summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
diff options
context:
space:
mode:
authorZihuan Zhang <zhangzihuan@kylinos.cn>2025-09-23 10:55:53 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-09-23 18:16:56 +0300
commit9a1aa642c1fb5a3776447182aaf37dfaafb36134 (patch)
tree4e32ea3f1c1f9acef79fc165392ea9abb3ba74b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
parent02d09026a88f227aa1f4687bd31d6ffc4970e8be (diff)
downloadlinux-9a1aa642c1fb5a3776447182aaf37dfaafb36134.tar.xz
cpufreq: Replace pointer subtraction with iteration macro
The cpufreq documentation suggests avoiding direct pointer subtraction when working with entries in driver_freq_table, as it is relatively costly. Instead, the recommended approach is to use the provided iteration macros, like cpufreq_for_each_valid_entry_idx(). Use cpufreq_for_each_entry_idx() instead of pointer subtraction in cpufreq_frequency_table_cpuinfo() which improves code clarity and follows the established cpufreq coding style. While at it, remove redundant local variable initialization from cpufreq_table_index_unsorted(). No functional change intended. Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn> Link: https://patch.msgid.link/20250923075553.45532-1-zhangzihuan@kylinos.cn [ rjw: Subject tweak, changelog edits, local variable definition tweak ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c')
0 files changed, 0 insertions, 0 deletions