diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/gpu/drm/amd/pm | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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')
50 files changed, 95 insertions, 95 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 28b178d0aff6..eca93a9d0b84 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -2746,7 +2746,7 @@ static int amdgpu_device_attr_create(struct amdgpu_device *adev, name, ret); } - attr_entry = kmalloc_obj(*attr_entry, GFP_KERNEL); + attr_entry = kmalloc_obj(*attr_entry); if (!attr_entry) return -ENOMEM; @@ -4592,7 +4592,7 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev) int ret; /* Setup the top `gpu_od` directory which holds all other OD interfaces */ - top_set = kzalloc_obj(*top_set, GFP_KERNEL); + top_set = kzalloc_obj(*top_set); if (!top_set) return -ENOMEM; list_add(&top_set->entry, &adev->pm.od_kobj_list); @@ -4629,7 +4629,7 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev) * The container is presented as a plain file under top `gpu_od` * directory. */ - attribute = kzalloc_obj(*attribute, GFP_KERNEL); + attribute = kzalloc_obj(*attribute); if (!attribute) { ret = -ENOMEM; goto err_out; @@ -4649,7 +4649,7 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev) goto err_out; } else { /* The container is presented as a sub directory. */ - sub_set = kzalloc_obj(*sub_set, GFP_KERNEL); + sub_set = kzalloc_obj(*sub_set); if (!sub_set) { ret = -ENOMEM; goto err_out; @@ -4679,7 +4679,7 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev) * With the container presented as a sub directory, the entry within * it is presented as a plain file under the sub directory. */ - attribute = kzalloc_obj(*attribute, GFP_KERNEL); + attribute = kzalloc_obj(*attribute); if (!attribute) { ret = -ENOMEM; goto err_out; 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; diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c index cd3036e33c5a..e558b81b25c9 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c @@ -41,7 +41,7 @@ static int amd_powerplay_create(struct amdgpu_device *adev) if (adev == NULL) return -EINVAL; - hwmgr = kzalloc_obj(struct pp_hwmgr, GFP_KERNEL); + hwmgr = kzalloc_obj(struct pp_hwmgr); if (hwmgr == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c index a1292d5b0a1c..37a85d8a3db2 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c @@ -200,7 +200,7 @@ static int get_platform_power_management_table( struct pp_hwmgr *hwmgr, ATOM_Tonga_PPM_Table *atom_ppm_table) { - struct phm_ppm_table *ptr = kzalloc_obj(*ptr, GFP_KERNEL); + struct phm_ppm_table *ptr = kzalloc_obj(*ptr); struct phm_ppt_v1_information *pp_table_information = (struct phm_ppt_v1_information *)(hwmgr->pptable); @@ -1142,7 +1142,7 @@ static int pp_tables_v1_0_initialize(struct pp_hwmgr *hwmgr) int result = 0; const ATOM_Tonga_POWERPLAYTABLE *powerplay_table; - hwmgr->pptable = kzalloc_obj(struct phm_ppt_v1_information, GFP_KERNEL); + hwmgr->pptable = kzalloc_obj(struct phm_ppt_v1_information); PP_ASSERT_WITH_CODE((NULL != hwmgr->pptable), "Failed to allocate hwmgr->pptable!", return -ENOMEM); diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c index 49dc20b790ad..d83e5c53bd43 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c @@ -550,7 +550,7 @@ static int smu10_hwmgr_backend_init(struct pp_hwmgr *hwmgr) int result = 0; struct smu10_hwmgr *data; - data = kzalloc_obj(struct smu10_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct smu10_hwmgr); if (data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c index a97136743723..e38222877f7e 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c @@ -2961,7 +2961,7 @@ static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr) struct smu7_hwmgr *data; int result = 0; - data = kzalloc_obj(struct smu7_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct smu7_hwmgr); if (data == NULL) return -ENOMEM; @@ -4652,7 +4652,7 @@ static const struct amdgpu_irq_src_funcs smu7_irq_funcs = { static int smu7_register_irq_handlers(struct pp_hwmgr *hwmgr) { struct amdgpu_irq_src *source = - kzalloc_obj(struct amdgpu_irq_src, GFP_KERNEL); + kzalloc_obj(struct amdgpu_irq_src); if (!source) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c index 5d20c41b3803..8133f2cc5e1d 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c @@ -1121,7 +1121,7 @@ static int smu8_hwmgr_backend_init(struct pp_hwmgr *hwmgr) int result = 0; struct smu8_hwmgr *data; - data = kzalloc_obj(struct smu8_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct smu8_hwmgr); if (data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c index 68ae1bc36a7f..29837c0f42ed 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c @@ -211,7 +211,7 @@ int phm_trim_voltage_table(struct pp_atomctrl_voltage_table *vol_table) PP_ASSERT_WITH_CODE((NULL != vol_table), "Voltage Table empty.", return -EINVAL); - table = kzalloc_obj(struct pp_atomctrl_voltage_table, GFP_KERNEL); + table = kzalloc_obj(struct pp_atomctrl_voltage_table); if (NULL == table) return -EINVAL; @@ -644,7 +644,7 @@ static const struct amdgpu_irq_src_funcs smu9_irq_funcs = { int smu9_register_irq_handlers(struct pp_hwmgr *hwmgr) { struct amdgpu_irq_src *source = - kzalloc_obj(struct amdgpu_irq_src, GFP_KERNEL); + kzalloc_obj(struct amdgpu_irq_src); if (!source) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c index 255fa6c96120..d9899cf7020b 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c @@ -831,7 +831,7 @@ static int vega10_hwmgr_backend_init(struct pp_hwmgr *hwmgr) struct pp_atomfwctrl_voltage_table vol_table; struct amdgpu_device *adev = hwmgr->adev; - data = kzalloc_obj(struct vega10_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct vega10_hwmgr); if (data == NULL) return -ENOMEM; @@ -1029,7 +1029,7 @@ static int vega10_trim_voltage_table(struct pp_hwmgr *hwmgr, PP_ASSERT_WITH_CODE(vol_table, "Voltage Table empty.", return -EINVAL); - table = kzalloc_obj(struct pp_atomfwctrl_voltage_table, GFP_KERNEL); + table = kzalloc_obj(struct pp_atomfwctrl_voltage_table); if (!table) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c index 2b9a1840a35a..b9a1ab27d995 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c @@ -1148,7 +1148,7 @@ static int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr) int result = 0; const ATOM_Vega10_POWERPLAYTABLE *powerplay_table; - hwmgr->pptable = kzalloc_obj(struct phm_ppt_v2_information, GFP_KERNEL); + hwmgr->pptable = kzalloc_obj(struct phm_ppt_v2_information); PP_ASSERT_WITH_CODE((hwmgr->pptable != NULL), "Failed to allocate hwmgr->pptable!", return -ENOMEM); diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c index eca05a6c868f..a9a85fd639b2 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c @@ -395,7 +395,7 @@ static int vega12_hwmgr_backend_init(struct pp_hwmgr *hwmgr) struct vega12_hwmgr *data; struct amdgpu_device *adev = hwmgr->adev; - data = kzalloc_obj(struct vega12_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct vega12_hwmgr); if (data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c index b8fad7417190..55e13f376039 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c @@ -263,7 +263,7 @@ static int vega12_pp_tables_initialize(struct pp_hwmgr *hwmgr) int result = 0; const ATOM_Vega12_POWERPLAYTABLE *powerplay_table; - hwmgr->pptable = kzalloc_obj(struct phm_ppt_v3_information, GFP_KERNEL); + hwmgr->pptable = kzalloc_obj(struct phm_ppt_v3_information); PP_ASSERT_WITH_CODE((hwmgr->pptable != NULL), "Failed to allocate hwmgr->pptable!", return -ENOMEM); diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c index 1dc84beaf440..dab9b78a9fc8 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c @@ -436,7 +436,7 @@ static int vega20_hwmgr_backend_init(struct pp_hwmgr *hwmgr) struct amdgpu_device *adev = hwmgr->adev; int result; - data = kzalloc_obj(struct vega20_hwmgr, GFP_KERNEL); + data = kzalloc_obj(struct vega20_hwmgr); if (data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c index 4316b5e4b848..36cb7aa80d07 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c @@ -336,7 +336,7 @@ static int vega20_pp_tables_initialize(struct pp_hwmgr *hwmgr) int result = 0; const ATOM_Vega20_POWERPLAYTABLE *powerplay_table; - hwmgr->pptable = kzalloc_obj(struct phm_ppt_v3_information, GFP_KERNEL); + hwmgr->pptable = kzalloc_obj(struct phm_ppt_v3_information); PP_ASSERT_WITH_CODE((hwmgr->pptable != NULL), "Failed to allocate hwmgr->pptable!", return -ENOMEM); diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c index 12a699a8c954..62ebec1c6fe3 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c @@ -2681,7 +2681,7 @@ static int ci_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) struct ci_mc_reg_table *ni_table = &smu_data->mc_reg_table; uint8_t module_index = ci_get_memory_modile_index(hwmgr); - table = kzalloc_obj(pp_atomctrl_mc_reg_table, GFP_KERNEL); + table = kzalloc_obj(pp_atomctrl_mc_reg_table); if (NULL == table) return -ENOMEM; @@ -2735,7 +2735,7 @@ static int ci_smu_init(struct pp_hwmgr *hwmgr) { struct ci_smumgr *ci_priv; - ci_priv = kzalloc_obj(struct ci_smumgr, GFP_KERNEL); + ci_priv = kzalloc_obj(struct ci_smumgr); if (ci_priv == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c index d7fd3a36ac95..7cf389e4717e 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c @@ -334,7 +334,7 @@ static int fiji_smu_init(struct pp_hwmgr *hwmgr) { struct fiji_smumgr *fiji_priv; - fiji_priv = kzalloc_obj(struct fiji_smumgr, GFP_KERNEL); + fiji_priv = kzalloc_obj(struct fiji_smumgr); if (fiji_priv == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c index b990def7d1aa..8f1bcbb482b5 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c @@ -261,7 +261,7 @@ static int iceland_smu_init(struct pp_hwmgr *hwmgr) { struct iceland_smumgr *iceland_priv; - iceland_priv = kzalloc_obj(struct iceland_smumgr, GFP_KERNEL); + iceland_priv = kzalloc_obj(struct iceland_smumgr); if (iceland_priv == NULL) return -ENOMEM; @@ -2608,7 +2608,7 @@ static int iceland_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) struct iceland_mc_reg_table *ni_table = &smu_data->mc_reg_table; uint8_t module_index = iceland_get_memory_modile_index(hwmgr); - table = kzalloc_obj(pp_atomctrl_mc_reg_table, GFP_KERNEL); + table = kzalloc_obj(pp_atomctrl_mc_reg_table); if (NULL == table) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c index 497a70988960..e59b87238e76 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c @@ -336,7 +336,7 @@ static int polaris10_smu_init(struct pp_hwmgr *hwmgr) { struct polaris10_smumgr *smu_data; - smu_data = kzalloc_obj(struct polaris10_smumgr, GFP_KERNEL); + smu_data = kzalloc_obj(struct polaris10_smumgr); if (smu_data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c index 22e0db4e097f..c9fdca88c96a 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c @@ -244,7 +244,7 @@ static int smu10_smu_init(struct pp_hwmgr *hwmgr) struct smu10_smumgr *priv; int r; - priv = kzalloc_obj(struct smu10_smumgr, GFP_KERNEL); + priv = kzalloc_obj(struct smu10_smumgr); if (!priv) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c index 9d6203998b5c..3e0068a6aeb2 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c @@ -333,7 +333,7 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr) if (!smu_data->toc) { struct SMU_DRAMData_TOC *toc; - smu_data->toc = kzalloc_obj(struct SMU_DRAMData_TOC, GFP_KERNEL); + smu_data->toc = kzalloc_obj(struct SMU_DRAMData_TOC); if (!smu_data->toc) return -ENOMEM; toc = smu_data->toc; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.c index 82f4f466db8a..f3f2b8fe8d63 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.c @@ -758,7 +758,7 @@ static int smu8_smu_init(struct pp_hwmgr *hwmgr) int ret = 0; struct smu8_smumgr *smu8_smu; - smu8_smu = kzalloc_obj(struct smu8_smumgr, GFP_KERNEL); + smu8_smu = kzalloc_obj(struct smu8_smumgr); if (smu8_smu == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c index 95d87b12df04..28fe988c2262 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c @@ -228,7 +228,7 @@ static int tonga_smu_init(struct pp_hwmgr *hwmgr) { struct tonga_smumgr *tonga_priv; - tonga_priv = kzalloc_obj(struct tonga_smumgr, GFP_KERNEL); + tonga_priv = kzalloc_obj(struct tonga_smumgr); if (tonga_priv == NULL) return -ENOMEM; @@ -3072,7 +3072,7 @@ static int tonga_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) struct tonga_mc_reg_table *ni_table = &smu_data->mc_reg_table; uint8_t module_index = tonga_get_memory_modile_index(hwmgr); - table = kzalloc_obj(pp_atomctrl_mc_reg_table, GFP_KERNEL); + table = kzalloc_obj(pp_atomctrl_mc_reg_table); if (table == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c index fe960e3c1010..39192adf441f 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c @@ -218,7 +218,7 @@ static int vega10_smu_init(struct pp_hwmgr *hwmgr) if (ret || !info.kptr) return -EINVAL; - priv = kzalloc_obj(struct vega10_smumgr, GFP_KERNEL); + priv = kzalloc_obj(struct vega10_smumgr); if (!priv) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c index bd846c4f09a1..99db4cf8e11d 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c @@ -221,7 +221,7 @@ static int vega12_smu_init(struct pp_hwmgr *hwmgr) if (ret || !info.kptr) return -EINVAL; - priv = kzalloc_obj(struct vega12_smumgr, GFP_KERNEL); + priv = kzalloc_obj(struct vega12_smumgr); if (!priv) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c index 7dda3ad13861..b982c03f9e9a 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c @@ -430,7 +430,7 @@ static int vega20_smu_init(struct pp_hwmgr *hwmgr) if (ret || !info.kptr) return -EINVAL; - priv = kzalloc_obj(struct vega20_smumgr, GFP_KERNEL); + priv = kzalloc_obj(struct vega20_smumgr); if (!priv) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c index 57eed236baa4..cca6693853ec 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c @@ -83,7 +83,7 @@ static int vegam_smu_init(struct pp_hwmgr *hwmgr) { struct vegam_smumgr *smu_data; - smu_data = kzalloc_obj(struct vegam_smumgr, GFP_KERNEL); + smu_data = kzalloc_obj(struct vegam_smumgr); if (smu_data == NULL) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 2f02410376b9..b05c8bbdf2f3 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -803,7 +803,7 @@ static int smu_early_init(struct amdgpu_ip_block *ip_block) struct smu_context *smu; int r; - smu = kzalloc_obj(struct smu_context, GFP_KERNEL); + smu = kzalloc_obj(struct smu_context); if (!smu) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c index 747879cbb4e6..ff3776eb0c69 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c @@ -267,7 +267,7 @@ static int arcturus_tables_init(struct smu_context *smu) sizeof(DpmActivityMonitorCoeffInt_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) return -ENOMEM; smu_table->metrics_time = 0; @@ -314,7 +314,7 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu) smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context); smu_dpm->dpm_policies = - kzalloc_obj(struct smu_dpm_policy_ctxt, GFP_KERNEL); + kzalloc_obj(struct smu_dpm_policy_ctxt); if (!smu_dpm->dpm_policies) return -ENOMEM; @@ -1579,7 +1579,7 @@ static int arcturus_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c index 97a785182e58..4e70308a455e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c @@ -97,7 +97,7 @@ static int cyan_skillfish_tables_init(struct smu_context *smu) PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err0_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 48c75e293541..4f12543270c3 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -516,7 +516,7 @@ static int navi10_tables_init(struct smu_context *smu) dummy_read_1_table->align = PAGE_SIZE; dummy_read_1_table->domain = AMDGPU_GEM_DOMAIN_VRAM; - smu_table->metrics_table = kzalloc_obj(SmuMetrics_NV1X_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_NV1X_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -527,7 +527,7 @@ static int navi10_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; @@ -2793,7 +2793,7 @@ static int navi10_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index 2c6378c51333..317cc269cc06 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -555,7 +555,7 @@ static int sienna_cichlid_tables_init(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_DRIVER_SMU_CONFIG, sizeof(DriverSmuConfigExternal_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -566,7 +566,7 @@ static int sienna_cichlid_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; @@ -2507,7 +2507,7 @@ static int sienna_cichlid_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c index 87502f9b5ca4..12b052d920f5 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c @@ -378,7 +378,7 @@ int smu_v11_0_init_smc_tables(struct smu_context *smu) } smu_table->max_sustainable_clocks = - kzalloc_obj(struct smu_11_0_max_sustainable_clocks, GFP_KERNEL); + kzalloc_obj(struct smu_11_0_max_sustainable_clocks); if (!smu_table->max_sustainable_clocks) { ret = -ENOMEM; goto err1_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index 86d8e5df1eb1..16eb73ba6b0c 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -253,11 +253,11 @@ static int vangogh_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err3_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c index f4951630375b..186020ed6708 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c @@ -157,16 +157,16 @@ static int renoir_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err0_out; - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err1_out; smu_table->metrics_time = 0; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index 618d0098208d..35495da90ee7 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c @@ -245,7 +245,7 @@ static int aldebaran_tables_init(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_ECCINFO, sizeof(EccInfoTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) return -ENOMEM; smu_table->metrics_time = 0; @@ -301,7 +301,7 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu) smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context); smu_dpm->dpm_policies = - kzalloc_obj(struct smu_dpm_policy_ctxt, GFP_KERNEL); + kzalloc_obj(struct smu_dpm_policy_ctxt); if (!smu_dpm->dpm_policies) return -ENOMEM; @@ -1422,7 +1422,7 @@ static int aldebaran_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c index 531fb265c948..f06608df14c4 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c @@ -449,7 +449,7 @@ int smu_v13_0_init_smc_tables(struct smu_context *smu) } smu_table->max_sustainable_clocks = - kzalloc_obj(struct smu_13_0_max_sustainable_clocks, GFP_KERNEL); + kzalloc_obj(struct smu_13_0_max_sustainable_clocks); if (!smu_table->max_sustainable_clocks) { ret = -ENOMEM; goto err1_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c index 013942fac955..a0d146a99f2a 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c @@ -495,7 +495,7 @@ static int smu_v13_0_0_tables_init(struct smu_context *smu) sizeof(WifiBandEntryTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -506,7 +506,7 @@ static int smu_v13_0_0_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; @@ -2638,7 +2638,7 @@ static int smu_v13_0_0_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c index 5ada870f8b65..32d5e2170d80 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c @@ -223,7 +223,7 @@ static int smu_v13_0_12_fru_get_product_info(struct smu_context *smu, struct amdgpu_device *adev = smu->adev; if (!adev->fru_info) { - adev->fru_info = kzalloc_obj(*adev->fru_info, GFP_KERNEL); + adev->fru_info = kzalloc_obj(*adev->fru_info); if (!adev->fru_info) return -ENOMEM; } diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c index 9e8b330f34dc..5b1a038d6a19 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c @@ -161,16 +161,16 @@ static int smu_v13_0_4_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err0_out; - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err1_out; smu_table->metrics_time = 0; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c index 25de5e2dde83..d534723fef91 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c @@ -136,16 +136,16 @@ static int smu_v13_0_5_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err0_out; - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err1_out; smu_table->metrics_time = 0; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index b85130bd8c08..896b51c8a9a7 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c @@ -586,7 +586,7 @@ static int smu_v13_0_6_tables_init(struct smu_context *smu) return -ENOMEM; smu_table->metrics_time = 0; - driver_pptable = kzalloc_obj(struct PPTable_t, GFP_KERNEL); + driver_pptable = kzalloc_obj(struct PPTable_t); if (!driver_pptable) return -ENOMEM; @@ -690,13 +690,13 @@ static int smu_v13_0_6_allocate_dpm_context(struct smu_context *smu) struct smu_dpm_policy *policy; smu_dpm->dpm_context = - kzalloc_obj(struct smu_13_0_dpm_context, GFP_KERNEL); + kzalloc_obj(struct smu_13_0_dpm_context); if (!smu_dpm->dpm_context) return -ENOMEM; smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context); smu_dpm->dpm_policies = - kzalloc_obj(struct smu_dpm_policy_ctxt, GFP_KERNEL); + kzalloc_obj(struct smu_dpm_policy_ctxt); if (!smu_dpm->dpm_policies) { kfree(smu_dpm->dpm_context); return -ENOMEM; @@ -2341,7 +2341,7 @@ static int smu_v13_0_6_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c index 6aefebdb0bad..b82034f3bc2a 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c @@ -530,7 +530,7 @@ static int smu_v13_0_7_tables_init(struct smu_context *smu) sizeof(WifiBandEntryTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -541,7 +541,7 @@ static int smu_v13_0_7_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c index e3700c704016..f43a91ac6970 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c @@ -163,16 +163,16 @@ static int yellow_carp_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err0_out; - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err1_out; smu_table->metrics_time = 0; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c index 2cfa8eb70cb3..1334776dd034 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c @@ -439,7 +439,7 @@ int smu_v14_0_init_smc_tables(struct smu_context *smu) } smu_table->max_sustainable_clocks = - kzalloc_obj(struct smu_14_0_max_sustainable_clocks, GFP_KERNEL); + kzalloc_obj(struct smu_14_0_max_sustainable_clocks); if (!smu_table->max_sustainable_clocks) { ret = -ENOMEM; goto err1_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c index a863e637e37f..2353524b8821 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c @@ -197,7 +197,7 @@ static int smu_v14_0_0_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -206,7 +206,7 @@ static int smu_v14_0_0_init_smc_tables(struct smu_context *smu) if (!smu_table->clocks_table) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c index b051a1f58760..fc50552771a4 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c @@ -393,7 +393,7 @@ static int smu_v14_0_2_tables_init(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_ECCINFO, sizeof(EccInfoTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetricsExternal_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; @@ -404,7 +404,7 @@ static int smu_v14_0_2_tables_init(struct smu_context *smu) if (ret) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; @@ -1876,7 +1876,7 @@ static int smu_v14_0_2_i2c_xfer(struct i2c_adapter *i2c_adap, if (!adev->pm.dpm_enabled) return -EBUSY; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c index 2070cb31f185..1fbc104afa6a 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c @@ -408,7 +408,7 @@ int smu_v15_0_init_smc_tables(struct smu_context *smu) } smu_table->max_sustainable_clocks = - kzalloc_obj(struct smu_15_0_max_sustainable_clocks, GFP_KERNEL); + kzalloc_obj(struct smu_15_0_max_sustainable_clocks); if (!smu_table->max_sustainable_clocks) { ret = -ENOMEM; goto err1_out; diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c index 18c31a50d281..49cf2b9d931e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c @@ -173,16 +173,16 @@ static int smu_v15_0_0_init_smc_tables(struct smu_context *smu) SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); - smu_table->metrics_table = kzalloc_obj(SmuMetrics_t, GFP_KERNEL); + smu_table->metrics_table = kzalloc_obj(SmuMetrics_t); if (!smu_table->metrics_table) goto err0_out; smu_table->metrics_time = 0; - smu_table->clocks_table = kzalloc_obj(DpmClocks_t, GFP_KERNEL); + smu_table->clocks_table = kzalloc_obj(DpmClocks_t); if (!smu_table->clocks_table) goto err1_out; - smu_table->watermarks_table = kzalloc_obj(Watermarks_t, GFP_KERNEL); + smu_table->watermarks_table = kzalloc_obj(Watermarks_t); if (!smu_table->watermarks_table) goto err2_out; |
