summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/legacy-dpm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/gpu/drm/amd/pm/legacy-dpm
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/legacy-dpm')
-rw-r--r--drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c4
-rw-r--r--drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c2
-rw-r--r--drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
index 5d0c0c5a706b..7a0d6e05e83b 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
@@ -2735,7 +2735,7 @@ static int kv_parse_power_table(struct amdgpu_device *adev)
non_clock_array_index = power_state->v2.nonClockInfoIndex;
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
&non_clock_info_array->nonClockInfo[non_clock_array_index];
- ps = kzalloc_obj(struct kv_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct kv_ps);
if (ps == NULL)
return -ENOMEM;
adev->pm.dpm.ps[i].ps_priv = ps;
@@ -2782,7 +2782,7 @@ static int kv_dpm_init(struct amdgpu_device *adev)
struct kv_power_info *pi;
int ret, i;
- pi = kzalloc_obj(struct kv_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct kv_power_info);
if (pi == NULL)
return -ENOMEM;
adev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
index c41bcc8a7efb..37d704ac3841 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
@@ -502,7 +502,7 @@ int amdgpu_parse_extended_power_table(struct amdgpu_device *adev)
(mode_info->atom_context->bios + data_offset +
le16_to_cpu(ext_hdr->usPPMTableOffset));
adev->pm.dpm.dyn_state.ppm_table =
- kzalloc_obj(struct amdgpu_ppm_table, GFP_KERNEL);
+ kzalloc_obj(struct amdgpu_ppm_table);
if (!adev->pm.dpm.dyn_state.ppm_table)
return -ENOMEM;
adev->pm.dpm.dyn_state.ppm_table->ppm_design = ppm->ucPpmDesign;
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index b4fc0106f973..c81327da1f72 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -2586,7 +2586,7 @@ static int si_initialize_smc_dte_tables(struct amdgpu_device *adev)
if (dte_data->k <= 0)
return -EINVAL;
- dte_tables = kzalloc_obj(Smc_SIslands_DTE_Configuration, GFP_KERNEL);
+ dte_tables = kzalloc_obj(Smc_SIslands_DTE_Configuration);
if (dte_tables == NULL) {
si_pi->enable_dte = false;
return -ENOMEM;
@@ -2767,7 +2767,7 @@ static int si_initialize_smc_cac_tables(struct amdgpu_device *adev)
if (ni_pi->enable_cac == false)
return 0;
- cac_tables = kzalloc_obj(PP_SIslands_CacConfig, GFP_KERNEL);
+ cac_tables = kzalloc_obj(PP_SIslands_CacConfig);
if (!cac_tables)
return -ENOMEM;
@@ -2964,7 +2964,7 @@ static int si_init_smc_spll_table(struct amdgpu_device *adev)
if (si_pi->spll_table_start == 0)
return -EINVAL;
- spll_table = kzalloc_obj(SMC_SISLANDS_SPLL_DIV_TABLE, GFP_KERNEL);
+ spll_table = kzalloc_obj(SMC_SISLANDS_SPLL_DIV_TABLE);
if (spll_table == NULL)
return -ENOMEM;
@@ -6054,7 +6054,7 @@ static int si_initialize_mc_reg_table(struct amdgpu_device *adev)
u8 module_index = rv770_get_memory_module_index(adev);
int ret;
- table = kzalloc_obj(struct atom_mc_reg_table, GFP_KERNEL);
+ table = kzalloc_obj(struct atom_mc_reg_table);
if (!table)
return -ENOMEM;
@@ -7352,7 +7352,7 @@ static int si_parse_power_table(struct amdgpu_device *adev)
non_clock_array_index = power_state->v2.nonClockInfoIndex;
non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
&non_clock_info_array->nonClockInfo[non_clock_array_index];
- ps = kzalloc_obj(struct si_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct si_ps);
if (ps == NULL)
return -ENOMEM;
adev->pm.dpm.ps[i].ps_priv = ps;
@@ -7405,7 +7405,7 @@ static int si_dpm_init(struct amdgpu_device *adev)
struct atom_clock_dividers dividers;
int ret;
- si_pi = kzalloc_obj(struct si_power_info, GFP_KERNEL);
+ si_pi = kzalloc_obj(struct si_power_info);
if (si_pi == NULL)
return -ENOMEM;
adev->pm.dpm.priv = si_pi;