summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
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
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')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/aldebaran.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c12
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_job.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c20
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/atom.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/atombios_encoders.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v10_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v6_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v8_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mes_userqueue.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/umc_v12_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_chardev.c4
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device.c6
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c4
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_events.c10
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c4
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c4
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_priv.h2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process.c6
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c4
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_queue.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c2
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_svm.c8
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_topology.c10
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c30
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c16
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c10
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c2
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c8
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/vector.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/bios_parser.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c22
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_sink.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_state.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_stream.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_surface.c6
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_abm.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_audio.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c10
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c8
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/link/link_factory.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c24
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c28
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c24
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c26
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c30
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c30
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c30
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c32
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c26
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c32
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c32
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c32
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c20
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c20
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c40
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c40
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c38
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c38
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c36
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c34
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c38
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c38
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c38
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c36
-rw-r--r--drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c2
-rw-r--r--drivers/gpu/drm/amd/display/modules/color/color_gamma.c8
-rw-r--r--drivers/gpu/drm/amd/display/modules/freesync/freesync.c2
-rw-r--r--drivers/gpu/drm/amd/display/modules/vmid/vmid.c2
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_pm.c10
-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
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c4
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c4
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c8
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c4
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c4
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c6
-rw-r--r--drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c2
-rw-r--r--drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c2
-rw-r--r--drivers/gpu/drm/amd/ras/rascore/ras_core.c4
-rw-r--r--drivers/gpu/drm/amd/ras/rascore/ras_log_ring.c2
-rw-r--r--drivers/gpu/drm/amd/ras/rascore/ras_umc.c8
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_crtc.c4
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c2
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_plane.c6
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c16
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c2
-rw-r--r--drivers/gpu/drm/arm/malidp_crtc.c4
-rw-r--r--drivers/gpu/drm/arm/malidp_mw.c2
-rw-r--r--drivers/gpu/drm/arm/malidp_planes.c4
-rw-r--r--drivers/gpu/drm/armada/armada_crtc.c4
-rw-r--r--drivers/gpu/drm/armada/armada_fb.c2
-rw-r--r--drivers/gpu/drm/armada/armada_gem.c8
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c4
-rw-r--r--drivers/gpu/drm/armada/armada_plane.c2
-rw-r--r--drivers/gpu/drm/ast/ast_dp.c2
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c4
-rw-r--r--drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c4
-rw-r--r--drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c2
-rw-r--r--drivers/gpu/drm/bridge/aux-bridge.c2
-rw-r--r--drivers/gpu/drm/bridge/aux-hpd-bridge.c2
-rw-r--r--drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c6
-rw-r--r--drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c6
-rw-r--r--drivers/gpu/drm/bridge/display-connector.c4
-rw-r--r--drivers/gpu/drm/bridge/imx/imx8qm-ldb.c2
-rw-r--r--drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c2
-rw-r--r--drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c2
-rw-r--r--drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c2
-rw-r--r--drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c2
-rw-r--r--drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c2
-rw-r--r--drivers/gpu/drm/bridge/ite-it6263.c2
-rw-r--r--drivers/gpu/drm/bridge/samsung-dsim.c2
-rw-r--r--drivers/gpu/drm/bridge/sil-sii8620.c2
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-dp.c2
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c2
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c2
-rw-r--r--drivers/gpu/drm/bridge/ti-tfp410.c2
-rw-r--r--drivers/gpu/drm/clients/drm_fbdev_client.c2
-rw-r--r--drivers/gpu/drm/clients/drm_log.c4
-rw-r--r--drivers/gpu/drm/display/drm_dp_aux_bus.c2
-rw-r--r--drivers/gpu/drm/display/drm_dp_aux_dev.c2
-rw-r--r--drivers/gpu/drm/display/drm_dp_mst_topology.c32
-rw-r--r--drivers/gpu/drm/display/drm_dp_tunnel.c14
-rw-r--r--drivers/gpu/drm/display/drm_hdmi_cec_helper.c2
-rw-r--r--drivers/gpu/drm/drm_atomic.c2
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c6
-rw-r--r--drivers/gpu/drm/drm_atomic_state_helper.c14
-rw-r--r--drivers/gpu/drm/drm_atomic_uapi.c2
-rw-r--r--drivers/gpu/drm/drm_auth.c2
-rw-r--r--drivers/gpu/drm/drm_blend.c2
-rw-r--r--drivers/gpu/drm/drm_bridge.c2
-rw-r--r--drivers/gpu/drm/drm_client.c2
-rw-r--r--drivers/gpu/drm/drm_client_modeset.c12
-rw-r--r--drivers/gpu/drm/drm_colorop.c4
-rw-r--r--drivers/gpu/drm/drm_connector.c2
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
-rw-r--r--drivers/gpu/drm/drm_damage_helper.c2
-rw-r--r--drivers/gpu/drm/drm_debugfs_crc.c2
-rw-r--r--drivers/gpu/drm/drm_edid.c4
-rw-r--r--drivers/gpu/drm/drm_file.c2
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c2
-rw-r--r--drivers/gpu/drm/drm_gem.c2
-rw-r--r--drivers/gpu/drm/drm_gem_atomic_helper.c2
-rw-r--r--drivers/gpu/drm/drm_gem_dma_helper.c4
-rw-r--r--drivers/gpu/drm/drm_gem_framebuffer_helper.c2
-rw-r--r--drivers/gpu/drm/drm_gem_shmem_helper.c2
-rw-r--r--drivers/gpu/drm/drm_gem_vram_helper.c6
-rw-r--r--drivers/gpu/drm/drm_gpusvm.c6
-rw-r--r--drivers/gpu/drm/drm_gpuvm.c14
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c2
-rw-r--r--drivers/gpu/drm/drm_modes.c2
-rw-r--r--drivers/gpu/drm/drm_pagemap.c4
-rw-r--r--drivers/gpu/drm/drm_pagemap_util.c6
-rw-r--r--drivers/gpu/drm/drm_plane.c2
-rw-r--r--drivers/gpu/drm/drm_prime.c8
-rw-r--r--drivers/gpu/drm/drm_privacy_screen.c2
-rw-r--r--drivers/gpu/drm/drm_property.c4
-rw-r--r--drivers/gpu/drm/drm_self_refresh_helper.c2
-rw-r--r--drivers/gpu/drm/drm_syncobj.c8
-rw-r--r--drivers/gpu/drm/drm_sysfs.c4
-rw-r--r--drivers/gpu/drm/drm_vblank.c4
-rw-r--r--drivers/gpu/drm/drm_vma_manager.c2
-rw-r--r--drivers/gpu/drm/drm_writeback.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_drv.c4
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem.c4
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c6
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_iommu.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c4
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_g2d.c8
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c4
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c4
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_plane.c4
-rw-r--r--drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_crt.c4
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_display.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_dp.c6
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_hdmi.c6
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_lvds.c6
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c2
-rw-r--r--drivers/gpu/drm/gma500/gem.c2
-rw-r--r--drivers/gpu/drm/gma500/intel_bios.c6
-rw-r--r--drivers/gpu/drm/gma500/intel_gmbus.c2
-rw-r--r--drivers/gpu/drm/gma500/intel_i2c.c2
-rw-r--r--drivers/gpu/drm/gma500/mid_bios.c2
-rw-r--r--drivers/gpu/drm/gma500/mmu.c6
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_hdmi.c6
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c2
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_lvds.c6
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_display.c4
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_lvds.c6
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_sdvo.c2
-rw-r--r--drivers/gpu/drm/gud/gud_connector.c4
-rw-r--r--drivers/gpu/drm/gud/gud_drv.c6
-rw-r--r--drivers/gpu/drm/i915/display/dvo_ch7017.c2
-rw-r--r--drivers/gpu/drm/i915/display/dvo_ch7xxx.c2
-rw-r--r--drivers/gpu/drm/i915/display/dvo_ivch.c2
-rw-r--r--drivers/gpu/drm/i915/display/dvo_ns2501.c2
-rw-r--r--drivers/gpu/drm/i915/display/dvo_sil164.c2
-rw-r--r--drivers/gpu/drm/i915/display/dvo_tfp410.c2
-rw-r--r--drivers/gpu/drm/i915/display/icl_dsi.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_atomic.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_bios.c10
-rw-r--r--drivers/gpu/drm/i915/display/intel_bw.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_cdclk.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_colorop.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_connector.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_crt.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_crtc.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_dbuf_bw.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_display.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_display_device.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_display_rps.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dmc.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_mst.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dpt.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dsb.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dsb_buffer.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_dsi.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_dvo.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_encoder.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_fb.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_fbc.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_global_state.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_gmbus.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_lpe_audio.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_lvds.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_opregion.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_overlay.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_plane.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_pmdemand.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_rom.c4
-rw-r--r--drivers/gpu/drm/i915/display/intel_sdvo.c8
-rw-r--r--drivers/gpu/drm/i915/display/intel_tc.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_tv.c2
-rw-r--r--drivers/gpu/drm/i915/display/skl_watermark.c4
-rw-r--r--drivers/gpu/drm/i915/display/vlv_dsi.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_clflush.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_context.c10
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c4
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_internal.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_mman.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_pages.c4
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_phys.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_stolen.c6
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_ttm.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_userptr.c4
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c2
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c6
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/mock_context.c2
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c2
-rw-r--r--drivers/gpu/drm/i915/gt/gen6_ppgtt.c2
-rw-r--r--drivers/gpu/drm/i915/gt/gen8_ppgtt.c2
-rw-r--r--drivers/gpu/drm/i915/gt/intel_breadcrumbs.c2
-rw-r--r--drivers/gpu/drm/i915/gt/intel_engine_cs.c4
-rw-r--r--drivers/gpu/drm/i915/gt/intel_gsc.c2
-rw-r--r--drivers/gpu/drm/i915/gt/intel_ring.c2
-rw-r--r--drivers/gpu/drm/i915/gt/intel_timeline.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_execlists.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_hangcheck.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_migrate.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_rc6.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_slpc.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_timeline.c2
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_workarounds.c4
-rw-r--r--drivers/gpu/drm/i915/gt/shmem_utils.c2
-rw-r--r--drivers/gpu/drm/i915/gt/sysfs_engines.c4
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c6
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c6
-rw-r--r--drivers/gpu/drm/i915/gt/uc/selftest_guc.c2
-rw-r--r--drivers/gpu/drm/i915/gvt/cmd_parser.c4
-rw-r--r--drivers/gpu/drm/i915/gvt/display.c4
-rw-r--r--drivers/gpu/drm/i915/gvt/dmabuf.c6
-rw-r--r--drivers/gpu/drm/i915/gvt/gtt.c6
-rw-r--r--drivers/gpu/drm/i915/gvt/handlers.c2
-rw-r--r--drivers/gpu/drm/i915/gvt/kvmgt.c6
-rw-r--r--drivers/gpu/drm/i915/gvt/page_track.c2
-rw-r--r--drivers/gpu/drm/i915/gvt/sched_policy.c4
-rw-r--r--drivers/gpu/drm/i915/gvt/vgpu.c4
-rw-r--r--drivers/gpu/drm/i915/i915_active.c4
-rw-r--r--drivers/gpu/drm/i915/i915_drm_client.c2
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
-rw-r--r--drivers/gpu/drm/i915/i915_hdcp_gsc.c2
-rw-r--r--drivers/gpu/drm/i915/i915_hwmon.c2
-rw-r--r--drivers/gpu/drm/i915/i915_perf.c10
-rw-r--r--drivers/gpu/drm/i915/i915_pmu.c6
-rw-r--r--drivers/gpu/drm/i915/i915_scheduler.c2
-rw-r--r--drivers/gpu/drm/i915/i915_ttm_buddy_manager.c4
-rw-r--r--drivers/gpu/drm/i915/i915_vma.c8
-rw-r--r--drivers/gpu/drm/i915/intel_memory_region.c2
-rw-r--r--drivers/gpu/drm/i915/intel_uncore.c2
-rw-r--r--drivers/gpu/drm/i915/pxp/intel_pxp.c2
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_active.c2
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_gem_evict.c2
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_perf.c4
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_request.c20
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_sw_fence.c6
-rw-r--r--drivers/gpu/drm/i915/selftests/mock_gem_device.c2
-rw-r--r--drivers/gpu/drm/i915/selftests/mock_gtt.c2
-rw-r--r--drivers/gpu/drm/i915/vlv_suspend.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_ccb.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_context.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_drv.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_free_list.c4
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_trace.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_gem.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_hwrt.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_job.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_mmu.c8
-rw-r--r--drivers/gpu/drm/imagination/pvr_power.c4
-rw-r--r--drivers/gpu/drm/imagination/pvr_queue.c4
-rw-r--r--drivers/gpu/drm/imagination/pvr_sync.c2
-rw-r--r--drivers/gpu/drm/imagination/pvr_vm.c12
-rw-r--r--drivers/gpu/drm/imx/dcss/dcss-plane.c2
-rw-r--r--drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c4
-rw-r--r--drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c4
-rw-r--r--drivers/gpu/drm/imx/ipuv3/parallel-display.c4
-rw-r--r--drivers/gpu/drm/ingenic/ingenic-drm-drv.c4
-rw-r--r--drivers/gpu/drm/ingenic/ingenic-ipu.c2
-rw-r--r--drivers/gpu/drm/kmb/kmb_dsi.c4
-rw-r--r--drivers/gpu/drm/lima/lima_ctx.c2
-rw-r--r--drivers/gpu/drm/lima/lima_drv.c2
-rw-r--r--drivers/gpu/drm/lima/lima_gem.c4
-rw-r--r--drivers/gpu/drm/lima/lima_vm.c4
-rw-r--r--drivers/gpu/drm/loongson/lsdc_crtc.c4
-rw-r--r--drivers/gpu/drm/loongson/lsdc_gfxpll.c2
-rw-r--r--drivers/gpu/drm/loongson/lsdc_i2c.c2
-rw-r--r--drivers/gpu/drm/loongson/lsdc_pixpll.c2
-rw-r--r--drivers/gpu/drm/loongson/lsdc_ttm.c4
-rw-r--r--drivers/gpu/drm/mediatek/mtk_crtc.c4
-rw-r--r--drivers/gpu/drm/mediatek/mtk_dp.c2
-rw-r--r--drivers/gpu/drm/mediatek/mtk_gem.c4
-rw-r--r--drivers/gpu/drm/mediatek/mtk_plane.c4
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c2
-rw-r--r--drivers/gpu/drm/msm/adreno/a2xx_gpu.c4
-rw-r--r--drivers/gpu/drm/msm/adreno/a2xx_gpummu.c2
-rw-r--r--drivers/gpu/drm/msm/adreno/a3xx_gpu.c4
-rw-r--r--drivers/gpu/drm/msm/adreno/a4xx_gpu.c4
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.c4
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gpu.c2
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c2
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c6
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c2
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c2
-rw-r--r--drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c2
-rw-r--r--drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c2
-rw-r--r--drivers/gpu/drm/msm/disp/msm_disp_snapshot.c2
-rw-r--r--drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c2
-rw-r--r--drivers/gpu/drm/msm/dp/dp_ctrl.c2
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c2
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_i2c.c2
-rw-r--r--drivers/gpu/drm/msm/msm_debugfs.c2
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c2
-rw-r--r--drivers/gpu/drm/msm/msm_fb.c2
-rw-r--r--drivers/gpu/drm/msm/msm_fence.c4
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c4
-rw-r--r--drivers/gpu/drm/msm/msm_gem_vma.c6
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c2
-rw-r--r--drivers/gpu/drm/msm/msm_iommu.c6
-rw-r--r--drivers/gpu/drm/msm/msm_perf.c2
-rw-r--r--drivers/gpu/drm/msm/msm_rd.c2
-rw-r--r--drivers/gpu/drm/msm/msm_ringbuffer.c2
-rw-r--r--drivers/gpu/drm/msm/msm_submitqueue.c4
-rw-r--r--drivers/gpu/drm/mxsfb/lcdif_kms.c4
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/crtc.c4
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/dac.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/dfp.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/tvnv04.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/tvnv17.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/core507d.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/disp.c16
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head.c6
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/lut.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndw.c8
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.c10
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_backlight.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c6
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_debugfs.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_dmem.c6
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_exec.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_hwmon.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_led.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_sched.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_sgdma.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_svm.c6
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_ttm.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_uvmm.c10
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_vmm.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv04_fence.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv10_fence.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv17_fence.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv50_fence.c4
-rw-r--r--drivers/gpu/drm/nouveau/nv84_fence.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvif/fifo.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvif/mmu.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvif/object.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvif/outp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvif/vmm.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/client.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/engine.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/intr.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/memory.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/mm.c8
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/object.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/oproxy.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/subdev.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/uevent.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/user.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf119.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/usergv100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/falcon.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sec2/r535.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gp10b.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv40.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/r535.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c8
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fsp/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/engine.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvdec.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fifo.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/vmm.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxch.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busgf119.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv04.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv4e.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c10
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/fannil.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/vfn/r535.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dss.c4
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c6
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_tiler.c6
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c6
-rw-r--r--drivers/gpu/drm/omapdrm/omap_encoder.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fb.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c12
-rw-r--r--drivers/gpu/drm/omapdrm/omap_irq.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_overlay.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_plane.c6
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_drv.c6
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_gem.c4
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_job.c4
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_mmu.c2
-rw-r--r--drivers/gpu/drm/panthor/panthor_drv.c4
-rw-r--r--drivers/gpu/drm/panthor/panthor_gem.c4
-rw-r--r--drivers/gpu/drm/panthor/panthor_heap.c6
-rw-r--r--drivers/gpu/drm/panthor/panthor_mmu.c8
-rw-r--r--drivers/gpu/drm/panthor/panthor_sched.c10
-rw-r--r--drivers/gpu/drm/qxl/qxl_cmd.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c4
-rw-r--r--drivers/gpu/drm/qxl/qxl_image.c4
-rw-r--r--drivers/gpu/drm/qxl/qxl_object.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_release.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_ttm.c2
-rw-r--r--drivers/gpu/drm/radeon/atom.c2
-rw-r--r--drivers/gpu/drm/radeon/atombios_encoders.c4
-rw-r--r--drivers/gpu/drm/radeon/btc_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/ci_dpm.c6
-rw-r--r--drivers/gpu/drm/radeon/cypress_dpm.c2
-rw-r--r--drivers/gpu/drm/radeon/evergreen_cs.c2
-rw-r--r--drivers/gpu/drm/radeon/kv_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/ni_dpm.c10
-rw-r--r--drivers/gpu/drm/radeon/r100.c2
-rw-r--r--drivers/gpu/drm/radeon/r300.c2
-rw-r--r--drivers/gpu/drm/radeon/r600_cs.c2
-rw-r--r--drivers/gpu/drm/radeon/r600_dpm.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_agp.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c12
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c6
-rw-r--r--drivers/gpu/drm/radeon/radeon_fbdev.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_i2c.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_encoders.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_semaphore.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_test.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_vm.c4
-rw-r--r--drivers/gpu/drm/radeon/rs780_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/rv6xx_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/rv770_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/si_dpm.c12
-rw-r--r--drivers/gpu/drm/radeon/sumo_dpm.c4
-rw-r--r--drivers/gpu/drm/radeon/trinity_dpm.c4
-rw-r--r--drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c2
-rw-r--r--drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c2
-rw-r--r--drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c2
-rw-r--r--drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c6
-rw-r--r--drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c6
-rw-r--r--drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c2
-rw-r--r--drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c4
-rw-r--r--drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c2
-rw-r--r--drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c2
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_fb.c2
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_gem.c4
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop2.c2
-rw-r--r--drivers/gpu/drm/sitronix/st7920.c8
-rw-r--r--drivers/gpu/drm/solomon/ssd130x.c4
-rw-r--r--drivers/gpu/drm/sti/sti_drv.c2
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_layer.c4
-rw-r--r--drivers/gpu/drm/sysfb/drm_sysfb_modeset.c8
-rw-r--r--drivers/gpu/drm/tegra/dc.c10
-rw-r--r--drivers/gpu/drm/tegra/drm.c8
-rw-r--r--drivers/gpu/drm/tegra/dsi.c2
-rw-r--r--drivers/gpu/drm/tegra/fb.c2
-rw-r--r--drivers/gpu/drm/tegra/gem.c10
-rw-r--r--drivers/gpu/drm/tegra/hub.c4
-rw-r--r--drivers/gpu/drm/tegra/plane.c4
-rw-r--r--drivers/gpu/drm/tegra/sor.c2
-rw-r--r--drivers/gpu/drm/tegra/submit.c10
-rw-r--r--drivers/gpu/drm/tegra/uapi.c4
-rw-r--r--drivers/gpu/drm/tests/drm_gem_shmem_test.c2
-rw-r--r--drivers/gpu/drm/tests/drm_mm_test.c2
-rw-r--r--drivers/gpu/drm/tests/drm_panic_test.c2
-rw-r--r--drivers/gpu/drm/tidss/tidss_crtc.c6
-rw-r--r--drivers/gpu/drm/tidss/tidss_plane.c2
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_panel.c2
-rw-r--r--drivers/gpu/drm/tiny/appletbdrm.c8
-rw-r--r--drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c2
-rw-r--r--drivers/gpu/drm/ttm/tests/ttm_mock_manager.c6
-rw-r--r--drivers/gpu/drm/ttm/ttm_agp_backend.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_pool.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_range_manager.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_sys_manager.c2
-rw-r--r--drivers/gpu/drm/udl/udl_main.c2
-rw-r--r--drivers/gpu/drm/v3d/v3d_bo.c2
-rw-r--r--drivers/gpu/drm/v3d/v3d_drv.c2
-rw-r--r--drivers/gpu/drm/v3d/v3d_fence.c2
-rw-r--r--drivers/gpu/drm/vboxvideo/vbox_mode.c8
-rw-r--r--drivers/gpu/drm/vc4/vc4_bo.c4
-rw-r--r--drivers/gpu/drm/vc4/vc4_crtc.c6
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c2
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c8
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.c2
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c10
-rw-r--r--drivers/gpu/drm/vc4/vc4_plane.c2
-rw-r--r--drivers/gpu/drm/vc4/vc4_validate_shaders.c2
-rw-r--r--drivers/gpu/drm/vgem/vgem_drv.c4
-rw-r--r--drivers/gpu/drm/vgem/vgem_fence.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_display.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_kms.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_object.c4
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_plane.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_prime.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_submit.c6
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_vq.c14
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_vram.c4
-rw-r--r--drivers/gpu/drm/vkms/vkms_colorop.c8
-rw-r--r--drivers/gpu/drm/vkms/vkms_config.c10
-rw-r--r--drivers/gpu/drm/vkms/vkms_configfs.c2
-rw-r--r--drivers/gpu/drm/vkms/vkms_crtc.c2
-rw-r--r--drivers/gpu/drm/vkms/vkms_plane.c6
-rw-r--r--drivers/gpu/drm/vkms/vkms_writeback.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/ttm_object.c6
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_bo.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_context.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fence.c10
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c12
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_mob.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_shader.c6
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_surface.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c2
-rw-r--r--drivers/gpu/drm/xe/display/intel_bo.c2
-rw-r--r--drivers/gpu/drm/xe/display/xe_dsb_buffer.c2
-rw-r--r--drivers/gpu/drm/xe/display/xe_hdcp_gsc.c2
-rw-r--r--drivers/gpu/drm/xe/display/xe_panic.c2
-rw-r--r--drivers/gpu/drm/xe/display/xe_stolen.c2
-rw-r--r--drivers/gpu/drm/xe/tests/xe_bo.c2
-rw-r--r--drivers/gpu/drm/xe/xe_bb.c4
-rw-r--r--drivers/gpu/drm/xe/xe_bo.c4
-rw-r--r--drivers/gpu/drm/xe/xe_configfs.c2
-rw-r--r--drivers/gpu/drm/xe/xe_dep_scheduler.c2
-rw-r--r--drivers/gpu/drm/xe/xe_device.c2
-rw-r--r--drivers/gpu/drm/xe/xe_drm_client.c2
-rw-r--r--drivers/gpu/drm/xe/xe_eu_stall.c4
-rw-r--r--drivers/gpu/drm/xe/xe_exec.c2
-rw-r--r--drivers/gpu/drm/xe/xe_exec_queue.c2
-rw-r--r--drivers/gpu/drm/xe/xe_execlist.c2
-rw-r--r--drivers/gpu/drm/xe/xe_gt_sysfs.c2
-rw-r--r--drivers/gpu/drm/xe/xe_guc_submit.c10
-rw-r--r--drivers/gpu/drm/xe/xe_heci_gsc.c2
-rw-r--r--drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c6
-rw-r--r--drivers/gpu/drm/xe/xe_lrc.c2
-rw-r--r--drivers/gpu/drm/xe/xe_migrate.c2
-rw-r--r--drivers/gpu/drm/xe/xe_mmio_gem.c2
-rw-r--r--drivers/gpu/drm/xe/xe_nvm.c2
-rw-r--r--drivers/gpu/drm/xe/xe_oa.c10
-rw-r--r--drivers/gpu/drm/xe/xe_pmu.c2
-rw-r--r--drivers/gpu/drm/xe/xe_preempt_fence.c2
-rw-r--r--drivers/gpu/drm/xe/xe_pt.c6
-rw-r--r--drivers/gpu/drm/xe/xe_reg_sr.c2
-rw-r--r--drivers/gpu/drm/xe/xe_shrinker.c2
-rw-r--r--drivers/gpu/drm/xe/xe_sriov_packet.c2
-rw-r--r--drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c2
-rw-r--r--drivers/gpu/drm/xe/xe_svm.c4
-rw-r--r--drivers/gpu/drm/xe/xe_sync.c4
-rw-r--r--drivers/gpu/drm/xe/xe_tile_sysfs.c2
-rw-r--r--drivers/gpu/drm/xe/xe_tlb_inval_job.c4
-rw-r--r--drivers/gpu/drm/xe/xe_ttm_vram_mgr.c4
-rw-r--r--drivers/gpu/drm/xe/xe_vm.c16
-rw-r--r--drivers/gpu/drm/xen/xen_drm_front.c4
-rw-r--r--drivers/gpu/drm/xen/xen_drm_front_gem.c2
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_disp.c2
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_dp.c2
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_dpsub.c2
928 files changed, 1971 insertions, 1971 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/aldebaran.c b/drivers/gpu/drm/amd/amdgpu/aldebaran.c
index 5d8d9c73434a..938fb0b2368d 100644
--- a/drivers/gpu/drm/amd/amdgpu/aldebaran.c
+++ b/drivers/gpu/drm/amd/amdgpu/aldebaran.c
@@ -447,7 +447,7 @@ int aldebaran_reset_init(struct amdgpu_device *adev)
{
struct amdgpu_reset_control *reset_ctl;
- reset_ctl = kzalloc_obj(*reset_ctl, GFP_KERNEL);
+ reset_ctl = kzalloc_obj(*reset_ctl);
if (!reset_ctl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
index 1c7597c19249..afe5ca81beec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
@@ -52,7 +52,7 @@ static int aca_banks_add_bank(struct aca_banks *banks, struct aca_bank *bank)
if (!bank)
return -EINVAL;
- node = kvzalloc_obj(*node, GFP_KERNEL);
+ node = kvzalloc_obj(*node);
if (!node)
return -ENOMEM;
@@ -230,7 +230,7 @@ static struct aca_bank_error *new_bank_error(struct aca_error *aerr, struct aca_
{
struct aca_bank_error *bank_error;
- bank_error = kvzalloc_obj(*bank_error, GFP_KERNEL);
+ bank_error = kvzalloc_obj(*bank_error);
if (!bank_error)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index c544f0dbb93f..b08752c57a7e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -246,7 +246,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
return -EINVAL;
acp_base = adev->rmmio_base;
- adev->acp.acp_genpd = kzalloc_obj(struct acp_pm_domain, GFP_KERNEL);
+ adev->acp.acp_genpd = kzalloc_obj(struct acp_pm_domain);
if (!adev->acp.acp_genpd)
return -ENOMEM;
@@ -267,7 +267,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
goto failure;
}
- adev->acp.acp_res = kzalloc_objs(struct resource, 3, GFP_KERNEL);
+ adev->acp.acp_res = kzalloc_objs(struct resource, 3);
if (!adev->acp.acp_res) {
r = -ENOMEM;
goto failure;
@@ -333,7 +333,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
goto failure;
}
- adev->acp.acp_res = kzalloc_objs(struct resource, 5, GFP_KERNEL);
+ adev->acp.acp_res = kzalloc_objs(struct resource, 5);
if (!adev->acp.acp_res) {
r = -ENOMEM;
goto failure;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 742fc381149e..516ab9cf88fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -897,7 +897,7 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)
if (!numa_info) {
struct sysinfo info;
- numa_info = kzalloc_obj(*numa_info, GFP_KERNEL);
+ numa_info = kzalloc_obj(*numa_info);
if (!numa_info)
return NULL;
@@ -1016,7 +1016,7 @@ static int amdgpu_acpi_dev_init(struct amdgpu_acpi_dev_info **dev_info,
int ret = -ENOENT;
*dev_info = NULL;
- tmp = kzalloc_obj(struct amdgpu_acpi_dev_info, GFP_KERNEL);
+ tmp = kzalloc_obj(struct amdgpu_acpi_dev_info);
if (!tmp)
return -ENOMEM;
@@ -1166,7 +1166,7 @@ int amdgpu_acpi_enumerate_xcc(void)
break;
}
- xcc_info = kzalloc_obj(struct amdgpu_acpi_xcc_info, GFP_KERNEL);
+ xcc_info = kzalloc_obj(struct amdgpu_acpi_xcc_info);
if (!xcc_info)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 16baf713be78..40c22438b1d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -829,11 +829,11 @@ int amdgpu_amdkfd_unmap_hiq(struct amdgpu_device *adev, u32 doorbell_off,
if (!kiq_ring->sched.ready || amdgpu_in_reset(adev))
return 0;
- ring_funcs = kzalloc_obj(*ring_funcs, GFP_KERNEL);
+ ring_funcs = kzalloc_obj(*ring_funcs);
if (!ring_funcs)
return -ENOMEM;
- ring = kzalloc_obj(*ring, GFP_KERNEL);
+ ring = kzalloc_obj(*ring);
if (!ring) {
r = -ENOMEM;
goto free_ring_funcs;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
index c74e3866ffb8..a1d93f217844 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
@@ -199,7 +199,7 @@ int kgd_arcturus_hqd_sdma_dump(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+6+7+10)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
index fff60109cf9c..6a364357522b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
@@ -67,7 +67,7 @@ struct amdgpu_amdkfd_fence *amdgpu_amdkfd_fence_create(u64 context,
{
struct amdgpu_amdkfd_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (fence == NULL)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c
index a2e00dd114a6..f35947be3763 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c
@@ -141,7 +141,7 @@ static int kgd_gfx_v9_4_3_hqd_sdma_dump(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
index 70d63690dccd..88acf75f0edd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
@@ -352,7 +352,7 @@ static int kgd_hqd_dump(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32_SOC15_IP(GC, addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -449,7 +449,7 @@ static int kgd_hqd_sdma_dump(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+6+7+10)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c
index 41564319441e..e31afee42979 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c
@@ -338,7 +338,7 @@ static int hqd_dump_v10_3(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32_SOC15_IP(GC, addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -435,7 +435,7 @@ static int hqd_sdma_dump_v10_3(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+6+7+12)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c
index 50c57914c90c..8aa068a4d3e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c
@@ -323,7 +323,7 @@ static int hqd_dump_v11(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -420,7 +420,7 @@ static int hqd_sdma_dump_v11(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (7+11+1+12+12)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12.c
index 4e43ad423713..bf0bd7688ee4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12.c
@@ -115,7 +115,7 @@ static int hqd_dump_v12(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -146,7 +146,7 @@ static int hqd_sdma_dump_v12(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (last_reg - first_reg + 1)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
index ba7e901322b3..2f62e5e306e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
@@ -214,7 +214,7 @@ static int kgd_hqd_dump(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -301,7 +301,7 @@ static int kgd_hqd_sdma_dump(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+4)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
index 9f51fd11c5ae..dc74fa26cf02 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
@@ -238,7 +238,7 @@ static int kgd_hqd_dump(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -324,7 +324,7 @@ static int kgd_hqd_sdma_dump(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+4+2+3+7)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
index cc2073cf43f4..2e116c06d5be 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
@@ -363,7 +363,7 @@ int kgd_gfx_v9_hqd_dump(struct amdgpu_device *adev,
(*dump)[i++][1] = RREG32(addr); \
} while (0)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
@@ -460,7 +460,7 @@ static int kgd_hqd_sdma_dump(struct amdgpu_device *adev,
#undef HQD_N_REGS
#define HQD_N_REGS (19+6+7+10)
- *dump = kmalloc_objs(**dump, HQD_N_REGS, GFP_KERNEL);
+ *dump = kmalloc_objs(**dump, HQD_N_REGS);
if (*dump == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index fd7bfe418099..06c1913d5a3f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -540,7 +540,7 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct amdgpu_vm *vm,
*/
static struct sg_table *create_sg_table(uint64_t addr, uint32_t size)
{
- struct sg_table *sg = kmalloc_obj(*sg, GFP_KERNEL);
+ struct sg_table *sg = kmalloc_obj(*sg);
if (!sg)
return NULL;
@@ -573,7 +573,7 @@ kfd_mem_dmamap_userptr(struct kgd_mem *mem,
if (WARN_ON(ttm->num_pages != src_ttm->num_pages))
return -EINVAL;
- ttm->sg = kmalloc_obj(*ttm->sg, GFP_KERNEL);
+ ttm->sg = kmalloc_obj(*ttm->sg);
if (unlikely(!ttm->sg))
return -ENOMEM;
@@ -1409,7 +1409,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
process = container_of(process_info, struct kfd_process, kgd_process_info);
if (!*process_info) {
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
@@ -1773,7 +1773,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(
if (flags & KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED)
alloc_flags |= AMDGPU_GEM_CREATE_UNCACHED;
- *mem = kzalloc_obj(struct kgd_mem, GFP_KERNEL);
+ *mem = kzalloc_obj(struct kgd_mem);
if (!*mem) {
ret = -ENOMEM;
goto err;
@@ -2374,7 +2374,7 @@ static int import_obj_create(struct amdgpu_device *adev,
/* Only VRAM and GTT BOs are supported */
return -EINVAL;
- *mem = kzalloc_obj(struct kgd_mem, GFP_KERNEL);
+ *mem = kzalloc_obj(struct kgd_mem);
if (!*mem)
return -ENOMEM;
@@ -3129,7 +3129,7 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem
if (!info || !gws)
return -EINVAL;
- *mem = kzalloc_obj(struct kgd_mem, GFP_KERNEL);
+ *mem = kzalloc_obj(struct kgd_mem);
if (!*mem)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index 59ddc14cbb7d..9f38b7dd1011 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -1897,7 +1897,7 @@ void amdgpu_atombios_fini(struct amdgpu_device *adev)
int amdgpu_atombios_init(struct amdgpu_device *adev)
{
struct card_info *atom_card_info =
- kzalloc_obj(struct card_info, GFP_KERNEL);
+ kzalloc_obj(struct card_info);
if (!atom_card_info)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index 198ad026222d..fa008b858e39 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -1652,7 +1652,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
}
}
- amdgpu_connector = kzalloc_obj(struct amdgpu_connector, GFP_KERNEL);
+ amdgpu_connector = kzalloc_obj(struct amdgpu_connector);
if (!amdgpu_connector)
return;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index c9345783ac26..2b2636e65279 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -523,7 +523,7 @@ static int amdgpu_cs_p2_syncobj_out(struct amdgpu_cs_parser *p,
if (p->post_deps)
return -EINVAL;
- p->post_deps = kmalloc_objs(*p->post_deps, num_deps, GFP_KERNEL);
+ p->post_deps = kmalloc_objs(*p->post_deps, num_deps);
p->num_post_deps = 0;
if (!p->post_deps)
@@ -556,7 +556,7 @@ static int amdgpu_cs_p2_syncobj_timeline_signal(struct amdgpu_cs_parser *p,
if (p->post_deps)
return -EINVAL;
- p->post_deps = kmalloc_objs(*p->post_deps, num_deps, GFP_KERNEL);
+ p->post_deps = kmalloc_objs(*p->post_deps, num_deps);
p->num_post_deps = 0;
if (!p->post_deps)
@@ -1689,7 +1689,7 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,
long r;
/* Prepare the fence array */
- array = kzalloc_objs(struct dma_fence *, fence_count, GFP_KERNEL);
+ array = kzalloc_objs(struct dma_fence *, fence_count);
if (array == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 1eb2e89fcdeb..c0f501a61198 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -482,7 +482,7 @@ static int amdgpu_ctx_alloc(struct amdgpu_device *adev,
struct amdgpu_ctx *ctx;
int r;
- ctx = kmalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kmalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 56a13637bb8c..f7467af2e102 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -206,7 +206,7 @@ static int amdgpu_debugfs_regs2_open(struct inode *inode, struct file *file)
{
struct amdgpu_debugfs_regs2_data *rd;
- rd = kzalloc_obj(*rd, GFP_KERNEL);
+ rd = kzalloc_obj(*rd);
if (!rd)
return -ENOMEM;
rd->adev = file_inode(file)->i_private;
@@ -371,7 +371,7 @@ static int amdgpu_debugfs_gprwave_open(struct inode *inode, struct file *file)
{
struct amdgpu_debugfs_gprwave_data *rd;
- rd = kzalloc_obj(*rd, GFP_KERNEL);
+ rd = kzalloc_obj(*rd);
if (!rd)
return -ENOMEM;
rd->adev = file_inode(file)->i_private;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c57cbf497eba..d9789e0b5201 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2596,7 +2596,7 @@ out:
static void amdgpu_uid_init(struct amdgpu_device *adev)
{
/* Initialize the UID for the device */
- adev->uid_info = kzalloc_obj(struct amdgpu_uid, GFP_KERNEL);
+ adev->uid_info = kzalloc_obj(struct amdgpu_uid);
if (!adev->uid_info) {
dev_warn(adev->dev, "Failed to allocate memory for UID\n");
return;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index c51eedd96fb0..6d1f5cae1a65 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1149,7 +1149,7 @@ static int amdgpu_discovery_sysfs_ips(struct amdgpu_device *adev,
* block if not yet registered.
*/
if (!ip_hw_id) {
- ip_hw_id = kzalloc_obj(*ip_hw_id, GFP_KERNEL);
+ ip_hw_id = kzalloc_obj(*ip_hw_id);
if (!ip_hw_id)
return -ENOMEM;
ip_hw_id->hw_id = ii;
@@ -1255,7 +1255,7 @@ static int amdgpu_discovery_sysfs_recurse(struct amdgpu_device *adev)
* amdgpu_discovery_reg_base_init().
*/
- ip_die_entry = kzalloc_obj(*ip_die_entry, GFP_KERNEL);
+ ip_die_entry = kzalloc_obj(*ip_die_entry);
if (!ip_die_entry)
return -ENOMEM;
@@ -1287,7 +1287,7 @@ static int amdgpu_discovery_sysfs_init(struct amdgpu_device *adev)
if (!discovery_bin)
return -EINVAL;
- ip_top = kzalloc_obj(*ip_top, GFP_KERNEL);
+ ip_top = kzalloc_obj(*ip_top);
if (!ip_top)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index eb94a0b97b94..bef9dce2e7ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -204,7 +204,7 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
u64 tiling_flags;
int i, r;
- work = kzalloc_obj(*work, GFP_KERNEL);
+ work = kzalloc_obj(*work);
if (work == NULL)
return -ENOMEM;
@@ -1323,7 +1323,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
return ERR_PTR(-EINVAL);
}
- amdgpu_fb = kzalloc_obj(*amdgpu_fb, GFP_KERNEL);
+ amdgpu_fb = kzalloc_obj(*amdgpu_fb);
if (amdgpu_fb == NULL) {
drm_gem_object_put(obj);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
index 432de34d177f..3b588c7740ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
@@ -161,7 +161,7 @@ amdgpu_eviction_fence_create(struct amdgpu_eviction_fence_mgr *evf_mgr)
{
struct amdgpu_eviction_fence *ev_fence;
- ev_fence = kzalloc_obj(*ev_fence, GFP_KERNEL);
+ ev_fence = kzalloc_obj(*ev_fence);
if (!ev_fence)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
index cb33a04d94c9..514bd302365f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
@@ -130,7 +130,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
return 0;
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/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index 07e43b446e44..e2d32c29668a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -153,7 +153,7 @@ int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev)
dev_info(adev->dev, "%s dma_addr:%pad\n", __func__, &dma_addr);
/* Create SG table */
- sg = kmalloc_obj(*sg, GFP_KERNEL);
+ sg = kmalloc_obj(*sg);
if (!sg) {
ret = -ENOMEM;
goto error;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 27b77a82b174..a6107109a2b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -1183,7 +1183,7 @@ int amdgpu_gem_list_handles_ioctl(struct drm_device *dev, void *data,
return 0;
}
- bo_entries = kvzalloc_objs(*bo_entries, num_bos, GFP_KERNEL);
+ bo_entries = kvzalloc_objs(*bo_entries, num_bos);
if (!bo_entries)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
index 4cc345f77db0..f72990ac046e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
@@ -265,7 +265,7 @@ struct amdgpu_hmm_range *amdgpu_hmm_range_alloc(struct amdgpu_bo *bo)
{
struct amdgpu_hmm_range *range;
- range = kzalloc_obj(*range, GFP_KERNEL);
+ range = kzalloc_obj(*range);
if (!range)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index 9dc4a5f426eb..c576e103a783 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -168,7 +168,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
if (rec->mm_i2c && (amdgpu_hw_i2c == 0))
return NULL;
- i2c = kzalloc_obj(struct amdgpu_i2c_chan, GFP_KERNEL);
+ i2c = kzalloc_obj(struct amdgpu_i2c_chan);
if (i2c == NULL)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
index 52bad6d28915..64c519cd7395 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
@@ -119,7 +119,7 @@ void amdgpu_pasid_free_delayed(struct dma_resv *resv,
return;
}
- cb = kmalloc_obj(*cb, GFP_KERNEL);
+ cb = kmalloc_obj(*cb);
if (!cb) {
/* Last resort when we are OOM */
dma_fence_wait(fence, false);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index d51ce25474f5..49eedfbfb5e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -448,7 +448,7 @@ int amdgpu_irq_add_id(struct amdgpu_device *adev,
if (source->num_types && !source->enabled_types) {
atomic_t *types;
- types = kzalloc_objs(atomic_t, source->num_types, GFP_KERNEL);
+ types = kzalloc_objs(atomic_t, source->num_types);
if (!types)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 8865b4802963..bee7fcf006a2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -202,14 +202,14 @@ int amdgpu_job_alloc(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (!*job)
return -ENOMEM;
- af = kzalloc_obj(struct amdgpu_fence, GFP_KERNEL);
+ af = kzalloc_obj(struct amdgpu_fence);
if (!af) {
r = -ENOMEM;
goto err_job;
}
(*job)->hw_fence = af;
- af = kzalloc_obj(struct amdgpu_fence, GFP_KERNEL);
+ af = kzalloc_obj(struct amdgpu_fence);
if (!af) {
r = -ENOMEM;
goto err_fence;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index a5b72ed77162..77e2133de5cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -942,7 +942,7 @@ out:
uint64_t vm_size;
uint32_t pcie_gen_mask, pcie_width_mask;
- dev_info = kzalloc_obj(*dev_info, GFP_KERNEL);
+ dev_info = kzalloc_obj(*dev_info);
if (!dev_info)
return -ENOMEM;
@@ -1329,7 +1329,7 @@ out:
return -EINVAL;
}
- caps = kzalloc_obj(*caps, GFP_KERNEL);
+ caps = kzalloc_obj(*caps);
if (!caps)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
index 6b52dbdb7e54..823ba17e32af 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
@@ -169,7 +169,7 @@ static int amdgpu_mca_bank_set_add_entry(struct mca_bank_set *mca_set, struct mc
if (!entry)
return -EINVAL;
- node = kvzalloc_obj(*node, GFP_KERNEL);
+ node = kvzalloc_obj(*node);
if (!node)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
index 0cfe3a91db84..ad5d2fcd03d7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
@@ -446,7 +446,7 @@ static int amdgpu_pmu_alloc_pmu_attrs(
struct amdgpu_pmu_event_attribute **evt_attr,
struct amdgpu_pmu_config *config)
{
- *fmt_attr = kzalloc_objs(**fmt_attr, config->num_formats, GFP_KERNEL);
+ *fmt_attr = kzalloc_objs(**fmt_attr, config->num_formats);
if (!(*fmt_attr))
return -ENOMEM;
@@ -458,7 +458,7 @@ static int amdgpu_pmu_alloc_pmu_attrs(
if (!fmt_attr_group->attrs)
goto err_fmt_attr_grp;
- *evt_attr = kzalloc_objs(**evt_attr, config->num_events, GFP_KERNEL);
+ *evt_attr = kzalloc_objs(**evt_attr, config->num_events);
if (!(*evt_attr))
goto err_evt_attr;
@@ -599,7 +599,7 @@ static struct amdgpu_pmu_entry *create_pmu_entry(struct amdgpu_device *adev,
{
struct amdgpu_pmu_entry *pmu_entry;
- pmu_entry = kzalloc_obj(struct amdgpu_pmu_entry, GFP_KERNEL);
+ pmu_entry = kzalloc_obj(struct amdgpu_pmu_entry);
if (!pmu_entry)
return pmu_entry;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
index 5420362b4261..b1dc33301d83 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
@@ -61,7 +61,7 @@ static int amdgpu_preempt_mgr_new(struct ttm_resource_manager *man,
const struct ttm_place *place,
struct ttm_resource **res)
{
- *res = kzalloc_obj(**res, GFP_KERNEL);
+ *res = kzalloc_obj(**res);
if (!*res)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 01ce996bfacd..27b67da9fdac 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -457,7 +457,7 @@ static int psp_sw_init(struct amdgpu_ip_block *ip_block)
struct psp_memory_training_context *mem_training_ctx = &psp->mem_train_ctx;
struct psp_runtime_scpm_entry scpm_entry;
- psp->cmd = kzalloc_obj(struct psp_gfx_cmd_resp, GFP_KERNEL);
+ psp->cmd = kzalloc_obj(struct psp_gfx_cmd_resp);
if (!psp->cmd) {
dev_err(adev->dev, "Failed to allocate memory to command buffer!\n");
return -ENOMEM;
@@ -4384,7 +4384,7 @@ static int psp_read_spirom_debugfs_open(struct inode *inode, struct file *filp)
return -EBUSY;
}
- bo_triplet = kzalloc_obj(struct spirom_bo, GFP_KERNEL);
+ bo_triplet = kzalloc_obj(struct spirom_bo);
if (!bo_triplet) {
mutex_unlock(&adev->psp.mutex);
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index c363953c2a74..eb3e62eb7b20 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -891,7 +891,7 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
if (head->block == AMDGPU_RAS_BLOCK__GFX &&
!amdgpu_sriov_vf(adev) &&
!amdgpu_ras_intr_triggered()) {
- info = kzalloc_obj(union ta_ras_cmd_input, GFP_KERNEL);
+ info = kzalloc_obj(union ta_ras_cmd_input);
if (!info)
return -ENOMEM;
@@ -1904,7 +1904,7 @@ static ssize_t amdgpu_ras_sysfs_badpages_read(struct file *f,
memset(buf, 0, count);
bps_count = end - start;
- bps = kmalloc_objs(*bps, bps_count, GFP_KERNEL);
+ bps = kmalloc_objs(*bps, bps_count);
if (!bps)
return 0;
@@ -2811,7 +2811,7 @@ static int amdgpu_uniras_badpages_read(struct amdgpu_device *adev,
if (!bps || !count)
return -EINVAL;
- output = kmalloc_obj(*output, GFP_KERNEL);
+ output = kmalloc_obj(*output);
if (!output)
return -ENOMEM;
@@ -2991,7 +2991,7 @@ static int amdgpu_ras_realloc_eh_data_space(struct amdgpu_device *adev,
unsigned int old_space = data->count + data->space_left;
unsigned int new_space = old_space + pages;
unsigned int align_space = ALIGN(new_space, 512);
- void *bps = kmalloc_objs(*data->bps, align_space, GFP_KERNEL);
+ void *bps = kmalloc_objs(*data->bps, align_space);
if (!bps) {
return -ENOMEM;
@@ -3375,7 +3375,7 @@ static int amdgpu_ras_load_bad_pages(struct amdgpu_device *adev)
if (control->ras_num_recs == 0 || amdgpu_bad_page_threshold == 0)
return 0;
- bps = kzalloc_objs(*bps, control->ras_num_recs, GFP_KERNEL);
+ bps = kzalloc_objs(*bps, control->ras_num_recs);
if (!bps)
return -ENOMEM;
@@ -3863,7 +3863,7 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev, bool init_bp_info)
return 0;
data = &con->eh_data;
- *data = kzalloc_obj(**data, GFP_KERNEL);
+ *data = kzalloc_obj(**data);
if (!*data) {
ret = -ENOMEM;
goto out;
@@ -4499,7 +4499,7 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
/* Those are the cached values at init.
*/
- query_info = kzalloc_obj(*query_info, GFP_KERNEL);
+ query_info = kzalloc_obj(*query_info);
if (!query_info)
return -ENOMEM;
memcpy(&query_info->head, ras_block, sizeof(struct ras_common_if));
@@ -5188,7 +5188,7 @@ int amdgpu_ras_register_ras_block(struct amdgpu_device *adev,
if (!adev || !ras_block_obj)
return -EINVAL;
- ras_node = kzalloc_obj(*ras_node, GFP_KERNEL);
+ ras_node = kzalloc_obj(*ras_node);
if (!ras_node)
return -ENOMEM;
@@ -5389,7 +5389,7 @@ static struct ras_err_node *amdgpu_ras_error_node_new(void)
{
struct ras_err_node *err_node;
- err_node = kvzalloc_obj(*err_node, GFP_KERNEL);
+ err_node = kvzalloc_obj(*err_node);
if (!err_node)
return NULL;
@@ -5682,7 +5682,7 @@ int amdgpu_ras_add_critical_region(struct amdgpu_device *adev,
/* Record new critical amdgpu bo */
list_for_each_entry(block, &vres->blocks, link) {
- region = kzalloc_obj(*region, GFP_KERNEL);
+ region = kzalloc_obj(*region);
if (!region) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
index d3413d1b9fb0..7a2fcb7ded1d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
@@ -276,7 +276,7 @@ struct amdgpu_reset_domain *amdgpu_reset_create_reset_domain(enum amdgpu_reset_d
{
struct amdgpu_reset_domain *reset_domain;
- reset_domain = kvzalloc_obj(struct amdgpu_reset_domain, GFP_KERNEL);
+ reset_domain = kvzalloc_obj(struct amdgpu_reset_domain);
if (!reset_domain) {
DRM_ERROR("Failed to allocate amdgpu_reset_domain!");
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index ac71b2d7e139..4638a686a84e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -507,13 +507,13 @@ static ssize_t amdgpu_ras_cper_debugfs_read(struct file *f, char __user *buf,
const uint8_t ring_header_size = 12;
struct amdgpu_ring *ring = file_inode(f)->i_private;
struct ras_cmd_cper_snapshot_req *snapshot_req __free(kfree) =
- kzalloc_obj(struct ras_cmd_cper_snapshot_req, GFP_KERNEL);
+ kzalloc_obj(struct ras_cmd_cper_snapshot_req);
struct ras_cmd_cper_snapshot_rsp *snapshot_rsp __free(kfree) =
- kzalloc_obj(struct ras_cmd_cper_snapshot_rsp, GFP_KERNEL);
+ kzalloc_obj(struct ras_cmd_cper_snapshot_rsp);
struct ras_cmd_cper_record_req *record_req __free(kfree) =
- kzalloc_obj(struct ras_cmd_cper_record_req, GFP_KERNEL);
+ kzalloc_obj(struct ras_cmd_cper_record_req);
struct ras_cmd_cper_record_rsp *record_rsp __free(kfree) =
- kzalloc_obj(struct ras_cmd_cper_record_rsp, GFP_KERNEL);
+ kzalloc_obj(struct ras_cmd_cper_record_rsp);
uint8_t *ring_header __free(kfree) =
kzalloc(ring_header_size, GFP_KERNEL);
uint32_t total_cper_num;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index dd412186c4f0..d319c37e0d4e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1122,7 +1122,7 @@ int amdgpu_ttm_mmio_remap_alloc_sgt(struct amdgpu_device *adev,
phys = adev->rmmio_remap.bus_addr + cur.start;
/* Build a single-entry sg_table mapped as I/O (no struct page backing). */
- *sgt = kzalloc_obj(**sgt, GFP_KERNEL);
+ *sgt = kzalloc_obj(**sgt);
if (!*sgt)
return -ENOMEM;
r = sg_alloc_table(*sgt, 1, GFP_KERNEL);
@@ -1172,7 +1172,7 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
struct amdgpu_ttm_tt *gtt;
enum ttm_caching caching;
- gtt = kzalloc_obj(struct amdgpu_ttm_tt, GFP_KERNEL);
+ gtt = kzalloc_obj(struct amdgpu_ttm_tt);
if (!gtt)
return NULL;
@@ -1213,7 +1213,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
/* user pages are bound by amdgpu_ttm_tt_pin_userptr() */
if (gtt->userptr) {
- ttm->sg = kzalloc_obj(struct sg_table, GFP_KERNEL);
+ ttm->sg = kzalloc_obj(struct sg_table);
if (!ttm->sg)
return -ENOMEM;
return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 97352c56e7a2..9d67b770bcc2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -217,7 +217,7 @@ static int amdgpu_userq_buffer_va_list_add(struct amdgpu_usermode_queue *queue,
struct amdgpu_userq_va_cursor *va_cursor;
struct userq_va_list;
- va_cursor = kzalloc_obj(*va_cursor, GFP_KERNEL);
+ va_cursor = kzalloc_obj(*va_cursor);
if (!va_cursor)
return -ENOMEM;
@@ -781,7 +781,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
goto unlock;
}
- queue = kzalloc_obj(struct amdgpu_usermode_queue, GFP_KERNEL);
+ queue = kzalloc_obj(struct amdgpu_usermode_queue);
if (!queue) {
drm_file_err(uq_mgr->file, "Failed to allocate memory for queue\n");
r = -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 38693bb7f8d4..8013260e29dc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -82,7 +82,7 @@ int amdgpu_userq_fence_driver_alloc(struct amdgpu_device *adev,
unsigned long flags;
int r;
- fence_drv = kzalloc_obj(*fence_drv, GFP_KERNEL);
+ fence_drv = kzalloc_obj(*fence_drv);
if (!fence_drv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 50b75c562281..522d5bd76269 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -294,15 +294,15 @@ static int amdgpu_virt_init_ras_err_handler_data(struct amdgpu_device *adev)
void *bps = NULL;
struct amdgpu_bo **bps_bo = NULL;
- *data = kmalloc_obj(struct amdgpu_virt_ras_err_handler_data, GFP_KERNEL);
+ *data = kmalloc_obj(struct amdgpu_virt_ras_err_handler_data);
if (!*data)
goto data_failure;
- bps = kmalloc_objs(*(*data)->bps, align_space, GFP_KERNEL);
+ bps = kmalloc_objs(*(*data)->bps, align_space);
if (!bps)
goto bps_failure;
- bps_bo = kmalloc_objs(*(*data)->bps_bo, align_space, GFP_KERNEL);
+ bps_bo = kmalloc_objs(*(*data)->bps_bo, align_space);
if (!bps_bo)
goto bps_bo_failure;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index 8931279cdea6..2c19b65de840 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -411,7 +411,7 @@ static struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
struct drm_plane *plane;
int ret;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index d946c39c4acb..f2beb980e3c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1118,7 +1118,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (!drm_dev_enter(adev_to_drm(adev), &idx))
return -ENODEV;
- tlb_cb = kmalloc_obj(*tlb_cb, GFP_KERNEL);
+ tlb_cb = kmalloc_obj(*tlb_cb);
if (!tlb_cb) {
drm_dev_exit(idx);
return -ENOMEM;
@@ -1471,7 +1471,7 @@ static void amdgpu_vm_add_prt_cb(struct amdgpu_device *adev,
if (!adev->gmc.gmc_funcs->set_prt)
return;
- cb = kmalloc_obj(struct amdgpu_prt_cb, GFP_KERNEL);
+ cb = kmalloc_obj(struct amdgpu_prt_cb);
if (!cb) {
/* Last resort when we are OOM */
if (fence)
@@ -1737,7 +1737,7 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
amdgpu_vm_assert_locked(vm);
- bo_va = kzalloc_obj(struct amdgpu_bo_va, GFP_KERNEL);
+ bo_va = kzalloc_obj(struct amdgpu_bo_va);
if (bo_va == NULL) {
return NULL;
}
@@ -1866,7 +1866,7 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
return -EINVAL;
}
- mapping = kmalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kmalloc_obj(*mapping);
if (!mapping)
return -ENOMEM;
@@ -1913,7 +1913,7 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev,
return r;
/* Allocate all the needed memory */
- mapping = kmalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kmalloc_obj(*mapping);
if (!mapping)
return -ENOMEM;
@@ -2033,12 +2033,12 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
eaddr = saddr + (size - 1) / AMDGPU_GPU_PAGE_SIZE;
/* Allocate all the needed memory */
- before = kzalloc_obj(*before, GFP_KERNEL);
+ before = kzalloc_obj(*before);
if (!before)
return -ENOMEM;
INIT_LIST_HEAD(&before->list);
- after = kzalloc_obj(*after, GFP_KERNEL);
+ after = kzalloc_obj(*after);
if (!after) {
kfree(before);
return -ENOMEM;
@@ -2533,7 +2533,7 @@ amdgpu_vm_get_task_info_pasid(struct amdgpu_device *adev, u32 pasid)
static int amdgpu_vm_create_task_info(struct amdgpu_vm *vm)
{
- vm->task_info = kzalloc_obj(struct amdgpu_task_info, GFP_KERNEL);
+ vm->task_info = kzalloc_obj(struct amdgpu_task_info);
if (!vm->task_info)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
index b3e47efeef62..82b8badde453 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
@@ -80,7 +80,7 @@ void amdgpu_vm_tlb_fence_create(struct amdgpu_device *adev, struct amdgpu_vm *vm
{
struct amdgpu_tlb_fence *f;
- f = kmalloc_obj(*f, GFP_KERNEL);
+ f = kmalloc_obj(*f);
if (!f) {
/*
* We can't fail since the PDEs and PTEs are already updated, so
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
index 6252246dcd68..6c9b3e21e15c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@ -340,7 +340,7 @@ int amdgpu_vram_mgr_reserve_range(struct amdgpu_vram_mgr *mgr,
{
struct amdgpu_vram_reservation *rsv;
- rsv = kzalloc_obj(*rsv, GFP_KERNEL);
+ rsv = kzalloc_obj(*rsv);
if (!rsv)
return -ENOMEM;
@@ -478,7 +478,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
tbo->page_alignment);
}
- vres = kzalloc_obj(*vres, GFP_KERNEL);
+ vres = kzalloc_obj(*vres);
if (!vres)
return -ENOMEM;
@@ -684,7 +684,7 @@ int amdgpu_vram_mgr_alloc_sgt(struct amdgpu_device *adev,
int num_entries = 0;
int i, r;
- *sgt = kmalloc_obj(**sgt, GFP_KERNEL);
+ *sgt = kmalloc_obj(**sgt);
if (!*sgt)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
index df5b70c9f911..cc5f4e01e38f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
@@ -334,7 +334,7 @@ int amdgpu_xcp_mgr_init(struct amdgpu_device *adev, int init_mode,
if (!xcp_funcs || !xcp_funcs->get_ip_details)
return -EINVAL;
- xcp_mgr = kzalloc_obj(*xcp_mgr, GFP_KERNEL);
+ xcp_mgr = kzalloc_obj(*xcp_mgr);
if (!xcp_mgr)
return -ENOMEM;
@@ -907,7 +907,7 @@ static void amdgpu_xcp_cfg_sysfs_init(struct amdgpu_device *adev)
if (!adev->xcp_mgr)
return;
- xcp_cfg = kzalloc_obj(*xcp_cfg, GFP_KERNEL);
+ xcp_cfg = kzalloc_obj(*xcp_cfg);
if (!xcp_cfg)
return;
xcp_cfg->xcp_mgr = adev->xcp_mgr;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index fe06ab35ba76..11e56df1d91b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -690,7 +690,7 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev)
goto pro_end;
}
- hive = kzalloc_obj(*hive, GFP_KERNEL);
+ hive = kzalloc_obj(*hive);
if (!hive) {
dev_err(adev->dev, "XGMI: allocation failed\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 51fa402e8b64..e4ce3029d3fb 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1524,7 +1524,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
{
int base;
struct atom_context *ctx =
- kzalloc_obj(struct atom_context, GFP_KERNEL);
+ kzalloc_obj(struct atom_context);
struct _ATOM_ROM_HEADER *atom_rom_header;
struct _ATOM_MASTER_DATA_TABLE *master_table;
struct _ATOM_FIRMWARE_INFO *atom_fw_info;
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
index 8e0841d3ca75..afb788d61011 100644
--- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
@@ -191,7 +191,7 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode
goto register_acpi_backlight;
}
- pdata = kmalloc_obj(struct amdgpu_backlight_privdata, GFP_KERNEL);
+ pdata = kmalloc_obj(struct amdgpu_backlight_privdata);
if (!pdata) {
DRM_ERROR("Memory allocation failed\n");
goto error;
@@ -1980,7 +1980,7 @@ amdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder)
lvds_info =
(union lvds_info *)(mode_info->atom_context->bios + data_offset);
lvds =
- kzalloc_obj(struct amdgpu_encoder_atom_dig, GFP_KERNEL);
+ kzalloc_obj(struct amdgpu_encoder_atom_dig);
if (!lvds)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index de1ccfe584d7..0bbc29ec5a3a 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -3517,7 +3517,7 @@ static void dce_v10_0_encoder_add(struct amdgpu_device *adev,
}
/* add a new one */
- amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder, GFP_KERNEL);
+ amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder);
if (!amdgpu_encoder)
return;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index 723a71c8bd38..103642f156ed 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -3414,7 +3414,7 @@ static void dce_v6_0_encoder_add(struct amdgpu_device *adev,
}
/* add a new one */
- amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder, GFP_KERNEL);
+ amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder);
if (!amdgpu_encoder)
return;
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index 0a4a8f0084b1..e016cbdf28e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -3425,7 +3425,7 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev,
}
/* add a new one */
- amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder, GFP_KERNEL);
+ amdgpu_encoder = kzalloc_obj(struct amdgpu_encoder);
if (!amdgpu_encoder)
return;
diff --git a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c
index f5785d9c6212..3a2473655b6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c
@@ -50,7 +50,7 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
isp_base = adev->rmmio_base;
- isp->isp_cell = kzalloc_objs(struct mfd_cell, 3, GFP_KERNEL);
+ isp->isp_cell = kzalloc_objs(struct mfd_cell, 3);
if (!isp->isp_cell) {
r = -ENOMEM;
drm_err(&adev->ddev,
@@ -59,7 +59,7 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
}
num_res = MAX_ISP410_MEM_RES + MAX_ISP410_INT_SRC;
- isp->isp_res = kzalloc_objs(struct resource, num_res, GFP_KERNEL);
+ isp->isp_res = kzalloc_objs(struct resource, num_res);
if (!isp->isp_res) {
r = -ENOMEM;
drm_err(&adev->ddev,
@@ -67,7 +67,7 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
goto failure;
}
- isp->isp_pdata = kzalloc_obj(*isp->isp_pdata, GFP_KERNEL);
+ isp->isp_pdata = kzalloc_obj(*isp->isp_pdata);
if (!isp->isp_pdata) {
r = -ENOMEM;
drm_err(&adev->ddev,
@@ -106,7 +106,7 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
isp->isp_cell[0].pdata_size = sizeof(struct isp_platform_data);
/* initialize isp i2c platform data */
- isp->isp_i2c_res = kzalloc_objs(struct resource, 1, GFP_KERNEL);
+ isp->isp_i2c_res = kzalloc_objs(struct resource, 1);
if (!isp->isp_i2c_res) {
r = -ENOMEM;
drm_err(&adev->ddev,
@@ -126,7 +126,7 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
isp->isp_cell[1].pdata_size = sizeof(struct isp_platform_data);
/* initialize isp gpiochip platform data */
- isp->isp_gpio_res = kzalloc_objs(struct resource, 1, GFP_KERNEL);
+ isp->isp_gpio_res = kzalloc_objs(struct resource, 1);
if (!isp->isp_gpio_res) {
r = -ENOMEM;
drm_err(&adev->ddev,
diff --git a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
index e757087d51d2..b3590b33cab9 100644
--- a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
@@ -259,7 +259,7 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
return -EINVAL;
}
- isp->isp_cell = kzalloc_objs(struct mfd_cell, 3, GFP_KERNEL);
+ isp->isp_cell = kzalloc_objs(struct mfd_cell, 3);
if (!isp->isp_cell) {
r = -ENOMEM;
drm_err(&adev->ddev, "isp mfd cell alloc failed (%d)\n", r);
@@ -268,14 +268,14 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
num_res = MAX_ISP411_MEM_RES + MAX_ISP411_INT_SRC;
- isp->isp_res = kzalloc_objs(struct resource, num_res, GFP_KERNEL);
+ isp->isp_res = kzalloc_objs(struct resource, num_res);
if (!isp->isp_res) {
r = -ENOMEM;
drm_err(&adev->ddev, "isp mfd resource alloc failed (%d)\n", r);
goto failure;
}
- isp->isp_pdata = kzalloc_obj(*isp->isp_pdata, GFP_KERNEL);
+ isp->isp_pdata = kzalloc_obj(*isp->isp_pdata);
if (!isp->isp_pdata) {
r = -ENOMEM;
drm_err(&adev->ddev, "isp platform data alloc failed (%d)\n", r);
@@ -317,7 +317,7 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
isp->isp_cell[0].pdata_size = sizeof(struct isp_platform_data);
/* initialize isp i2c platform data */
- isp->isp_i2c_res = kzalloc_objs(struct resource, 1, GFP_KERNEL);
+ isp->isp_i2c_res = kzalloc_objs(struct resource, 1);
if (!isp->isp_i2c_res) {
r = -ENOMEM;
drm_err(&adev->ddev, "isp mfd res alloc failed (%d)\n", r);
@@ -336,7 +336,7 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
isp->isp_cell[1].pdata_size = sizeof(struct isp_platform_data);
/* initialize isp gpiochip platform data */
- isp->isp_gpio_res = kzalloc_objs(struct resource, 1, GFP_KERNEL);
+ isp->isp_gpio_res = kzalloc_objs(struct resource, 1);
if (!isp->isp_gpio_res) {
r = -ENOMEM;
drm_err(&adev->ddev, "isp gpio resource alloc failed (%d)\n", r);
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
index 9e9a8e354c06..8c74894254f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
@@ -283,7 +283,7 @@ static int mes_userq_mqd_create(struct amdgpu_usermode_queue *queue,
int r;
/* Structure to initialize MQD for userqueue using generic MQD init function */
- userq_props = kzalloc_obj(struct amdgpu_mqd_prop, GFP_KERNEL);
+ userq_props = kzalloc_obj(struct amdgpu_mqd_prop);
if (!userq_props) {
DRM_ERROR("Failed to allocate memory for userq_props\n");
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c b/drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c
index 4de461fa9cdd..cb58032109e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c
+++ b/drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c
@@ -273,7 +273,7 @@ int sienna_cichlid_reset_init(struct amdgpu_device *adev)
{
struct amdgpu_reset_control *reset_ctl;
- reset_ctl = kzalloc_obj(*reset_ctl, GFP_KERNEL);
+ reset_ctl = kzalloc_obj(*reset_ctl);
if (!reset_ctl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
index e91e70844e49..11a574e8d3d7 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
@@ -270,7 +270,7 @@ int smu_v13_0_10_reset_init(struct amdgpu_device *adev)
{
struct amdgpu_reset_control *reset_ctl;
- reset_ctl = kzalloc_obj(*reset_ctl, GFP_KERNEL);
+ reset_ctl = kzalloc_obj(*reset_ctl);
if (!reset_ctl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
index 25af2707b5ca..1f80045775f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
@@ -567,7 +567,7 @@ static int umc_v12_0_update_ecc_status(struct amdgpu_device *adev,
if (ret)
return ret;
- ecc_err = kzalloc_obj(*ecc_err, GFP_KERNEL);
+ ecc_err = kzalloc_obj(*ecc_err);
if (!ecc_err)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index f8c9ccbc4851..b188f099077e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -2468,7 +2468,7 @@ static int criu_restore_bos(struct kfd_process *p,
/* Prevent MMU notifications until stage-4 IOCTL (CRIU_RESUME) is received */
amdgpu_amdkfd_block_mmu_notifications(p->kgd_process_info);
- bo_buckets = kvmalloc_objs(*bo_buckets, args->num_bos, GFP_KERNEL);
+ bo_buckets = kvmalloc_objs(*bo_buckets, args->num_bos);
if (!bo_buckets)
return -ENOMEM;
@@ -2486,7 +2486,7 @@ static int criu_restore_bos(struct kfd_process *p,
goto exit;
}
- bo_privs = kvmalloc_objs(*bo_privs, args->num_bos, GFP_KERNEL);
+ bo_privs = kvmalloc_objs(*bo_privs, args->num_bos);
if (!bo_privs) {
ret = -ENOMEM;
goto exit;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c
index 46ea876629bc..7d4e07452cdb 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c
@@ -146,7 +146,7 @@ void kfd_debugfs_add_process(struct kfd_process *p)
char name[MAX_DEBUGFS_FILENAME_LEN];
struct debugfs_proc_entry *entry;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index d03c3398695b..8ff97bf7d95a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -478,7 +478,7 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
return NULL;
}
- kfd = kzalloc_obj(*kfd, GFP_KERNEL);
+ kfd = kzalloc_obj(*kfd);
if (!kfd)
return NULL;
@@ -864,7 +864,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
/* Allocate the KFD nodes */
for (i = 0, xcp_idx = 0; i < kfd->num_nodes; i++) {
- node = kzalloc_obj(struct kfd_node, GFP_KERNEL);
+ node = kzalloc_obj(struct kfd_node);
if (!node)
goto node_alloc_error;
@@ -1328,7 +1328,7 @@ int kfd_gtt_sa_allocate(struct kfd_node *node, unsigned int size,
if (size > kfd->gtt_sa_num_of_chunks * kfd->gtt_sa_chunk_size)
return -ENOMEM;
- *mem_obj = kzalloc_obj(struct kfd_mem_obj, GFP_KERNEL);
+ *mem_obj = kzalloc_obj(struct kfd_mem_obj);
if (!(*mem_obj))
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 7707496761ea..3ddf06c755b5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1401,7 +1401,7 @@ static int register_process(struct device_queue_manager *dqm,
uint64_t pd_base;
int retval;
- n = kzalloc_obj(*n, GFP_KERNEL);
+ n = kzalloc_obj(*n);
if (!n)
return -ENOMEM;
@@ -2921,7 +2921,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_node *dev)
pr_debug("Loading device queue manager\n");
- dqm = kzalloc_obj(*dqm, GFP_KERNEL);
+ dqm = kzalloc_obj(*dqm);
if (!dqm)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
index 950717576e20..a2fdf0d451ef 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
@@ -67,7 +67,7 @@ static struct kfd_signal_page *allocate_signal_page(struct kfd_process *p)
void *backing_store;
struct kfd_signal_page *page;
- page = kzalloc_obj(*page, GFP_KERNEL);
+ page = kzalloc_obj(*page);
if (!page)
return NULL;
@@ -337,7 +337,7 @@ static int kfd_event_page_set(struct kfd_process *p, void *kernel_address,
return -EINVAL;
}
- page = kzalloc_obj(*page, GFP_KERNEL);
+ page = kzalloc_obj(*page);
if (!page)
return -ENOMEM;
@@ -405,7 +405,7 @@ int kfd_event_create(struct file *devkfd, struct kfd_process *p,
uint64_t *event_page_offset, uint32_t *event_slot_index)
{
int ret = 0;
- struct kfd_event *ev = kzalloc_obj(*ev, GFP_KERNEL);
+ struct kfd_event *ev = kzalloc_obj(*ev);
if (!ev)
return -ENOMEM;
@@ -458,11 +458,11 @@ int kfd_criu_restore_event(struct file *devkfd,
struct kfd_event *ev = NULL;
int ret = 0;
- ev_priv = kmalloc_obj(*ev_priv, GFP_KERNEL);
+ ev_priv = kmalloc_obj(*ev_priv);
if (!ev_priv)
return -ENOMEM;
- ev = kzalloc_obj(*ev, GFP_KERNEL);
+ ev = kzalloc_obj(*ev);
if (!ev) {
ret = -ENOMEM;
goto exit;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
index 9e28dda09285..3ffa081daaec 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
@@ -309,7 +309,7 @@ struct kernel_queue *kernel_queue_init(struct kfd_node *dev,
{
struct kernel_queue *kq;
- kq = kzalloc_obj(*kq, GFP_KERNEL);
+ kq = kzalloc_obj(*kq);
if (!kq)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
index 93f389ba8cc9..723b725d20b8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
@@ -51,7 +51,7 @@ struct kfd_mem_obj *allocate_hiq_mqd(struct mqd_manager *mm, struct queue_proper
struct kfd_mem_obj *mqd_mem_obj;
struct kfd_node *dev = mm->dev;
- mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj, GFP_KERNEL);
+ mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj);
if (!mqd_mem_obj)
return NULL;
@@ -69,7 +69,7 @@ struct kfd_mem_obj *allocate_sdma_mqd(struct mqd_manager *mm,
struct kfd_node *dev = mm->dev;
uint64_t offset;
- mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj, GFP_KERNEL);
+ mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj);
if (!mqd_mem_obj)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
index 575aebee8ad1..562d475cf4c9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
@@ -389,7 +389,7 @@ struct mqd_manager *mqd_manager_init_cik(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
index daf5e487d87e..d6067316d7f4 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -451,7 +451,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
index fd258bbc37b4..e3a7acb0ccbc 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
@@ -465,7 +465,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c
index e826a4149ff0..0b97376fc6f9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c
@@ -385,7 +385,7 @@ struct mqd_manager *mqd_manager_init_v12(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c
index 6fa17465d3fa..eef6bdce4be3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c
@@ -646,7 +646,7 @@ struct mqd_manager *mqd_manager_init_v12_1(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
index 5d3b500a4146..d5c234f30e8d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
@@ -147,7 +147,7 @@ static struct kfd_mem_obj *allocate_mqd(struct mqd_manager *mm,
* amdgpu memory functions to do so.
*/
if (node->kfd->cwsr_enabled && (q->type == KFD_QUEUE_TYPE_COMPUTE)) {
- mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj, GFP_KERNEL);
+ mqd_mem_obj = kzalloc_obj(struct kfd_mem_obj);
if (!mqd_mem_obj)
return NULL;
retval = amdgpu_amdkfd_alloc_kernel_mem(node->adev,
@@ -960,7 +960,7 @@ struct mqd_manager *mqd_manager_init_v9(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
index 27875d88a5ea..69c1b8a690b8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
@@ -446,7 +446,7 @@ struct mqd_manager *mqd_manager_init_vi(enum KFD_MQD_TYPE type,
if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
return NULL;
- mqd = kzalloc_obj(*mqd, GFP_KERNEL);
+ mqd = kzalloc_obj(*mqd);
if (!mqd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index a5f479af3607..e5b56412931b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -91,7 +91,7 @@
/* Macro for allocating structures */
#define kfd_alloc_struct(ptr_to_struct) \
- ((typeof(ptr_to_struct)) kzalloc_obj(*ptr_to_struct, GFP_KERNEL))
+ ((typeof(ptr_to_struct)) kzalloc_obj(*ptr_to_struct))
#define KFD_MAX_NUM_OF_PROCESSES 512
#define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS 1024
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index ff64bde0acd2..8283098b2388 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -153,7 +153,7 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
(q->properties.type != KFD_QUEUE_TYPE_SDMA_XGMI))
continue;
- sdma_q = kzalloc_obj(struct temp_sdma_queue_list, GFP_KERNEL);
+ sdma_q = kzalloc_obj(struct temp_sdma_queue_list);
if (!sdma_q) {
dqm_unlock(dqm);
goto cleanup;
@@ -1593,7 +1593,7 @@ struct kfd_process *create_process(const struct task_struct *thread, bool primar
struct mmu_notifier *mn;
int err = -ENOMEM;
- process = kzalloc_obj(*process, GFP_KERNEL);
+ process = kzalloc_obj(*process);
if (!process)
goto err_alloc_process;
@@ -1709,7 +1709,7 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_node *dev,
if (WARN_ON_ONCE(p->n_pdds >= MAX_GPU_INSTANCE))
return NULL;
- pdd = kzalloc_obj(*pdd, GFP_KERNEL);
+ pdd = kzalloc_obj(*pdd);
if (!pdd)
return NULL;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index dac1f9604d8e..8ea31699d38b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -383,7 +383,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
memset(pdd->proc_ctx_cpu_ptr, 0, AMDGPU_MES_PROC_CTX_SIZE);
}
- pqn = kzalloc_obj(*pqn, GFP_KERNEL);
+ pqn = kzalloc_obj(*pqn);
if (!pqn) {
retval = -ENOMEM;
goto err_allocate_pqn;
@@ -991,7 +991,7 @@ int kfd_criu_restore_queue(struct kfd_process *p,
if (*priv_data_offset + sizeof(*q_data) > max_priv_data_size)
return -EINVAL;
- q_data = kmalloc_obj(*q_data, GFP_KERNEL);
+ q_data = kmalloc_obj(*q_data);
if (!q_data)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
index 1285c70a1c3b..bbe869ceae3f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
@@ -70,7 +70,7 @@ int init_queue(struct queue **q, const struct queue_properties *properties)
{
struct queue *tmp_q;
- tmp_q = kzalloc_obj(*tmp_q, GFP_KERNEL);
+ tmp_q = kzalloc_obj(*tmp_q);
if (!tmp_q)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index 242e58fea05e..15975c23a88e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -370,7 +370,7 @@ int kfd_smi_event_open(struct kfd_node *dev, uint32_t *fd)
struct kfd_smi_client *client;
int ret;
- client = kzalloc_obj(struct kfd_smi_client, GFP_KERNEL);
+ client = kzalloc_obj(struct kfd_smi_client);
if (!client)
return -ENOMEM;
INIT_LIST_HEAD(&client->list);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index e168a74190e3..080242f9981b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -168,7 +168,7 @@ svm_range_dma_map_dev(struct amdgpu_device *adev, struct svm_range *prange,
int i, r;
if (!addr) {
- addr = kvzalloc_objs(*addr, prange->npages, GFP_KERNEL);
+ addr = kvzalloc_objs(*addr, prange->npages);
if (!addr)
return -ENOMEM;
prange->dma_addr[gpuidx] = addr;
@@ -329,7 +329,7 @@ svm_range *svm_range_new(struct svm_range_list *svms, uint64_t start,
struct svm_range *prange;
struct kfd_process *p;
- prange = kzalloc_obj(*prange, GFP_KERNEL);
+ prange = kzalloc_obj(*prange);
if (!prange)
return NULL;
@@ -539,7 +539,7 @@ static struct svm_range_bo *svm_range_bo_new(void)
{
struct svm_range_bo *svm_bo;
- svm_bo = kzalloc_obj(*svm_bo, GFP_KERNEL);
+ svm_bo = kzalloc_obj(*svm_bo);
if (!svm_bo)
return NULL;
@@ -1674,7 +1674,7 @@ static int svm_range_validate_and_map(struct mm_struct *mm,
int32_t idx;
int r = 0;
- ctx = kzalloc_obj(struct svm_validate_context, GFP_KERNEL);
+ ctx = kzalloc_obj(struct svm_validate_context);
if (!ctx)
return -ENOMEM;
ctx->process = container_of(prange->svms, struct kfd_process, svms);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 8aa86502fceb..995f2c2528a9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -711,7 +711,7 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
i = 0;
list_for_each_entry(mem, &dev->mem_props, list) {
- mem->kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ mem->kobj = kzalloc_obj(struct kobject);
if (!mem->kobj)
return -ENOMEM;
ret = kobject_init_and_add(mem->kobj, &mem_type,
@@ -732,7 +732,7 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
i = 0;
list_for_each_entry(cache, &dev->cache_props, list) {
- cache->kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ cache->kobj = kzalloc_obj(struct kobject);
if (!cache->kobj)
return -ENOMEM;
ret = kobject_init_and_add(cache->kobj, &cache_type,
@@ -753,7 +753,7 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
i = 0;
list_for_each_entry(iolink, &dev->io_link_props, list) {
- iolink->kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ iolink->kobj = kzalloc_obj(struct kobject);
if (!iolink->kobj)
return -ENOMEM;
ret = kobject_init_and_add(iolink->kobj, &iolink_type,
@@ -774,7 +774,7 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
i = 0;
list_for_each_entry(p2plink, &dev->p2p_link_props, list) {
- p2plink->kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ p2plink->kobj = kzalloc_obj(struct kobject);
if (!p2plink->kobj)
return -ENOMEM;
ret = kobject_init_and_add(p2plink->kobj, &iolink_type,
@@ -1381,7 +1381,7 @@ static int kfd_build_p2p_node_entry(struct kfd_topology_device *dev,
{
int ret;
- p2plink->kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ p2plink->kobj = kzalloc_obj(struct kobject);
if (!p2plink->kobj)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 10bc1d252b1f..988f42998010 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1724,7 +1724,7 @@ dm_allocate_gpu_mem(
AMDGPU_GEM_DOMAIN_GTT : AMDGPU_GEM_DOMAIN_VRAM;
int ret;
- da = kzalloc_obj(struct dal_allocation, GFP_KERNEL);
+ da = kzalloc_obj(struct dal_allocation);
if (!da)
return NULL;
@@ -2526,7 +2526,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
}
- adev->dm.dmub_srv = kzalloc_obj(*adev->dm.dmub_srv, GFP_KERNEL);
+ adev->dm.dmub_srv = kzalloc_obj(*adev->dm.dmub_srv);
dmub_srv = adev->dm.dmub_srv;
if (!dmub_srv) {
@@ -2607,7 +2607,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
memory_params.region_info = &region_info;
memory_params.window_memory_type = window_memory_type;
- adev->dm.dmub_fb_info = kzalloc_obj(*adev->dm.dmub_fb_info, GFP_KERNEL);
+ adev->dm.dmub_fb_info = kzalloc_obj(*adev->dm.dmub_fb_info);
fb_info = adev->dm.dmub_fb_info;
if (!fb_info) {
@@ -3363,7 +3363,7 @@ static void dm_gpureset_commit_state(struct dc_state *dc_state,
} *bundle __free(kfree);
int k, m;
- bundle = kzalloc_obj(*bundle, GFP_KERNEL);
+ bundle = kzalloc_obj(*bundle);
if (!bundle) {
drm_err(dm->ddev, "Failed to allocate update bundle\n");
@@ -3931,7 +3931,7 @@ void amdgpu_dm_update_connector_after_detect(
if (!aconnector->timing_requested) {
aconnector->timing_requested =
- kzalloc_obj(struct dc_crtc_timing, GFP_KERNEL);
+ kzalloc_obj(struct dc_crtc_timing);
if (!aconnector->timing_requested)
drm_err(dev,
"failed to create aconnector->requested_timing\n");
@@ -4882,7 +4882,7 @@ dm_atomic_duplicate_state(struct drm_private_obj *obj)
{
struct dm_atomic_state *old_state, *new_state;
- new_state = kzalloc_obj(*new_state, GFP_KERNEL);
+ new_state = kzalloc_obj(*new_state);
if (!new_state)
return NULL;
@@ -4939,7 +4939,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
/* indicates support for immediate flip */
adev_to_drm(adev)->mode_config.async_page_flip = true;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
@@ -5367,7 +5367,7 @@ static int initialize_plane(struct amdgpu_display_manager *dm,
unsigned long possible_crtcs;
int ret = 0;
- plane = kzalloc_obj(struct drm_plane, GFP_KERNEL);
+ plane = kzalloc_obj(struct drm_plane);
if (!plane) {
drm_err(adev_to_drm(dm->adev), "KMS: Failed to allocate plane\n");
return -ENOMEM;
@@ -5626,11 +5626,11 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
continue;
}
- aconnector = kzalloc_obj(*aconnector, GFP_KERNEL);
+ aconnector = kzalloc_obj(*aconnector);
if (!aconnector)
goto fail;
- aencoder = kzalloc_obj(*aencoder, GFP_KERNEL);
+ aencoder = kzalloc_obj(*aencoder);
if (!aencoder)
goto fail;
@@ -7824,7 +7824,7 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
kfree(state);
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state) {
state->scaling = RMX_OFF;
@@ -9099,7 +9099,7 @@ static int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
if (!ddc_service->ddc_pin)
return result;
- cmd.payloads = kzalloc_objs(struct i2c_payload, num, GFP_KERNEL);
+ cmd.payloads = kzalloc_objs(struct i2c_payload, num);
if (!cmd.payloads)
return result;
@@ -9148,7 +9148,7 @@ create_i2c(struct ddc_service *ddc_service, bool oem)
struct amdgpu_device *adev = ddc_service->ctx->driver_context;
struct amdgpu_i2c_adapter *i2c;
- i2c = kzalloc_obj(struct amdgpu_i2c_adapter, GFP_KERNEL);
+ i2c = kzalloc_obj(struct amdgpu_i2c_adapter);
if (!i2c)
return NULL;
i2c->base.owner = THIS_MODULE;
@@ -9949,7 +9949,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
struct dc_stream_update stream_update;
} *bundle;
- bundle = kzalloc_obj(*bundle, GFP_KERNEL);
+ bundle = kzalloc_obj(*bundle);
if (!bundle) {
drm_err(dev, "Failed to allocate update bundle\n");
@@ -10624,7 +10624,7 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm,
struct amdgpu_framebuffer *afb;
int i = 0;
- wb_info = kzalloc_obj(*wb_info, GFP_KERNEL);
+ wb_info = kzalloc_obj(*wb_info);
if (!wb_info) {
drm_err(adev_to_drm(adev), "Failed to allocate wb_info\n");
return;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
index 76405a351111..2ba98f384685 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
@@ -1227,7 +1227,7 @@ int amdgpu_dm_check_crtc_color_mgmt(struct dm_crtc_state *crtc,
crtc->cm_is_degamma_srgb = false;
if (check_only) {
- out_tf = kvzalloc_obj(*out_tf, GFP_KERNEL);
+ out_tf = kvzalloc_obj(*out_tf);
if (!out_tf)
return -ENOMEM;
} else {
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
index 2f072167bcc5..f25c0ede7199 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
@@ -66,7 +66,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
memset(ops, 0, sizeof(ops));
/* 1D curve - DEGAM TF */
- ops[i] = kzalloc_obj(*ops[0], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[0]);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -83,7 +83,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* Multiplier */
- ops[i] = kzalloc_obj(struct drm_colorop, GFP_KERNEL);
+ ops[i] = kzalloc_obj(struct drm_colorop);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -98,7 +98,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 3x4 matrix */
- ops[i] = kzalloc_obj(struct drm_colorop, GFP_KERNEL);
+ ops[i] = kzalloc_obj(struct drm_colorop);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -114,7 +114,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
if (adev->dm.dc->caps.color.dpp.hw_3d_lut) {
/* 1D curve - SHAPER TF */
- ops[i] = kzalloc_obj(*ops[0], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[0]);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -131,7 +131,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 1D LUT - SHAPER LUT */
- ops[i] = kzalloc_obj(*ops[0], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[0]);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -148,7 +148,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 3D LUT */
- ops[i] = kzalloc_obj(*ops[0], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[0]);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -166,7 +166,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
}
/* 1D curve - BLND TF */
- ops[i] = kzalloc_obj(*ops[0], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[0]);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
@@ -183,7 +183,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 1D LUT - BLND LUT */
- ops[i] = kzalloc_obj(struct drm_colorop, GFP_KERNEL);
+ ops[i] = kzalloc_obj(struct drm_colorop);
if (!ops[i]) {
ret = -ENOMEM;
goto cleanup;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 49f68ddcfec8..130190e8a1b2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@ -231,7 +231,7 @@ struct idle_workqueue *idle_create_workqueue(struct amdgpu_device *adev)
{
struct idle_workqueue *idle_work;
- idle_work = kzalloc_obj(*idle_work, GFP_KERNEL);
+ idle_work = kzalloc_obj(*idle_work);
if (ZERO_OR_NULL_PTR(idle_work))
return NULL;
@@ -447,7 +447,7 @@ static struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state(struct drm_crtc *cr
if (WARN_ON(!crtc->state))
return NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
@@ -487,7 +487,7 @@ static void amdgpu_dm_crtc_reset_state(struct drm_crtc *crtc)
if (crtc->state)
amdgpu_dm_crtc_destroy_state(crtc, crtc->state);
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (WARN_ON(!state))
return;
@@ -728,14 +728,14 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
bool has_degamma;
int res = -ENOMEM;
- cursor_plane = kzalloc_obj(*cursor_plane, GFP_KERNEL);
+ cursor_plane = kzalloc_obj(*cursor_plane);
if (!cursor_plane)
goto fail;
cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
res = amdgpu_dm_plane_init(dm, cursor_plane, 0, NULL);
- acrtc = kzalloc_obj(struct amdgpu_crtc, GFP_KERNEL);
+ acrtc = kzalloc_obj(struct amdgpu_crtc);
if (!acrtc)
goto fail;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index b43ec19848fd..24bc2a86904b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -4301,7 +4301,7 @@ static ssize_t dcc_en_bits_read(
int *dcc_en_bits;
int i, r;
- dcc_en_bits = kzalloc_objs(int, num_pipes, GFP_KERNEL);
+ dcc_en_bits = kzalloc_objs(int, num_pipes);
if (!dcc_en_bits)
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
index 3b26797c9d03..eb73bbf8f411 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
@@ -746,7 +746,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev,
struct hdcp_workqueue *hdcp_work;
int i = 0;
- hdcp_work = kzalloc_objs(*hdcp_work, max_caps, GFP_KERNEL);
+ hdcp_work = kzalloc_objs(*hdcp_work, max_caps);
if (ZERO_OR_NULL_PTR(hdcp_work))
return NULL;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index d26003d2a2cc..a09761f9882d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -617,7 +617,7 @@ bool dm_helpers_submit_i2c(
return false;
}
- msgs = kzalloc_objs(struct i2c_msg, num, GFP_KERNEL);
+ msgs = kzalloc_objs(struct i2c_msg, num);
if (!msgs)
return false;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
index dfb80689d889..e49803a90eda 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
@@ -313,7 +313,7 @@ void *amdgpu_dm_irq_register_interrupt(struct amdgpu_device *adev,
if (false == validate_irq_registration_params(int_params, ih))
return DAL_INVALID_IRQ_HANDLER_IDX;
- handler_data = kzalloc_obj(*handler_data, GFP_KERNEL);
+ handler_data = kzalloc_obj(*handler_data);
if (!handler_data) {
DRM_ERROR("DM_IRQ: failed to allocate irq handler!\n");
return DAL_INVALID_IRQ_HANDLER_IDX;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 781163d6b23b..7be50e8c0636 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -640,7 +640,7 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
struct drm_connector *connector;
int i;
- aconnector = kzalloc_obj(*aconnector, GFP_KERNEL);
+ aconnector = kzalloc_obj(*aconnector);
if (!aconnector)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
index c50583a05ce3..70587e5a8d46 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
@@ -1470,7 +1470,7 @@ static void amdgpu_dm_plane_drm_plane_reset(struct drm_plane *plane)
if (plane->state)
plane->funcs->atomic_destroy_state(plane, plane->state);
- amdgpu_state = kzalloc_obj(*amdgpu_state, GFP_KERNEL);
+ amdgpu_state = kzalloc_obj(*amdgpu_state);
WARN_ON(amdgpu_state == NULL);
if (!amdgpu_state)
@@ -1488,7 +1488,7 @@ static struct drm_plane_state *amdgpu_dm_plane_drm_plane_duplicate_state(struct
struct dm_plane_state *dm_plane_state, *old_dm_plane_state;
old_dm_plane_state = to_dm_plane_state(plane->state);
- dm_plane_state = kzalloc_obj(*dm_plane_state, GFP_KERNEL);
+ dm_plane_state = kzalloc_obj(*dm_plane_state);
if (!dm_plane_state)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
index dbc4c2e0e514..9ae1399549c3 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
@@ -120,11 +120,11 @@ static void calculate_bandwidth(
int32_t number_of_displays_enabled_with_margin = 0;
int32_t number_of_aligned_displays_with_no_margin = 0;
- yclk = kzalloc_objs(*yclk, 3, GFP_KERNEL);
+ yclk = kzalloc_objs(*yclk, 3);
if (!yclk)
return;
- sclk = kzalloc_objs(*sclk, 8, GFP_KERNEL);
+ sclk = kzalloc_objs(*sclk, 8);
if (!sclk)
goto free_yclk;
@@ -2051,11 +2051,11 @@ void bw_calcs_init(struct bw_calcs_dceip *bw_dceip,
enum bw_calcs_version version = bw_calcs_version_from_asic_id(asic_id);
- dceip = kzalloc_obj(*dceip, GFP_KERNEL);
+ dceip = kzalloc_obj(*dceip);
if (!dceip)
return;
- vbios = kzalloc_obj(*vbios, GFP_KERNEL);
+ vbios = kzalloc_obj(*vbios);
if (!vbios) {
kfree(dceip);
return;
diff --git a/drivers/gpu/drm/amd/display/dc/basics/vector.c b/drivers/gpu/drm/amd/display/dc/basics/vector.c
index 8f6b780b7778..a8b750ff8573 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/vector.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/vector.c
@@ -94,7 +94,7 @@ struct vector *dal_vector_presized_create(
void *initial_value,
uint32_t struct_size)
{
- struct vector *vector = kzalloc_obj(struct vector, GFP_KERNEL);
+ struct vector *vector = kzalloc_obj(struct vector);
if (vector == NULL)
return NULL;
@@ -113,7 +113,7 @@ struct vector *dal_vector_create(
uint32_t capacity,
uint32_t struct_size)
{
- struct vector *vector = kzalloc_obj(struct vector, GFP_KERNEL);
+ struct vector *vector = kzalloc_obj(struct vector);
if (vector == NULL)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 65993314c5cd..73e3c45eeeba 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -98,7 +98,7 @@ struct dc_bios *bios_parser_create(
{
struct bios_parser *bp;
- bp = kzalloc_obj(struct bios_parser, GFP_KERNEL);
+ bp = kzalloc_obj(struct bios_parser);
if (!bp)
return NULL;
@@ -2667,7 +2667,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
struct bios_parser *bp = BP_FROM_DCB(dcb);
struct integrated_info *info;
- info = kzalloc_obj(struct integrated_info, GFP_KERNEL);
+ info = kzalloc_obj(struct integrated_info);
if (info == NULL) {
ASSERT_CRITICAL(0);
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 9da95c59a68b..94fddf22f5a9 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3207,7 +3207,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
struct bios_parser *bp = BP_FROM_DCB(dcb);
struct integrated_info *info;
- info = kzalloc_obj(struct integrated_info, GFP_KERNEL);
+ info = kzalloc_obj(struct integrated_info);
if (info == NULL) {
ASSERT_CRITICAL(0);
@@ -3793,7 +3793,7 @@ struct dc_bios *firmware_parser_create(
{
struct bios_parser *bp;
- bp = kzalloc_obj(struct bios_parser, GFP_KERNEL);
+ bp = kzalloc_obj(struct bios_parser);
if (!bp)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index e05a6a9d66ff..1481915d4d71 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -284,7 +284,7 @@ static bool create_links(
}
for (i = 0; i < num_virtual_links; i++) {
- struct dc_link *link = kzalloc_obj(*link, GFP_KERNEL);
+ struct dc_link *link = kzalloc_obj(*link);
struct encoder_init_data enc_init = {0};
if (link == NULL) {
@@ -304,7 +304,7 @@ static bool create_links(
link->link_id.enum_id = ENUM_ID_1;
link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->replay_settings.config.replay_version = DC_REPLAY_VERSION_UNSUPPORTED;
- link->link_enc = kzalloc_obj(*link->link_enc, GFP_KERNEL);
+ link->link_enc = kzalloc_obj(*link->link_enc);
if (!link->link_enc) {
BREAK_TO_DEBUGGER();
@@ -409,7 +409,7 @@ static void destroy_link_encoders(struct dc *dc)
static struct dc_perf_trace *dc_perf_trace_create(void)
{
- return kzalloc_obj(struct dc_perf_trace, GFP_KERNEL);
+ return kzalloc_obj(struct dc_perf_trace);
}
static void dc_perf_trace_destroy(struct dc_perf_trace **perf_trace)
@@ -1005,7 +1005,7 @@ static bool dc_construct_ctx(struct dc *dc,
{
struct dc_context *dc_ctx;
- dc_ctx = kzalloc_obj(*dc_ctx, GFP_KERNEL);
+ dc_ctx = kzalloc_obj(*dc_ctx);
if (!dc_ctx)
return false;
@@ -1023,7 +1023,7 @@ static bool dc_construct_ctx(struct dc *dc,
dc_ctx->clk_reg_offsets = init_params->clk_reg_offsets;
/* Create logger */
- dc_ctx->logger = kmalloc_obj(*dc_ctx->logger, GFP_KERNEL);
+ dc_ctx->logger = kmalloc_obj(*dc_ctx->logger);
if (!dc_ctx->logger) {
kfree(dc_ctx);
@@ -1063,7 +1063,7 @@ static bool dc_construct(struct dc *dc,
dc->config = init_params->flags;
// Allocate memory for the vm_helper
- dc->vm_helper = kzalloc_obj(struct vm_helper, GFP_KERNEL);
+ dc->vm_helper = kzalloc_obj(struct vm_helper);
if (!dc->vm_helper) {
dm_error("%s: failed to create dc->vm_helper\n", __func__);
goto fail;
@@ -1071,7 +1071,7 @@ static bool dc_construct(struct dc *dc,
memcpy(&dc->bb_overrides, &init_params->bb_overrides, sizeof(dc->bb_overrides));
- dc_dceip = kzalloc_obj(*dc_dceip, GFP_KERNEL);
+ dc_dceip = kzalloc_obj(*dc_dceip);
if (!dc_dceip) {
dm_error("%s: failed to create dceip\n", __func__);
goto fail;
@@ -1079,14 +1079,14 @@ static bool dc_construct(struct dc *dc,
dc->bw_dceip = dc_dceip;
- dc_vbios = kzalloc_obj(*dc_vbios, GFP_KERNEL);
+ dc_vbios = kzalloc_obj(*dc_vbios);
if (!dc_vbios) {
dm_error("%s: failed to create vbios\n", __func__);
goto fail;
}
dc->bw_vbios = dc_vbios;
- dcn_soc = kzalloc_obj(*dcn_soc, GFP_KERNEL);
+ dcn_soc = kzalloc_obj(*dcn_soc);
if (!dcn_soc) {
dm_error("%s: failed to create dcn_soc\n", __func__);
goto fail;
@@ -1094,7 +1094,7 @@ static bool dc_construct(struct dc *dc,
dc->dcn_soc = dcn_soc;
- dcn_ip = kzalloc_obj(*dcn_ip, GFP_KERNEL);
+ dcn_ip = kzalloc_obj(*dcn_ip);
if (!dcn_ip) {
dm_error("%s: failed to create dcn_ip\n", __func__);
goto fail;
@@ -1496,7 +1496,7 @@ static void disable_vbios_mode_if_required(
struct dc *dc_create(const struct dc_init_data *init_params)
{
- struct dc *dc = kzalloc_obj(*dc, GFP_KERNEL);
+ struct dc *dc = kzalloc_obj(*dc);
unsigned int full_pipe_count;
if (!dc)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_sink.c b/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
index 0bcd7445fe97..e5ac7056a187 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
@@ -76,7 +76,7 @@ void dc_sink_release(struct dc_sink *sink)
struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)
{
- struct dc_sink *sink = kzalloc_obj(*sink, GFP_KERNEL);
+ struct dc_sink *sink = kzalloc_obj(*sink);
if (NULL == sink)
goto alloc_fail;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_state.c b/drivers/gpu/drm/amd/display/dc/core/dc_state.c
index c85b8915bbd3..a40e5c44143f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_state.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_state.c
@@ -195,7 +195,7 @@ struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *p
{
struct dc_state *state;
- state = kvzalloc_obj(struct dc_state, GFP_KERNEL);
+ state = kvzalloc_obj(struct dc_state);
if (!state)
return NULL;
@@ -251,7 +251,7 @@ struct dc_state *dc_state_create_copy(struct dc_state *src_state)
{
struct dc_state *new_state;
- new_state = kvmalloc_obj(struct dc_state, GFP_KERNEL);
+ new_state = kvmalloc_obj(struct dc_state);
if (!new_state)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index def02e26cb1f..246893d80f1f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -170,7 +170,7 @@ struct dc_stream_state *dc_create_stream_for_sink(
if (sink == NULL)
goto fail;
- stream = kzalloc_obj(struct dc_stream_state, GFP_KERNEL);
+ stream = kzalloc_obj(struct dc_stream_state);
if (stream == NULL)
goto fail;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
index 11c237720bd2..d4c40b44d909 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
@@ -195,7 +195,7 @@ void dc_gamma_release(struct dc_gamma **gamma)
struct dc_gamma *dc_create_gamma(void)
{
- struct dc_gamma *gamma = kvzalloc_obj(*gamma, GFP_KERNEL);
+ struct dc_gamma *gamma = kvzalloc_obj(*gamma);
if (gamma == NULL)
goto alloc_fail;
@@ -225,7 +225,7 @@ void dc_transfer_func_release(struct dc_transfer_func *tf)
struct dc_transfer_func *dc_create_transfer_func(void)
{
- struct dc_transfer_func *tf = kvzalloc_obj(*tf, GFP_KERNEL);
+ struct dc_transfer_func *tf = kvzalloc_obj(*tf);
if (tf == NULL)
goto alloc_fail;
@@ -247,7 +247,7 @@ static void dc_3dlut_func_free(struct kref *kref)
struct dc_3dlut *dc_create_3dlut_func(void)
{
- struct dc_3dlut *lut = kvzalloc_obj(*lut, GFP_KERNEL);
+ struct dc_3dlut *lut = kvzalloc_obj(*lut);
if (lut == NULL)
goto alloc_fail;
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
index 9b70c4e96ffe..b15360bcdacf 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
@@ -60,7 +60,7 @@ static void dc_dmub_srv_handle_failure(struct dc_dmub_srv *dc_dmub_srv)
struct dc_dmub_srv *dc_dmub_srv_create(struct dc *dc, struct dmub_srv *dmub)
{
struct dc_dmub_srv *dc_srv =
- kzalloc_obj(struct dc_dmub_srv, GFP_KERNEL);
+ kzalloc_obj(struct dc_dmub_srv);
if (dc_srv == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
index 7c578d10cbca..13ba7f5ce13e 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
@@ -200,7 +200,7 @@ struct dccg *dccg2_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
index b147456a8cd4..5b9ba9a811ea 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
@@ -70,7 +70,7 @@ struct dccg *dccg201_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
index f14abe712f2d..75c69348027e 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
@@ -116,7 +116,7 @@ struct dccg *dccg21_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
index f264cf2285ce..ca947d710ad1 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
@@ -62,7 +62,7 @@ struct dccg *dccg3_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
@@ -87,7 +87,7 @@ struct dccg *dccg30_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
index 93ff864def88..837f4e3d1a60 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
@@ -61,7 +61,7 @@ struct dccg *dccg301_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
index 5ab0325f3615..7f58acfe1177 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
@@ -863,7 +863,7 @@ struct dccg *dccg31_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
index 5193883bfb41..ac6a909187c0 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
@@ -392,7 +392,7 @@ struct dccg *dccg314_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
index be44bc057bee..e817cd7c2b6a 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
@@ -360,7 +360,7 @@ struct dccg *dccg32_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
index 34414be7efb6..0b7908fbb115 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
@@ -2461,7 +2461,7 @@ struct dccg *dccg35_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c b/drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
index 9554d24b882b..a37f94dec6f2 100644
--- a/drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
@@ -892,7 +892,7 @@ struct dccg *dccg401_create(
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
- struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn, GFP_KERNEL);
+ struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
index 71bb5794a513..41169b42534c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
@@ -283,7 +283,7 @@ struct abm *dce_abm_create(
const struct dce_abm_shift *abm_shift,
const struct dce_abm_mask *abm_mask)
{
- struct dce_abm *abm_dce = kzalloc_obj(*abm_dce, GFP_KERNEL);
+ struct dce_abm *abm_dce = kzalloc_obj(*abm_dce);
if (abm_dce == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
index ba30394b828f..d18490cd0f1e 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
@@ -1331,7 +1331,7 @@ struct audio *dce_audio_create(
const struct dce_audio_mask *masks
)
{
- struct dce_audio *audio = kzalloc_obj(*audio, GFP_KERNEL);
+ struct dce_audio *audio = kzalloc_obj(*audio);
if (audio == NULL) {
ASSERT_CRITICAL(audio);
@@ -1357,7 +1357,7 @@ struct audio *dce60_audio_create(
const struct dce_audio_mask *masks
)
{
- struct dce_audio *audio = kzalloc_obj(*audio, GFP_KERNEL);
+ struct dce_audio *audio = kzalloc_obj(*audio);
if (audio == NULL) {
ASSERT_CRITICAL(audio);
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c
index 405758106101..dca025b5ff1f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c
@@ -848,7 +848,7 @@ struct clk_mgr *dce_clk_mgr_create(
const struct clk_mgr_shift *clk_shift,
const struct clk_mgr_mask *clk_mask)
{
- struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce, GFP_KERNEL);
+ struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce);
if (clk_mgr_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -871,7 +871,7 @@ struct clk_mgr *dce110_clk_mgr_create(
const struct clk_mgr_shift *clk_shift,
const struct clk_mgr_mask *clk_mask)
{
- struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce, GFP_KERNEL);
+ struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce);
if (clk_mgr_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -896,7 +896,7 @@ struct clk_mgr *dce112_clk_mgr_create(
const struct clk_mgr_shift *clk_shift,
const struct clk_mgr_mask *clk_mask)
{
- struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce, GFP_KERNEL);
+ struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce);
if (clk_mgr_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -917,7 +917,7 @@ struct clk_mgr *dce112_clk_mgr_create(
struct clk_mgr *dce120_clk_mgr_create(struct dc_context *ctx)
{
- struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce, GFP_KERNEL);
+ struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce);
if (clk_mgr_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -939,7 +939,7 @@ struct clk_mgr *dce120_clk_mgr_create(struct dc_context *ctx)
struct clk_mgr *dce121_clk_mgr_create(struct dc_context *ctx)
{
- struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce, GFP_KERNEL);
+ struct dce_clk_mgr *clk_mgr_dce = kzalloc_obj(*clk_mgr_dce);
if (clk_mgr_dce == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
index dd33218dcbab..e871b72e43ef 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
@@ -1105,7 +1105,7 @@ struct dmcu *dce_dmcu_create(
const struct dce_dmcu_shift *dmcu_shift,
const struct dce_dmcu_mask *dmcu_mask)
{
- struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce, GFP_KERNEL);
+ struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce);
if (dmcu_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -1126,7 +1126,7 @@ struct dmcu *dcn10_dmcu_create(
const struct dce_dmcu_shift *dmcu_shift,
const struct dce_dmcu_mask *dmcu_mask)
{
- struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce, GFP_KERNEL);
+ struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce);
if (dmcu_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -1147,7 +1147,7 @@ struct dmcu *dcn20_dmcu_create(
const struct dce_dmcu_shift *dmcu_shift,
const struct dce_dmcu_mask *dmcu_mask)
{
- struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce, GFP_KERNEL);
+ struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce);
if (dmcu_dce == NULL) {
BREAK_TO_DEBUGGER();
@@ -1168,7 +1168,7 @@ struct dmcu *dcn21_dmcu_create(
const struct dce_dmcu_shift *dmcu_shift,
const struct dce_dmcu_mask *dmcu_mask)
{
- struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce, GFP_KERNEL);
+ struct dce_dmcu *dmcu_dce = kzalloc_obj(*dmcu_dce);
if (dmcu_dce == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
index 11ba6e59f5b5..b686d89b79b2 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
@@ -222,7 +222,7 @@ struct abm *dmub_abm_create(
const struct dce_abm_mask *abm_mask)
{
if (ctx->dc->caps.dmcub_support) {
- struct dce_abm *abm_dce = kzalloc_obj(*abm_dce, GFP_KERNEL);
+ struct dce_abm *abm_dce = kzalloc_obj(*abm_dce);
if (abm_dce == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
index 4527e35a0666..f94fd007af23 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -488,7 +488,7 @@ static void dmub_psr_construct(struct dmub_psr *psr, struct dc_context *ctx)
*/
struct dmub_psr *dmub_psr_create(struct dc_context *ctx)
{
- struct dmub_psr *psr = kzalloc_obj(struct dmub_psr, GFP_KERNEL);
+ struct dmub_psr *psr = kzalloc_obj(struct dmub_psr);
if (psr == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
index c590c9274f21..28a218149b8b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
@@ -438,7 +438,7 @@ static void dmub_replay_construct(struct dmub_replay *replay, struct dc_context
*/
struct dmub_replay *dmub_replay_create(struct dc_context *ctx)
{
- struct dmub_replay *replay = kzalloc_obj(struct dmub_replay, GFP_KERNEL);
+ struct dmub_replay *replay = kzalloc_obj(struct dmub_replay);
if (replay == NULL) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
index 68849d518e76..9be578ff8c88 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
@@ -394,7 +394,7 @@ void dce110_compressor_set_fbc_invalidation_triggers(
struct compressor *dce110_compressor_create(struct dc_context *ctx)
{
struct dce110_compressor *cp110 =
- kzalloc_obj(struct dce110_compressor, GFP_KERNEL);
+ kzalloc_obj(struct dce110_compressor);
if (!cp110)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
index 24effd7d3ea3..187f45a7f5e1 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
@@ -831,7 +831,7 @@ void dce112_compressor_construct(struct dce112_compressor *compressor,
struct compressor *dce112_compressor_create(struct dc_context *ctx)
{
struct dce112_compressor *cp110 =
- kzalloc_obj(struct dce112_compressor, GFP_KERNEL);
+ kzalloc_obj(struct dce112_compressor);
if (!cp110)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c
index f30eeda44842..a9c8857476ac 100644
--- a/drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c
+++ b/drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c
@@ -159,7 +159,7 @@ bool virtual_stream_encoder_construct(
struct stream_encoder *virtual_stream_encoder_create(
struct dc_context *ctx, struct dc_bios *bp)
{
- struct stream_encoder *enc = kzalloc_obj(*enc, GFP_KERNEL);
+ struct stream_encoder *enc = kzalloc_obj(*enc);
if (!enc)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c b/drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
index c4b1a337ac92..37adf0e6a166 100644
--- a/drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
@@ -280,7 +280,7 @@ bool dwb3_ogam_set_input_transfer_func(
if (in_transfer_func_dwb_ogam == NULL)
return result;
- dwb_ogam_lut = kzalloc_obj(*dwb_ogam_lut, GFP_KERNEL);
+ dwb_ogam_lut = kzalloc_obj(*dwb_ogam_lut);
if (dwb_ogam_lut) {
cm_helper_translate_curve_to_hw_format(dwbc->ctx,
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c
index 4e3a5b3513d8..95532b7ee884 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c
@@ -270,7 +270,7 @@ struct gpio *dal_gpio_create(
uint32_t en,
enum gpio_pin_output_state output_state)
{
- struct gpio *gpio = kzalloc_obj(struct gpio, GFP_KERNEL);
+ struct gpio *gpio = kzalloc_obj(struct gpio);
if (!gpio) {
ASSERT_CRITICAL(false);
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
index fd7be0a35d0f..a2c46350e44e 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
@@ -58,7 +58,7 @@ struct gpio_service *dal_gpio_service_create(
struct gpio_service *service;
int32_t index_of_id;
- service = kzalloc_obj(struct gpio_service, GFP_KERNEL);
+ service = kzalloc_obj(struct gpio_service);
if (!service) {
BREAK_TO_DEBUGGER();
@@ -498,7 +498,7 @@ struct ddc *dal_gpio_create_ddc(
if (!service->translate.funcs->offset_to_id(offset, mask, &id, &en))
return NULL;
- ddc = kzalloc_obj(struct ddc, GFP_KERNEL);
+ ddc = kzalloc_obj(struct ddc);
if (!ddc) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c
index 05fa4119bf55..86d60986d669 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c
@@ -233,7 +233,7 @@ void dal_hw_ddc_init(
*hw_ddc = NULL;
}
- *hw_ddc = kzalloc_obj(struct hw_ddc, GFP_KERNEL);
+ *hw_ddc = kzalloc_obj(struct hw_ddc);
if (!*hw_ddc) {
ASSERT_CRITICAL(false);
return;
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c
index 61bbcade18cb..7f137cb96895 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c
@@ -111,7 +111,7 @@ void dal_hw_generic_init(
*hw_generic = NULL;
}
- *hw_generic = kzalloc_obj(struct hw_generic, GFP_KERNEL);
+ *hw_generic = kzalloc_obj(struct hw_generic);
if (!*hw_generic) {
ASSERT_CRITICAL(false);
return;
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c
index ee7d794a8c60..79e107904e21 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c
@@ -132,7 +132,7 @@ void dal_hw_hpd_init(
*hw_hpd = NULL;
}
- *hw_hpd = kzalloc_obj(struct hw_hpd, GFP_KERNEL);
+ *hw_hpd = kzalloc_obj(struct hw_hpd);
if (!*hw_hpd) {
ASSERT_CRITICAL(false);
return;
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
index 7083c57da007..a2d28be480e8 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
@@ -2399,7 +2399,7 @@ static int dcn10_align_pixel_clocks(struct dc *dc, int group_size,
DC_LOGGER_INIT(dc_ctx->logger);
- hw_crtc_timing = kzalloc_objs(*hw_crtc_timing, MAX_PIPES, GFP_KERNEL);
+ hw_crtc_timing = kzalloc_objs(*hw_crtc_timing, MAX_PIPES);
if (!hw_crtc_timing)
return master;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c b/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
index 002210b6bb62..676df39079fc 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
@@ -419,7 +419,7 @@ static void dce110_irq_construct(struct irq_service *irq_service,
struct irq_service *
dal_irq_service_dce110_create(struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c b/drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c
index 47714407252d..b473dae2abbb 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c
@@ -257,7 +257,7 @@ static void dce120_irq_construct(
struct irq_service *dal_irq_service_dce120_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c b/drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c
index 47a2a53979db..68692a126f60 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c
@@ -355,7 +355,7 @@ static void dce60_irq_construct(
struct irq_service *dal_irq_service_dce60_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c b/drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c
index bad0e02713f8..b5c5f42cf8f2 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c
@@ -267,7 +267,7 @@ static void dce80_irq_construct(
struct irq_service *dal_irq_service_dce80_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c b/drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c
index 51f3a5042788..ca2e13702fbb 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c
@@ -369,7 +369,7 @@ static void dcn10_irq_construct(
struct irq_service *dal_irq_service_dcn10_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c b/drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c
index cd09fa6e6706..1c4c51abc259 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c
@@ -374,7 +374,7 @@ static void dcn20_irq_construct(
struct irq_service *dal_irq_service_dcn20_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c b/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
index 7ca085b418e3..04b5d748e03a 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
@@ -328,7 +328,7 @@ static void dcn201_irq_construct(
struct irq_service *dal_irq_service_dcn201_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
index 67fbcce3409f..9e0881472e38 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
@@ -402,7 +402,7 @@ static void dcn21_irq_construct(
struct irq_service *dal_irq_service_dcn21_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c b/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
index 10a16dc17487..92bcd35723ca 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
@@ -411,7 +411,7 @@ static void dcn30_irq_construct(
struct irq_service *dal_irq_service_dcn30_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c b/drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c
index 55c863790402..16685d066c1a 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c
@@ -377,7 +377,7 @@ static void dcn302_irq_construct(struct irq_service *irq_service, struct irq_ser
struct irq_service *dal_irq_service_dcn302_create(struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c b/drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c
index 2ce7c829a445..01d83e1922d6 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c
@@ -273,7 +273,7 @@ static void dcn303_irq_construct(struct irq_service *irq_service, struct irq_ser
struct irq_service *dal_irq_service_dcn303_create(struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c b/drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c
index 710cda204bee..2114c5669e6e 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c
@@ -393,7 +393,7 @@ static void dcn31_irq_construct(
struct irq_service *dal_irq_service_dcn31_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c b/drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c
index 8cb120a3ceb7..16f158e0fb60 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c
@@ -395,7 +395,7 @@ static void dcn314_irq_construct(
struct irq_service *dal_irq_service_dcn314_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c b/drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c
index f3a0f8f176d8..8ee03c006ad6 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c
@@ -400,7 +400,7 @@ static void dcn315_irq_construct(
struct irq_service *dal_irq_service_dcn315_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c b/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c
index 80b388ac3511..07e6f7dd6b99 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c
@@ -425,7 +425,7 @@ static void dcn32_irq_construct(
struct irq_service *dal_irq_service_dcn32_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c b/drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c
index 44b3c3b0c657..3d28a5007f53 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c
@@ -389,7 +389,7 @@ static void dcn35_irq_construct(
struct irq_service *dal_irq_service_dcn35_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c b/drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c
index e4600282cf18..f716c2590876 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c
@@ -371,7 +371,7 @@ static void dcn351_irq_construct(
struct irq_service *dal_irq_service_dcn351_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c b/drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c
index e81077f764df..e718004901cf 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c
@@ -370,7 +370,7 @@ static void dcn36_irq_construct(
struct irq_service *dal_irq_service_dcn36_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c b/drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c
index 97c80aa30e8b..2cde50b2ae22 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c
@@ -403,7 +403,7 @@ static void dcn401_irq_construct(
struct irq_service *dal_irq_service_dcn401_create(
struct irq_service_init_data *init_data)
{
- struct irq_service *irq_service = kzalloc_obj(*irq_service, GFP_KERNEL);
+ struct irq_service *irq_service = kzalloc_obj(*irq_service);
if (!irq_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
index e1cf56cdc8c0..21815ad01a29 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
@@ -302,7 +302,7 @@ static void construct_link_service(struct link_service *link_srv)
struct link_service *link_create_link_service(void)
{
- struct link_service *link_srv = kzalloc_obj(*link_srv, GFP_KERNEL);
+ struct link_service *link_srv = kzalloc_obj(*link_srv);
if (link_srv == NULL)
goto fail;
@@ -897,7 +897,7 @@ static bool link_construct(struct dc_link *link,
struct dc_link *link_create(const struct link_init_data *init_params)
{
- struct dc_link *link = kzalloc_obj(*link, GFP_KERNEL);
+ struct dc_link *link = kzalloc_obj(*link);
if (NULL == link)
goto alloc_fail;
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
index 1a7c73263615..a66217e54a09 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
@@ -156,7 +156,7 @@ struct ddc_service *link_create_ddc_service(
{
struct ddc_service *ddc_service;
- ddc_service = kzalloc_obj(struct ddc_service, GFP_KERNEL);
+ ddc_service = kzalloc_obj(struct ddc_service);
if (!ddc_service)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c b/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
index 0df983c70ba3..f5bf5940e748 100644
--- a/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
+++ b/drivers/gpu/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
@@ -542,7 +542,7 @@ struct pg_cntl *pg_cntl35_create(
const struct pg_cntl_shift *pg_cntl_shift,
const struct pg_cntl_mask *pg_cntl_mask)
{
- struct dcn_pg_cntl *pg_cntl_dcn = kzalloc_obj(*pg_cntl_dcn, GFP_KERNEL);
+ struct dcn_pg_cntl *pg_cntl_dcn = kzalloc_obj(*pg_cntl_dcn);
struct pg_cntl *base;
if (pg_cntl_dcn == NULL) {
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c
index e562c71fb432..8e0b38762c96 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c
@@ -472,7 +472,7 @@ static struct timing_generator *dce100_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -486,7 +486,7 @@ static struct stream_encoder *dce100_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -520,7 +520,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dce100_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -597,7 +597,7 @@ static struct transform *dce100_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -610,7 +610,7 @@ static struct transform *dce100_transform_create(
static struct input_pixel_processor *dce100_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -634,7 +634,7 @@ static struct link_encoder *dce100_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110)
@@ -669,7 +669,7 @@ static struct link_encoder *dce100_link_encoder_create(
static struct panel_cntl *dce100_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -688,7 +688,7 @@ static struct output_pixel_processor *dce100_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -703,7 +703,7 @@ static struct dce_aux *dce100_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -741,7 +741,7 @@ static struct dce_i2c_hw *dce100_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -759,7 +759,7 @@ static struct clock_source *dce100_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1215,7 +1215,7 @@ struct resource_pool *dce100_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
index 68964e8ce10b..0a28d3573549 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
@@ -516,7 +516,7 @@ static struct timing_generator *dce110_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -530,7 +530,7 @@ static struct stream_encoder *dce110_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -563,7 +563,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dce110_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -632,7 +632,7 @@ static struct transform *dce110_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -645,7 +645,7 @@ static struct transform *dce110_transform_create(
static struct input_pixel_processor *dce110_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -669,7 +669,7 @@ static struct link_encoder *dce110_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -690,7 +690,7 @@ static struct link_encoder *dce110_link_encoder_create(
static struct panel_cntl *dce110_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -709,7 +709,7 @@ static struct output_pixel_processor *dce110_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -724,7 +724,7 @@ static struct dce_aux *dce110_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -762,7 +762,7 @@ static struct dce_i2c_hw *dce110_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -780,7 +780,7 @@ static struct clock_source *dce110_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1254,8 +1254,8 @@ static bool underlay_create(struct dc_context *ctx, struct resource_pool *pool)
GFP_KERNEL);
struct dce_transform *dce110_xfmv = kzalloc_obj(*dce110_xfmv,
GFP_KERNEL);
- struct dce_mem_input *dce110_miv = kzalloc_obj(*dce110_miv, GFP_KERNEL);
- struct dce110_opp *dce110_oppv = kzalloc_obj(*dce110_oppv, GFP_KERNEL);
+ struct dce_mem_input *dce110_miv = kzalloc_obj(*dce110_miv);
+ struct dce110_opp *dce110_oppv = kzalloc_obj(*dce110_oppv);
if (!dce110_tgv || !dce110_xfmv || !dce110_miv || !dce110_oppv) {
kfree(dce110_tgv);
@@ -1543,7 +1543,7 @@ struct resource_pool *dce110_create_resource_pool(
struct hw_asic_id asic_id)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
index 9c3f6e96f0ae..678ee1a73ac6 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
@@ -497,7 +497,7 @@ static struct timing_generator *dce112_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -511,7 +511,7 @@ static struct stream_encoder *dce112_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -540,7 +540,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dce112_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -603,7 +603,7 @@ static struct transform *dce112_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -630,7 +630,7 @@ static struct link_encoder *dce112_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -651,7 +651,7 @@ static struct link_encoder *dce112_link_encoder_create(
static struct panel_cntl *dce112_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -668,7 +668,7 @@ static struct panel_cntl *dce112_panel_cntl_create(const struct panel_cntl_init_
static struct input_pixel_processor *dce112_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -685,7 +685,7 @@ static struct output_pixel_processor *dce112_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -700,7 +700,7 @@ static struct dce_aux *dce112_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -738,7 +738,7 @@ static struct dce_i2c_hw *dce112_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -756,7 +756,7 @@ static struct clock_source *dce112_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1423,7 +1423,7 @@ struct resource_pool *dce112_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c
index 48f8a418f324..c0c2f4da5cd2 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c
@@ -428,7 +428,7 @@ static struct output_pixel_processor *dce120_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -442,7 +442,7 @@ static struct dce_aux *dce120_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -480,7 +480,7 @@ static struct dce_i2c_hw *dce120_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -541,7 +541,7 @@ static struct clock_source *dce120_clock_source_create(
const struct dce110_clk_src_regs *regs,
bool dp_clk_src)
{
- struct dce110_clk_src *clk_src = kzalloc_obj(*clk_src, GFP_KERNEL);
+ struct dce110_clk_src *clk_src = kzalloc_obj(*clk_src);
if (!clk_src)
return NULL;
@@ -582,7 +582,7 @@ static struct timing_generator *dce120_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -713,7 +713,7 @@ static struct link_encoder *dce120_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -735,7 +735,7 @@ static struct link_encoder *dce120_link_encoder_create(
static struct panel_cntl *dce120_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -752,7 +752,7 @@ static struct panel_cntl *dce120_panel_cntl_create(const struct panel_cntl_init_
static struct input_pixel_processor *dce120_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -769,7 +769,7 @@ static struct stream_encoder *dce120_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -812,7 +812,7 @@ static const struct dce_hwseq_mask dce121_hwseq_mask = {
static struct dce_hwseq *dce120_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -826,7 +826,7 @@ static struct dce_hwseq *dce120_hwseq_create(
static struct dce_hwseq *dce121_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -891,7 +891,7 @@ static struct transform *dce120_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -1295,7 +1295,7 @@ struct resource_pool *dce120_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c
index 621739d0b024..31aa80943c16 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c
@@ -507,7 +507,7 @@ static struct timing_generator *dce60_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -521,7 +521,7 @@ static struct output_pixel_processor *dce60_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -536,7 +536,7 @@ static struct dce_aux *dce60_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -574,7 +574,7 @@ static struct dce_i2c_hw *dce60_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -589,7 +589,7 @@ static struct dce_i2c_sw *dce60_i2c_sw_create(
struct dc_context *ctx)
{
struct dce_i2c_sw *dce_i2c_sw =
- kzalloc_obj(struct dce_i2c_sw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_sw);
if (!dce_i2c_sw)
return NULL;
@@ -603,7 +603,7 @@ static struct stream_encoder *dce60_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -638,7 +638,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dce60_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -707,7 +707,7 @@ static struct transform *dce60_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -730,7 +730,7 @@ static struct link_encoder *dce60_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110)
@@ -765,7 +765,7 @@ static struct link_encoder *dce60_link_encoder_create(
static struct panel_cntl *dce60_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -787,7 +787,7 @@ static struct clock_source *dce60_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -812,7 +812,7 @@ static void dce60_clock_source_destroy(struct clock_source **clk_src)
static struct input_pixel_processor *dce60_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -1098,7 +1098,7 @@ struct resource_pool *dce60_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
@@ -1296,7 +1296,7 @@ struct resource_pool *dce61_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
@@ -1493,7 +1493,7 @@ struct resource_pool *dce64_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c
index bef4a30caf7e..d1f781e61f1e 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c
@@ -513,7 +513,7 @@ static struct timing_generator *dce80_timing_generator_create(
const struct dce110_timing_generator_offsets *offsets)
{
struct dce110_timing_generator *tg110 =
- kzalloc_obj(struct dce110_timing_generator, GFP_KERNEL);
+ kzalloc_obj(struct dce110_timing_generator);
if (!tg110)
return NULL;
@@ -527,7 +527,7 @@ static struct output_pixel_processor *dce80_opp_create(
uint32_t inst)
{
struct dce110_opp *opp =
- kzalloc_obj(struct dce110_opp, GFP_KERNEL);
+ kzalloc_obj(struct dce110_opp);
if (!opp)
return NULL;
@@ -542,7 +542,7 @@ static struct dce_aux *dce80_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -580,7 +580,7 @@ static struct dce_i2c_hw *dce80_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -595,7 +595,7 @@ static struct dce_i2c_sw *dce80_i2c_sw_create(
struct dc_context *ctx)
{
struct dce_i2c_sw *dce_i2c_sw =
- kzalloc_obj(struct dce_i2c_sw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_sw);
if (!dce_i2c_sw)
return NULL;
@@ -609,7 +609,7 @@ static struct stream_encoder *dce80_stream_encoder_create(
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
- kzalloc_obj(struct dce110_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_stream_encoder);
if (!enc110)
return NULL;
@@ -644,7 +644,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dce80_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -713,7 +713,7 @@ static struct transform *dce80_transform_create(
uint32_t inst)
{
struct dce_transform *transform =
- kzalloc_obj(struct dce_transform, GFP_KERNEL);
+ kzalloc_obj(struct dce_transform);
if (!transform)
return NULL;
@@ -736,7 +736,7 @@ static struct link_encoder *dce80_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dce110_link_encoder *enc110 =
- kzalloc_obj(struct dce110_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dce110_link_encoder);
int link_regs_id;
if (!enc110)
@@ -771,7 +771,7 @@ static struct link_encoder *dce80_link_encoder_create(
static struct panel_cntl *dce80_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -793,7 +793,7 @@ static struct clock_source *dce80_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -818,7 +818,7 @@ static void dce80_clock_source_destroy(struct clock_source **clk_src)
static struct input_pixel_processor *dce80_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
- struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp, GFP_KERNEL);
+ struct dce_ipp *ipp = kzalloc_obj(struct dce_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -1109,7 +1109,7 @@ struct resource_pool *dce80_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
@@ -1309,7 +1309,7 @@ struct resource_pool *dce81_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
@@ -1507,7 +1507,7 @@ struct resource_pool *dce83_create_resource_pool(
struct dc *dc)
{
struct dce110_resource_pool *pool =
- kzalloc_obj(struct dce110_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dce110_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
index 6c066576a5a5..3d1c8344c8bb 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
@@ -574,7 +574,7 @@ static struct dpp *dcn10_dpp_create(
uint32_t inst)
{
struct dcn10_dpp *dpp =
- kzalloc_obj(struct dcn10_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_dpp);
if (!dpp)
return NULL;
@@ -588,7 +588,7 @@ static struct input_pixel_processor *dcn10_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn10_ipp *ipp =
- kzalloc_obj(struct dcn10_ipp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -605,7 +605,7 @@ static struct output_pixel_processor *dcn10_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn10_opp *opp =
- kzalloc_obj(struct dcn10_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -621,7 +621,7 @@ static struct dce_aux *dcn10_aux_engine_create(struct dc_context *ctx,
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -658,7 +658,7 @@ static struct dce_i2c_hw *dcn10_i2c_hw_create(struct dc_context *ctx,
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -670,7 +670,7 @@ static struct dce_i2c_hw *dcn10_i2c_hw_create(struct dc_context *ctx,
}
static struct mpc *dcn10_mpc_create(struct dc_context *ctx)
{
- struct dcn10_mpc *mpc10 = kzalloc_obj(struct dcn10_mpc, GFP_KERNEL);
+ struct dcn10_mpc *mpc10 = kzalloc_obj(struct dcn10_mpc);
if (!mpc10)
return NULL;
@@ -705,7 +705,7 @@ static struct timing_generator *dcn10_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -738,7 +738,7 @@ static struct link_encoder *dcn10_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn10_link_encoder *enc10 =
- kzalloc_obj(struct dcn10_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_link_encoder);
int link_regs_id;
if (!enc10 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -762,7 +762,7 @@ static struct link_encoder *dcn10_link_encoder_create(
static struct panel_cntl *dcn10_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -784,7 +784,7 @@ static struct clock_source *dcn10_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -820,7 +820,7 @@ static struct stream_encoder *dcn10_stream_encoder_create(
struct dc_context *ctx)
{
struct dcn10_stream_encoder *enc1 =
- kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_stream_encoder);
if (!enc1)
return NULL;
@@ -846,7 +846,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dcn10_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -890,7 +890,7 @@ static void dcn10_clock_source_destroy(struct clock_source **clk_src)
static struct pp_smu_funcs *dcn10_pp_smu_create(struct dc_context *ctx)
{
- struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu, GFP_KERNEL);
+ struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu);
if (!pp_smu)
return pp_smu;
@@ -983,7 +983,7 @@ static struct hubp *dcn10_hubp_create(
uint32_t inst)
{
struct dcn10_hubp *hubp1 =
- kzalloc_obj(struct dcn10_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_hubp);
if (!hubp1)
return NULL;
@@ -1680,7 +1680,7 @@ struct resource_pool *dcn10_create_resource_pool(
struct dc *dc)
{
struct dcn10_resource_pool *pool =
- kzalloc_obj(struct dcn10_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
index ba83a78f7fc1..9906ecdc51ea 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
@@ -736,7 +736,7 @@ struct dpp *dcn20_dpp_create(
uint32_t inst)
{
struct dcn20_dpp *dpp =
- kzalloc_obj(struct dcn20_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dpp);
if (!dpp)
return NULL;
@@ -754,7 +754,7 @@ struct input_pixel_processor *dcn20_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn10_ipp *ipp =
- kzalloc_obj(struct dcn10_ipp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -771,7 +771,7 @@ struct output_pixel_processor *dcn20_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -788,7 +788,7 @@ struct dce_aux *dcn20_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -826,7 +826,7 @@ struct dce_i2c_hw *dcn20_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -838,7 +838,7 @@ struct dce_i2c_hw *dcn20_i2c_hw_create(
}
struct mpc *dcn20_mpc_create(struct dc_context *ctx)
{
- struct dcn20_mpc *mpc20 = kzalloc_obj(struct dcn20_mpc, GFP_KERNEL);
+ struct dcn20_mpc *mpc20 = kzalloc_obj(struct dcn20_mpc);
if (!mpc20)
return NULL;
@@ -884,7 +884,7 @@ struct timing_generator *dcn20_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -918,7 +918,7 @@ struct link_encoder *dcn20_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
int link_regs_id;
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -942,7 +942,7 @@ struct link_encoder *dcn20_link_encoder_create(
static struct panel_cntl *dcn20_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -964,7 +964,7 @@ static struct clock_source *dcn20_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1000,7 +1000,7 @@ struct stream_encoder *dcn20_stream_encoder_create(
struct dc_context *ctx)
{
struct dcn10_stream_encoder *enc1 =
- kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_stream_encoder);
if (!enc1)
return NULL;
@@ -1032,7 +1032,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
struct dce_hwseq *dcn20_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1063,7 +1063,7 @@ struct display_stream_compressor *dcn20_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1200,7 +1200,7 @@ struct hubp *dcn20_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -2288,7 +2288,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
{
- struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu, GFP_KERNEL);
+ struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu);
if (!pp_smu)
return pp_smu;
@@ -2768,7 +2768,7 @@ struct resource_pool *dcn20_create_resource_pool(
struct dc *dc)
{
struct dcn20_resource_pool *pool =
- kzalloc_obj(struct dcn20_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
index 71629186eb30..86281ee78f8c 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
@@ -632,7 +632,7 @@ static struct dpp *dcn201_dpp_create(
uint32_t inst)
{
struct dcn201_dpp *dpp =
- kzalloc_obj(struct dcn201_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn201_dpp);
if (!dpp)
return NULL;
@@ -649,7 +649,7 @@ static struct input_pixel_processor *dcn201_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn10_ipp *ipp =
- kzalloc_obj(struct dcn10_ipp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_ipp);
if (!ipp) {
return NULL;
@@ -665,7 +665,7 @@ static struct output_pixel_processor *dcn201_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn201_opp *opp =
- kzalloc_obj(struct dcn201_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn201_opp);
if (!opp) {
return NULL;
@@ -680,7 +680,7 @@ static struct dce_aux *dcn201_aux_engine_create(struct dc_context *ctx,
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -713,7 +713,7 @@ static struct dce_i2c_hw *dcn201_i2c_hw_create(struct dc_context *ctx,
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -726,7 +726,7 @@ static struct dce_i2c_hw *dcn201_i2c_hw_create(struct dc_context *ctx,
static struct mpc *dcn201_mpc_create(struct dc_context *ctx, uint32_t num_mpcc)
{
- struct dcn201_mpc *mpc201 = kzalloc_obj(struct dcn201_mpc, GFP_KERNEL);
+ struct dcn201_mpc *mpc201 = kzalloc_obj(struct dcn201_mpc);
if (!mpc201)
return NULL;
@@ -761,7 +761,7 @@ static struct timing_generator *dcn201_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -795,7 +795,7 @@ static struct link_encoder *dcn201_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
struct dcn10_link_encoder *enc10;
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -823,7 +823,7 @@ static struct clock_source *dcn201_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -858,7 +858,7 @@ static struct stream_encoder *dcn201_stream_encoder_create(
struct dc_context *ctx)
{
struct dcn10_stream_encoder *enc1 =
- kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_stream_encoder);
if (!enc1)
return NULL;
@@ -885,7 +885,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dcn201_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -985,7 +985,7 @@ static struct hubp *dcn201_hubp_create(
uint32_t inst)
{
struct dcn201_hubp *hubp201 =
- kzalloc_obj(struct dcn201_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn201_hubp);
if (!hubp201)
return NULL;
@@ -1306,7 +1306,7 @@ struct resource_pool *dcn201_create_resource_pool(
struct dc *dc)
{
struct dcn201_resource_pool *pool =
- kzalloc_obj(struct dcn201_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn201_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
index 0e93bc342011..a1bee2257362 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
@@ -484,7 +484,7 @@ static struct input_pixel_processor *dcn21_ipp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn10_ipp *ipp =
- kzalloc_obj(struct dcn10_ipp, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_ipp);
if (!ipp) {
BREAK_TO_DEBUGGER();
@@ -501,7 +501,7 @@ static struct dpp *dcn21_dpp_create(
uint32_t inst)
{
struct dcn20_dpp *dpp =
- kzalloc_obj(struct dcn20_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dpp);
if (!dpp)
return NULL;
@@ -520,7 +520,7 @@ static struct dce_aux *dcn21_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -557,7 +557,7 @@ static struct dce_i2c_hw *dcn21_i2c_hw_create(struct dc_context *ctx,
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -960,7 +960,7 @@ static struct clock_source *dcn21_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -981,7 +981,7 @@ static struct hubp *dcn21_hubp_create(
uint32_t inst)
{
struct dcn21_hubp *hubp21 =
- kzalloc_obj(struct dcn21_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn21_hubp);
if (!hubp21)
return NULL;
@@ -1028,7 +1028,7 @@ static struct output_pixel_processor *dcn21_opp_create(struct dc_context *ctx,
uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -1044,7 +1044,7 @@ static struct timing_generator *dcn21_timing_generator_create(struct dc_context
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1063,7 +1063,7 @@ static struct timing_generator *dcn21_timing_generator_create(struct dc_context
static struct mpc *dcn21_mpc_create(struct dc_context *ctx)
{
- struct dcn20_mpc *mpc20 = kzalloc_obj(struct dcn20_mpc, GFP_KERNEL);
+ struct dcn20_mpc *mpc20 = kzalloc_obj(struct dcn20_mpc);
if (!mpc20)
return NULL;
@@ -1091,7 +1091,7 @@ static struct display_stream_compressor *dcn21_dsc_create(struct dc_context *ctx
uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1104,7 +1104,7 @@ static struct display_stream_compressor *dcn21_dsc_create(struct dc_context *ctx
static struct pp_smu_funcs *dcn21_pp_smu_create(struct dc_context *ctx)
{
- struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu, GFP_KERNEL);
+ struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu);
if (!pp_smu)
return pp_smu;
@@ -1141,7 +1141,7 @@ static struct stream_encoder *dcn21_stream_encoder_create(enum engine_id eng_id,
struct dc_context *ctx)
{
struct dcn10_stream_encoder *enc1 =
- kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn10_stream_encoder);
if (!enc1)
return NULL;
@@ -1168,7 +1168,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dcn21_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1295,7 +1295,7 @@ static struct link_encoder *dcn21_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn21_link_encoder *enc21 =
- kzalloc_obj(struct dcn21_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn21_link_encoder);
int link_regs_id;
if (!enc21 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
@@ -1319,7 +1319,7 @@ static struct link_encoder *dcn21_link_encoder_create(
static struct panel_cntl *dcn21_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1704,7 +1704,7 @@ struct resource_pool *dcn21_create_resource_pool(
struct dc *dc)
{
struct dcn21_resource_pool *pool =
- kzalloc_obj(struct dcn21_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn21_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
index 75aa4b6d7133..465a31eb94c3 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
@@ -753,7 +753,7 @@ static struct dpp *dcn30_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -771,7 +771,7 @@ static struct output_pixel_processor *dcn30_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -788,7 +788,7 @@ static struct dce_aux *dcn30_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -827,7 +827,7 @@ static struct dce_i2c_hw *dcn30_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -843,7 +843,7 @@ static struct mpc *dcn30_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -892,7 +892,7 @@ static struct timing_generator *dcn30_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -926,7 +926,7 @@ static struct link_encoder *dcn30_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -946,7 +946,7 @@ static struct link_encoder *dcn30_link_encoder_create(
static struct panel_cntl *dcn30_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dce_panel_cntl *panel_cntl =
- kzalloc_obj(struct dce_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dce_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -980,7 +980,7 @@ static struct vpg *dcn30_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -997,7 +997,7 @@ static struct afmt *dcn30_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -1026,7 +1026,7 @@ static struct stream_encoder *dcn30_stream_encoder_create(enum engine_id eng_id,
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn30_vpg_create(ctx, vpg_inst);
afmt = dcn30_afmt_create(ctx, afmt_inst);
@@ -1047,7 +1047,7 @@ static struct stream_encoder *dcn30_stream_encoder_create(enum engine_id eng_id,
static struct dce_hwseq *dcn30_hwseq_create(struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1200,7 +1200,7 @@ static struct hubp *dcn30_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1268,7 +1268,7 @@ static struct display_stream_compressor *dcn30_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1302,7 +1302,7 @@ static struct clock_source *dcn30_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2622,7 +2622,7 @@ struct resource_pool *dcn30_create_resource_pool(
struct dc *dc)
{
struct dcn30_resource_pool *pool =
- kzalloc_obj(struct dcn30_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn30_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
index 6bced8def669..b08f5d3cb673 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
@@ -717,7 +717,7 @@ static void dcn301_dpp_destroy(struct dpp **dpp)
static struct dpp *dcn301_dpp_create(struct dc_context *ctx, uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -734,7 +734,7 @@ static struct output_pixel_processor *dcn301_opp_create(struct dc_context *ctx,
uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -749,7 +749,7 @@ static struct output_pixel_processor *dcn301_opp_create(struct dc_context *ctx,
static struct dce_aux *dcn301_aux_engine_create(struct dc_context *ctx, uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -783,7 +783,7 @@ static const struct dce_i2c_mask i2c_masks = {
static struct dce_i2c_hw *dcn301_i2c_hw_create(struct dc_context *ctx, uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -798,7 +798,7 @@ static struct mpc *dcn301_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -848,7 +848,7 @@ static struct timing_generator *dcn301_timing_generator_create(
struct dc_context *ctx, uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -882,7 +882,7 @@ static struct link_encoder *dcn301_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -902,7 +902,7 @@ static struct link_encoder *dcn301_link_encoder_create(
static struct panel_cntl *dcn301_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn301_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn301_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn301_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -951,7 +951,7 @@ static struct vpg *dcn301_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -968,7 +968,7 @@ static struct afmt *dcn301_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -997,7 +997,7 @@ static struct stream_encoder *dcn301_stream_encoder_create(enum engine_id eng_id
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn301_vpg_create(ctx, vpg_inst);
afmt = dcn301_afmt_create(ctx, afmt_inst);
@@ -1018,7 +1018,7 @@ static struct stream_encoder *dcn301_stream_encoder_create(enum engine_id eng_id
static struct dce_hwseq *dcn301_hwseq_create(struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1160,7 +1160,7 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool)
static struct hubp *dcn301_hubp_create(struct dc_context *ctx, uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1228,7 +1228,7 @@ static struct display_stream_compressor *dcn301_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1257,7 +1257,7 @@ static struct clock_source *dcn301_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1727,7 +1727,7 @@ struct resource_pool *dcn301_create_resource_pool(
struct dc *dc)
{
struct dcn301_resource_pool *pool =
- kzalloc_obj(struct dcn301_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn301_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
index 1dba37343c0f..c69a7f962a42 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
@@ -300,7 +300,7 @@ static const struct dcn30_vpg_mask vpg_mask = {
static struct vpg *dcn302_vpg_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -332,7 +332,7 @@ static const struct dcn30_afmt_mask afmt_mask = {
static struct afmt *dcn302_afmt_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -407,7 +407,7 @@ static struct stream_encoder *dcn302_stream_encoder_create(enum engine_id eng_id
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn302_vpg_create(ctx, vpg_inst);
afmt = dcn302_afmt_create(ctx, afmt_inst);
@@ -476,7 +476,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dcn302_hwseq_create(struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -508,7 +508,7 @@ static const struct dcn_hubp2_mask hubp_mask = {
static struct hubp *dcn302_hubp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_hubp *hubp2 = kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ struct dcn20_hubp *hubp2 = kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -542,7 +542,7 @@ static const struct dcn3_dpp_mask tf_mask = {
static struct dpp *dcn302_dpp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -576,7 +576,7 @@ static const struct dcn20_opp_mask opp_mask = {
static struct output_pixel_processor *dcn302_opp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_opp *opp = kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ struct dcn20_opp *opp = kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -608,7 +608,7 @@ static const struct dcn_optc_mask optc_mask = {
static struct timing_generator *dcn302_timing_generator_create(struct dc_context *ctx, uint32_t instance)
{
- struct optc *tgn10 = kzalloc_obj(struct optc, GFP_KERNEL);
+ struct optc *tgn10 = kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -653,7 +653,7 @@ static const struct dcn30_mpc_mask mpc_mask = {
static struct mpc *dcn302_mpc_create(struct dc_context *ctx, int num_mpcc, int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -684,7 +684,7 @@ static const struct dcn20_dsc_mask dsc_mask = {
static struct display_stream_compressor *dcn302_dsc_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_dsc *dsc = kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ struct dcn20_dsc *dsc = kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
index 2f81c0b51d1a..e4e179212d57 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
@@ -293,7 +293,7 @@ static const struct dcn30_vpg_mask vpg_mask = {
static struct vpg *dcn303_vpg_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -322,7 +322,7 @@ static const struct dcn30_afmt_mask afmt_mask = {
static struct afmt *dcn303_afmt_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -394,7 +394,7 @@ static struct stream_encoder *dcn303_stream_encoder_create(enum engine_id eng_id
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn303_vpg_create(ctx, vpg_inst);
afmt = dcn303_afmt_create(ctx, afmt_inst);
@@ -460,7 +460,7 @@ static const struct dce_hwseq_mask hwseq_mask = {
static struct dce_hwseq *dcn303_hwseq_create(struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -489,7 +489,7 @@ static const struct dcn_hubp2_mask hubp_mask = {
static struct hubp *dcn303_hubp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_hubp *hubp2 = kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ struct dcn20_hubp *hubp2 = kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -520,7 +520,7 @@ static const struct dcn3_dpp_mask tf_mask = {
static struct dpp *dcn303_dpp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -551,7 +551,7 @@ static const struct dcn20_opp_mask opp_mask = {
static struct output_pixel_processor *dcn303_opp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_opp *opp = kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ struct dcn20_opp *opp = kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -580,7 +580,7 @@ static const struct dcn_optc_mask optc_mask = {
static struct timing_generator *dcn303_timing_generator_create(struct dc_context *ctx, uint32_t instance)
{
- struct optc *tgn10 = kzalloc_obj(struct optc, GFP_KERNEL);
+ struct optc *tgn10 = kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -617,7 +617,7 @@ static const struct dcn30_mpc_mask mpc_mask = {
static struct mpc *dcn303_mpc_create(struct dc_context *ctx, int num_mpcc, int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -645,7 +645,7 @@ static const struct dcn20_dsc_mask dsc_mask = {
static struct display_stream_compressor *dcn303_dsc_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn20_dsc *dsc = kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ struct dcn20_dsc *dsc = kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
index 4fb54637f41e..b1b598dd97f2 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
@@ -919,7 +919,7 @@ static struct dpp *dcn31_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -937,7 +937,7 @@ static struct output_pixel_processor *dcn31_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -954,7 +954,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -991,7 +991,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -1006,7 +1006,7 @@ static struct mpc *dcn31_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1058,7 +1058,7 @@ static struct timing_generator *dcn31_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1092,7 +1092,7 @@ static struct link_encoder *dcn31_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1121,7 +1121,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1138,7 +1138,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1168,7 +1168,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1185,7 +1185,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1204,7 +1204,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1234,7 +1234,7 @@ static struct stream_encoder *dcn31_stream_encoder_create(
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1311,7 +1311,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1325,7 +1325,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn31_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1499,7 +1499,7 @@ static struct hubp *dcn31_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1567,7 +1567,7 @@ static struct display_stream_compressor *dcn31_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1595,7 +1595,7 @@ static struct clock_source *dcn31_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1867,7 +1867,7 @@ static struct clock_source *dcn30_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2228,7 +2228,7 @@ struct resource_pool *dcn31_create_resource_pool(
struct dc *dc)
{
struct dcn31_resource_pool *pool =
- kzalloc_obj(struct dcn31_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
index 8c451d2a040a..d3b8de5c9b32 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
@@ -955,7 +955,7 @@ static struct dpp *dcn31_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -973,7 +973,7 @@ static struct output_pixel_processor *dcn31_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -990,7 +990,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -1049,7 +1049,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -1064,7 +1064,7 @@ static struct mpc *dcn31_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1116,7 +1116,7 @@ static struct timing_generator *dcn31_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1150,7 +1150,7 @@ static struct link_encoder *dcn31_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1179,7 +1179,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1196,7 +1196,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1226,7 +1226,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1243,7 +1243,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1262,7 +1262,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1292,7 +1292,7 @@ static struct stream_encoder *dcn314_stream_encoder_create(
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1370,7 +1370,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1384,7 +1384,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn314_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1557,7 +1557,7 @@ static struct hubp *dcn31_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1625,7 +1625,7 @@ static struct display_stream_compressor *dcn314_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1653,7 +1653,7 @@ static struct clock_source *dcn31_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -1798,7 +1798,7 @@ static struct clock_source *dcn30_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2146,7 +2146,7 @@ struct resource_pool *dcn314_create_resource_pool(
struct dc *dc)
{
struct dcn314_resource_pool *pool =
- kzalloc_obj(struct dcn314_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn314_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
index 1a63eaf5e1d9..4398b5db4834 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
@@ -918,7 +918,7 @@ static struct dpp *dcn31_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -936,7 +936,7 @@ static struct output_pixel_processor *dcn31_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -953,7 +953,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -990,7 +990,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -1005,7 +1005,7 @@ static struct mpc *dcn31_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1057,7 +1057,7 @@ static struct timing_generator *dcn31_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1091,7 +1091,7 @@ static struct link_encoder *dcn31_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1120,7 +1120,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1137,7 +1137,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1167,7 +1167,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1184,7 +1184,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1203,7 +1203,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1235,7 +1235,7 @@ static struct stream_encoder *dcn315_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1312,7 +1312,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1326,7 +1326,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn31_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1500,7 +1500,7 @@ static struct hubp *dcn31_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1568,7 +1568,7 @@ static struct display_stream_compressor *dcn31_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1596,7 +1596,7 @@ static struct clock_source *dcn31_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2167,7 +2167,7 @@ struct resource_pool *dcn315_create_resource_pool(
struct dc *dc)
{
struct dcn315_resource_pool *pool =
- kzalloc_obj(struct dcn315_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn315_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
index 4b8dddba34b8..68845cbf8383 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
@@ -911,7 +911,7 @@ static struct dpp *dcn31_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp)
return NULL;
@@ -929,7 +929,7 @@ static struct output_pixel_processor *dcn31_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -946,7 +946,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -983,7 +983,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -998,7 +998,7 @@ static struct mpc *dcn31_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1050,7 +1050,7 @@ static struct timing_generator *dcn31_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1084,7 +1084,7 @@ static struct link_encoder *dcn31_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1113,7 +1113,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1130,7 +1130,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1160,7 +1160,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1177,7 +1177,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1197,7 +1197,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1228,7 +1228,7 @@ static struct stream_encoder *dcn316_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1306,7 +1306,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1321,7 +1321,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn31_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
if (hws) {
hws->ctx = ctx;
@@ -1492,7 +1492,7 @@ static struct hubp *dcn31_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1560,7 +1560,7 @@ static struct display_stream_compressor *dcn31_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1588,7 +1588,7 @@ static struct clock_source *dcn31_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2034,7 +2034,7 @@ struct resource_pool *dcn316_create_resource_pool(
struct dc *dc)
{
struct dcn316_resource_pool *pool =
- kzalloc_obj(struct dcn316_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn316_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
index a93862071ff5..debf6a08e012 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
@@ -750,7 +750,7 @@ static struct dce_aux *dcn32_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -790,7 +790,7 @@ static struct dce_i2c_hw *dcn32_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -817,7 +817,7 @@ static struct clock_source *dcn32_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -893,7 +893,7 @@ static struct hubp *dcn32_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -925,7 +925,7 @@ static struct dpp *dcn32_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp3 =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp3)
return NULL;
@@ -951,7 +951,7 @@ static struct mpc *dcn32_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -974,7 +974,7 @@ static struct output_pixel_processor *dcn32_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp2 =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp2) {
BREAK_TO_DEBUGGER();
@@ -999,7 +999,7 @@ static struct timing_generator *dcn32_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1040,7 +1040,7 @@ static struct link_encoder *dcn32_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1084,7 +1084,7 @@ static struct link_encoder *dcn32_link_encoder_create(
struct panel_cntl *dcn32_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1123,7 +1123,7 @@ static struct vpg *dcn32_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -1153,7 +1153,7 @@ static struct afmt *dcn32_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -1179,7 +1179,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1216,7 +1216,7 @@ static struct stream_encoder *dcn32_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn32_vpg_create(ctx, vpg_inst);
afmt = dcn32_afmt_create(ctx, afmt_inst);
@@ -1308,7 +1308,7 @@ static struct hpo_dp_link_encoder *dcn32_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1327,7 +1327,7 @@ static struct hpo_dp_link_encoder *dcn32_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn32_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1566,7 +1566,7 @@ static struct display_stream_compressor *dcn32_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -2572,7 +2572,7 @@ struct resource_pool *dcn32_create_resource_pool(
struct dc *dc)
{
struct dcn32_resource_pool *pool =
- kzalloc_obj(struct dcn32_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn32_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
index 97976318f4c0..d936192c3a6c 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
@@ -744,7 +744,7 @@ static struct dce_aux *dcn321_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -784,7 +784,7 @@ static struct dce_i2c_hw *dcn321_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -811,7 +811,7 @@ static struct clock_source *dcn321_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -887,7 +887,7 @@ static struct hubp *dcn321_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -919,7 +919,7 @@ static struct dpp *dcn321_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp3 =
- kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp);
if (!dpp3)
return NULL;
@@ -945,7 +945,7 @@ static struct mpc *dcn321_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -968,7 +968,7 @@ static struct output_pixel_processor *dcn321_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp2 =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp2) {
BREAK_TO_DEBUGGER();
@@ -993,7 +993,7 @@ static struct timing_generator *dcn321_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1034,7 +1034,7 @@ static struct link_encoder *dcn321_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1104,7 +1104,7 @@ static struct vpg *dcn321_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg, GFP_KERNEL);
+ struct dcn30_vpg *vpg3 = kzalloc_obj(struct dcn30_vpg);
if (!vpg3)
return NULL;
@@ -1134,7 +1134,7 @@ static struct afmt *dcn321_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt3 = kzalloc_obj(struct dcn30_afmt);
if (!afmt3)
return NULL;
@@ -1160,7 +1160,7 @@ static struct apg *dcn321_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1197,7 +1197,7 @@ static struct stream_encoder *dcn321_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn321_vpg_create(ctx, vpg_inst);
afmt = dcn321_afmt_create(ctx, afmt_inst);
@@ -1289,7 +1289,7 @@ static struct hpo_dp_link_encoder *dcn321_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1308,7 +1308,7 @@ static struct hpo_dp_link_encoder *dcn321_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn321_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1546,7 +1546,7 @@ static struct display_stream_compressor *dcn321_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -2064,7 +2064,7 @@ struct resource_pool *dcn321_create_resource_pool(
struct dc *dc)
{
struct dcn321_resource_pool *pool =
- kzalloc_obj(struct dcn321_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn321_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
index 26493ed5a6fc..2be765f70889 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
@@ -810,7 +810,7 @@ static void dcn35_dpp_destroy(struct dpp **dpp)
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp);
bool success = (dpp != NULL);
if (!success)
@@ -841,7 +841,7 @@ static struct output_pixel_processor *dcn35_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -868,7 +868,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -931,7 +931,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -954,7 +954,7 @@ static struct mpc *dcn35_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1033,7 +1033,7 @@ static struct timing_generator *dcn35_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1074,7 +1074,7 @@ static struct link_encoder *dcn35_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1127,7 +1127,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1144,7 +1144,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1185,7 +1185,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1215,7 +1215,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1243,7 +1243,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1280,7 +1280,7 @@ static struct stream_encoder *dcn35_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1372,7 +1372,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1391,7 +1391,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn35_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1572,7 +1572,7 @@ static struct hubp *dcn35_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1673,7 +1673,7 @@ static struct display_stream_compressor *dcn35_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1710,7 +1710,7 @@ static struct clock_source *dcn35_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2210,7 +2210,7 @@ struct resource_pool *dcn35_create_resource_pool(
struct dc *dc)
{
struct dcn35_resource_pool *pool =
- kzalloc_obj(struct dcn35_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn35_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
index 0e204d8e1336..bc41df90715c 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
@@ -790,7 +790,7 @@ static void dcn35_dpp_destroy(struct dpp **dpp)
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp);
bool success = (dpp != NULL);
if (!success)
@@ -821,7 +821,7 @@ static struct output_pixel_processor *dcn35_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -848,7 +848,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -911,7 +911,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -934,7 +934,7 @@ static struct mpc *dcn35_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1013,7 +1013,7 @@ static struct timing_generator *dcn35_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1054,7 +1054,7 @@ static struct link_encoder *dcn35_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1107,7 +1107,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1124,7 +1124,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1165,7 +1165,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1195,7 +1195,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1223,7 +1223,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1260,7 +1260,7 @@ static struct stream_encoder *dcn35_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1352,7 +1352,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1371,7 +1371,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn351_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1552,7 +1552,7 @@ static struct hubp *dcn35_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1653,7 +1653,7 @@ static struct display_stream_compressor *dcn35_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1690,7 +1690,7 @@ static struct clock_source *dcn35_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2183,7 +2183,7 @@ struct resource_pool *dcn351_create_resource_pool(
struct dc *dc)
{
struct dcn351_resource_pool *pool =
- kzalloc_obj(struct dcn351_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn351_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
index c0cf8c46031f..ae95b1497af3 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
@@ -797,7 +797,7 @@ static void dcn35_dpp_destroy(struct dpp **dpp)
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
{
- struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
+ struct dcn3_dpp *dpp = kzalloc_obj(struct dcn3_dpp);
bool success = (dpp != NULL);
if (!success)
@@ -828,7 +828,7 @@ static struct output_pixel_processor *dcn35_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -855,7 +855,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -918,7 +918,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -941,7 +941,7 @@ static struct mpc *dcn35_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc);
if (!mpc30)
return NULL;
@@ -1020,7 +1020,7 @@ static struct timing_generator *dcn35_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1061,7 +1061,7 @@ static struct link_encoder *dcn35_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1114,7 +1114,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder);
if (!enc20)
return NULL;
@@ -1131,7 +1131,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl);
if (!panel_cntl)
return NULL;
@@ -1172,7 +1172,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg);
if (!vpg31)
return NULL;
@@ -1202,7 +1202,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt);
if (!afmt31)
return NULL;
@@ -1230,7 +1230,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1267,7 +1267,7 @@ static struct stream_encoder *dcn35_stream_encoder_create(
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1359,7 +1359,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1378,7 +1378,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn36_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1559,7 +1559,7 @@ static struct hubp *dcn35_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -1660,7 +1660,7 @@ static struct display_stream_compressor *dcn35_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1697,7 +1697,7 @@ static struct clock_source *dcn35_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -2189,7 +2189,7 @@ struct resource_pool *dcn36_create_resource_pool(
struct dc *dc)
{
struct dcn36_resource_pool *pool =
- kzalloc_obj(struct dcn36_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn36_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
index db8a0c0b8cda..ce272e279c5f 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
@@ -762,7 +762,7 @@ static struct dce_aux *dcn401_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110);
if (!aux_engine)
return NULL;
@@ -801,7 +801,7 @@ static struct dce_i2c_hw *dcn401_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw);
if (!dce_i2c_hw)
return NULL;
@@ -827,7 +827,7 @@ static struct clock_source *dcn401_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src);
if (!clk_src)
return NULL;
@@ -900,7 +900,7 @@ static struct hubbub *dcn401_hubbub_create(struct dc_context *ctx)
static struct dio *dcn401_dio_create(struct dc_context *ctx)
{
- struct dcn10_dio *dio10 = kzalloc_obj(struct dcn10_dio, GFP_KERNEL);
+ struct dcn10_dio *dio10 = kzalloc_obj(struct dcn10_dio);
if (!dio10)
return NULL;
@@ -919,7 +919,7 @@ static struct hubp *dcn401_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp);
if (!hubp2)
return NULL;
@@ -951,7 +951,7 @@ static struct dpp *dcn401_dpp_create(
uint32_t inst)
{
struct dcn401_dpp *dpp401 =
- kzalloc_obj(struct dcn401_dpp, GFP_KERNEL);
+ kzalloc_obj(struct dcn401_dpp);
if (!dpp401)
return NULL;
@@ -977,7 +977,7 @@ static struct mpc *dcn401_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn401_mpc *mpc401 = kzalloc_obj(struct dcn401_mpc, GFP_KERNEL);
+ struct dcn401_mpc *mpc401 = kzalloc_obj(struct dcn401_mpc);
if (!mpc401)
return NULL;
@@ -1000,7 +1000,7 @@ static struct output_pixel_processor *dcn401_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp4 =
- kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp);
if (!opp4) {
BREAK_TO_DEBUGGER();
@@ -1025,7 +1025,7 @@ static struct timing_generator *dcn401_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc_obj(struct optc, GFP_KERNEL);
+ kzalloc_obj(struct optc);
if (!tgn10)
return NULL;
@@ -1065,7 +1065,7 @@ static struct link_encoder *dcn401_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1130,7 +1130,7 @@ static struct vpg *dcn401_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg4 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
+ struct dcn31_vpg *vpg4 = kzalloc_obj(struct dcn31_vpg);
if (!vpg4)
return NULL;
@@ -1160,7 +1160,7 @@ static struct afmt *dcn401_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn30_afmt *afmt401 = kzalloc_obj(struct dcn30_afmt, GFP_KERNEL);
+ struct dcn30_afmt *afmt401 = kzalloc_obj(struct dcn30_afmt);
if (!afmt401)
return NULL;
@@ -1185,7 +1185,7 @@ static struct apg *dcn401_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg);
if (!apg31)
return NULL;
@@ -1222,7 +1222,7 @@ static struct stream_encoder *dcn401_stream_encoder_create(
} else
return NULL;
- enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder);
vpg = dcn401_vpg_create(ctx, vpg_inst);
afmt = dcn401_afmt_create(ctx, afmt_inst);
@@ -1312,7 +1312,7 @@ static struct hpo_dp_link_encoder *dcn401_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1356,7 +1356,7 @@ static unsigned int dcn401_calc_num_avail_chans_for_mall(struct dc *dc, unsigned
static struct dce_hwseq *dcn401_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq);
#undef REG_STRUCT
#define REG_STRUCT hwseq_reg
@@ -1609,7 +1609,7 @@ static struct display_stream_compressor *dcn401_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn401_dsc *dsc =
- kzalloc_obj(struct dcn401_dsc, GFP_KERNEL);
+ kzalloc_obj(struct dcn401_dsc);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -2314,7 +2314,7 @@ struct resource_pool *dcn401_create_resource_pool(
struct dc *dc)
{
struct dcn401_resource_pool *pool =
- kzalloc_obj(struct dcn401_resource_pool, GFP_KERNEL);
+ kzalloc_obj(struct dcn401_resource_pool);
if (!pool)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c b/drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
index 1334d0efe6e3..6617c9d2d5f8 100644
--- a/drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
+++ b/drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
@@ -21,7 +21,7 @@ struct soc_and_ip_translator *dc_create_soc_and_ip_translator(enum dce_version d
{
struct soc_and_ip_translator *soc_and_ip_translator;
- soc_and_ip_translator = kzalloc_obj(*soc_and_ip_translator, GFP_KERNEL);
+ soc_and_ip_translator = kzalloc_obj(*soc_and_ip_translator);
if (!soc_and_ip_translator)
return NULL;
diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 33a7627191f8..a62ff18f3434 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -933,7 +933,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
struct pwl_float_data_ex *rgb = rgb_regamma;
const struct hw_x_point *coord_x = coordinate_x;
- coeff = kvzalloc_obj(*coeff, GFP_KERNEL);
+ coeff = kvzalloc_obj(*coeff);
if (!coeff)
goto release;
@@ -1738,11 +1738,11 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
scale_gamma(rgb_user, ramp, dividers);
}
- curve = kvzalloc_objs(*curve, MAX_HW_POINTS + _EXTRA_POINTS, GFP_KERNEL);
+ curve = kvzalloc_objs(*curve, MAX_HW_POINTS + _EXTRA_POINTS);
if (!curve)
goto curve_alloc_fail;
- coeff = kvzalloc_objs(*coeff, MAX_HW_POINTS + _EXTRA_POINTS, GFP_KERNEL);
+ coeff = kvzalloc_objs(*coeff, MAX_HW_POINTS + _EXTRA_POINTS);
if (!coeff)
goto coeff_alloc_fail;
@@ -1970,7 +1970,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
if (!rgb_regamma)
goto rgb_regamma_alloc_fail;
- coeff = kvzalloc_objs(*coeff, MAX_HW_POINTS + _EXTRA_POINTS, GFP_KERNEL);
+ coeff = kvzalloc_objs(*coeff, MAX_HW_POINTS + _EXTRA_POINTS);
if (!coeff)
goto coeff_alloc_fail;
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index b819610021f2..19de72173052 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -61,7 +61,7 @@ struct core_freesync {
struct mod_freesync *mod_freesync_create(struct dc *dc)
{
struct core_freesync *core_freesync =
- kzalloc_obj(struct core_freesync, GFP_KERNEL);
+ kzalloc_obj(struct core_freesync);
if (core_freesync == NULL)
goto fail_alloc_context;
diff --git a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c
index ccd35d1f05ec..9f408cb11ac9 100644
--- a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c
+++ b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c
@@ -144,7 +144,7 @@ struct mod_vmid *mod_vmid_create(
if (dc == NULL)
goto fail_dc_null;
- core_vmid = kzalloc_obj(struct core_vmid, GFP_KERNEL);
+ core_vmid = kzalloc_obj(struct core_vmid);
if (core_vmid == NULL)
goto fail_alloc_context;
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;
diff --git a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
index 611171fea3cb..9190c9cd7993 100644
--- a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
+++ b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
@@ -299,7 +299,7 @@ static int amdgpu_ras_mgr_sw_init(struct amdgpu_ip_block *ip_block)
if (!con->uniras_enabled)
return 0;
- ras_mgr = kzalloc_obj(*ras_mgr, GFP_KERNEL);
+ ras_mgr = kzalloc_obj(*ras_mgr);
if (!ras_mgr)
return -EINVAL;
diff --git a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c
index 65223bfec688..087a893afbba 100644
--- a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c
+++ b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c
@@ -195,7 +195,7 @@ static int amdgpu_virt_ras_get_cper_records(struct ras_core_context *ras_core,
if (!req->buf_size || !req->buf_ptr || !req->cper_num)
return RAS_CMD__ERROR_INVALID_INPUT_DATA;
- trace = kzalloc_objs(*trace, MAX_RECORD_PER_BATCH, GFP_KERNEL);
+ trace = kzalloc_objs(*trace, MAX_RECORD_PER_BATCH);
if (!trace)
return RAS_CMD__ERROR_GENERIC;
diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_core.c b/drivers/gpu/drm/amd/ras/rascore/ras_core.c
index e4a6f6cfd2d5..3f56f26abd6d 100644
--- a/drivers/gpu/drm/amd/ras/rascore/ras_core.c
+++ b/drivers/gpu/drm/amd/ras/rascore/ras_core.c
@@ -263,11 +263,11 @@ struct ras_core_context *ras_core_create(struct ras_core_config *init_config)
struct ras_core_context *ras_core;
struct ras_core_config *config;
- ras_core = kzalloc_obj(*ras_core, GFP_KERNEL);
+ ras_core = kzalloc_obj(*ras_core);
if (!ras_core)
return NULL;
- config = kzalloc_obj(*config, GFP_KERNEL);
+ config = kzalloc_obj(*config);
if (!config) {
kfree(ras_core);
return NULL;
diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_log_ring.c b/drivers/gpu/drm/amd/ras/rascore/ras_log_ring.c
index 5d3e46c7740f..f10e856f3c8c 100644
--- a/drivers/gpu/drm/amd/ras/rascore/ras_log_ring.c
+++ b/drivers/gpu/drm/amd/ras/rascore/ras_log_ring.c
@@ -202,7 +202,7 @@ struct ras_log_batch_tag *ras_log_ring_create_batch_tag(struct ras_core_context
struct ras_log_batch_tag *batch_tag;
unsigned long flags = 0;
- batch_tag = kzalloc_obj(*batch_tag, GFP_KERNEL);
+ batch_tag = kzalloc_obj(*batch_tag);
if (!batch_tag)
return NULL;
diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
index 7c69a7a8c5f6..2abe8553e479 100644
--- a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
+++ b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c
@@ -199,7 +199,7 @@ int ras_umc_log_bad_bank_pending(struct ras_core_context *ras_core, struct ras_b
struct ras_umc *ras_umc = &ras_core->ras_umc;
struct ras_bank_ecc_node *ecc_node;
- ecc_node = kzalloc_obj(*ecc_node, GFP_KERNEL);
+ ecc_node = kzalloc_obj(*ecc_node);
if (!ecc_node)
return -ENOMEM;
@@ -246,7 +246,7 @@ int ras_umc_log_bad_bank(struct ras_core_context *ras_core, struct ras_bank_ecc
if (ret)
goto out;
- err_rec = kzalloc_obj(*err_rec, GFP_KERNEL);
+ err_rec = kzalloc_obj(*err_rec);
if (!err_rec) {
ret = -ENOMEM;
goto out;
@@ -454,7 +454,7 @@ int ras_umc_load_bad_pages(struct ras_core_context *ras_core)
ras_core->ras_eeprom.record_threshold_config == DISABLE_RETIRE_PAGE)
return 0;
- bps = kzalloc_objs(*bps, ras_num_recs, GFP_KERNEL);
+ bps = kzalloc_objs(*bps, ras_num_recs);
if (!bps)
return -ENOMEM;
@@ -512,7 +512,7 @@ int ras_umc_handle_bad_pages(struct ras_core_context *ras_core, void *data)
struct eeprom_umc_record *records;
int count, ret;
- records = kzalloc_objs(*records, MAX_ECC_NUM_PER_RETIREMENT, GFP_KERNEL);
+ records = kzalloc_objs(*records, MAX_ECC_NUM_PER_RETIREMENT);
if (!records)
return -ENOMEM;
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
index 7221dc4731ab..9c8b8da531a7 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
@@ -503,7 +503,7 @@ static void komeda_crtc_reset(struct drm_crtc *crtc)
kfree(to_kcrtc_st(crtc->state));
crtc->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -514,7 +514,7 @@ komeda_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
struct komeda_crtc_state *old = to_kcrtc_st(crtc->state);
struct komeda_crtc_state *new;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
index ec34491f4f8b..6ee909f8d534 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
@@ -165,7 +165,7 @@ komeda_fb_create(struct drm_device *dev, struct drm_file *file,
struct komeda_fb *kfb;
int ret = 0, i;
- kfb = kzalloc_obj(*kfb, GFP_KERNEL);
+ kfb = kzalloc_obj(*kfb);
if (!kfb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
index 05342c6d5b6d..835c11fdd7ff 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
@@ -142,7 +142,7 @@ static void komeda_plane_reset(struct drm_plane *plane)
kfree(plane->state);
plane->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_plane_reset(plane, &state->base);
}
@@ -155,7 +155,7 @@ komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
@@ -247,7 +247,7 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
u32 *formats, n_formats = 0;
int err;
- kplane = kzalloc_obj(*kplane, GFP_KERNEL);
+ kplane = kzalloc_obj(*kplane);
if (!kplane)
return -ENOMEM;
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c b/drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c
index 56703456fbfa..ee57e306bf7b 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c
@@ -50,7 +50,7 @@ static int komeda_layer_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_layer_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -92,7 +92,7 @@ static int komeda_scaler_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_scaler_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -135,7 +135,7 @@ static int komeda_compiz_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_compiz_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -178,7 +178,7 @@ static int komeda_splitter_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_splitter_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -221,7 +221,7 @@ static int komeda_merger_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_merger_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -265,7 +265,7 @@ static int komeda_improc_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_improc_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -308,7 +308,7 @@ static int komeda_timing_ctrlr_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_compiz_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -352,7 +352,7 @@ static int komeda_pipeline_obj_add(struct komeda_kms_dev *kms,
{
struct komeda_pipeline_state *st;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
index 5e290815c32b..41cc3e080dc9 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
@@ -149,7 +149,7 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
if (!kcrtc->master->wb_layer)
return 0;
- kwb_conn = kzalloc_obj(*kwb_conn, GFP_KERNEL);
+ kwb_conn = kzalloc_obj(*kwb_conn);
if (!kwb_conn)
return -ENOMEM;
diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index c3a295f3c82d..18e6157b1047 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -447,7 +447,7 @@ static struct drm_crtc_state *malidp_crtc_duplicate_state(struct drm_crtc *crtc)
return NULL;
old_state = to_malidp_crtc_state(crtc->state);
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
@@ -478,7 +478,7 @@ static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
static void malidp_crtc_reset(struct drm_crtc *crtc)
{
- struct malidp_crtc_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct malidp_crtc_state *state = kzalloc_obj(*state);
if (crtc->state)
malidp_crtc_destroy_state(crtc, crtc->state);
diff --git a/drivers/gpu/drm/arm/malidp_mw.c b/drivers/gpu/drm/arm/malidp_mw.c
index 81442a011b09..0af7eaf9abc1 100644
--- a/drivers/gpu/drm/arm/malidp_mw.c
+++ b/drivers/gpu/drm/arm/malidp_mw.c
@@ -98,7 +98,7 @@ malidp_mw_connector_duplicate_state(struct drm_connector *connector)
if (WARN_ON(!connector->state))
return NULL;
- mw_state = kzalloc_obj(*mw_state, GFP_KERNEL);
+ mw_state = kzalloc_obj(*mw_state);
if (!mw_state)
return NULL;
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 1ba8fdf2dc4f..4b9876322501 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -81,7 +81,7 @@ static void malidp_plane_reset(struct drm_plane *plane)
__drm_atomic_helper_plane_destroy_state(&state->base);
kfree(state);
plane->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_plane_reset(plane, &state->base);
}
@@ -94,7 +94,7 @@ drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
if (!plane->state)
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index ed57b60d0f12..d40bb9cf9ff1 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -921,7 +921,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev,
if (IS_ERR(base))
return PTR_ERR(base);
- dcrtc = kzalloc_obj(*dcrtc, GFP_KERNEL);
+ dcrtc = kzalloc_obj(*dcrtc);
if (!dcrtc) {
DRM_ERROR("failed to allocate Armada crtc\n");
return -ENOMEM;
@@ -970,7 +970,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev,
dcrtc->crtc.port = port;
- primary = kzalloc_obj(*primary, GFP_KERNEL);
+ primary = kzalloc_obj(*primary);
if (!primary) {
ret = -ENOMEM;
goto err_crtc;
diff --git a/drivers/gpu/drm/armada/armada_fb.c b/drivers/gpu/drm/armada/armada_fb.c
index 9355a7a20a50..b828bba419bf 100644
--- a/drivers/gpu/drm/armada/armada_fb.c
+++ b/drivers/gpu/drm/armada/armada_fb.c
@@ -57,7 +57,7 @@ struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
return ERR_PTR(-EINVAL);
}
- dfb = kzalloc_obj(*dfb, GFP_KERNEL);
+ dfb = kzalloc_obj(*dfb);
if (!dfb) {
DRM_ERROR("failed to allocate Armada fb object\n");
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c
index 56563816ca54..da7335cbe82d 100644
--- a/drivers/gpu/drm/armada/armada_gem.c
+++ b/drivers/gpu/drm/armada/armada_gem.c
@@ -137,7 +137,7 @@ armada_gem_linear_back(struct drm_device *dev, struct armada_gem_object *obj)
void __iomem *ptr;
int ret;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return -ENOSPC;
@@ -200,7 +200,7 @@ armada_gem_alloc_private_object(struct drm_device *dev, size_t size)
size = roundup_gem_size(size);
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return NULL;
@@ -221,7 +221,7 @@ static struct armada_gem_object *armada_gem_alloc_object(struct drm_device *dev,
size = roundup_gem_size(size);
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return NULL;
@@ -393,7 +393,7 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach,
struct sg_table *sgt;
int i;
- sgt = kmalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kmalloc_obj(*sgt);
if (!sgt)
return NULL;
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index c003a8dce805..361fdcece4b0 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -310,7 +310,7 @@ static void armada_overlay_reset(struct drm_plane *plane)
kfree(plane->state);
plane->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state) {
state->colorkey_yr = 0xfefefe00;
state->colorkey_ug = 0x01010100;
@@ -550,7 +550,7 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
if (ret)
return ret;
- overlay = kzalloc_obj(*overlay, GFP_KERNEL);
+ overlay = kzalloc_obj(*overlay);
if (!overlay)
return -ENOMEM;
diff --git a/drivers/gpu/drm/armada/armada_plane.c b/drivers/gpu/drm/armada/armada_plane.c
index 88cac3e7e592..eba12bba1e09 100644
--- a/drivers/gpu/drm/armada/armada_plane.c
+++ b/drivers/gpu/drm/armada/armada_plane.c
@@ -262,7 +262,7 @@ void armada_plane_reset(struct drm_plane *plane)
if (plane->state)
__drm_atomic_helper_plane_destroy_state(plane->state);
kfree(plane->state);
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (st)
__drm_atomic_helper_plane_reset(plane, &st->base);
}
diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c
index 056b372803b1..19acd1eff4f3 100644
--- a/drivers/gpu/drm/ast/ast_dp.c
+++ b/drivers/gpu/drm/ast/ast_dp.c
@@ -500,7 +500,7 @@ ast_astdp_connector_atomic_duplicate_state(struct drm_connector *connector)
if (drm_WARN_ON(dev, !connector->state))
return NULL;
- new_astdp_state = kmalloc_obj(*new_astdp_state, GFP_KERNEL);
+ new_astdp_state = kmalloc_obj(*new_astdp_state);
if (!new_astdp_state)
return NULL;
__drm_atomic_helper_connector_duplicate_state(connector, &new_astdp_state->base);
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index b017afe7e546..21abb6a6d8bc 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -876,7 +876,7 @@ static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
static void ast_crtc_reset(struct drm_crtc *crtc)
{
- struct ast_crtc_state *ast_state = kzalloc_obj(*ast_state, GFP_KERNEL);
+ struct ast_crtc_state *ast_state = kzalloc_obj(*ast_state);
if (crtc->state)
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
@@ -896,7 +896,7 @@ ast_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
if (drm_WARN_ON(dev, !crtc->state))
return NULL;
- new_ast_state = kmalloc_obj(*new_ast_state, GFP_KERNEL);
+ new_ast_state = kmalloc_obj(*new_ast_state);
if (!new_ast_state)
return NULL;
__drm_atomic_helper_crtc_duplicate_state(crtc, &new_ast_state->base);
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
index 7204ef72c4d2..d8cf3d231920 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
@@ -540,7 +540,7 @@ static void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc)
crtc->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -554,7 +554,7 @@ atmel_hlcdc_crtc_duplicate_state(struct drm_crtc *crtc)
if (WARN_ON(!crtc->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
__drm_atomic_helper_crtc_duplicate_state(crtc, &state->base);
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 1a1e76dc4727..bccd1564216e 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -1194,7 +1194,7 @@ static void atmel_hlcdc_plane_reset(struct drm_plane *p)
p->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state) {
if (atmel_hlcdc_plane_alloc_dscrs(p, state)) {
kfree(state);
diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c
index 50309a23dbea..1ed21a8713bf 100644
--- a/drivers/gpu/drm/bridge/aux-bridge.c
+++ b/drivers/gpu/drm/bridge/aux-bridge.c
@@ -47,7 +47,7 @@ int drm_aux_bridge_register(struct device *parent)
struct auxiliary_device *adev;
int ret;
- adev = kzalloc_obj(*adev, GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev)
return -ENOMEM;
diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/bridge/aux-hpd-bridge.c
index 0f8a0fb50fbc..f02a38a2638a 100644
--- a/drivers/gpu/drm/bridge/aux-hpd-bridge.c
+++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c
@@ -52,7 +52,7 @@ struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, str
struct auxiliary_device *adev;
int ret;
- adev = kzalloc_obj(*adev, GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
index c094740523ea..0dd85e26248c 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
@@ -902,7 +902,7 @@ static u32 *cdns_dsi_bridge_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 0;
- input_fmts = kzalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kzalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
@@ -985,7 +985,7 @@ cdns_dsi_bridge_atomic_duplicate_state(struct drm_bridge *bridge)
bridge_state = drm_priv_to_bridge_state(bridge->base.state);
old_dsi_state = to_cdns_dsi_bridge_state(bridge_state);
- dsi_state = kzalloc_obj(*dsi_state, GFP_KERNEL);
+ dsi_state = kzalloc_obj(*dsi_state);
if (!dsi_state)
return NULL;
@@ -1013,7 +1013,7 @@ cdns_dsi_bridge_atomic_reset(struct drm_bridge *bridge)
{
struct cdns_dsi_bridge_state *dsi_state;
- dsi_state = kzalloc_obj(*dsi_state, GFP_KERNEL);
+ dsi_state = kzalloc_obj(*dsi_state);
if (!dsi_state)
return NULL;
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
index 9d41e824e757..9392c226ff5b 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
@@ -2055,7 +2055,7 @@ cdns_mhdp_bridge_atomic_duplicate_state(struct drm_bridge *bridge)
{
struct cdns_mhdp_bridge_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
@@ -2085,7 +2085,7 @@ cdns_mhdp_bridge_atomic_reset(struct drm_bridge *bridge)
{
struct cdns_mhdp_bridge_state *cdns_mhdp_state;
- cdns_mhdp_state = kzalloc_obj(*cdns_mhdp_state, GFP_KERNEL);
+ cdns_mhdp_state = kzalloc_obj(*cdns_mhdp_state);
if (!cdns_mhdp_state)
return NULL;
@@ -2105,7 +2105,7 @@ static u32 *cdns_mhdp_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 0;
- input_fmts = kzalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kzalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c
index f5ffef625a9b..16c0631adeb1 100644
--- a/drivers/gpu/drm/bridge/display-connector.c
+++ b/drivers/gpu/drm/bridge/display-connector.c
@@ -116,7 +116,7 @@ static u32 *display_connector_get_output_bus_fmts(struct drm_bridge *bridge,
u32 *out_bus_fmts;
*num_output_fmts = 1;
- out_bus_fmts = kmalloc_obj(*out_bus_fmts, GFP_KERNEL);
+ out_bus_fmts = kmalloc_obj(*out_bus_fmts);
if (!out_bus_fmts)
return NULL;
@@ -158,7 +158,7 @@ static u32 *display_connector_get_input_bus_fmts(struct drm_bridge *bridge,
u32 *in_bus_fmts;
*num_input_fmts = 1;
- in_bus_fmts = kmalloc_obj(*in_bus_fmts, GFP_KERNEL);
+ in_bus_fmts = kmalloc_obj(*in_bus_fmts);
if (!in_bus_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
index 157cda9d2fb1..bdecee56fa49 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c
@@ -319,7 +319,7 @@ imx8qm_ldb_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
index eb06266f15fb..fbd7a37c0812 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c
@@ -333,7 +333,7 @@ imx8qxp_ldb_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
index a7dd49e2d3bb..5582456a4490 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
@@ -216,7 +216,7 @@ imx8qxp_pc_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
index 85976abdda63..b52b7c7ce183 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
@@ -206,7 +206,7 @@ imx8qxp_pixel_link_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
index 7c86760171dc..441fd32dc91c 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
@@ -175,7 +175,7 @@ imx8qxp_pxl2dpi_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
index e672a37950e0..8f312f9edf97 100644
--- a/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
@@ -609,7 +609,7 @@ static u32 *imx93_dsi_get_input_bus_fmts(void *priv_data,
return NULL;
}
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
input_fmts[0] = input_fmt;
diff --git a/drivers/gpu/drm/bridge/ite-it6263.c b/drivers/gpu/drm/bridge/ite-it6263.c
index 85fbf57001ec..e77681047bb2 100644
--- a/drivers/gpu/drm/bridge/ite-it6263.c
+++ b/drivers/gpu/drm/bridge/ite-it6263.c
@@ -735,7 +735,7 @@ it6263_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
if (!it6263_is_input_bus_fmt_valid(it->lvds_data_mapping))
return NULL;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index 810c6984cf6b..930aaa659c97 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -1741,7 +1741,7 @@ samsung_dsim_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
{
u32 *input_fmts;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c
index 10fcec9d653b..d3f238b1f2a9 100644
--- a/drivers/gpu/drm/bridge/sil-sii8620.c
+++ b/drivers/gpu/drm/bridge/sil-sii8620.c
@@ -384,7 +384,7 @@ static void sii8620_mt_msc_cmd_send(struct sii8620 *ctx,
static struct sii8620_mt_msg *sii8620_mt_msg_new(struct sii8620 *ctx)
{
- struct sii8620_mt_msg *msg = kzalloc_obj(*msg, GFP_KERNEL);
+ struct sii8620_mt_msg *msg = kzalloc_obj(*msg);
if (!msg)
ctx->error = -ENOMEM;
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
index 04e2e19c9e25..4ab6922dd79c 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
@@ -1809,7 +1809,7 @@ static struct drm_bridge_state *dw_dp_bridge_atomic_duplicate_state(struct drm_b
{
struct dw_dp_bridge_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index 8d5d8a196479..ca4dea226f4b 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -561,7 +561,7 @@ dw_mipi_dsi_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
output_fmt, num_input_fmts);
/* Fall back to MEDIA_BUS_FMT_FIXED as the only input format. */
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
input_fmts[0] = MEDIA_BUS_FMT_FIXED;
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
index 9f06d00569ec..e6eaf9fd0251 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
@@ -711,7 +711,7 @@ dw_mipi_dsi2_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
output_fmt, num_input_fmts);
/* Fall back to MEDIA_BUS_FMT_FIXED as the only input format. */
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
input_fmts[0] = MEDIA_BUS_FMT_FIXED;
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index cae2ea075670..3b6b0e92cf89 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -213,7 +213,7 @@ static u32 *tfp410_get_input_bus_fmts(struct drm_bridge *bridge,
*num_input_fmts = 0;
- input_fmts = kzalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kzalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c
index f708c0d2bf6a..91d196a397cf 100644
--- a/drivers/gpu/drm/clients/drm_fbdev_client.c
+++ b/drivers/gpu/drm/clients/drm_fbdev_client.c
@@ -154,7 +154,7 @@ int drm_fbdev_client_setup(struct drm_device *dev, const struct drm_format_info
drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
- fb_helper = kzalloc_obj(*fb_helper, GFP_KERNEL);
+ fb_helper = kzalloc_obj(*fb_helper);
if (!fb_helper)
return -ENOMEM;
drm_fb_helper_prepare(dev, fb_helper, color_mode, NULL);
diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
index 1055f05dbfa2..8d21b785bead 100644
--- a/drivers/gpu/drm/clients/drm_log.c
+++ b/drivers/gpu/drm/clients/drm_log.c
@@ -248,7 +248,7 @@ static void drm_log_init_client(struct drm_log *dlog)
if (!max_modeset)
return;
- dlog->scanout = kzalloc_objs(*dlog->scanout, max_modeset, GFP_KERNEL);
+ dlog->scanout = kzalloc_objs(*dlog->scanout, max_modeset);
if (!dlog->scanout)
return;
@@ -419,7 +419,7 @@ void drm_log_register(struct drm_device *dev)
{
struct drm_log *new;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
goto err_warn;
diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
index a36feef1cd6a..6e5e3e542290 100644
--- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
+++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
@@ -280,7 +280,7 @@ int of_dp_aux_populate_bus(struct drm_dp_aux *aux,
goto err_did_get_np;
}
- aux_ep_with_data = kzalloc_obj(*aux_ep_with_data, GFP_KERNEL);
+ aux_ep_with_data = kzalloc_obj(*aux_ep_with_data);
if (!aux_ep_with_data) {
ret = -ENOMEM;
goto err_did_set_populated;
diff --git a/drivers/gpu/drm/display/drm_dp_aux_dev.c b/drivers/gpu/drm/display/drm_dp_aux_dev.c
index df02dbca7338..f0632e43b69e 100644
--- a/drivers/gpu/drm/display/drm_dp_aux_dev.c
+++ b/drivers/gpu/drm/display/drm_dp_aux_dev.c
@@ -75,7 +75,7 @@ static struct drm_dp_aux_dev *alloc_drm_dp_aux_dev(struct drm_dp_aux *aux)
struct drm_dp_aux_dev *aux_dev;
int index;
- aux_dev = kzalloc_obj(*aux_dev, GFP_KERNEL);
+ aux_dev = kzalloc_obj(*aux_dev);
if (!aux_dev)
return ERR_PTR(-ENOMEM);
aux_dev->aux = aux;
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index 954ecaa6fd6b..953228cc46cb 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -1333,7 +1333,7 @@ static struct drm_dp_mst_branch *drm_dp_add_mst_branch_device(u8 lct, u8 *rad)
{
struct drm_dp_mst_branch *mstb;
- mstb = kzalloc_obj(*mstb, GFP_KERNEL);
+ mstb = kzalloc_obj(*mstb);
if (!mstb)
return NULL;
@@ -2317,7 +2317,7 @@ drm_dp_mst_add_port(struct drm_device *dev,
struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_mst_branch *mstb, u8 port_number)
{
- struct drm_dp_mst_port *port = kzalloc_obj(*port, GFP_KERNEL);
+ struct drm_dp_mst_port *port = kzalloc_obj(*port);
if (!port)
return NULL;
@@ -2923,7 +2923,7 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
int i, ret, port_mask = 0;
bool changed = false;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg)
return -ENOMEM;
@@ -3000,7 +3000,7 @@ drm_dp_send_clear_payload_id_table(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_sideband_msg_tx *txmsg;
int ret;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg)
return;
@@ -3025,7 +3025,7 @@ drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_sideband_msg_tx *txmsg;
int ret;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg)
return -ENOMEM;
@@ -3138,7 +3138,7 @@ static int drm_dp_payload_send_msg(struct drm_dp_mst_topology_mgr *mgr,
return -EINVAL;
}
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
ret = -ENOMEM;
goto fail_put;
@@ -3185,7 +3185,7 @@ int drm_dp_send_power_updown_phy(struct drm_dp_mst_topology_mgr *mgr,
if (!port)
return -EINVAL;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
drm_dp_mst_topology_put_port(port);
return -ENOMEM;
@@ -3219,7 +3219,7 @@ int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
u8 nonce[7];
int ret;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg)
return -ENOMEM;
@@ -3470,7 +3470,7 @@ static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
if (!mstb)
return -EINVAL;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
ret = -ENOMEM;
goto fail_put;
@@ -3521,7 +3521,7 @@ static int drm_dp_send_dpcd_write(struct drm_dp_mst_topology_mgr *mgr,
if (!mstb)
return -EINVAL;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
ret = -ENOMEM;
goto fail_put;
@@ -3562,7 +3562,7 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,
{
struct drm_dp_sideband_msg_tx *txmsg;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg)
return -ENOMEM;
@@ -4135,7 +4135,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr)
if (!mgr->up_req_recv.have_eomt)
return 0;
- up_req = kzalloc_obj(*up_req, GFP_KERNEL);
+ up_req = kzalloc_obj(*up_req);
if (!up_req) {
ret = -ENOMEM;
goto out_clear_reply;
@@ -4479,7 +4479,7 @@ int drm_dp_atomic_find_time_slots(struct drm_atomic_state *state,
/* Add the new allocation to the state, note the VCPI isn't assigned until the end */
if (!payload) {
- payload = kzalloc_obj(*payload, GFP_KERNEL);
+ payload = kzalloc_obj(*payload);
if (!payload)
return -ENOMEM;
@@ -5744,7 +5744,7 @@ int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr,
mgr->max_payloads = max_payloads;
mgr->conn_base_id = conn_base_id;
- mst_state = kzalloc_obj(*mst_state, GFP_KERNEL);
+ mst_state = kzalloc_obj(*mst_state);
if (mst_state == NULL)
return -ENOMEM;
@@ -5844,7 +5844,7 @@ static int drm_dp_mst_i2c_read(struct drm_dp_mst_branch *mstb,
msg.u.i2c_read.read_i2c_device_id = msgs[num - 1].addr;
msg.u.i2c_read.num_bytes_read = msgs[num - 1].len;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
ret = -ENOMEM;
goto out;
@@ -5884,7 +5884,7 @@ static int drm_dp_mst_i2c_write(struct drm_dp_mst_branch *mstb,
struct drm_dp_sideband_msg_tx *txmsg = NULL;
int ret;
- txmsg = kzalloc_obj(*txmsg, GFP_KERNEL);
+ txmsg = kzalloc_obj(*txmsg);
if (!txmsg) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/gpu/drm/display/drm_dp_tunnel.c b/drivers/gpu/drm/display/drm_dp_tunnel.c
index 005ee68e6cd4..7aee57416902 100644
--- a/drivers/gpu/drm/display/drm_dp_tunnel.c
+++ b/drivers/gpu/drm/display/drm_dp_tunnel.c
@@ -476,7 +476,7 @@ create_tunnel(struct drm_dp_tunnel_mgr *mgr,
u8 drv_group_id = tunnel_reg_drv_group_id(regs);
struct drm_dp_tunnel *tunnel;
- tunnel = kzalloc_obj(*tunnel, GFP_KERNEL);
+ tunnel = kzalloc_obj(*tunnel);
if (!tunnel)
return NULL;
@@ -1387,7 +1387,7 @@ add_tunnel_state(struct drm_dp_tunnel_group_state *group_state,
"Adding state for tunnel %p to group state %p\n",
tunnel, group_state);
- tunnel_state = kzalloc_obj(*tunnel_state, GFP_KERNEL);
+ tunnel_state = kzalloc_obj(*tunnel_state);
if (!tunnel_state)
return NULL;
@@ -1458,7 +1458,7 @@ tunnel_group_duplicate_state(struct drm_private_obj *obj)
struct drm_dp_tunnel_group_state *group_state;
struct drm_dp_tunnel_state *tunnel_state;
- group_state = kzalloc_obj(*group_state, GFP_KERNEL);
+ group_state = kzalloc_obj(*group_state);
if (!group_state)
return NULL;
@@ -1583,7 +1583,7 @@ static bool init_group(struct drm_dp_tunnel_mgr *mgr, struct drm_dp_tunnel_group
{
struct drm_dp_tunnel_group_state *group_state;
- group_state = kzalloc_obj(*group_state, GFP_KERNEL);
+ group_state = kzalloc_obj(*group_state);
if (!group_state)
return false;
@@ -1644,7 +1644,7 @@ static int resize_bw_array(struct drm_dp_tunnel_state *tunnel_state,
if (old_mask == new_mask)
return 0;
- new_bws = kzalloc_objs(*new_bws, hweight32(new_mask), GFP_KERNEL);
+ new_bws = kzalloc_objs(*new_bws, hweight32(new_mask));
if (!new_bws)
return -ENOMEM;
@@ -1906,14 +1906,14 @@ drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
struct drm_dp_tunnel_mgr *mgr;
int i;
- mgr = kzalloc_obj(*mgr, GFP_KERNEL);
+ mgr = kzalloc_obj(*mgr);
if (!mgr)
return ERR_PTR(-ENOMEM);
mgr->dev = dev;
init_waitqueue_head(&mgr->bw_req_queue);
- mgr->groups = kzalloc_objs(*mgr->groups, max_group_count, GFP_KERNEL);
+ mgr->groups = kzalloc_objs(*mgr->groups, max_group_count);
if (!mgr->groups) {
kfree(mgr);
diff --git a/drivers/gpu/drm/display/drm_hdmi_cec_helper.c b/drivers/gpu/drm/display/drm_hdmi_cec_helper.c
index 7308ed792089..ef6dbaa59dee 100644
--- a/drivers/gpu/drm/display/drm_hdmi_cec_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_cec_helper.c
@@ -97,7 +97,7 @@ int drmm_connector_hdmi_cec_register(struct drm_connector *connector,
if (!funcs->init || !funcs->enable || !funcs->log_addr || !funcs->transmit)
return -EINVAL;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index a666fca65d6c..565c47f976b1 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -177,7 +177,7 @@ drm_atomic_state_alloc(struct drm_device *dev)
if (!config->funcs->atomic_state_alloc) {
struct drm_atomic_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
if (drm_atomic_state_init(dev, state) < 0) {
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 8626f903fdd5..3bdf32234bb3 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2525,7 +2525,7 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,
funcs = state->dev->mode_config.helper_private;
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
- commit = kzalloc_obj(*commit, GFP_KERNEL);
+ commit = kzalloc_obj(*commit);
if (!commit)
return -ENOMEM;
@@ -2554,7 +2554,7 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,
}
if (!new_crtc_state->event) {
- commit->event = kzalloc_obj(*commit->event, GFP_KERNEL);
+ commit->event = kzalloc_obj(*commit->event);
if (!commit->event)
return -ENOMEM;
@@ -4080,7 +4080,7 @@ drm_atomic_helper_bridge_propagate_bus_fmt(struct drm_bridge *bridge,
{
u32 *input_fmts;
- input_fmts = kzalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kzalloc_obj(*input_fmts);
if (!input_fmts) {
*num_input_fmts = 0;
return NULL;
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index 67812085dca7..2a101fd5a714 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -114,7 +114,7 @@ EXPORT_SYMBOL(__drm_atomic_helper_crtc_reset);
void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc)
{
struct drm_crtc_state *crtc_state =
- kzalloc_obj(*crtc->state, GFP_KERNEL);
+ kzalloc_obj(*crtc->state);
if (crtc->state)
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
@@ -175,7 +175,7 @@ drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc)
if (WARN_ON(!crtc->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_duplicate_state(crtc, state);
@@ -333,7 +333,7 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)
__drm_atomic_helper_plane_destroy_state(plane->state);
kfree(plane->state);
- plane->state = kzalloc_obj(*plane->state, GFP_KERNEL);
+ plane->state = kzalloc_obj(*plane->state);
if (plane->state)
__drm_atomic_helper_plane_reset(plane, plane->state);
}
@@ -377,7 +377,7 @@ drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (state)
__drm_atomic_helper_plane_duplicate_state(plane, state);
@@ -666,7 +666,7 @@ drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector)
if (WARN_ON(!connector->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (state)
__drm_atomic_helper_connector_duplicate_state(connector, state);
@@ -763,7 +763,7 @@ drm_atomic_helper_bridge_duplicate_state(struct drm_bridge *bridge)
if (WARN_ON(!bridge->base.state))
return NULL;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (new)
__drm_atomic_helper_bridge_duplicate_state(bridge, new);
@@ -821,7 +821,7 @@ drm_atomic_helper_bridge_reset(struct drm_bridge *bridge)
{
struct drm_bridge_state *bridge_state;
- bridge_state = kzalloc_obj(*bridge_state, GFP_KERNEL);
+ bridge_state = kzalloc_obj(*bridge_state);
if (!bridge_state)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index ac2175f5e5b0..87de41fb4459 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1088,7 +1088,7 @@ static struct drm_pending_vblank_event *create_vblank_event(
{
struct drm_pending_vblank_event *e = NULL;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
return NULL;
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index d9d984ae62c4..e17bb0f1f9e0 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -132,7 +132,7 @@ struct drm_master *drm_master_create(struct drm_device *dev)
{
struct drm_master *master;
- master = kzalloc_obj(*master, GFP_KERNEL);
+ master = kzalloc_obj(*master);
if (!master)
return NULL;
diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
index 9a81992b04e9..3b1f5f72885e 100644
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -459,7 +459,7 @@ static int drm_atomic_helper_crtc_normalize_zpos(struct drm_crtc *crtc,
drm_dbg_atomic(dev, "[CRTC:%d:%s] calculating normalized zpos values\n",
crtc->base.id, crtc->name);
- states = kmalloc_objs(*states, total_planes, GFP_KERNEL);
+ states = kmalloc_objs(*states, total_planes);
if (!states)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 5518760a88c1..d6f11c68bb6a 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -1189,7 +1189,7 @@ drm_atomic_bridge_chain_select_bus_fmts(struct drm_bridge *bridge,
return -ENOMEM;
} else {
num_out_bus_fmts = 1;
- out_bus_fmts = kmalloc_obj(*out_bus_fmts, GFP_KERNEL);
+ out_bus_fmts = kmalloc_obj(*out_bus_fmts);
if (!out_bus_fmts)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index 0e6f4b73827d..6236ec46d62a 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -225,7 +225,7 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height,
struct drm_framebuffer *fb;
int ret;
- buffer = kzalloc_obj(*buffer, GFP_KERNEL);
+ buffer = kzalloc_obj(*buffer);
if (!buffer)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index fce35c27b361..8e41cb8d0011 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -567,7 +567,7 @@ static int drm_client_pick_crtcs(struct drm_client_dev *client,
if (modes[n] == NULL)
return best_score;
- crtcs = kzalloc_objs(*crtcs, connector_count, GFP_KERNEL);
+ crtcs = kzalloc_objs(*crtcs, connector_count);
if (!crtcs)
return best_score;
@@ -643,7 +643,7 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
if (drm_WARN_ON(dev, count <= 0))
return false;
- save_enabled = kzalloc_objs(bool, count, GFP_KERNEL);
+ save_enabled = kzalloc_objs(bool, count);
if (!save_enabled)
return false;
@@ -855,10 +855,10 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
if (!connector_count)
return 0;
- crtcs = kzalloc_objs(*crtcs, connector_count, GFP_KERNEL);
- modes = kzalloc_objs(*modes, connector_count, GFP_KERNEL);
- offsets = kzalloc_objs(*offsets, connector_count, GFP_KERNEL);
- enabled = kzalloc_objs(bool, connector_count, GFP_KERNEL);
+ crtcs = kzalloc_objs(*crtcs, connector_count);
+ modes = kzalloc_objs(*modes, connector_count);
+ offsets = kzalloc_objs(*offsets, connector_count);
+ enabled = kzalloc_objs(bool, connector_count);
if (!crtcs || !modes || !enabled || !offsets) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
index 2f3cd856df03..398cc81ae588 100644
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -453,7 +453,7 @@ drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop)
if (WARN_ON(!colorop->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (state)
__drm_atomic_helper_colorop_duplicate_state(colorop, state);
@@ -514,7 +514,7 @@ static void __drm_colorop_reset(struct drm_colorop *colorop,
void drm_colorop_reset(struct drm_colorop *colorop)
{
kfree(colorop->state);
- colorop->state = kzalloc_obj(*colorop->state, GFP_KERNEL);
+ colorop->state = kzalloc_obj(*colorop->state);
if (colorop->state)
__drm_colorop_reset(colorop, colorop->state);
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 7528c848ccfb..2a3a1fa0594b 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -3605,7 +3605,7 @@ struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev,
struct drm_tile_group *tg;
int ret;
- tg = kzalloc_obj(*tg, GFP_KERNEL);
+ tg = kzalloc_obj(*tg);
if (!tg)
return NULL;
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index f24b5593b613..6d0bf06b4d31 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -185,7 +185,7 @@ struct dma_fence *drm_crtc_create_fence(struct drm_crtc *crtc)
{
struct dma_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return NULL;
diff --git a/drivers/gpu/drm/drm_damage_helper.c b/drivers/gpu/drm/drm_damage_helper.c
index 928cccac527e..1b6850aa1688 100644
--- a/drivers/gpu/drm/drm_damage_helper.c
+++ b/drivers/gpu/drm/drm_damage_helper.c
@@ -140,7 +140,7 @@ int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,
num_clips /= 2;
}
- rects = kzalloc_objs(*rects, num_clips, GFP_KERNEL);
+ rects = kzalloc_objs(*rects, num_clips);
if (!rects) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index 835deddcc538..371edb0b9b17 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -224,7 +224,7 @@ static int crtc_crc_open(struct inode *inode, struct file *filep)
if (WARN_ON(values_cnt == 0))
return -EINVAL;
- entries = kzalloc_objs(*entries, DRM_CRC_ENTRIES_NR, GFP_KERNEL);
+ entries = kzalloc_objs(*entries, DRM_CRC_ENTRIES_NR);
if (!entries)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d248d2b295a0..ff432ac6b569 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2503,7 +2503,7 @@ static const struct drm_edid *_drm_edid_alloc(const void *edid, size_t size)
if (!edid || !size || size < EDID_LENGTH)
return NULL;
- drm_edid = kzalloc_obj(*drm_edid, GFP_KERNEL);
+ drm_edid = kzalloc_obj(*drm_edid);
if (drm_edid) {
drm_edid->edid = edid;
drm_edid->size = size;
@@ -5764,7 +5764,7 @@ static int _drm_edid_to_sad(const struct drm_edid *drm_edid,
int i;
count = cea_db_payload_len(db) / 3; /* SAD is 3B */
- sads = kzalloc_objs(*sads, count, GFP_KERNEL);
+ sads = kzalloc_objs(*sads, count);
*psads = sads;
if (!sads)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index 608763984794..ec820686b302 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -136,7 +136,7 @@ struct drm_file *drm_file_alloc(struct drm_minor *minor)
struct drm_file *file;
int ret;
- file = kzalloc_obj(*file, GFP_KERNEL);
+ file = kzalloc_obj(*file);
if (!file)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 45963ff2192c..147ac19f851b 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -747,7 +747,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
ret = -EINVAL;
goto out_err1;
}
- clips = kzalloc_objs(*clips, num_clips, GFP_KERNEL);
+ clips = kzalloc_objs(*clips, num_clips);
if (!clips) {
ret = -ENOMEM;
goto out_err1;
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 4eb96aa589a1..891c3bff5ae0 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -684,7 +684,7 @@ struct page **drm_gem_get_pages(struct drm_gem_object *obj)
npages = obj->size >> PAGE_SHIFT;
- pages = kvmalloc_objs(struct page *, npages, GFP_KERNEL);
+ pages = kvmalloc_objs(struct page *, npages);
if (pages == NULL)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/drivers/gpu/drm/drm_gem_atomic_helper.c
index fa43e586eb49..b2e3778fb7a7 100644
--- a/drivers/gpu/drm/drm_gem_atomic_helper.c
+++ b/drivers/gpu/drm/drm_gem_atomic_helper.c
@@ -338,7 +338,7 @@ void drm_gem_reset_shadow_plane(struct drm_plane *plane)
plane->state = NULL; /* must be set to NULL here */
}
- shadow_plane_state = kzalloc_obj(*shadow_plane_state, GFP_KERNEL);
+ shadow_plane_state = kzalloc_obj(*shadow_plane_state);
__drm_gem_reset_shadow_plane(plane, shadow_plane_state);
}
EXPORT_SYMBOL(drm_gem_reset_shadow_plane);
diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
index ffcdf733984f..ecb9746f4da8 100644
--- a/drivers/gpu/drm/drm_gem_dma_helper.c
+++ b/drivers/gpu/drm/drm_gem_dma_helper.c
@@ -82,7 +82,7 @@ __drm_gem_dma_create(struct drm_device *drm, size_t size, bool private)
return ERR_CAST(gem_obj);
dma_obj = to_drm_gem_dma_obj(gem_obj);
} else {
- dma_obj = kzalloc_obj(*dma_obj, GFP_KERNEL);
+ dma_obj = kzalloc_obj(*dma_obj);
if (!dma_obj)
return ERR_PTR(-ENOMEM);
gem_obj = &dma_obj->base;
@@ -428,7 +428,7 @@ struct sg_table *drm_gem_dma_get_sg_table(struct drm_gem_dma_object *dma_obj)
struct sg_table *sgt;
int ret;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
index e8b81ea55878..9166c353f131 100644
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -238,7 +238,7 @@ drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
struct drm_framebuffer *fb;
int ret;
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (!fb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 4acc632e73b1..7b5a49935ae4 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -127,7 +127,7 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
return ERR_CAST(obj);
shmem = to_drm_gem_shmem_obj(obj);
} else {
- shmem = kzalloc_obj(*shmem, GFP_KERNEL);
+ shmem = kzalloc_obj(*shmem);
if (!shmem)
return ERR_PTR(-ENOMEM);
obj = &shmem->base;
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index 27ceae40cfe3..d7fcced75e79 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -197,7 +197,7 @@ struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev,
return ERR_CAST(gem);
gbo = drm_gem_vram_of_gem(gem);
} else {
- gbo = kzalloc_obj(*gbo, GFP_KERNEL);
+ gbo = kzalloc_obj(*gbo);
if (!gbo)
return ERR_PTR(-ENOMEM);
gem = &gbo->bo.base;
@@ -721,7 +721,7 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
struct ttm_tt *tt;
int ret;
- tt = kzalloc_obj(*tt, GFP_KERNEL);
+ tt = kzalloc_obj(*tt);
if (!tt)
return NULL;
@@ -890,7 +890,7 @@ static struct drm_vram_mm *drm_vram_helper_alloc_mm(struct drm_device *dev, uint
if (WARN_ON(dev->vram_mm))
return dev->vram_mm;
- dev->vram_mm = kzalloc_obj(*dev->vram_mm, GFP_KERNEL);
+ dev->vram_mm = kzalloc_obj(*dev->vram_mm);
if (!dev->vram_mm)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c
index 7570a0e05450..24180bfdf5a2 100644
--- a/drivers/gpu/drm/drm_gpusvm.c
+++ b/drivers/gpu/drm/drm_gpusvm.c
@@ -522,7 +522,7 @@ drm_gpusvm_notifier_alloc(struct drm_gpusvm *gpusvm, unsigned long fault_addr)
if (gpusvm->ops->notifier_alloc)
notifier = gpusvm->ops->notifier_alloc();
else
- notifier = kzalloc_obj(*notifier, GFP_KERNEL);
+ notifier = kzalloc_obj(*notifier);
if (!notifier)
return ERR_PTR(-ENOMEM);
@@ -629,7 +629,7 @@ drm_gpusvm_range_alloc(struct drm_gpusvm *gpusvm,
if (gpusvm->ops->range_alloc)
range = gpusvm->ops->range_alloc(gpusvm);
else
- range = kzalloc_obj(*range, GFP_KERNEL);
+ range = kzalloc_obj(*range);
if (!range)
return ERR_PTR(-ENOMEM);
@@ -1471,7 +1471,7 @@ map_pages:
/* Unlock and restart mapping to allocate memory. */
drm_gpusvm_notifier_unlock(gpusvm);
svm_pages->dma_addr =
- kvmalloc_objs(*svm_pages->dma_addr, npages, GFP_KERNEL);
+ kvmalloc_objs(*svm_pages->dma_addr, npages);
if (!svm_pages->dma_addr) {
err = -ENOMEM;
goto err_free;
diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c
index 9d2f4ae8cc9d..44acfe4120d2 100644
--- a/drivers/gpu/drm/drm_gpuvm.c
+++ b/drivers/gpu/drm/drm_gpuvm.c
@@ -1060,7 +1060,7 @@ drm_gpuvm_resv_object_alloc(struct drm_device *drm)
{
struct drm_gem_object *obj;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return NULL;
@@ -1581,7 +1581,7 @@ drm_gpuvm_bo_create(struct drm_gpuvm *gpuvm,
if (ops && ops->vm_bo_alloc)
vm_bo = ops->vm_bo_alloc();
else
- vm_bo = kzalloc_obj(*vm_bo, GFP_KERNEL);
+ vm_bo = kzalloc_obj(*vm_bo);
if (unlikely(!vm_bo))
return NULL;
@@ -2852,7 +2852,7 @@ gpuva_op_alloc(struct drm_gpuvm *gpuvm)
if (fn && fn->op_alloc)
op = fn->op_alloc();
else
- op = kzalloc_obj(*op, GFP_KERNEL);
+ op = kzalloc_obj(*op);
if (unlikely(!op))
return NULL;
@@ -2946,7 +2946,7 @@ __drm_gpuvm_sm_map_ops_create(struct drm_gpuvm *gpuvm,
} args;
int ret;
- ops = kzalloc_obj(*ops, GFP_KERNEL);
+ ops = kzalloc_obj(*ops);
if (unlikely(!ops))
return ERR_PTR(-ENOMEM);
@@ -3080,7 +3080,7 @@ drm_gpuvm_sm_unmap_ops_create(struct drm_gpuvm *gpuvm,
} args;
int ret;
- ops = kzalloc_obj(*ops, GFP_KERNEL);
+ ops = kzalloc_obj(*ops);
if (unlikely(!ops))
return ERR_PTR(-ENOMEM);
@@ -3130,7 +3130,7 @@ drm_gpuvm_prefetch_ops_create(struct drm_gpuvm *gpuvm,
u64 end = addr + range;
int ret;
- ops = kzalloc_obj(*ops, GFP_KERNEL);
+ ops = kzalloc_obj(*ops);
if (!ops)
return ERR_PTR(-ENOMEM);
@@ -3184,7 +3184,7 @@ drm_gpuvm_bo_unmap_ops_create(struct drm_gpuvm_bo *vm_bo)
drm_gem_gpuva_assert_lock_held(vm_bo->vm, vm_bo->obj);
- ops = kzalloc_obj(*ops, GFP_KERNEL);
+ ops = kzalloc_obj(*ops);
if (!ops)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 55542a360adc..0390e14d3157 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -134,7 +134,7 @@ static struct mipi_dsi_device *mipi_dsi_device_alloc(struct mipi_dsi_host *host)
{
struct mipi_dsi_device *dsi;
- dsi = kzalloc_obj(*dsi, GFP_KERNEL);
+ dsi = kzalloc_obj(*dsi);
if (!dsi)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index e1293ef88581..3f8e025fd6d9 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -75,7 +75,7 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev)
{
struct drm_display_mode *nmode;
- nmode = kzalloc_obj(struct drm_display_mode, GFP_KERNEL);
+ nmode = kzalloc_obj(struct drm_display_mode);
if (!nmode)
return NULL;
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index 4e9b5f5f2539..bdc79140875c 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -94,7 +94,7 @@ drm_pagemap_zdd_alloc(struct drm_pagemap *dpagemap)
{
struct drm_pagemap_zdd *zdd;
- zdd = kmalloc_obj(*zdd, GFP_KERNEL);
+ zdd = kmalloc_obj(*zdd);
if (!zdd)
return NULL;
@@ -861,7 +861,7 @@ drm_pagemap_dev_hold(struct drm_pagemap *dpagemap)
struct drm_pagemap_dev_hold *dev_hold;
struct drm_device *drm = dpagemap->drm;
- dev_hold = kzalloc_obj(*dev_hold, GFP_KERNEL);
+ dev_hold = kzalloc_obj(*dev_hold);
if (!dev_hold)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_pagemap_util.c b/drivers/gpu/drm/drm_pagemap_util.c
index c53031308308..14ddb948a32e 100644
--- a/drivers/gpu/drm/drm_pagemap_util.c
+++ b/drivers/gpu/drm/drm_pagemap_util.c
@@ -94,7 +94,7 @@ out:
*/
struct drm_pagemap_cache *drm_pagemap_cache_create_devm(struct drm_pagemap_shrinker *shrinker)
{
- struct drm_pagemap_cache *cache = kzalloc_obj(*cache, GFP_KERNEL);
+ struct drm_pagemap_cache *cache = kzalloc_obj(*cache);
int err;
if (!cache)
@@ -424,7 +424,7 @@ struct drm_pagemap_shrinker *drm_pagemap_shrinker_create_devm(struct drm_device
struct shrinker *shrink;
int err;
- shrinker = kzalloc_obj(*shrinker, GFP_KERNEL);
+ shrinker = kzalloc_obj(*shrinker);
if (!shrinker)
return ERR_PTR(-ENOMEM);
@@ -548,7 +548,7 @@ int drm_pagemap_acquire_owner(struct drm_pagemap_peer *peer,
}
if (!interconnect) {
- owner = kmalloc_obj(*owner, GFP_KERNEL);
+ owner = kmalloc_obj(*owner);
if (!owner) {
mutex_unlock(&owner_list->lock);
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 75ec5ca579b0..3e8c36484b06 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -1514,7 +1514,7 @@ retry:
}
if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) {
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index ad09be486ea0..51fdb06d3e9f 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -100,7 +100,7 @@ int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv,
struct drm_prime_member *member;
struct rb_node **p, *rb;
- member = kmalloc_obj(*member, GFP_KERNEL);
+ member = kmalloc_obj(*member);
if (!member)
return -ENOMEM;
@@ -780,8 +780,8 @@ int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
return 0;
}
- priv = kzalloc_obj(*priv, GFP_KERNEL);
- fil = kzalloc_obj(*fil, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
+ fil = kzalloc_obj(*fil);
if (!priv || !fil) {
ret = -ENOMEM;
goto out;
@@ -854,7 +854,7 @@ struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev,
size_t max_segment = 0;
int err;
- sg = kmalloc_obj(struct sg_table, GFP_KERNEL);
+ sg = kmalloc_obj(struct sg_table);
if (!sg)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_privacy_screen.c b/drivers/gpu/drm/drm_privacy_screen.c
index d9d0c5a38ffd..a2a6e8368131 100644
--- a/drivers/gpu/drm/drm_privacy_screen.c
+++ b/drivers/gpu/drm/drm_privacy_screen.c
@@ -395,7 +395,7 @@ struct drm_privacy_screen *drm_privacy_screen_register(
struct drm_privacy_screen *priv;
int ret;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index fb8a23832c37..f38f2c5437e6 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -107,7 +107,7 @@ struct drm_property *drm_property_create(struct drm_device *dev,
if (WARN_ON(strlen(name) >= DRM_PROP_NAME_LEN))
return NULL;
- property = kzalloc_obj(struct drm_property, GFP_KERNEL);
+ property = kzalloc_obj(struct drm_property);
if (!property)
return NULL;
@@ -417,7 +417,7 @@ int drm_property_add_enum(struct drm_property *property,
if (WARN_ON(index >= property->num_values))
return -EINVAL;
- prop_enum = kzalloc_obj(struct drm_property_enum, GFP_KERNEL);
+ prop_enum = kzalloc_obj(struct drm_property_enum);
if (!prop_enum)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_self_refresh_helper.c b/drivers/gpu/drm/drm_self_refresh_helper.c
index 294343259f8a..74907f33841c 100644
--- a/drivers/gpu/drm/drm_self_refresh_helper.c
+++ b/drivers/gpu/drm/drm_self_refresh_helper.c
@@ -238,7 +238,7 @@ int drm_self_refresh_helper_init(struct drm_crtc *crtc)
if (WARN_ON(sr_data))
return -EINVAL;
- sr_data = kzalloc_obj(*sr_data, GFP_KERNEL);
+ sr_data = kzalloc_obj(*sr_data);
if (!sr_data)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index bed005abf08e..250734dee928 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -557,7 +557,7 @@ int drm_syncobj_create(struct drm_syncobj **out_syncobj, uint32_t flags,
int ret;
struct drm_syncobj *syncobj;
- syncobj = kzalloc_obj(struct drm_syncobj, GFP_KERNEL);
+ syncobj = kzalloc_obj(struct drm_syncobj);
if (!syncobj)
return -ENOMEM;
@@ -1062,7 +1062,7 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
goto err_free_points;
}
- entries = kzalloc_objs(*entries, count, GFP_KERNEL);
+ entries = kzalloc_objs(*entries, count);
if (!entries) {
timeout = -ENOMEM;
goto err_free_points;
@@ -1279,7 +1279,7 @@ static int drm_syncobj_array_find(struct drm_file *file_private,
goto err_free_handles;
}
- syncobjs = kmalloc_objs(*syncobjs, count_handles, GFP_KERNEL);
+ syncobjs = kmalloc_objs(*syncobjs, count_handles);
if (syncobjs == NULL) {
ret = -ENOMEM;
goto err_free_handles;
@@ -1485,7 +1485,7 @@ drm_syncobj_eventfd_ioctl(struct drm_device *dev, void *data,
goto err_fdget;
}
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry) {
ret = -ENOMEM;
goto err_kzalloc;
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 0dccd5362138..ef4e923a8728 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -349,7 +349,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
if (connector->kdev)
return 0;
- kdev = kzalloc_obj(*kdev, GFP_KERNEL);
+ kdev = kzalloc_obj(*kdev);
if (!kdev)
return -ENOMEM;
@@ -554,7 +554,7 @@ struct device *drm_sysfs_minor_alloc(struct drm_minor *minor)
struct device *kdev;
int r;
- kdev = kzalloc_obj(*kdev, GFP_KERNEL);
+ kdev = kzalloc_obj(*kdev);
if (!kdev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 4b196e48c8fe..f78bf37f1e0a 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1615,7 +1615,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
u64 seq;
int ret;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (e == NULL) {
ret = -ENOMEM;
goto err_put;
@@ -2094,7 +2094,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
vblank = drm_crtc_vblank_crtc(crtc);
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (e == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/drm_vma_manager.c b/drivers/gpu/drm/drm_vma_manager.c
index 7978b6276a6a..1b8daec1013e 100644
--- a/drivers/gpu/drm/drm_vma_manager.c
+++ b/drivers/gpu/drm/drm_vma_manager.c
@@ -253,7 +253,7 @@ static int vma_node_allow(struct drm_vma_offset_node *node,
* unlikely that an open-file is added twice to a single node so we
* don't optimize for this case. OOM is checked below only if the entry
* is actually used. */
- new = kmalloc_obj(*entry, GFP_KERNEL);
+ new = kmalloc_obj(*entry);
write_lock(&node->vm_lock);
diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
index 7b1dbc0df135..a4805d47ea4d 100644
--- a/drivers/gpu/drm/drm_writeback.c
+++ b/drivers/gpu/drm/drm_writeback.c
@@ -581,7 +581,7 @@ drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector)
DRM_MODE_CONNECTOR_WRITEBACK))
return NULL;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return NULL;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
index 57a82526a54f..854292066ce8 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
@@ -33,7 +33,7 @@ etnaviv_cmdbuf_suballoc_new(struct device *dev)
struct etnaviv_cmdbuf_suballoc *suballoc;
int ret;
- suballoc = kzalloc_obj(*suballoc, GFP_KERNEL);
+ suballoc = kzalloc_obj(*suballoc);
if (!suballoc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 06e76d6d2e47..08aca9035fc1 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -66,7 +66,7 @@ static int etnaviv_open(struct drm_device *dev, struct drm_file *file)
struct etnaviv_file_private *ctx;
int ret, i;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
@@ -531,7 +531,7 @@ static int etnaviv_bind(struct device *dev)
if (IS_ERR(drm))
return PTR_ERR(drm);
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
dev_err(dev, "failed to allocate private data\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 3e330f30eaa2..b0436a1e103f 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -288,7 +288,7 @@ struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
*/
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
if (!mapping) {
- mapping = kzalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kzalloc_obj(*mapping);
if (!mapping) {
ret = -ENOMEM;
goto out;
@@ -675,7 +675,7 @@ static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj)
if (userptr->mm != current->mm)
return -EPERM;
- pvec = kvmalloc_objs(struct page *, npages, GFP_KERNEL);
+ pvec = kvmalloc_objs(struct page *, npages);
if (!pvec)
return -ENOMEM;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
index 1d9a4ca5d5e6..6757ae6ec304 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
@@ -126,7 +126,7 @@ struct drm_gem_object *etnaviv_gem_prime_import_sg_table(struct drm_device *dev,
npages = size / PAGE_SIZE;
etnaviv_obj->sgt = sgt;
- etnaviv_obj->pages = kvmalloc_objs(struct page *, npages, GFP_KERNEL);
+ etnaviv_obj->pages = kvmalloc_objs(struct page *, npages);
if (!etnaviv_obj->pages) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index e3accccf22be..c35a3f77118c 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -468,9 +468,9 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
* Copy the command submission and bo array to kernel space in
* one go, and do this outside of any locks.
*/
- bos = kvmalloc_objs(*bos, args->nr_bos, GFP_KERNEL);
- relocs = kvmalloc_objs(*relocs, args->nr_relocs, GFP_KERNEL);
- pmrs = kvmalloc_objs(*pmrs, args->nr_pmrs, GFP_KERNEL);
+ bos = kvmalloc_objs(*bos, args->nr_bos);
+ relocs = kvmalloc_objs(*relocs, args->nr_relocs);
+ pmrs = kvmalloc_objs(*pmrs, args->nr_pmrs);
stream = kvmalloc_array(1, args->stream_size, GFP_KERNEL);
if (!bos || !relocs || !pmrs || !stream) {
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 0d2a2684b2a6..a891d4f1f843 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1184,7 +1184,7 @@ static struct dma_fence *etnaviv_gpu_fence_alloc(struct etnaviv_gpu *gpu)
*/
lockdep_assert_held(&gpu->lock);
- f = kzalloc_obj(*f, GFP_KERNEL);
+ f = kzalloc_obj(*f);
if (!f)
return NULL;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
index 7cb29d6daa90..38377b2065b7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
@@ -143,7 +143,7 @@ etnaviv_iommuv1_context_alloc(struct etnaviv_iommu_global *global)
return context;
}
- v1_context = kzalloc_obj(*v1_context, GFP_KERNEL);
+ v1_context = kzalloc_obj(*v1_context);
if (!v1_context) {
mutex_unlock(&global->lock);
return NULL;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 2ffb18ccde61..e3572461b599 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -494,7 +494,7 @@ int etnaviv_iommu_global_init(struct etnaviv_gpu *gpu)
return 0;
}
- global = kzalloc_obj(*global, GFP_KERNEL);
+ global = kzalloc_obj(*global);
if (!global)
return -ENOMEM;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 03ad7dd8bf07..41252caccd67 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -180,7 +180,7 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
struct drm_crtc *crtc;
int ret;
- exynos_crtc = kzalloc_obj(*exynos_crtc, GFP_KERNEL);
+ exynos_crtc = kzalloc_obj(*exynos_crtc);
if (!exynos_crtc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 311d5077a2bf..2101a74dc1ed 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -50,7 +50,7 @@ static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
struct drm_exynos_file_private *file_priv;
int ret;
- file_priv = kzalloc_obj(*file_priv, GFP_KERNEL);
+ file_priv = kzalloc_obj(*file_priv);
if (!file_priv)
return -ENOMEM;
@@ -245,7 +245,7 @@ static int exynos_drm_bind(struct device *dev)
if (IS_ERR(drm))
return PTR_ERR(drm);
- private = kzalloc_obj(struct exynos_drm_private, GFP_KERNEL);
+ private = kzalloc_obj(struct exynos_drm_private);
if (!private) {
ret = -ENOMEM;
goto err_free_drm;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index b078295c96e2..ab0e0c74ec47 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -66,7 +66,7 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
int i;
int ret;
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (!fb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index aa70e249f512..a63087ceaf9e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -287,7 +287,7 @@ static int g2d_init_cmdlist(struct g2d_data *g2d)
return -ENOMEM;
}
- node = kzalloc_objs(*node, G2D_CMDLIST_NUM, GFP_KERNEL);
+ node = kzalloc_objs(*node, G2D_CMDLIST_NUM);
if (!node) {
ret = -ENOMEM;
goto err;
@@ -459,7 +459,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
}
}
- g2d_userptr = kzalloc_obj(*g2d_userptr, GFP_KERNEL);
+ g2d_userptr = kzalloc_obj(*g2d_userptr);
if (!g2d_userptr)
return ERR_PTR(-ENOMEM);
@@ -491,7 +491,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
}
g2d_userptr->npages = npages;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt) {
ret = -ENOMEM;
goto err_unpin_pages;
@@ -1169,7 +1169,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
node->event = NULL;
if (req->event_type != G2D_EVENT_NOT) {
- e = kzalloc_obj(*node->event, GFP_KERNEL);
+ e = kzalloc_obj(*node->event);
if (!e) {
ret = -ENOMEM;
goto err;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 8b21623c2075..69ef6cda1ce9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -152,7 +152,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev,
struct drm_gem_object *obj;
int ret;
- exynos_gem = kzalloc_obj(*exynos_gem, GFP_KERNEL);
+ exynos_gem = kzalloc_obj(*exynos_gem);
if (!exynos_gem)
return ERR_PTR(-ENOMEM);
@@ -411,7 +411,7 @@ struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj)
struct sg_table *sgt;
int ret;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index a4d72e12d1a6..ee3d61345a66 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -260,7 +260,7 @@ static inline struct exynos_drm_ipp_task *
{
struct exynos_drm_ipp_task *task;
- task = kzalloc_obj(*task, GFP_KERNEL);
+ task = kzalloc_obj(*task);
if (!task)
return NULL;
@@ -699,7 +699,7 @@ static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task,
struct drm_pending_exynos_ipp_event *e = NULL;
int ret;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
return -ENOMEM;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
index fec9033ec13e..da043bd357a4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
@@ -134,7 +134,7 @@ static void exynos_drm_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- exynos_state = kzalloc_obj(*exynos_state, GFP_KERNEL);
+ exynos_state = kzalloc_obj(*exynos_state);
if (exynos_state) {
__drm_atomic_helper_plane_reset(plane, &exynos_state->base);
plane->state->zpos = exynos_plane->config->zpos;
@@ -148,7 +148,7 @@ exynos_drm_plane_duplicate_state(struct drm_plane *plane)
struct exynos_drm_plane_state *copy;
exynos_state = to_exynos_plane_state(plane->state);
- copy = kzalloc_obj(*exynos_state, GFP_KERNEL);
+ copy = kzalloc_obj(*exynos_state);
if (!copy)
return NULL;
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
index 7702788003a7..a9b3467263d6 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
@@ -209,7 +209,7 @@ struct drm_plane *fsl_dcu_drm_primary_create_plane(struct drm_device *dev)
struct drm_plane *primary;
int ret;
- primary = kzalloc_obj(*primary, GFP_KERNEL);
+ primary = kzalloc_obj(*primary);
if (!primary) {
DRM_DEBUG_KMS("Failed to allocate primary plane\n");
return NULL;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
index df38fefd4722..342a57c82846 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
@@ -250,11 +250,11 @@ void cdv_intel_crt_init(struct drm_device *dev,
struct drm_encoder *encoder;
int ret;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto err_free_encoder;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c
index 1f6e2f65c33f..a901721ea73a 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -939,7 +939,7 @@ struct drm_display_mode *cdv_intel_crtc_mode_get(struct drm_device *dev,
vsync = p->vsync;
}
- mode = kzalloc_obj(*mode, GFP_KERNEL);
+ mode = kzalloc_obj(*mode);
if (!mode)
return NULL;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
index 4f3fbe31a779..fbed35cf7603 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
@@ -1953,13 +1953,13 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
const char *name = NULL;
int type = DRM_MODE_CONNECTOR_DisplayPort;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto err_connector;
- intel_dp = kzalloc_obj(struct cdv_intel_dp, GFP_KERNEL);
+ intel_dp = kzalloc_obj(struct cdv_intel_dp);
if (!intel_dp)
goto err_priv;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
index 5bfdc7adcaab..ce7850647778 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
@@ -284,15 +284,15 @@ void cdv_hdmi_init(struct drm_device *dev,
int ddc_reg;
int ret;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto err_free_encoder;
- hdmi_priv = kzalloc_obj(struct mid_intel_hdmi_priv, GFP_KERNEL);
+ hdmi_priv = kzalloc_obj(struct mid_intel_hdmi_priv);
if (!hdmi_priv)
goto err_free_connector;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
index 5b6b0ac77c99..d7fd9a783cde 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
@@ -501,15 +501,15 @@ void cdv_intel_lvds_init(struct drm_device *dev,
return;
}
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto err_free_encoder;
- lvds_priv = kzalloc_obj(struct cdv_intel_lvds_priv, GFP_KERNEL);
+ lvds_priv = kzalloc_obj(struct cdv_intel_lvds_priv);
if (!lvds_priv)
goto err_free_connector;
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 808feee5fe2a..fe1f43f0abff 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -75,7 +75,7 @@ struct drm_framebuffer *psb_framebuffer_create(struct drm_device *dev,
struct drm_framebuffer *fb;
int ret;
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (!fb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
index 238f0dfafacf..88f1e86c8903 100644
--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -146,7 +146,7 @@ psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen,
size = roundup(size, PAGE_SIZE);
- pobj = kzalloc_obj(*pobj, GFP_KERNEL);
+ pobj = kzalloc_obj(*pobj);
if (!pobj)
return ERR_PTR(-ENOMEM);
obj = &pobj->base;
diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c
index 527adf563bfa..c6a945358e3e 100644
--- a/drivers/gpu/drm/gma500/intel_bios.c
+++ b/drivers/gpu/drm/gma500/intel_bios.c
@@ -247,7 +247,7 @@ static void parse_lfp_panel_data(struct drm_psb_private *dev_priv,
entry = &lvds_lfp_data->data[lvds_options->panel_type];
dvo_timing = &entry->dvo_timing;
- panel_fixed_mode = kzalloc_obj(*panel_fixed_mode, GFP_KERNEL);
+ panel_fixed_mode = kzalloc_obj(*panel_fixed_mode);
if (panel_fixed_mode == NULL) {
dev_err(dev_priv->dev.dev, "out of memory for fixed panel mode\n");
return;
@@ -285,7 +285,7 @@ static void parse_sdvo_panel_data(struct drm_psb_private *dev_priv,
if (!dvo_timing)
return;
- panel_fixed_mode = kzalloc_obj(*panel_fixed_mode, GFP_KERNEL);
+ panel_fixed_mode = kzalloc_obj(*panel_fixed_mode);
if (!panel_fixed_mode)
return;
@@ -477,7 +477,7 @@ parse_device_mapping(struct drm_psb_private *dev_priv,
DRM_DEBUG_KMS("no child dev is parsed from VBT\n");
return;
}
- dev_priv->child_dev = kzalloc_objs(*p_child, count, GFP_KERNEL);
+ dev_priv->child_dev = kzalloc_objs(*p_child, count);
if (!dev_priv->child_dev) {
DRM_DEBUG_KMS("No memory space for child devices\n");
return;
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
index 04eba78fa816..71782c369acf 100644
--- a/drivers/gpu/drm/gma500/intel_gmbus.c
+++ b/drivers/gpu/drm/gma500/intel_gmbus.c
@@ -187,7 +187,7 @@ intel_gpio_create(struct drm_psb_private *dev_priv, u32 pin)
if (pin >= ARRAY_SIZE(map_pin_to_reg) || !map_pin_to_reg[pin])
return NULL;
- gpio = kzalloc_obj(struct intel_gpio, GFP_KERNEL);
+ gpio = kzalloc_obj(struct intel_gpio);
if (gpio == NULL)
return NULL;
diff --git a/drivers/gpu/drm/gma500/intel_i2c.c b/drivers/gpu/drm/gma500/intel_i2c.c
index e121c7c27638..ab8217796817 100644
--- a/drivers/gpu/drm/gma500/intel_i2c.c
+++ b/drivers/gpu/drm/gma500/intel_i2c.c
@@ -107,7 +107,7 @@ struct gma_i2c_chan *gma_i2c_create(struct drm_device *dev, const u32 reg,
{
struct gma_i2c_chan *chan;
- chan = kzalloc_obj(struct gma_i2c_chan, GFP_KERNEL);
+ chan = kzalloc_obj(struct gma_i2c_chan);
if (!chan)
goto out_free;
diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c
index 16128e84936a..428aff92a7bb 100644
--- a/drivers/gpu/drm/gma500/mid_bios.c
+++ b/drivers/gpu/drm/gma500/mid_bios.c
@@ -228,7 +228,7 @@ static int mid_get_vbt_data_r10(struct drm_psb_private *dev_priv, u32 addr)
if (read_vbt_r10(addr, &vbt))
return -1;
- gct = kmalloc_objs(*gct, vbt.panel_count, GFP_KERNEL);
+ gct = kmalloc_objs(*gct, vbt.panel_count);
if (!gct)
return -ENOMEM;
diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
index 7bc6a914a378..6b6b44e426cf 100644
--- a/drivers/gpu/drm/gma500/mmu.c
+++ b/drivers/gpu/drm/gma500/mmu.c
@@ -158,7 +158,7 @@ static inline uint32_t psb_mmu_mask_pte(uint32_t pfn, int type)
struct psb_mmu_pd *psb_mmu_alloc_pd(struct psb_mmu_driver *driver,
int trap_pagefaults, int invalid_type)
{
- struct psb_mmu_pd *pd = kmalloc_obj(*pd, GFP_KERNEL);
+ struct psb_mmu_pd *pd = kmalloc_obj(*pd);
uint32_t *v;
int i;
@@ -260,7 +260,7 @@ void psb_mmu_free_pagedir(struct psb_mmu_pd *pd)
static struct psb_mmu_pt *psb_mmu_alloc_pt(struct psb_mmu_pd *pd)
{
- struct psb_mmu_pt *pt = kmalloc_obj(*pt, GFP_KERNEL);
+ struct psb_mmu_pt *pt = kmalloc_obj(*pt);
void *v;
uint32_t clflush_add = pd->driver->clflush_add >> PAGE_SHIFT;
uint32_t clflush_count = PAGE_SIZE / clflush_add;
@@ -425,7 +425,7 @@ struct psb_mmu_driver *psb_mmu_driver_init(struct drm_device *dev,
struct psb_mmu_driver *driver;
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
- driver = kmalloc_obj(*driver, GFP_KERNEL);
+ driver = kmalloc_obj(*driver);
if (!driver)
return NULL;
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index d48c9711e95a..58d7e191fd56 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -633,11 +633,11 @@ void oaktrail_hdmi_init(struct drm_device *dev,
struct drm_connector *connector;
struct drm_encoder *encoder;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto failed_connector;
@@ -677,7 +677,7 @@ void oaktrail_hdmi_setup(struct drm_device *dev)
if (!pdev)
return;
- hdmi_dev = kzalloc_obj(struct oaktrail_hdmi_dev, GFP_KERNEL);
+ hdmi_dev = kzalloc_obj(struct oaktrail_hdmi_dev);
if (!hdmi_dev) {
dev_err(dev->dev, "failed to allocate memory\n");
goto out;
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
index 7c02a92c60cb..2a7916ca5907 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
@@ -280,7 +280,7 @@ int oaktrail_hdmi_i2c_init(struct pci_dev *dev)
hdmi_dev = pci_get_drvdata(dev);
- i2c_dev = kzalloc_obj(struct hdmi_i2c_dev, GFP_KERNEL);
+ i2c_dev = kzalloc_obj(struct hdmi_i2c_dev);
if (!i2c_dev)
return -ENOMEM;
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c
index f6ca1559081d..884d324f0044 100644
--- a/drivers/gpu/drm/gma500/oaktrail_lvds.c
+++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c
@@ -223,7 +223,7 @@ static void oaktrail_lvds_get_configuration_mode(struct drm_device *dev,
/* Use the firmware provided data on Moorestown */
if (dev_priv->has_gct) {
- mode = kzalloc_obj(*mode, GFP_KERNEL);
+ mode = kzalloc_obj(*mode);
if (!mode)
return;
@@ -302,11 +302,11 @@ void oaktrail_lvds_init(struct drm_device *dev,
struct drm_display_mode *scan; /* *modes, *bios_mode; */
int ret;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder)
return;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector)
goto err_free_encoder;
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c b/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
index 2b5ef15df09f..bbfbe893d1c4 100644
--- a/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
+++ b/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
@@ -135,7 +135,7 @@ struct gma_i2c_chan *oaktrail_lvds_i2c_init(struct drm_device *dev)
struct gma_i2c_chan *chan;
int ret;
- chan = kzalloc_obj(struct gma_i2c_chan, GFP_KERNEL);
+ chan = kzalloc_obj(struct gma_i2c_chan);
if (!chan)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
index 2864b209fcdf..0df75a4a7739 100644
--- a/drivers/gpu/drm/gma500/psb_intel_display.c
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c
@@ -404,7 +404,7 @@ struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev,
vsync = p->vsync;
}
- mode = kzalloc_obj(*mode, GFP_KERNEL);
+ mode = kzalloc_obj(*mode);
if (!mode)
return NULL;
@@ -487,7 +487,7 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
return;
gma_crtc->crtc_state =
- kzalloc_obj(struct psb_intel_crtc_state, GFP_KERNEL);
+ kzalloc_obj(struct psb_intel_crtc_state);
if (!gma_crtc->crtc_state) {
dev_err(dev->dev, "Crtc state error: No memory\n");
kfree(gma_crtc);
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
index 6183360b1a81..2ca164b21293 100644
--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
@@ -639,20 +639,20 @@ void psb_intel_lvds_init(struct drm_device *dev,
int pipe;
int ret;
- gma_encoder = kzalloc_obj(struct gma_encoder, GFP_KERNEL);
+ gma_encoder = kzalloc_obj(struct gma_encoder);
if (!gma_encoder) {
dev_err(dev->dev, "gma_encoder allocation error\n");
return;
}
encoder = &gma_encoder->base;
- gma_connector = kzalloc_obj(struct gma_connector, GFP_KERNEL);
+ gma_connector = kzalloc_obj(struct gma_connector);
if (!gma_connector) {
dev_err(dev->dev, "gma_connector allocation error\n");
goto err_free_encoder;
}
- lvds_priv = kzalloc_obj(struct psb_intel_lvds_priv, GFP_KERNEL);
+ lvds_priv = kzalloc_obj(struct psb_intel_lvds_priv);
if (!lvds_priv) {
dev_err(dev->dev, "LVDS private allocation error\n");
goto err_free_connector;
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index 6f973c9044e0..e81431957e7f 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -2446,7 +2446,7 @@ bool psb_intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
struct psb_intel_sdvo *psb_intel_sdvo;
int i;
- psb_intel_sdvo = kzalloc_obj(struct psb_intel_sdvo, GFP_KERNEL);
+ psb_intel_sdvo = kzalloc_obj(struct psb_intel_sdvo);
if (!psb_intel_sdvo)
return false;
diff --git a/drivers/gpu/drm/gud/gud_connector.c b/drivers/gpu/drm/gud/gud_connector.c
index b3d5df5f7a5c..78be37092748 100644
--- a/drivers/gpu/drm/gud/gud_connector.c
+++ b/drivers/gpu/drm/gud/gud_connector.c
@@ -621,7 +621,7 @@ static int gud_connector_create(struct gud_device *gdrm, unsigned int index,
int ret, connector_type;
u32 flags;
- gconn = kzalloc_obj(*gconn, GFP_KERNEL);
+ gconn = kzalloc_obj(*gconn);
if (!gconn)
return -ENOMEM;
@@ -700,7 +700,7 @@ int gud_get_connectors(struct gud_device *gdrm)
unsigned int i, num_connectors;
int ret;
- descs = kmalloc_objs(*descs, GUD_CONNECTORS_MAX_NUM, GFP_KERNEL);
+ descs = kmalloc_objs(*descs, GUD_CONNECTORS_MAX_NUM);
if (!descs)
return -ENOMEM;
diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c
index 66780b9f6026..a301e1580b3f 100644
--- a/drivers/gpu/drm/gud/gud_drv.c
+++ b/drivers/gpu/drm/gud/gud_drv.c
@@ -82,7 +82,7 @@ static int gud_get_display_descriptor(struct usb_interface *intf,
void *buf;
int ret;
- buf = kmalloc_obj(*desc, GFP_KERNEL);
+ buf = kmalloc_obj(*desc);
if (!buf)
return -ENOMEM;
@@ -135,7 +135,7 @@ static int gud_usb_get_status(struct usb_interface *intf)
int ret, status = -EIO;
u8 *buf;
- buf = kmalloc_obj(*buf, GFP_KERNEL);
+ buf = kmalloc_obj(*buf);
if (!buf)
return -ENOMEM;
@@ -402,7 +402,7 @@ static int gud_alloc_bulk_buffer(struct gud_device *gdrm)
return -ENOMEM;
num_pages = DIV_ROUND_UP(gdrm->bulk_len, PAGE_SIZE);
- pages = kmalloc_objs(struct page *, num_pages, GFP_KERNEL);
+ pages = kmalloc_objs(struct page *, num_pages);
if (!pages)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/dvo_ch7017.c b/drivers/gpu/drm/i915/display/dvo_ch7017.c
index 032c41e55a07..326b08e7a362 100644
--- a/drivers/gpu/drm/i915/display/dvo_ch7017.c
+++ b/drivers/gpu/drm/i915/display/dvo_ch7017.c
@@ -207,7 +207,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
const char *str;
u8 val;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (priv == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
index b85c9afb0c64..1382fe195bb1 100644
--- a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
+++ b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
@@ -218,7 +218,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
u8 vendor, device;
char *name, *devid;
- ch7xxx = kzalloc_obj(*ch7xxx, GFP_KERNEL);
+ ch7xxx = kzalloc_obj(*ch7xxx);
if (ch7xxx == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/dvo_ivch.c b/drivers/gpu/drm/i915/display/dvo_ivch.c
index 9bcdd02d5f36..0970dc6fd73d 100644
--- a/drivers/gpu/drm/i915/display/dvo_ivch.c
+++ b/drivers/gpu/drm/i915/display/dvo_ivch.c
@@ -269,7 +269,7 @@ static bool ivch_init(struct intel_dvo_device *dvo,
u16 temp;
int i;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (priv == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/dvo_ns2501.c b/drivers/gpu/drm/i915/display/dvo_ns2501.c
index 248b79795edf..6a6072b78410 100644
--- a/drivers/gpu/drm/i915/display/dvo_ns2501.c
+++ b/drivers/gpu/drm/i915/display/dvo_ns2501.c
@@ -476,7 +476,7 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
struct ns2501_priv *ns;
unsigned char ch;
- ns = kzalloc_obj(*ns, GFP_KERNEL);
+ ns = kzalloc_obj(*ns);
if (ns == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/dvo_sil164.c b/drivers/gpu/drm/i915/display/dvo_sil164.c
index 765d2517fb10..c6989a4bad0f 100644
--- a/drivers/gpu/drm/i915/display/dvo_sil164.c
+++ b/drivers/gpu/drm/i915/display/dvo_sil164.c
@@ -143,7 +143,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
struct sil164_priv *sil;
unsigned char ch;
- sil = kzalloc_obj(*sil, GFP_KERNEL);
+ sil = kzalloc_obj(*sil);
if (sil == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/dvo_tfp410.c b/drivers/gpu/drm/i915/display/dvo_tfp410.c
index 9bd8305bc291..10d8dd4f4d17 100644
--- a/drivers/gpu/drm/i915/display/dvo_tfp410.c
+++ b/drivers/gpu/drm/i915/display/dvo_tfp410.c
@@ -175,7 +175,7 @@ static bool tfp410_init(struct intel_dvo_device *dvo,
struct tfp410_priv *tfp;
int id;
- tfp = kzalloc_obj(*tfp, GFP_KERNEL);
+ tfp = kzalloc_obj(*tfp);
if (tfp == NULL)
return false;
diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index b46b79eee5bb..fc265f71d72b 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1934,7 +1934,7 @@ void icl_dsi_init(struct intel_display *display,
if (port == PORT_NONE)
return;
- intel_dsi = kzalloc_obj(*intel_dsi, GFP_KERNEL);
+ intel_dsi = kzalloc_obj(*intel_dsi);
if (!intel_dsi)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index 208d6a449edc..71b7325917b6 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -323,7 +323,7 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,
struct drm_atomic_state *
intel_atomic_state_alloc(struct drm_device *dev)
{
- struct intel_atomic_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct intel_atomic_state *state = kzalloc_obj(*state);
if (!state || drm_atomic_state_init(dev, &state->base) < 0) {
kfree(state);
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 4731afb418da..85f5f9bdf741 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -852,7 +852,7 @@ parse_lfp_panel_dtd(struct intel_display *display,
lfp_data_ptrs,
panel_type);
- panel_fixed_mode = kzalloc_obj(*panel_fixed_mode, GFP_KERNEL);
+ panel_fixed_mode = kzalloc_obj(*panel_fixed_mode);
if (!panel_fixed_mode)
return;
@@ -968,7 +968,7 @@ parse_generic_dtd(struct intel_display *display,
dtd = &generic_dtd->dtd[panel->vbt.panel_type];
- panel_fixed_mode = kzalloc_obj(*panel_fixed_mode, GFP_KERNEL);
+ panel_fixed_mode = kzalloc_obj(*panel_fixed_mode);
if (!panel_fixed_mode)
return;
@@ -1141,7 +1141,7 @@ parse_sdvo_lvds_data(struct intel_display *display,
return;
}
- panel_fixed_mode = kzalloc_obj(*panel_fixed_mode, GFP_KERNEL);
+ panel_fixed_mode = kzalloc_obj(*panel_fixed_mode);
if (!panel_fixed_mode)
return;
@@ -2929,7 +2929,7 @@ parse_general_definitions(struct intel_display *display)
"Found VBT child device with type 0x%x\n",
child->device_type);
- devdata = kzalloc_obj(*devdata, GFP_KERNEL);
+ devdata = kzalloc_obj(*devdata);
if (!devdata)
break;
@@ -3010,7 +3010,7 @@ init_vbt_missing_defaults(struct intel_display *display)
continue;
/* Create fake child device config */
- devdata = kzalloc_obj(*devdata, GFP_KERNEL);
+ devdata = kzalloc_obj(*devdata);
if (!devdata)
break;
diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
index e08e477e882a..fe48949b5880 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_bw.c
@@ -1470,7 +1470,7 @@ int intel_bw_init(struct intel_display *display)
{
struct intel_bw_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 46375d4972be..f5946e677c93 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -3409,7 +3409,7 @@ int intel_cdclk_init(struct intel_display *display)
{
struct intel_cdclk_state *cdclk_state;
- cdclk_state = kzalloc_obj(*cdclk_state, GFP_KERNEL);
+ cdclk_state = kzalloc_obj(*cdclk_state);
if (!cdclk_state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_colorop.c b/drivers/gpu/drm/i915/display/intel_colorop.c
index 8326916ccdc1..a898b8d73dd8 100644
--- a/drivers/gpu/drm/i915/display/intel_colorop.c
+++ b/drivers/gpu/drm/i915/display/intel_colorop.c
@@ -15,7 +15,7 @@ struct intel_colorop *intel_colorop_alloc(void)
{
struct intel_colorop *colorop;
- colorop = kzalloc_obj(*colorop, GFP_KERNEL);
+ colorop = kzalloc_obj(*colorop);
if (!colorop)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c
index 8712f6a61778..7ef9338d67ab 100644
--- a/drivers/gpu/drm/i915/display/intel_connector.c
+++ b/drivers/gpu/drm/i915/display/intel_connector.c
@@ -86,7 +86,7 @@ static int intel_connector_init(struct intel_connector *connector)
* need it we'll free the state and allocate a smaller one on the first
* successful commit anyway.
*/
- conn_state = kzalloc_obj(*conn_state, GFP_KERNEL);
+ conn_state = kzalloc_obj(*conn_state);
if (!conn_state)
return -ENOMEM;
@@ -105,7 +105,7 @@ struct intel_connector *intel_connector_alloc(void)
{
struct intel_connector *connector;
- connector = kzalloc_obj(*connector, GFP_KERNEL);
+ connector = kzalloc_obj(*connector);
if (!connector)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c
index 7be2361e52e7..59d637c6a187 100644
--- a/drivers/gpu/drm/i915/display/intel_crt.c
+++ b/drivers/gpu/drm/i915/display/intel_crt.c
@@ -1037,7 +1037,7 @@ void intel_crt_init(struct intel_display *display)
intel_de_write(display, adpa_reg, adpa);
}
- crt = kzalloc_obj(struct intel_crt, GFP_KERNEL);
+ crt = kzalloc_obj(struct intel_crt);
if (!crt)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index e41975b34929..53378d2dcbec 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -168,7 +168,7 @@ struct intel_crtc_state *intel_crtc_state_alloc(struct intel_crtc *crtc)
{
struct intel_crtc_state *crtc_state;
- crtc_state = kmalloc_obj(*crtc_state, GFP_KERNEL);
+ crtc_state = kmalloc_obj(*crtc_state);
if (crtc_state)
intel_crtc_state_reset(crtc_state, crtc);
@@ -196,7 +196,7 @@ static struct intel_crtc *intel_crtc_alloc(void)
struct intel_crtc_state *crtc_state;
struct intel_crtc *crtc;
- crtc = kzalloc_obj(*crtc, GFP_KERNEL);
+ crtc = kzalloc_obj(*crtc);
if (!crtc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_dbuf_bw.c b/drivers/gpu/drm/i915/display/intel_dbuf_bw.c
index 73d22de72226..0562d4df6a07 100644
--- a/drivers/gpu/drm/i915/display/intel_dbuf_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_dbuf_bw.c
@@ -284,7 +284,7 @@ int intel_dbuf_bw_init(struct intel_display *display)
{
struct intel_dbuf_bw_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 4a081b30477c..3b8ba8ab76a1 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4122,7 +4122,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder)
crtc = intel_crtc_for_pipe(display, pipe);
- mode = kzalloc_obj(*mode, GFP_KERNEL);
+ mode = kzalloc_obj(*mode);
if (!mode)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
index 648294f234cc..01e0ae01fc50 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.c
+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
@@ -1663,7 +1663,7 @@ struct intel_display *intel_display_device_probe(struct pci_dev *pdev,
const struct subplatform_desc *subdesc;
enum intel_step step;
- display = kzalloc_obj(*display, GFP_KERNEL);
+ display = kzalloc_obj(*display);
if (!display)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_display_rps.c b/drivers/gpu/drm/i915/display/intel_display_rps.c
index f37361f87894..b58281edc563 100644
--- a/drivers/gpu/drm/i915/display/intel_display_rps.c
+++ b/drivers/gpu/drm/i915/display/intel_display_rps.c
@@ -59,7 +59,7 @@ void intel_display_rps_boost_after_vblank(struct drm_crtc *crtc,
if (drm_crtc_vblank_get(crtc))
return;
- wait = kmalloc_obj(*wait, GFP_KERNEL);
+ wait = kmalloc_obj(*wait);
if (!wait) {
drm_crtc_vblank_put(crtc);
return;
diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index 7e51d8873178..1006b060c3f3 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -1417,7 +1417,7 @@ void intel_dmc_init(struct intel_display *display)
*/
intel_dmc_runtime_pm_get(display);
- dmc = kzalloc_obj(*dmc, GFP_KERNEL);
+ dmc = kzalloc_obj(*dmc);
if (!dmc)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 96da2f8da8b5..70a21685a3e1 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1765,7 +1765,7 @@ mst_stream_encoder_create(struct intel_digital_port *dig_port, enum pipe pipe)
struct intel_dp_mst_encoder *intel_mst;
struct intel_encoder *encoder;
- intel_mst = kzalloc_obj(*intel_mst, GFP_KERNEL);
+ intel_mst = kzalloc_obj(*intel_mst);
if (!intel_mst)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
index 05e5c8f839a1..da472371c7d7 100644
--- a/drivers/gpu/drm/i915/display/intel_dpt.c
+++ b/drivers/gpu/drm/i915/display/intel_dpt.c
@@ -280,7 +280,7 @@ intel_dpt_create(struct intel_framebuffer *fb)
return ERR_PTR(ret);
}
- dpt = kzalloc_obj(*dpt, GFP_KERNEL);
+ dpt = kzalloc_obj(*dpt);
if (!dpt) {
i915_gem_object_put(dpt_obj);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index d9aff12a0a9b..b5d774706fec 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -974,7 +974,7 @@ struct intel_dsb *intel_dsb_prepare(struct intel_atomic_state *state,
if (!display->params.enable_dsb)
return NULL;
- dsb = kzalloc_obj(*dsb, GFP_KERNEL);
+ dsb = kzalloc_obj(*dsb);
if (!dsb)
goto out;
diff --git a/drivers/gpu/drm/i915/display/intel_dsb_buffer.c b/drivers/gpu/drm/i915/display/intel_dsb_buffer.c
index 28d63ba2f032..9b6060af250d 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb_buffer.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb_buffer.c
@@ -46,7 +46,7 @@ struct intel_dsb_buffer *intel_dsb_buffer_create(struct drm_device *drm, size_t
u32 *buf;
int ret;
- dsb_buf = kzalloc_obj(*dsb_buf, GFP_KERNEL);
+ dsb_buf = kzalloc_obj(*dsb_buf);
if (!dsb_buf)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
index 1ac274964c4c..9005c1f5d857 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi.c
@@ -87,7 +87,7 @@ struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
struct intel_dsi_host *host;
struct mipi_dsi_device *device;
- host = kzalloc_obj(*host, GFP_KERNEL);
+ host = kzalloc_obj(*host);
if (!host)
return NULL;
@@ -102,7 +102,7 @@ struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
* devices by ourselves here too. Need to be careful though, because we
* don't initialize any of the driver model devices here.
*/
- device = kzalloc_obj(*device, GFP_KERNEL);
+ device = kzalloc_obj(*device);
if (!device) {
kfree(host);
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
index d6fbf4fd29d9..405b33aca9dd 100644
--- a/drivers/gpu/drm/i915/display/intel_dvo.c
+++ b/drivers/gpu/drm/i915/display/intel_dvo.c
@@ -494,7 +494,7 @@ void intel_dvo_init(struct intel_display *display)
struct intel_encoder *encoder;
struct intel_dvo *intel_dvo;
- intel_dvo = kzalloc_obj(*intel_dvo, GFP_KERNEL);
+ intel_dvo = kzalloc_obj(*intel_dvo);
if (!intel_dvo)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_encoder.c b/drivers/gpu/drm/i915/display/intel_encoder.c
index b02297d56950..d01b081a6074 100644
--- a/drivers/gpu/drm/i915/display/intel_encoder.c
+++ b/drivers/gpu/drm/i915/display/intel_encoder.c
@@ -108,7 +108,7 @@ struct intel_digital_port *intel_dig_port_alloc(void)
{
struct intel_digital_port *dig_port;
- dig_port = kzalloc_obj(*dig_port, GFP_KERNEL);
+ dig_port = kzalloc_obj(*dig_port);
if (!dig_port)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 3b6d0d4ccff7..38c33f2ca05c 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -2173,7 +2173,7 @@ static int intel_user_framebuffer_dirty(struct drm_framebuffer *fb,
if (ret || !fence)
goto flush;
- cb = kmalloc_obj(*cb, GFP_KERNEL);
+ cb = kmalloc_obj(*cb);
if (!cb) {
dma_fence_put(fence);
ret = -ENOMEM;
@@ -2361,7 +2361,7 @@ struct intel_framebuffer *intel_framebuffer_alloc(void)
{
struct intel_framebuffer *intel_fb;
- intel_fb = kzalloc_obj(*intel_fb, GFP_KERNEL);
+ intel_fb = kzalloc_obj(*intel_fb);
if (!intel_fb)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index c0dfa65809f9..91de38379282 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -2294,7 +2294,7 @@ static struct intel_fbc *intel_fbc_create(struct intel_display *display,
{
struct intel_fbc *fbc;
- fbc = kzalloc_obj(*fbc, GFP_KERNEL);
+ fbc = kzalloc_obj(*fbc);
if (!fbc)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_global_state.c b/drivers/gpu/drm/i915/display/intel_global_state.c
index 49f32828c3f1..9e1369c834e4 100644
--- a/drivers/gpu/drm/i915/display/intel_global_state.c
+++ b/drivers/gpu/drm/i915/display/intel_global_state.c
@@ -52,7 +52,7 @@ static struct intel_global_commit *commit_new(void)
{
struct intel_global_commit *commit;
- commit = kzalloc_obj(*commit, GFP_KERNEL);
+ commit = kzalloc_obj(*commit);
if (!commit)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index b27330b95145..a7bce0c6a17e 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -925,7 +925,7 @@ int intel_gmbus_setup(struct intel_display *display)
if (!gmbus_pin)
continue;
- bus = kzalloc_obj(*bus, GFP_KERNEL);
+ bus = kzalloc_obj(*bus);
if (!bus) {
ret = -ENOMEM;
goto err;
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
index 5b941bfa8c17..c2de48f57f30 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
@@ -633,7 +633,7 @@ int intel_hdcp_gsc_init(struct intel_display *display)
struct i915_hdcp_arbiter *arbiter;
int ret = 0;
- arbiter = kzalloc_obj(*arbiter, GFP_KERNEL);
+ arbiter = kzalloc_obj(*arbiter);
if (!arbiter)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_lpe_audio.c b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
index c7f28b537509..117b60656ca1 100644
--- a/drivers/gpu/drm/i915/display/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
@@ -87,11 +87,11 @@ lpe_audio_platdev_create(struct intel_display *display)
struct platform_device *platdev;
struct intel_hdmi_lpe_audio_pdata *pdata;
- pdata = kzalloc_obj(*pdata, GFP_KERNEL);
+ pdata = kzalloc_obj(*pdata);
if (!pdata)
return ERR_PTR(-ENOMEM);
- rsc = kzalloc_objs(*rsc, 2, GFP_KERNEL);
+ rsc = kzalloc_objs(*rsc, 2);
if (!rsc) {
kfree(pdata);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
index 7f085f475664..cc6d4bfcff10 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -886,7 +886,7 @@ void intel_lvds_init(struct intel_display *display)
"LVDS is not present in VBT, but enabled anyway\n");
}
- lvds_encoder = kzalloc_obj(*lvds_encoder, GFP_KERNEL);
+ lvds_encoder = kzalloc_obj(*lvds_encoder);
if (!lvds_encoder)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
index e968834dc7b7..e25be56e678b 100644
--- a/drivers/gpu/drm/i915/display/intel_opregion.c
+++ b/drivers/gpu/drm/i915/display/intel_opregion.c
@@ -898,7 +898,7 @@ int intel_opregion_setup(struct intel_display *display)
return -ENOTSUPP;
}
- opregion = kzalloc_obj(*opregion, GFP_KERNEL);
+ opregion = kzalloc_obj(*opregion);
if (!opregion)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index 8ab5a866fb67..05c7545c49e5 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -1409,7 +1409,7 @@ void intel_overlay_setup(struct intel_display *display)
if (!engine || !engine->kernel_context)
return;
- overlay = kzalloc_obj(*overlay, GFP_KERNEL);
+ overlay = kzalloc_obj(*overlay);
if (!overlay)
return;
diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
index a5d60180cc7a..e06a0618b4c6 100644
--- a/drivers/gpu/drm/i915/display/intel_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_plane.c
@@ -77,11 +77,11 @@ struct intel_plane *intel_plane_alloc(void)
struct intel_plane_state *plane_state;
struct intel_plane *plane;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
- plane_state = kzalloc_obj(*plane_state, GFP_KERNEL);
+ plane_state = kzalloc_obj(*plane_state);
if (!plane_state) {
kfree(plane);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/display/intel_pmdemand.c b/drivers/gpu/drm/i915/display/intel_pmdemand.c
index d12fabbe90de..f3db55710010 100644
--- a/drivers/gpu/drm/i915/display/intel_pmdemand.c
+++ b/drivers/gpu/drm/i915/display/intel_pmdemand.c
@@ -121,7 +121,7 @@ int intel_pmdemand_init(struct intel_display *display)
{
struct intel_pmdemand_state *pmdemand_state;
- pmdemand_state = kzalloc_obj(*pmdemand_state, GFP_KERNEL);
+ pmdemand_state = kzalloc_obj(*pmdemand_state);
if (!pmdemand_state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_rom.c b/drivers/gpu/drm/i915/display/intel_rom.c
index 930b9cb9d1b7..05b6ea764ebb 100644
--- a/drivers/gpu/drm/i915/display/intel_rom.c
+++ b/drivers/gpu/drm/i915/display/intel_rom.c
@@ -47,7 +47,7 @@ struct intel_rom *intel_rom_spi(struct drm_device *drm)
struct intel_rom *rom;
u32 static_region;
- rom = kzalloc_obj(*rom, GFP_KERNEL);
+ rom = kzalloc_obj(*rom);
if (!rom)
return NULL;
@@ -92,7 +92,7 @@ struct intel_rom *intel_rom_pci(struct drm_device *drm)
{
struct intel_rom *rom;
- rom = kzalloc_obj(*rom, GFP_KERNEL);
+ rom = kzalloc_obj(*rom);
if (!rom)
return NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 273487e8ec5c..2e1af9e869de 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -474,7 +474,7 @@ static bool __intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,
if (!buf)
return false;
- msgs = kzalloc_objs(*msgs, args_len + 3, GFP_KERNEL);
+ msgs = kzalloc_objs(*msgs, args_len + 3);
if (!msgs) {
kfree(buf);
return false;
@@ -2774,11 +2774,11 @@ static struct intel_sdvo_connector *intel_sdvo_connector_alloc(void)
struct intel_sdvo_connector *sdvo_connector;
struct intel_sdvo_connector_state *conn_state;
- sdvo_connector = kzalloc_obj(*sdvo_connector, GFP_KERNEL);
+ sdvo_connector = kzalloc_obj(*sdvo_connector);
if (!sdvo_connector)
return NULL;
- conn_state = kzalloc_obj(*conn_state, GFP_KERNEL);
+ conn_state = kzalloc_obj(*conn_state);
if (!conn_state) {
kfree(sdvo_connector);
return NULL;
@@ -3389,7 +3389,7 @@ bool intel_sdvo_init(struct intel_display *display,
if (!assert_sdvo_port_valid(display, port))
return false;
- intel_sdvo = kzalloc_obj(*intel_sdvo, GFP_KERNEL);
+ intel_sdvo = kzalloc_obj(*intel_sdvo);
if (!intel_sdvo)
return false;
diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index 0f9efe45acf2..bd12148e42f7 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -1977,7 +1977,7 @@ int intel_tc_port_init(struct intel_digital_port *dig_port, bool is_legacy)
if (drm_WARN_ON(display->drm, tc_port == TC_PORT_NONE))
return -EINVAL;
- tc = kzalloc_obj(*tc, GFP_KERNEL);
+ tc = kzalloc_obj(*tc);
if (!tc)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
index 2036eaf2d1ff..8fbf0adb5699 100644
--- a/drivers/gpu/drm/i915/display/intel_tv.c
+++ b/drivers/gpu/drm/i915/display/intel_tv.c
@@ -1966,7 +1966,7 @@ intel_tv_init(struct intel_display *display)
(tv_dac_off & TVDAC_STATE_CHG_EN) != 0)
return;
- intel_tv = kzalloc_obj(*intel_tv, GFP_KERNEL);
+ intel_tv = kzalloc_obj(*intel_tv);
if (!intel_tv) {
return;
}
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index edd6ca199106..f5a6fae815d1 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3366,7 +3366,7 @@ int intel_dbuf_init(struct intel_display *display)
{
struct intel_dbuf_state *dbuf_state;
- dbuf_state = kzalloc_obj(*dbuf_state, GFP_KERNEL);
+ dbuf_state = kzalloc_obj(*dbuf_state);
if (!dbuf_state)
return -ENOMEM;
@@ -3892,7 +3892,7 @@ void intel_wm_state_verify(struct intel_atomic_state *state,
if (DISPLAY_VER(display) < 9 || !new_crtc_state->hw.active)
return;
- hw = kzalloc_obj(*hw, GFP_KERNEL);
+ hw = kzalloc_obj(*hw);
if (!hw)
return;
diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index 31625b0070c6..60857d2afdb1 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -1919,7 +1919,7 @@ void vlv_dsi_init(struct intel_display *display)
else
display->dsi.mmio_base = VLV_MIPI_BASE;
- intel_dsi = kzalloc_obj(*intel_dsi, GFP_KERNEL);
+ intel_dsi = kzalloc_obj(*intel_dsi);
if (!intel_dsi)
return;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
index 50ade188edc5..30cc08583cbd 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
@@ -52,7 +52,7 @@ static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj)
GEM_BUG_ON(!obj->cache_dirty);
- clflush = kmalloc_obj(*clflush, GFP_KERNEL);
+ clflush = kmalloc_obj(*clflush);
if (!clflush)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index c364423706c6..6ff5dc07b719 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -285,7 +285,7 @@ proto_context_create(struct drm_i915_file_private *fpriv,
{
struct i915_gem_proto_context *pc, *err;
- pc = kzalloc_obj(*pc, GFP_KERNEL);
+ pc = kzalloc_obj(*pc);
if (!pc)
return ERR_PTR(-ENOMEM);
@@ -442,7 +442,7 @@ set_proto_ctx_engines_balance(struct i915_user_extension __user *base,
if (num_siblings == 0)
return 0;
- siblings = kmalloc_objs(*siblings, num_siblings, GFP_KERNEL);
+ siblings = kmalloc_objs(*siblings, num_siblings);
if (!siblings)
return -ENOMEM;
@@ -644,7 +644,7 @@ set_proto_ctx_engines_parallel_submit(struct i915_user_extension __user *base,
return -EINVAL;
}
- siblings = kmalloc_objs(*siblings, num_siblings * width, GFP_KERNEL);
+ siblings = kmalloc_objs(*siblings, num_siblings * width);
if (!siblings)
return -ENOMEM;
@@ -759,7 +759,7 @@ static int set_proto_ctx_engines(struct drm_i915_file_private *fpriv,
if (set.num_engines > I915_EXEC_RING_MASK + 1)
return -EINVAL;
- set.engines = kmalloc_objs(*set.engines, set.num_engines, GFP_KERNEL);
+ set.engines = kmalloc_objs(*set.engines, set.num_engines);
if (!set.engines)
return -ENOMEM;
@@ -1609,7 +1609,7 @@ i915_gem_create_context(struct drm_i915_private *i915,
int err;
int i;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index db7166784731..b43d34c7d641 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -36,7 +36,7 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attach,
* Make a copy of the object's sgt, so that we can make an independent
* mapping
*/
- sgt = kmalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kmalloc_obj(*sgt);
if (!sgt) {
ret = -ENOMEM;
goto err;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index c2e91eeb7c16..e7918f896a26 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2006,7 +2006,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
for_each_batch_create_order(eb, j) {
struct i915_capture_list *capture;
- capture = kmalloc_obj(*capture, GFP_KERNEL);
+ capture = kmalloc_obj(*capture);
if (!capture)
continue;
@@ -3190,7 +3190,7 @@ eb_composite_fence_create(struct i915_execbuffer *eb, int out_fence_fd)
GEM_BUG_ON(!intel_context_is_parent(eb->context));
- fences = kmalloc_objs(*fences, eb->num_batches, GFP_KERNEL);
+ fences = kmalloc_objs(*fences, eb->num_batches);
if (!fences)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_internal.c b/drivers/gpu/drm/i915/gem/i915_gem_internal.c
index e90fe30cc44e..37d286ecb99b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_internal.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_internal.c
@@ -54,7 +54,7 @@ static int i915_gem_object_get_pages_internal(struct drm_i915_gem_object *obj)
}
create_st:
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e10a9e21e6c8..0644f85c6c8e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -730,7 +730,7 @@ mmap_offset_attach(struct drm_i915_gem_object *obj,
if (mmo)
goto out;
- mmo = kmalloc_obj(*mmo, GFP_KERNEL);
+ mmo = kmalloc_obj(*mmo);
if (!mmo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
index e9b7d76927bb..adba3fa96c05 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
@@ -32,7 +32,7 @@ i915_gem_object_frontbuffer_get(struct drm_i915_gem_object *obj)
if (front)
return front;
- front = kmalloc_obj(*front, GFP_KERNEL);
+ front = kmalloc_obj(*front);
if (!front)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index fa6d174987ac..df35bdb755e4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -314,7 +314,7 @@ static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
if (n_pages > ARRAY_SIZE(stack)) {
/* Too big for stack -- allocate temporary array instead */
- pages = kvmalloc_objs(*pages, n_pages, GFP_KERNEL);
+ pages = kvmalloc_objs(*pages, n_pages);
if (!pages)
return ERR_PTR(-ENOMEM);
}
@@ -437,7 +437,7 @@ struct intel_panic *i915_gem_object_alloc_panic(void)
{
struct intel_panic *panic;
- panic = kzalloc_obj(*panic, GFP_KERNEL);
+ panic = kzalloc_obj(*panic);
return panic;
}
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_phys.c b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
index 71a2c2bb5087..ce2780ef97ef 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_phys.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
@@ -47,7 +47,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
if (!vaddr)
return -ENOMEM;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
goto err_pci;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index a577f8df7c60..77f85359f279 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -648,7 +648,7 @@ i915_pages_create_for_stolen(struct drm_device *dev,
* dma mapping in a single scatterlist.
*/
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (st == NULL)
return ERR_PTR(-ENOMEM);
@@ -783,7 +783,7 @@ static int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
!(flags & I915_BO_ALLOC_GPU_ONLY))
return -ENOSPC;
- stolen = kzalloc_obj(*stolen, GFP_KERNEL);
+ stolen = kzalloc_obj(*stolen);
if (!stolen)
return -ENOMEM;
@@ -1074,7 +1074,7 @@ static struct intel_stolen_node *i915_gem_stolen_node_alloc(struct drm_device *d
struct drm_i915_private *i915 = to_i915(drm);
struct intel_stolen_node *node;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 46ed4ff8658d..033eda38e4b5 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -279,7 +279,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
if (i915_ttm_is_ghost_object(bo))
return NULL;
- i915_tt = kzalloc_obj(*i915_tt, GFP_KERNEL);
+ i915_tt = kzalloc_obj(*i915_tt);
if (!i915_tt)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
index ff2e02113fe6..3a7e202ae87d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
@@ -498,7 +498,7 @@ __i915_ttm_move(struct ttm_buffer_object *bo,
struct dma_fence *dep = fence;
if (!I915_SELFTEST_ONLY(fail_work_allocation))
- copy_work = kzalloc_obj(*copy_work, GFP_KERNEL);
+ copy_work = kzalloc_obj(*copy_work);
if (copy_work) {
copy_work->i915 = i915;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 6518a02397c6..043095f93ac6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -109,7 +109,7 @@ static int i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
return -E2BIG;
num_pages = obj->base.size >> PAGE_SHIFT;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -258,7 +258,7 @@ int i915_gem_object_userptr_submit_init(struct drm_i915_gem_object *obj)
if (ret)
return ret;
- pvec = kvmalloc_objs(struct page *, num_pages, GFP_KERNEL);
+ pvec = kvmalloc_objs(struct page *, num_pages);
if (!pvec)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
index ee661b7d3c6f..1d4d7cfb3f9c 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
@@ -540,7 +540,7 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
u64 hole_size;
int err;
- t = kzalloc_obj(*t, GFP_KERNEL);
+ t = kzalloc_obj(*t);
if (!t)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
index 223a9ca32d22..9d405098f9e7 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
@@ -56,7 +56,7 @@ static int live_nop_switch(void *arg)
if (IS_ERR(file))
return PTR_ERR(file);
- ctx = kzalloc_objs(*ctx, nctx, GFP_KERNEL);
+ ctx = kzalloc_objs(*ctx, nctx);
if (!ctx) {
err = -ENOMEM;
goto out_file;
@@ -317,7 +317,7 @@ static int live_parallel_switch(void *arg)
engines = i915_gem_context_lock_engines(ctx);
count = engines->num_engines;
- data = kzalloc_objs(*data, count, GFP_KERNEL);
+ data = kzalloc_objs(*data, count);
if (!data) {
i915_gem_context_unlock_engines(ctx);
err = -ENOMEM;
@@ -1054,7 +1054,7 @@ __sseu_prepare(const char *name,
if (!(flags & (TEST_BUSY | TEST_RESET)))
return 0;
- *spin = kzalloc_obj(**spin, GFP_KERNEL);
+ *spin = kzalloc_obj(**spin);
if (!*spin)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_context.c b/drivers/gpu/drm/i915/gem/selftests/mock_context.c
index 35cf3d0dd08f..24f1437262ec 100644
--- a/drivers/gpu/drm/i915/gem/selftests/mock_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/mock_context.c
@@ -17,7 +17,7 @@ mock_context(struct drm_i915_private *i915,
struct i915_gem_engines *e;
struct intel_sseu null_sseu = {};
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c b/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
index 8eabb6aa2f65..4212873c326d 100644
--- a/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
@@ -15,7 +15,7 @@ static struct sg_table *mock_map_dma_buf(struct dma_buf_attachment *attachment,
struct scatterlist *sg;
int i, err;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c
index 6cbf5dc04d9a..e8fab45759c3 100644
--- a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c
@@ -431,7 +431,7 @@ struct i915_ppgtt *gen6_ppgtt_create(struct intel_gt *gt)
struct gen6_ppgtt *ppgtt;
int err;
- ppgtt = kzalloc_obj(*ppgtt, GFP_KERNEL);
+ ppgtt = kzalloc_obj(*ppgtt);
if (!ppgtt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
index 1e1d035a0391..cfa09b250a1b 100644
--- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
@@ -1006,7 +1006,7 @@ struct i915_ppgtt *gen8_ppgtt_create(struct intel_gt *gt,
struct i915_ppgtt *ppgtt;
int err;
- ppgtt = kzalloc_obj(*ppgtt, GFP_KERNEL);
+ ppgtt = kzalloc_obj(*ppgtt);
if (!ppgtt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index e18c019b7725..a2b413982ce6 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -279,7 +279,7 @@ intel_breadcrumbs_create(struct intel_engine_cs *irq_engine)
{
struct intel_breadcrumbs *b;
- b = kzalloc_obj(*b, GFP_KERNEL);
+ b = kzalloc_obj(*b);
if (!b)
return NULL;
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 53b7554b78b9..d37966ec7a92 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -471,7 +471,7 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id,
if (GEM_DEBUG_WARN_ON(gt->engine_class[info->class][info->instance]))
return -EINVAL;
- engine = kzalloc_obj(*engine, GFP_KERNEL);
+ engine = kzalloc_obj(*engine);
if (!engine)
return -ENOMEM;
@@ -1311,7 +1311,7 @@ static int measure_breadcrumb_dw(struct intel_context *ce)
GEM_BUG_ON(!engine->gt->scratch);
- frame = kzalloc_obj(*frame, GFP_KERNEL);
+ frame = kzalloc_obj(*frame);
if (!frame)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
index d0b61fcc6eb7..050d909fb4f8 100644
--- a/drivers/gpu/drm/i915/gt/intel_gsc.c
+++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
@@ -204,7 +204,7 @@ static void gsc_init_one(struct drm_i915_private *i915, struct intel_gsc *gsc,
}
add_device:
- adev = kzalloc_obj(*adev, GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev)
goto fail;
diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
index 73e342a95dcb..be7eeb95ff12 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring.c
@@ -152,7 +152,7 @@ intel_engine_create_ring(struct intel_engine_cs *engine, int size)
GEM_BUG_ON(!is_power_of_2(size));
GEM_BUG_ON(RING_CTL_SIZE(size) & ~RING_NR_PAGES);
- ring = kzalloc_obj(*ring, GFP_KERNEL);
+ ring = kzalloc_obj(*ring);
if (!ring)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
index 98a6aadff7dd..7070047bfbaa 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.c
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
@@ -151,7 +151,7 @@ __intel_timeline_create(struct intel_gt *gt,
struct intel_timeline *timeline;
int err;
- timeline = kzalloc_obj(*timeline, GFP_KERNEL);
+ timeline = kzalloc_obj(*timeline);
if (!timeline)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
index 67326bc83310..b893a8fde895 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
@@ -72,7 +72,7 @@ static struct pulse *pulse_create(void)
{
struct pulse *p;
- p = kmalloc_obj(*p, GFP_KERNEL);
+ p = kmalloc_obj(*p);
if (!p)
return p;
diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i915/gt/selftest_execlists.c
index 1e99179ce32f..8c3b76e71eae 100644
--- a/drivers/gpu/drm/i915/gt/selftest_execlists.c
+++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c
@@ -3564,7 +3564,7 @@ static int smoke_crescendo(struct preempt_smoke *smoke, unsigned int flags)
unsigned long count;
int err = 0;
- arg = kmalloc_objs(*arg, I915_NUM_ENGINES, GFP_KERNEL);
+ arg = kmalloc_objs(*arg, I915_NUM_ENGINES);
if (!arg)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
index 2204058849bd..00dfc37221fa 100644
--- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
+++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
@@ -986,7 +986,7 @@ static int __igt_reset_engines(struct intel_gt *gt,
h.ctx->sched.priority = 1024;
}
- threads = kmalloc_objs(*threads, I915_NUM_ENGINES, GFP_KERNEL);
+ threads = kmalloc_objs(*threads, I915_NUM_ENGINES);
if (!threads)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index 71f2c2ca71a2..5b986a7687d9 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -689,7 +689,7 @@ static int threaded_migrate(struct intel_migrate *migrate,
unsigned int i;
int err = 0;
- thread = kzalloc_objs(*thread, n_cpus, GFP_KERNEL);
+ thread = kzalloc_objs(*thread, n_cpus);
if (!thread)
return 0;
diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c b/drivers/gpu/drm/i915/gt/selftest_rc6.c
index 166175f0b19c..90f30b988d68 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
@@ -201,7 +201,7 @@ randomised_engines(struct intel_gt *gt,
if (!n)
return NULL;
- engines = kmalloc_objs(*engines, n, GFP_KERNEL);
+ engines = kmalloc_objs(*engines, n);
if (!engines)
return NULL;
diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
index 6e25d39fa193..c3c918248989 100644
--- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
@@ -499,7 +499,7 @@ static int live_slpc_tile_interaction(void *arg)
struct slpc_thread *threads;
int i = 0, ret = 0;
- threads = kzalloc_objs(*threads, I915_MAX_GT, GFP_KERNEL);
+ threads = kzalloc_objs(*threads, I915_MAX_GT);
if (!threads)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/selftest_timeline.c b/drivers/gpu/drm/i915/gt/selftest_timeline.c
index 6860b61915b9..351271045d36 100644
--- a/drivers/gpu/drm/i915/gt/selftest_timeline.c
+++ b/drivers/gpu/drm/i915/gt/selftest_timeline.c
@@ -170,7 +170,7 @@ static int mock_hwsp_freelist(void *arg)
state.max = PAGE_SIZE / sizeof(*state.history);
state.count = 0;
- state.history = kzalloc_objs(*state.history, state.max, GFP_KERNEL);
+ state.history = kzalloc_objs(*state.history, state.max);
if (!state.history) {
err = -ENOMEM;
goto err_put;
diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
index 24ee4ec4c287..81cdecd38346 100644
--- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
@@ -1204,7 +1204,7 @@ live_gpu_reset_workarounds(void *arg)
if (!intel_has_gpu_reset(gt))
return 0;
- lists = kzalloc_obj(*lists, GFP_KERNEL);
+ lists = kzalloc_obj(*lists);
if (!lists)
return -ENOMEM;
@@ -1248,7 +1248,7 @@ live_engine_reset_workarounds(void *arg)
if (!intel_has_reset_engine(gt))
return 0;
- lists = kzalloc_obj(*lists, GFP_KERNEL);
+ lists = kzalloc_obj(*lists);
if (!lists)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/shmem_utils.c b/drivers/gpu/drm/i915/gt/shmem_utils.c
index 1db6aa1e32d8..5850adaebf82 100644
--- a/drivers/gpu/drm/i915/gt/shmem_utils.c
+++ b/drivers/gpu/drm/i915/gt/shmem_utils.c
@@ -63,7 +63,7 @@ void *shmem_pin_map(struct file *file)
void *vaddr;
n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT;
- pages = kvmalloc_objs(*pages, n_pages, GFP_KERNEL);
+ pages = kvmalloc_objs(*pages, n_pages);
if (!pages)
return NULL;
diff --git a/drivers/gpu/drm/i915/gt/sysfs_engines.c b/drivers/gpu/drm/i915/gt/sysfs_engines.c
index bb4eb815f0ff..da740bbcd083 100644
--- a/drivers/gpu/drm/i915/gt/sysfs_engines.c
+++ b/drivers/gpu/drm/i915/gt/sysfs_engines.c
@@ -430,7 +430,7 @@ kobj_engine(struct kobject *dir, struct intel_engine_cs *engine)
{
struct kobj_engine *ke;
- ke = kzalloc_obj(*ke, GFP_KERNEL);
+ ke = kzalloc_obj(*ke);
if (!ke)
return NULL;
@@ -458,7 +458,7 @@ static void add_defaults(struct kobj_engine *parent)
};
struct kobj_engine *ke;
- ke = kzalloc_obj(*ke, GFP_KERNEL);
+ ke = kzalloc_obj(*ke);
if (!ke)
return;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
index 2e7257f5543b..73b9959119a5 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -275,7 +275,7 @@ __alloc_ext_regs(struct __guc_mmio_reg_descr_group *newlist,
{
struct __guc_mmio_reg_descr *list;
- list = kzalloc_objs(struct __guc_mmio_reg_descr, num_regs, GFP_KERNEL);
+ list = kzalloc_objs(struct __guc_mmio_reg_descr, num_regs);
if (!list)
return -ENOMEM;
@@ -985,7 +985,7 @@ guc_capture_alloc_one_node(struct intel_guc *guc)
struct __guc_capture_parsed_output *new;
int i;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
@@ -1641,7 +1641,7 @@ void intel_guc_capture_destroy(struct intel_guc *guc)
int intel_guc_capture_init(struct intel_guc *guc)
{
- guc->capture = kzalloc_obj(*guc->capture, GFP_KERNEL);
+ guc->capture = kzalloc_obj(*guc->capture);
if (!guc->capture)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 1ba53ff64861..142183d3f7fb 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -2110,7 +2110,7 @@ static int init_tlb_lookup(struct intel_guc *guc)
xa_init_flags(&guc->tlb_lookup, XA_FLAGS_ALLOC);
- wait = kzalloc_obj(*wait, GFP_KERNEL);
+ wait = kzalloc_obj(*wait);
if (!wait)
return -ENOMEM;
@@ -4222,7 +4222,7 @@ guc_create_parallel(struct intel_engine_cs **engines,
struct intel_context *parent = NULL, *ce, *err;
int i, j;
- siblings = kmalloc_objs(*siblings, num_siblings, GFP_KERNEL);
+ siblings = kmalloc_objs(*siblings, num_siblings);
if (!siblings)
return ERR_PTR(-ENOMEM);
@@ -5905,7 +5905,7 @@ guc_create_virtual(struct intel_engine_cs **siblings, unsigned int count,
unsigned int n;
int err;
- ve = kzalloc_obj(*ve, GFP_KERNEL);
+ ve = kzalloc_obj(*ve);
if (!ve)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
index 8556a3e1ac3f..477c163d2660 100644
--- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
@@ -153,7 +153,7 @@ static int intel_guc_steal_guc_ids(void *arg)
struct i915_request *spin_rq = NULL, *rq, *last = NULL;
int number_guc_id_stolen = guc->number_guc_id_stolen;
- ce = kzalloc_objs(*ce, GUC_MAX_CONTEXT_ID, GFP_KERNEL);
+ ce = kzalloc_objs(*ce, GUC_MAX_CONTEXT_ID);
if (!ce) {
guc_err(guc, "Context array allocation failed\n");
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index d5d00cb84f2f..b868a0501886 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -1921,7 +1921,7 @@ static int perform_bb_shadow(struct parser_exec_state *s)
if (ret)
return ret;
- bb = kzalloc_obj(*bb, GFP_KERNEL);
+ bb = kzalloc_obj(*bb);
if (!bb)
return -ENOMEM;
@@ -3226,7 +3226,7 @@ static int init_cmd_table(struct intel_gvt *gvt)
if (!(cmd_info[i].devices & gen_type))
continue;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/display.c b/drivers/gpu/drm/i915/gvt/display.c
index 04ddd4709933..fe4302c8cae5 100644
--- a/drivers/gpu/drm/i915/gvt/display.c
+++ b/drivers/gpu/drm/i915/gvt/display.c
@@ -562,11 +562,11 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num,
if (drm_WARN_ON(&i915->drm, resolution >= GVT_EDID_NUM))
return -EINVAL;
- port->edid = kzalloc_obj(*(port->edid), GFP_KERNEL);
+ port->edid = kzalloc_obj(*(port->edid));
if (!port->edid)
return -ENOMEM;
- port->dpcd = kzalloc_obj(*(port->dpcd), GFP_KERNEL);
+ port->dpcd = kzalloc_obj(*(port->dpcd));
if (!port->dpcd) {
kfree(port->edid);
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c
index 255abb5a849b..8a1d6c5636c2 100644
--- a/drivers/gpu/drm/i915/gvt/dmabuf.c
+++ b/drivers/gpu/drm/i915/gvt/dmabuf.c
@@ -67,7 +67,7 @@ static int vgpu_gem_get_pages(struct drm_i915_gem_object *obj)
if (drm_WARN_ON(&dev_priv->drm, !vgpu))
return -ENODEV;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (unlikely(!st))
return -ENOMEM;
@@ -447,14 +447,14 @@ int intel_vgpu_query_plane(struct intel_vgpu *vgpu, void *args)
mutex_unlock(&vgpu->dmabuf_lock);
/* Need to allocate a new one*/
- dmabuf_obj = kmalloc_obj(struct intel_vgpu_dmabuf_obj, GFP_KERNEL);
+ dmabuf_obj = kmalloc_obj(struct intel_vgpu_dmabuf_obj);
if (unlikely(!dmabuf_obj)) {
gvt_vgpu_err("alloc dmabuf_obj failed\n");
ret = -ENOMEM;
goto out;
}
- dmabuf_obj->info = kmalloc_obj(struct intel_vgpu_fb_info, GFP_KERNEL);
+ dmabuf_obj->info = kmalloc_obj(struct intel_vgpu_fb_info);
if (unlikely(!dmabuf_obj->info)) {
gvt_vgpu_err("allocate intel vgpu fb info failed\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 8cc24620a32e..5056a5887b31 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -1770,7 +1770,7 @@ static struct intel_vgpu_mm *vgpu_alloc_mm(struct intel_vgpu *vgpu)
{
struct intel_vgpu_mm *mm;
- mm = kzalloc_obj(*mm, GFP_KERNEL);
+ mm = kzalloc_obj(*mm);
if (!mm)
return NULL;
@@ -2206,7 +2206,7 @@ static int emulate_ggtt_mmio_write(struct intel_vgpu *vgpu, unsigned int off,
if (!found) {
/* the first partial part */
- partial_pte = kzalloc_obj(*partial_pte, GFP_KERNEL);
+ partial_pte = kzalloc_obj(*partial_pte);
if (!partial_pte)
return -ENOMEM;
partial_pte->offset = off;
@@ -2502,7 +2502,7 @@ static int setup_spt_oos(struct intel_gvt *gvt)
INIT_LIST_HEAD(&gtt->oos_page_use_list_head);
for (i = 0; i < preallocated_oos_pages; i++) {
- oos_page = kzalloc_obj(*oos_page, GFP_KERNEL);
+ oos_page = kzalloc_obj(*oos_page);
if (!oos_page) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index ade07397a585..b0d8d3e74ae7 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -2892,7 +2892,7 @@ static int handle_mmio(struct intel_gvt_mmio_table_iter *iter, u32 offset,
return -EEXIST;
}
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 62da85b3f2ca..8cced31d1d96 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -250,7 +250,7 @@ static int __gvt_cache_add(struct intel_vgpu *vgpu, gfn_t gfn,
struct gvt_dma *new, *itr;
struct rb_node **link, *parent = NULL;
- new = kzalloc_obj(struct gvt_dma, GFP_KERNEL);
+ new = kzalloc_obj(struct gvt_dma);
if (!new)
return -ENOMEM;
@@ -595,7 +595,7 @@ int intel_gvt_set_edid(struct intel_vgpu *vgpu, int port_num)
struct vfio_edid_region *base;
int ret;
- base = kzalloc_obj(*base, GFP_KERNEL);
+ base = kzalloc_obj(*base);
if (!base)
return -ENOMEM;
@@ -1829,7 +1829,7 @@ static int intel_gvt_init_device(struct drm_i915_private *i915)
if (drm_WARN_ON(&i915->drm, i915->gvt))
return -EEXIST;
- gvt = kzalloc_obj(struct intel_gvt, GFP_KERNEL);
+ gvt = kzalloc_obj(struct intel_gvt);
if (!gvt)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/page_track.c b/drivers/gpu/drm/i915/gvt/page_track.c
index 862e199e5486..3ecac67b0fc4 100644
--- a/drivers/gpu/drm/i915/gvt/page_track.c
+++ b/drivers/gpu/drm/i915/gvt/page_track.c
@@ -58,7 +58,7 @@ int intel_vgpu_register_page_track(struct intel_vgpu *vgpu, unsigned long gfn,
if (track)
return -EEXIST;
- track = kzalloc_obj(*track, GFP_KERNEL);
+ track = kzalloc_obj(*track);
if (!track)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c
index 21e823113543..b353fedc0ba0 100644
--- a/drivers/gpu/drm/i915/gvt/sched_policy.c
+++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
@@ -282,7 +282,7 @@ static int tbs_sched_init(struct intel_gvt *gvt)
struct gvt_sched_data *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
@@ -312,7 +312,7 @@ static int tbs_sched_init_vgpu(struct intel_vgpu *vgpu)
{
struct vgpu_sched_data *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
index 003aacd770e9..a437875a30e3 100644
--- a/drivers/gpu/drm/i915/gvt/vgpu.c
+++ b/drivers/gpu/drm/i915/gvt/vgpu.c
@@ -113,11 +113,11 @@ int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
unsigned int num_types = ARRAY_SIZE(intel_vgpu_configs);
unsigned int i;
- gvt->types = kzalloc_objs(struct intel_vgpu_type, num_types, GFP_KERNEL);
+ gvt->types = kzalloc_objs(struct intel_vgpu_type, num_types);
if (!gvt->types)
return -ENOMEM;
- gvt->mdev_types = kzalloc_objs(*gvt->mdev_types, num_types, GFP_KERNEL);
+ gvt->mdev_types = kzalloc_objs(*gvt->mdev_types, num_types);
if (!gvt->mdev_types)
goto out_free_types;
diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 4cbbbe8307a8..25c46d7b1ea7 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -650,7 +650,7 @@ static int __await_barrier(struct i915_active *ref, struct i915_sw_fence *fence)
{
struct wait_barrier *wb;
- wb = kmalloc_obj(*wb, GFP_KERNEL);
+ wb = kmalloc_obj(*wb);
if (unlikely(!wb))
return -ENOMEM;
@@ -1160,7 +1160,7 @@ struct i915_active *i915_active_create(void)
{
struct auto_active *aa;
- aa = kmalloc_obj(*aa, GFP_KERNEL);
+ aa = kmalloc_obj(*aa);
if (!aa)
return NULL;
diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c
index 2407414c2ff1..82cbb0528ff1 100644
--- a/drivers/gpu/drm/i915/i915_drm_client.c
+++ b/drivers/gpu/drm/i915/i915_drm_client.c
@@ -21,7 +21,7 @@ struct i915_drm_client *i915_drm_client_alloc(void)
{
struct i915_drm_client *client;
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (!client)
return NULL;
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6e44b4d633f9..160733619a4a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1319,7 +1319,7 @@ int i915_gem_open(struct drm_i915_private *i915, struct drm_file *file)
drm_dbg(&i915->drm, "\n");
- file_priv = kzalloc_obj(*file_priv, GFP_KERNEL);
+ file_priv = kzalloc_obj(*file_priv);
if (!file_priv)
goto err_alloc;
diff --git a/drivers/gpu/drm/i915/i915_hdcp_gsc.c b/drivers/gpu/drm/i915/i915_hdcp_gsc.c
index 988c4cafa7c6..168b9ccbef3e 100644
--- a/drivers/gpu/drm/i915/i915_hdcp_gsc.c
+++ b/drivers/gpu/drm/i915/i915_hdcp_gsc.c
@@ -94,7 +94,7 @@ static struct intel_hdcp_gsc_context *intel_hdcp_gsc_context_alloc(struct drm_de
struct intel_hdcp_gsc_context *gsc_context;
int ret;
- gsc_context = kzalloc_obj(*gsc_context, GFP_KERNEL);
+ gsc_context = kzalloc_obj(*gsc_context);
if (!gsc_context)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 9d87d58d2385..16e64d752e12 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -915,7 +915,7 @@ void i915_hwmon_register(struct drm_i915_private *i915)
if (!IS_DGFX(i915))
return;
- hwmon = kzalloc_obj(*hwmon, GFP_KERNEL);
+ hwmon = kzalloc_obj(*hwmon);
if (!hwmon)
return;
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1b11442a3a39..2820e8f0f765 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -2200,7 +2200,7 @@ alloc_oa_config_buffer(struct i915_perf_stream *stream,
u32 *cs;
int err;
- oa_bo = kzalloc_obj(*oa_bo, GFP_KERNEL);
+ oa_bo = kzalloc_obj(*oa_bo);
if (!oa_bo)
return ERR_PTR(-ENOMEM);
@@ -3872,7 +3872,7 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
goto err_ctx;
}
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (!stream) {
ret = -ENOMEM;
goto err_ctx;
@@ -4505,7 +4505,7 @@ static struct i915_oa_reg *alloc_oa_regs(struct i915_perf *perf,
if (!is_valid)
return ERR_PTR(-EINVAL);
- oa_regs = kmalloc_objs(*oa_regs, n_regs, GFP_KERNEL);
+ oa_regs = kmalloc_objs(*oa_regs, n_regs);
if (!oa_regs)
return ERR_PTR(-ENOMEM);
@@ -4614,7 +4614,7 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
}
- oa_config = kzalloc_obj(*oa_config, GFP_KERNEL);
+ oa_config = kzalloc_obj(*oa_config);
if (!oa_config) {
drm_dbg(&perf->i915->drm,
"Failed to allocate memory for the OA config\n");
@@ -4910,7 +4910,7 @@ static int oa_init_gt(struct intel_gt *gt)
struct i915_perf_group *g;
intel_engine_mask_t tmp;
- g = kzalloc_objs(*g, num_groups, GFP_KERNEL);
+ g = kzalloc_objs(*g, num_groups);
if (!g)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index d52c1ed69b8e..1c3bafda9c70 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -1028,16 +1028,16 @@ create_event_attributes(struct i915_pmu *pmu)
}
/* Allocate attribute objects and table. */
- i915_attr = kzalloc_objs(*i915_attr, count, GFP_KERNEL);
+ i915_attr = kzalloc_objs(*i915_attr, count);
if (!i915_attr)
goto err_alloc;
- pmu_attr = kzalloc_objs(*pmu_attr, count, GFP_KERNEL);
+ pmu_attr = kzalloc_objs(*pmu_attr, count);
if (!pmu_attr)
goto err_alloc;
/* Max one pointer of each attribute type plus a termination entry. */
- attr = kzalloc_objs(*attr, count * 2 + 1, GFP_KERNEL);
+ attr = kzalloc_objs(*attr, count * 2 + 1);
if (!attr)
goto err_alloc;
diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 101df7236d6c..aec1342402ca 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -453,7 +453,7 @@ i915_sched_engine_create(unsigned int subclass)
{
struct i915_sched_engine *sched_engine;
- sched_engine = kzalloc_obj(*sched_engine, GFP_KERNEL);
+ sched_engine = kzalloc_obj(*sched_engine);
if (!sched_engine)
return NULL;
diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
index cf79995f1a5b..caceef5ab543 100644
--- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
+++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
@@ -48,7 +48,7 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
if (!lpfn)
lpfn = man->size;
- bman_res = kzalloc_obj(*bman_res, GFP_KERNEL);
+ bman_res = kzalloc_obj(*bman_res);
if (!bman_res)
return -ENOMEM;
@@ -289,7 +289,7 @@ int i915_ttm_buddy_man_init(struct ttm_device *bdev,
struct i915_ttm_buddy_manager *bman;
int err;
- bman = kzalloc_obj(*bman, GFP_KERNEL);
+ bman = kzalloc_obj(*bman);
if (!bman)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 39eb1808fd11..afc192d9931b 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -394,7 +394,7 @@ struct i915_vma_work *i915_vma_work(void)
{
struct i915_vma_work *vw;
- vw = kzalloc_obj(*vw, GFP_KERNEL);
+ vw = kzalloc_obj(*vw);
if (!vw)
return NULL;
@@ -1027,7 +1027,7 @@ intel_rotate_pages(struct intel_rotation_info *rot_info,
int i;
/* Allocate target SG list. */
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
goto err_st_alloc;
@@ -1237,7 +1237,7 @@ intel_remap_pages(struct intel_remapped_info *rem_info,
int i;
/* Allocate target SG list. */
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
goto err_st_alloc;
@@ -1275,7 +1275,7 @@ intel_partial_pages(const struct i915_gtt_view *view,
unsigned int count = view->partial.size;
int ret = -ENOMEM;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
goto err_st_alloc;
diff --git a/drivers/gpu/drm/i915/intel_memory_region.c b/drivers/gpu/drm/i915/intel_memory_region.c
index 426355f75db8..35f96ce7822f 100644
--- a/drivers/gpu/drm/i915/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/intel_memory_region.c
@@ -258,7 +258,7 @@ intel_memory_region_create(struct drm_i915_private *i915,
struct intel_memory_region *mem;
int err;
- mem = kzalloc_obj(*mem, GFP_KERNEL);
+ mem = kzalloc_obj(*mem);
if (!mem)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index b0d7cc7eb98f..bccedd59a114 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -2072,7 +2072,7 @@ static int __fw_domain_init(struct intel_uncore *uncore,
GEM_BUG_ON(domain_id >= FW_DOMAIN_ID_COUNT);
GEM_BUG_ON(uncore->fw_domain[domain_id]);
- d = kzalloc_obj(*d, GFP_KERNEL);
+ d = kzalloc_obj(*d);
if (!d)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
index d87d58433307..f7ed4e18a3ab 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
@@ -222,7 +222,7 @@ int intel_pxp_init(struct drm_i915_private *i915)
* including session and object management, or we will init the backend tee
* channel for internal users such as HuC loading by GSC
*/
- i915->pxp = kzalloc_obj(*i915->pxp, GFP_KERNEL);
+ i915->pxp = kzalloc_obj(*i915->pxp);
if (!i915->pxp)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/selftests/i915_active.c b/drivers/gpu/drm/i915/selftests/i915_active.c
index 3eaee7e8cc65..52345073b409 100644
--- a/drivers/gpu/drm/i915/selftests/i915_active.c
+++ b/drivers/gpu/drm/i915/selftests/i915_active.c
@@ -66,7 +66,7 @@ static struct live_active *__live_alloc(struct drm_i915_private *i915)
{
struct live_active *active;
- active = kzalloc_obj(*active, GFP_KERNEL);
+ active = kzalloc_obj(*active);
if (!active)
return NULL;
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
index 3362421467e8..718cddde7e73 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
@@ -421,7 +421,7 @@ static int igt_evict_contexts(void *arg)
struct reserved *r;
mutex_unlock(&ggtt->vm.mutex);
- r = kzalloc_objs(*r, 1, GFP_KERNEL);
+ r = kzalloc_objs(*r, 1);
mutex_lock(&ggtt->vm.mutex);
if (!r) {
err = -ENOMEM;
diff --git a/drivers/gpu/drm/i915/selftests/i915_perf.c b/drivers/gpu/drm/i915/selftests/i915_perf.c
index 411d43acd0d8..e9469e27f42a 100644
--- a/drivers/gpu/drm/i915/selftests/i915_perf.c
+++ b/drivers/gpu/drm/i915/selftests/i915_perf.c
@@ -21,7 +21,7 @@ alloc_empty_config(struct i915_perf *perf)
{
struct i915_oa_config *oa_config;
- oa_config = kzalloc_obj(*oa_config, GFP_KERNEL);
+ oa_config = kzalloc_obj(*oa_config);
if (!oa_config)
return -ENOMEM;
@@ -114,7 +114,7 @@ test_stream(struct i915_perf *perf)
props.metrics_set = oa_config->id;
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (!stream) {
i915_oa_config_put(oa_config);
return NULL;
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index d1d48ea8d264..f2c304d70c17 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -329,7 +329,7 @@ static void __igt_breadcrumbs_smoketest(struct kthread_work *work)
* that the fences were marked as signaled.
*/
- requests = kzalloc_objs(*requests, total, GFP_KERNEL);
+ requests = kzalloc_objs(*requests, total);
if (!requests) {
thread->result = -ENOMEM;
return;
@@ -472,11 +472,11 @@ static int mock_breadcrumbs_smoketest(void *arg)
* See __igt_breadcrumbs_smoketest();
*/
- threads = kzalloc_objs(*threads, ncpus, GFP_KERNEL);
+ threads = kzalloc_objs(*threads, ncpus);
if (!threads)
return -ENOMEM;
- t.contexts = kzalloc_objs(*t.contexts, t.ncontexts, GFP_KERNEL);
+ t.contexts = kzalloc_objs(*t.contexts, t.ncontexts);
if (!t.contexts) {
ret = -ENOMEM;
goto out_threads;
@@ -1203,7 +1203,7 @@ static int live_all_engines(void *arg)
* block doing so, and that they don't complete too soon.
*/
- request = kzalloc_objs(*request, nengines, GFP_KERNEL);
+ request = kzalloc_objs(*request, nengines);
if (!request)
return -ENOMEM;
@@ -1333,7 +1333,7 @@ static int live_sequential_engines(void *arg)
* they are running on independent engines.
*/
- request = kzalloc_objs(*request, nengines, GFP_KERNEL);
+ request = kzalloc_objs(*request, nengines);
if (!request)
return -ENOMEM;
@@ -1626,7 +1626,7 @@ static int live_parallel_engines(void *arg)
* tests that we load up the system maximally.
*/
- threads = kzalloc_objs(*threads, nengines, GFP_KERNEL);
+ threads = kzalloc_objs(*threads, nengines);
if (!threads)
return -ENOMEM;
@@ -1754,13 +1754,13 @@ static int live_breadcrumbs_smoketest(void *arg)
goto out_rpm;
}
- smoke = kzalloc_objs(*smoke, nengines, GFP_KERNEL);
+ smoke = kzalloc_objs(*smoke, nengines);
if (!smoke) {
ret = -ENOMEM;
goto out_file;
}
- threads = kzalloc_objs(*threads, ncpus * nengines, GFP_KERNEL);
+ threads = kzalloc_objs(*threads, ncpus * nengines);
if (!threads) {
ret = -ENOMEM;
goto out_smoke;
@@ -2837,7 +2837,7 @@ static int perf_series_engines(void *arg)
unsigned int idx;
int err = 0;
- stats = kzalloc_objs(*stats, nengines, GFP_KERNEL);
+ stats = kzalloc_objs(*stats, nengines);
if (!stats)
return -ENOMEM;
@@ -3193,7 +3193,7 @@ static int perf_parallel_engines(void *arg)
struct p_thread *engines;
int err = 0;
- engines = kzalloc_objs(*engines, nengines, GFP_KERNEL);
+ engines = kzalloc_objs(*engines, nengines);
if (!engines)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
index 34bcdbaac7c3..6c376338bb37 100644
--- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
@@ -47,7 +47,7 @@ static struct i915_sw_fence *alloc_fence(void)
{
struct i915_sw_fence *fence;
- fence = kmalloc_obj(*fence, GFP_KERNEL);
+ fence = kmalloc_obj(*fence);
if (!fence)
return NULL;
@@ -454,7 +454,7 @@ static int test_chain(void *arg)
int ret, i;
/* Test a long chain of fences */
- fences = kmalloc_objs(*fences, nfences, GFP_KERNEL);
+ fences = kmalloc_objs(*fences, nfences);
if (!fences)
return -ENOMEM;
@@ -639,7 +639,7 @@ static struct dma_fence *alloc_dma_fence(void)
{
struct dma_fence *dma;
- dma = kmalloc_obj(*dma, GFP_KERNEL);
+ dma = kmalloc_obj(*dma);
if (dma)
dma_fence_init(dma, &mock_fence_ops, &mock_fence_lock, 0, 0);
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index d6b4796fde82..210b9f8f7b61 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -148,7 +148,7 @@ struct drm_i915_private *mock_gem_device(void)
struct pci_dev *pdev;
int ret;
- pdev = kzalloc_obj(*pdev, GFP_KERNEL);
+ pdev = kzalloc_obj(*pdev);
if (!pdev)
return NULL;
device_initialize(&pdev->dev);
diff --git a/drivers/gpu/drm/i915/selftests/mock_gtt.c b/drivers/gpu/drm/i915/selftests/mock_gtt.c
index 1b13502add8a..933990a8dc52 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gtt.c
@@ -66,7 +66,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name)
{
struct i915_ppgtt *ppgtt;
- ppgtt = kzalloc_obj(*ppgtt, GFP_KERNEL);
+ ppgtt = kzalloc_obj(*ppgtt);
if (!ppgtt)
return NULL;
diff --git a/drivers/gpu/drm/i915/vlv_suspend.c b/drivers/gpu/drm/i915/vlv_suspend.c
index b5360ddc34e7..dac4b9bac743 100644
--- a/drivers/gpu/drm/i915/vlv_suspend.c
+++ b/drivers/gpu/drm/i915/vlv_suspend.c
@@ -464,7 +464,7 @@ int vlv_suspend_init(struct drm_i915_private *i915)
return 0;
/* we write all the values in the struct, so no need to zero it out */
- i915->vlv_s0ix_state = kmalloc_obj(*i915->vlv_s0ix_state, GFP_KERNEL);
+ i915->vlv_s0ix_state = kmalloc_obj(*i915->vlv_s0ix_state);
if (!i915->vlv_s0ix_state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/imagination/pvr_ccb.c b/drivers/gpu/drm/imagination/pvr_ccb.c
index 998b9ceb54ca..00c236d24acc 100644
--- a/drivers/gpu/drm/imagination/pvr_ccb.c
+++ b/drivers/gpu/drm/imagination/pvr_ccb.c
@@ -543,7 +543,7 @@ struct dma_fence *pvr_kccb_fence_alloc(void)
{
struct pvr_kccb_fence *kccb_fence;
- kccb_fence = kzalloc_obj(*kccb_fence, GFP_KERNEL);
+ kccb_fence = kzalloc_obj(*kccb_fence);
if (!kccb_fence)
return NULL;
diff --git a/drivers/gpu/drm/imagination/pvr_context.c b/drivers/gpu/drm/imagination/pvr_context.c
index 1aa4f098f93d..8de70c30b9de 100644
--- a/drivers/gpu/drm/imagination/pvr_context.c
+++ b/drivers/gpu/drm/imagination/pvr_context.c
@@ -292,7 +292,7 @@ int pvr_context_create(struct pvr_file *pvr_file, struct drm_pvr_ioctl_create_co
if (ctx_size < 0)
return ctx_size;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c
index b6171d10e8ac..268900464ab6 100644
--- a/drivers/gpu/drm/imagination/pvr_drv.c
+++ b/drivers/gpu/drm/imagination/pvr_drv.c
@@ -1312,7 +1312,7 @@ pvr_drm_driver_open(struct drm_device *drm_dev, struct drm_file *file)
struct pvr_device *pvr_dev = to_pvr_device(drm_dev);
struct pvr_file *pvr_file;
- pvr_file = kzalloc_obj(*pvr_file, GFP_KERNEL);
+ pvr_file = kzalloc_obj(*pvr_file);
if (!pvr_file)
return -ENOMEM;
diff --git a/drivers/gpu/drm/imagination/pvr_free_list.c b/drivers/gpu/drm/imagination/pvr_free_list.c
index cfcfbd89052a..e85cac83834c 100644
--- a/drivers/gpu/drm/imagination/pvr_free_list.c
+++ b/drivers/gpu/drm/imagination/pvr_free_list.c
@@ -307,7 +307,7 @@ pvr_free_list_grow(struct pvr_free_list *free_list, u32 num_pages)
goto err_unlock;
}
- free_list_node = kzalloc_obj(*free_list_node, GFP_KERNEL);
+ free_list_node = kzalloc_obj(*free_list_node);
if (!free_list_node) {
err = -ENOMEM;
goto err_unlock;
@@ -415,7 +415,7 @@ pvr_free_list_create(struct pvr_file *pvr_file,
int err;
/* Create and fill out the kernel structure */
- free_list = kzalloc_obj(*free_list, GFP_KERNEL);
+ free_list = kzalloc_obj(*free_list);
if (!free_list)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_fw.c b/drivers/gpu/drm/imagination/pvr_fw.c
index 1cbbaff3e7bf..288516dc2560 100644
--- a/drivers/gpu/drm/imagination/pvr_fw.c
+++ b/drivers/gpu/drm/imagination/pvr_fw.c
@@ -1272,7 +1272,7 @@ pvr_fw_object_create_and_map_common(struct pvr_device *pvr_dev, size_t size,
/* %DRM_PVR_BO_PM_FW_PROTECT is implicit for FW objects. */
flags |= DRM_PVR_BO_PM_FW_PROTECT;
- fw_obj = kzalloc_obj(*fw_obj, GFP_KERNEL);
+ fw_obj = kzalloc_obj(*fw_obj);
if (!fw_obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index f2c92a3b3a94..e154cb35f604 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -455,7 +455,7 @@ static int fw_trace_open(struct inode *inode, struct file *file)
struct pvr_fw_trace_seq_data *trace_seq_data;
int err;
- trace_seq_data = kzalloc_obj(*trace_seq_data, GFP_KERNEL);
+ trace_seq_data = kzalloc_obj(*trace_seq_data);
if (!trace_seq_data)
return -ENOMEM;
diff --git a/drivers/gpu/drm/imagination/pvr_gem.c b/drivers/gpu/drm/imagination/pvr_gem.c
index 7a4e8ec92e1e..686a3fe22986 100644
--- a/drivers/gpu/drm/imagination/pvr_gem.c
+++ b/drivers/gpu/drm/imagination/pvr_gem.c
@@ -314,7 +314,7 @@ struct drm_gem_object *pvr_gem_create_object(struct drm_device *drm_dev, size_t
struct drm_gem_object *gem_obj;
struct pvr_gem_object *pvr_obj;
- pvr_obj = kzalloc_obj(*pvr_obj, GFP_KERNEL);
+ pvr_obj = kzalloc_obj(*pvr_obj);
if (!pvr_obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_hwrt.c b/drivers/gpu/drm/imagination/pvr_hwrt.c
index 93ea3c8ee176..05c68c78da22 100644
--- a/drivers/gpu/drm/imagination/pvr_hwrt.c
+++ b/drivers/gpu/drm/imagination/pvr_hwrt.c
@@ -457,7 +457,7 @@ pvr_hwrt_dataset_create(struct pvr_file *pvr_file,
int err, i = 0;
/* Create and fill out the kernel structure */
- hwrt = kzalloc_obj(*hwrt, GFP_KERNEL);
+ hwrt = kzalloc_obj(*hwrt);
if (!hwrt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_job.c b/drivers/gpu/drm/imagination/pvr_job.c
index a4e550505504..0c2f511a6178 100644
--- a/drivers/gpu/drm/imagination/pvr_job.c
+++ b/drivers/gpu/drm/imagination/pvr_job.c
@@ -415,7 +415,7 @@ create_job(struct pvr_device *pvr_dev,
(args->hwrt.set_handle || args->hwrt.data_index))
return ERR_PTR(-EINVAL);
- job = kzalloc_obj(*job, GFP_KERNEL);
+ job = kzalloc_obj(*job);
if (!job)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_mmu.c b/drivers/gpu/drm/imagination/pvr_mmu.c
index 4d35879a344b..2e4da5b2c499 100644
--- a/drivers/gpu/drm/imagination/pvr_mmu.c
+++ b/drivers/gpu/drm/imagination/pvr_mmu.c
@@ -1828,7 +1828,7 @@ pvr_page_table_l0_get_or_insert(struct pvr_mmu_op_context *op_ctx,
*/
struct pvr_mmu_context *pvr_mmu_context_create(struct pvr_device *pvr_dev)
{
- struct pvr_mmu_context *ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ struct pvr_mmu_context *ctx = kzalloc_obj(*ctx);
int err;
if (!ctx)
@@ -1877,7 +1877,7 @@ pvr_page_table_l1_alloc(struct pvr_mmu_context *ctx)
{
int err;
- struct pvr_page_table_l1 *table = kzalloc_obj(*table, GFP_KERNEL);
+ struct pvr_page_table_l1 *table = kzalloc_obj(*table);
if (!table)
return ERR_PTR(-ENOMEM);
@@ -1905,7 +1905,7 @@ pvr_page_table_l0_alloc(struct pvr_mmu_context *ctx)
{
int err;
- struct pvr_page_table_l0 *table = kzalloc_obj(*table, GFP_KERNEL);
+ struct pvr_page_table_l0 *table = kzalloc_obj(*table);
if (!table)
return ERR_PTR(-ENOMEM);
@@ -2350,7 +2350,7 @@ pvr_mmu_op_context_create(struct pvr_mmu_context *ctx, struct sg_table *sgt,
{
int err;
- struct pvr_mmu_op_context *op_ctx = kzalloc_obj(*op_ctx, GFP_KERNEL);
+ struct pvr_mmu_op_context *op_ctx = kzalloc_obj(*op_ctx);
if (!op_ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c
index c70a62192d79..0cf7393f89c6 100644
--- a/drivers/gpu/drm/imagination/pvr_power.c
+++ b/drivers/gpu/drm/imagination/pvr_power.c
@@ -614,11 +614,11 @@ int pvr_power_domains_init(struct pvr_device *pvr_dev)
link_count = domain_count + (domain_count - 1);
- domain_devs = kzalloc_objs(*domain_devs, domain_count, GFP_KERNEL);
+ domain_devs = kzalloc_objs(*domain_devs, domain_count);
if (!domain_devs)
return -ENOMEM;
- domain_links = kzalloc_objs(*domain_links, link_count, GFP_KERNEL);
+ domain_links = kzalloc_objs(*domain_links, link_count);
if (!domain_links)
return -ENOMEM;
diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
index 12f759c17f93..dd88949f6194 100644
--- a/drivers/gpu/drm/imagination/pvr_queue.c
+++ b/drivers/gpu/drm/imagination/pvr_queue.c
@@ -249,7 +249,7 @@ pvr_queue_fence_alloc(void)
{
struct pvr_queue_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return NULL;
@@ -1266,7 +1266,7 @@ struct pvr_queue *pvr_queue_create(struct pvr_context *ctx,
if (ctx_state_size < 0)
return ERR_PTR(ctx_state_size);
- queue = kzalloc_obj(*queue, GFP_KERNEL);
+ queue = kzalloc_obj(*queue);
if (!queue)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_sync.c b/drivers/gpu/drm/imagination/pvr_sync.c
index b5268c9b885b..3582616ff722 100644
--- a/drivers/gpu/drm/imagination/pvr_sync.c
+++ b/drivers/gpu/drm/imagination/pvr_sync.c
@@ -64,7 +64,7 @@ pvr_sync_signal_array_add(struct xarray *array, struct drm_file *file, u32 handl
int err;
u32 id;
- sig_sync = kzalloc_obj(*sig_sync, GFP_KERNEL);
+ sig_sync = kzalloc_obj(*sig_sync);
if (!sig_sync)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c
index e482bfc00576..e1ec60f34b6e 100644
--- a/drivers/gpu/drm/imagination/pvr_vm.c
+++ b/drivers/gpu/drm/imagination/pvr_vm.c
@@ -261,9 +261,9 @@ pvr_vm_bind_op_map_init(struct pvr_vm_bind_op *bind_op,
if (IS_ERR(bind_op->gpuvm_bo))
return PTR_ERR(bind_op->gpuvm_bo);
- bind_op->new_va = kzalloc_obj(*bind_op->new_va, GFP_KERNEL);
- bind_op->prev_va = kzalloc_obj(*bind_op->prev_va, GFP_KERNEL);
- bind_op->next_va = kzalloc_obj(*bind_op->next_va, GFP_KERNEL);
+ bind_op->new_va = kzalloc_obj(*bind_op->new_va);
+ bind_op->prev_va = kzalloc_obj(*bind_op->prev_va);
+ bind_op->next_va = kzalloc_obj(*bind_op->next_va);
if (!bind_op->new_va || !bind_op->prev_va || !bind_op->next_va) {
err = -ENOMEM;
goto err_bind_op_fini;
@@ -310,8 +310,8 @@ pvr_vm_bind_op_unmap_init(struct pvr_vm_bind_op *bind_op,
bind_op->type = PVR_VM_BIND_TYPE_UNMAP;
- bind_op->prev_va = kzalloc_obj(*bind_op->prev_va, GFP_KERNEL);
- bind_op->next_va = kzalloc_obj(*bind_op->next_va, GFP_KERNEL);
+ bind_op->prev_va = kzalloc_obj(*bind_op->prev_va);
+ bind_op->next_va = kzalloc_obj(*bind_op->next_va);
if (!bind_op->prev_va || !bind_op->next_va) {
err = -ENOMEM;
goto err_bind_op_fini;
@@ -565,7 +565,7 @@ pvr_vm_create_context(struct pvr_device *pvr_dev, bool is_userspace_context)
return ERR_PTR(-EINVAL);
}
- vm_ctx = kzalloc_obj(*vm_ctx, GFP_KERNEL);
+ vm_ctx = kzalloc_obj(*vm_ctx);
if (!vm_ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c
index 07bc2044f76a..c014ef70dfd1 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-plane.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c
@@ -381,7 +381,7 @@ struct dcss_plane *dcss_plane_init(struct drm_device *drm,
if (zpos > 2)
return ERR_PTR(-EINVAL);
- dcss_plane = kzalloc_obj(*dcss_plane, GFP_KERNEL);
+ dcss_plane = kzalloc_obj(*dcss_plane);
if (!dcss_plane) {
DRM_ERROR("failed to allocate plane\n");
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
index eeff0d535b02..a18b9d1a68b6 100644
--- a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
+++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
@@ -117,7 +117,7 @@ static void imx_drm_crtc_reset(struct drm_crtc *crtc)
kfree(to_imx_crtc_state(crtc->state));
crtc->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -126,7 +126,7 @@ static struct drm_crtc_state *imx_drm_crtc_duplicate_state(struct drm_crtc *crtc
{
struct imx_crtc_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
index 0b58871277d7..0ea70b8fd743 100644
--- a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
@@ -308,7 +308,7 @@ static void ipu_plane_state_reset(struct drm_plane *plane)
plane->state = NULL;
}
- ipu_state = kzalloc_obj(*ipu_state, GFP_KERNEL);
+ ipu_state = kzalloc_obj(*ipu_state);
if (ipu_state)
__drm_atomic_helper_plane_reset(plane, &ipu_state->base);
@@ -322,7 +322,7 @@ ipu_plane_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (state)
__drm_atomic_helper_plane_duplicate_state(plane, &state->base);
diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
index e82cbb92faee..dea85577513a 100644
--- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c
+++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
@@ -66,7 +66,7 @@ imx_pd_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
}
*num_output_fmts = 1;
- output_fmts = kmalloc_obj(*output_fmts, GFP_KERNEL);
+ output_fmts = kmalloc_obj(*output_fmts);
if (!output_fmts)
return NULL;
@@ -117,7 +117,7 @@ imx_pd_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
}
*num_input_fmts = 1;
- input_fmts = kmalloc_obj(*input_fmts, GFP_KERNEL);
+ input_fmts = kmalloc_obj(*input_fmts);
if (!input_fmts)
return NULL;
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
index 6273058b1bee..6601589339f6 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
@@ -923,7 +923,7 @@ ingenic_drm_gem_create_object(struct drm_device *drm, size_t size)
struct ingenic_drm *priv = drm_device_get_priv(drm);
struct drm_gem_dma_object *obj;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
@@ -1387,7 +1387,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
goto err_devclk_disable;
}
- private_state = kzalloc_obj(*private_state, GFP_KERNEL);
+ private_state = kzalloc_obj(*private_state);
if (!private_state) {
ret = -ENOMEM;
goto err_clk_notifier_unregister;
diff --git a/drivers/gpu/drm/ingenic/ingenic-ipu.c b/drivers/gpu/drm/ingenic/ingenic-ipu.c
index 88b6b406e796..289274f464ba 100644
--- a/drivers/gpu/drm/ingenic/ingenic-ipu.c
+++ b/drivers/gpu/drm/ingenic/ingenic-ipu.c
@@ -887,7 +887,7 @@ static int ingenic_ipu_bind(struct device *dev, struct device *master, void *d)
return err;
}
- private_state = kzalloc_obj(*private_state, GFP_KERNEL);
+ private_state = kzalloc_obj(*private_state);
if (!private_state) {
err = -ENOMEM;
goto err_clk_unprepare;
diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index 1d2ce15d703a..aeb2f9f98f23 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
+++ b/drivers/gpu/drm/kmb/kmb_dsi.c
@@ -220,14 +220,14 @@ int kmb_dsi_host_bridge_init(struct device *dev)
/* Create and register MIPI DSI host */
if (!dsi_host) {
- dsi_host = kzalloc_obj(*dsi_host, GFP_KERNEL);
+ dsi_host = kzalloc_obj(*dsi_host);
if (!dsi_host)
return -ENOMEM;
dsi_host->ops = &kmb_dsi_host_ops;
if (!dsi_device) {
- dsi_device = kzalloc_obj(*dsi_device, GFP_KERNEL);
+ dsi_device = kzalloc_obj(*dsi_device);
if (!dsi_device) {
kfree(dsi_host);
return -ENOMEM;
diff --git a/drivers/gpu/drm/lima/lima_ctx.c b/drivers/gpu/drm/lima/lima_ctx.c
index edcd3733dd95..68ede7a725e2 100644
--- a/drivers/gpu/drm/lima/lima_ctx.c
+++ b/drivers/gpu/drm/lima/lima_ctx.c
@@ -12,7 +12,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
struct lima_ctx *ctx;
int i, err;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
ctx->dev = dev;
diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c
index f2bdf0d1b2fc..9a0eb1092ad3 100644
--- a/drivers/gpu/drm/lima/lima_drv.c
+++ b/drivers/gpu/drm/lima/lima_drv.c
@@ -215,7 +215,7 @@ static int lima_drm_driver_open(struct drm_device *dev, struct drm_file *file)
struct lima_drm_priv *priv;
struct lima_device *ldev = to_lima_dev(dev);
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c
index bed7945d8440..0c73860bb501 100644
--- a/drivers/gpu/drm/lima/lima_gem.c
+++ b/drivers/gpu/drm/lima/lima_gem.c
@@ -73,7 +73,7 @@ int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm)
dma_unmap_sgtable(dev, bo->base.sgt, DMA_BIDIRECTIONAL, 0);
sg_free_table(bo->base.sgt);
} else {
- bo->base.sgt = kmalloc_obj(*bo->base.sgt, GFP_KERNEL);
+ bo->base.sgt = kmalloc_obj(*bo->base.sgt);
if (!bo->base.sgt) {
ret = -ENOMEM;
goto err_out0;
@@ -226,7 +226,7 @@ struct drm_gem_object *lima_gem_create_object(struct drm_device *dev, size_t siz
{
struct lima_bo *bo;
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c
index 5db2a1ad1983..c1b75b15c260 100644
--- a/drivers/gpu/drm/lima/lima_vm.c
+++ b/drivers/gpu/drm/lima/lima_vm.c
@@ -109,7 +109,7 @@ int lima_vm_bo_add(struct lima_vm *vm, struct lima_bo *bo, bool create)
return -ENOENT;
}
- bo_va = kzalloc_obj(*bo_va, GFP_KERNEL);
+ bo_va = kzalloc_obj(*bo_va);
if (!bo_va) {
err = -ENOMEM;
goto err_out0;
@@ -201,7 +201,7 @@ struct lima_vm *lima_vm_create(struct lima_device *dev)
{
struct lima_vm *vm;
- vm = kzalloc_obj(*vm, GFP_KERNEL);
+ vm = kzalloc_obj(*vm);
if (!vm)
return NULL;
diff --git a/drivers/gpu/drm/loongson/lsdc_crtc.c b/drivers/gpu/drm/loongson/lsdc_crtc.c
index 32ef0f3826ac..587fbe285e9e 100644
--- a/drivers/gpu/drm/loongson/lsdc_crtc.c
+++ b/drivers/gpu/drm/loongson/lsdc_crtc.c
@@ -397,7 +397,7 @@ static void lsdc_crtc_reset(struct drm_crtc *crtc)
if (crtc->state)
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
- priv_crtc_state = kzalloc_obj(*priv_crtc_state, GFP_KERNEL);
+ priv_crtc_state = kzalloc_obj(*priv_crtc_state);
if (!priv_crtc_state)
__drm_atomic_helper_crtc_reset(crtc, NULL);
@@ -424,7 +424,7 @@ lsdc_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
struct lsdc_crtc_state *new_priv_state;
struct lsdc_crtc_state *old_priv_state;
- new_priv_state = kzalloc_obj(*new_priv_state, GFP_KERNEL);
+ new_priv_state = kzalloc_obj(*new_priv_state);
if (!new_priv_state)
return NULL;
diff --git a/drivers/gpu/drm/loongson/lsdc_gfxpll.c b/drivers/gpu/drm/loongson/lsdc_gfxpll.c
index 984ee165cacb..2daa62e72fda 100644
--- a/drivers/gpu/drm/loongson/lsdc_gfxpll.c
+++ b/drivers/gpu/drm/loongson/lsdc_gfxpll.c
@@ -178,7 +178,7 @@ int loongson_gfxpll_create(struct drm_device *ddev,
struct loongson_gfxpll *this;
int ret;
- this = kzalloc_obj(*this, GFP_KERNEL);
+ this = kzalloc_obj(*this);
if (IS_ERR_OR_NULL(this))
return -ENOMEM;
diff --git a/drivers/gpu/drm/loongson/lsdc_i2c.c b/drivers/gpu/drm/loongson/lsdc_i2c.c
index 5ed314a76dde..b5ff68866f02 100644
--- a/drivers/gpu/drm/loongson/lsdc_i2c.c
+++ b/drivers/gpu/drm/loongson/lsdc_i2c.c
@@ -124,7 +124,7 @@ int lsdc_create_i2c_chan(struct drm_device *ddev,
struct lsdc_i2c *li2c;
int ret;
- li2c = kzalloc_obj(*li2c, GFP_KERNEL);
+ li2c = kzalloc_obj(*li2c);
if (!li2c)
return -ENOMEM;
diff --git a/drivers/gpu/drm/loongson/lsdc_pixpll.c b/drivers/gpu/drm/loongson/lsdc_pixpll.c
index d9c9de7b5de0..41131a74056f 100644
--- a/drivers/gpu/drm/loongson/lsdc_pixpll.c
+++ b/drivers/gpu/drm/loongson/lsdc_pixpll.c
@@ -124,7 +124,7 @@ static int lsdc_pixel_pll_setup(struct lsdc_pixpll * const this)
if (!this->mmio)
return -ENOMEM;
- pparms = kzalloc_obj(*pparms, GFP_KERNEL);
+ pparms = kzalloc_obj(*pparms);
if (!pparms) {
iounmap(this->mmio);
return -ENOMEM;
diff --git a/drivers/gpu/drm/loongson/lsdc_ttm.c b/drivers/gpu/drm/loongson/lsdc_ttm.c
index 3404e18e87b4..d7441d96a0dc 100644
--- a/drivers/gpu/drm/loongson/lsdc_ttm.c
+++ b/drivers/gpu/drm/loongson/lsdc_ttm.c
@@ -96,7 +96,7 @@ lsdc_ttm_tt_create(struct ttm_buffer_object *tbo, uint32_t page_flags)
struct ttm_tt *tt;
int ret;
- tt = kzalloc_obj(*tt, GFP_KERNEL);
+ tt = kzalloc_obj(*tt);
if (!tt)
return NULL;
@@ -441,7 +441,7 @@ struct lsdc_bo *lsdc_bo_create(struct drm_device *ddev,
enum ttm_bo_type bo_type;
int ret;
- lbo = kzalloc_obj(*lbo, GFP_KERNEL);
+ lbo = kzalloc_obj(*lbo);
if (!lbo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c
index 1c1459a4af13..351d58c50b84 100644
--- a/drivers/gpu/drm/mediatek/mtk_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_crtc.c
@@ -160,7 +160,7 @@ static void mtk_crtc_reset(struct drm_crtc *crtc)
kfree(to_mtk_crtc_state(crtc->state));
crtc->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -169,7 +169,7 @@ static struct drm_crtc_state *mtk_crtc_duplicate_state(struct drm_crtc *crtc)
{
struct mtk_crtc_state *state;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
index 08d954e412d1..08c4d64b87b9 100644
--- a/drivers/gpu/drm/mediatek/mtk_dp.c
+++ b/drivers/gpu/drm/mediatek/mtk_dp.c
@@ -2482,7 +2482,7 @@ static u32 *mtk_dp_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
u32 *output_fmts;
*num_output_fmts = 0;
- output_fmts = kmalloc_obj(*output_fmts, GFP_KERNEL);
+ output_fmts = kmalloc_obj(*output_fmts);
if (!output_fmts)
return NULL;
*num_output_fmts = 1;
diff --git a/drivers/gpu/drm/mediatek/mtk_gem.c b/drivers/gpu/drm/mediatek/mtk_gem.c
index 5f7e50ff70ae..f059a1452220 100644
--- a/drivers/gpu/drm/mediatek/mtk_gem.c
+++ b/drivers/gpu/drm/mediatek/mtk_gem.c
@@ -50,7 +50,7 @@ static struct sg_table *mtk_gem_prime_get_sg_table(struct drm_gem_object *obj)
struct sg_table *sgt;
int ret;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt)
return ERR_PTR(-ENOMEM);
@@ -85,7 +85,7 @@ static struct drm_gem_dma_object *mtk_gem_init(struct drm_device *dev,
if (size == 0)
return ERR_PTR(-EINVAL);
- dma_obj = kzalloc_obj(*dma_obj, GFP_KERNEL);
+ dma_obj = kzalloc_obj(*dma_obj);
if (!dma_obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/mediatek/mtk_plane.c b/drivers/gpu/drm/mediatek/mtk_plane.c
index 60c35d3cbb9b..86c6f60eadb3 100644
--- a/drivers/gpu/drm/mediatek/mtk_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_plane.c
@@ -35,7 +35,7 @@ static void mtk_plane_reset(struct drm_plane *plane)
state = to_mtk_plane_state(plane->state);
memset(state, 0, sizeof(*state));
} else {
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return;
}
@@ -52,7 +52,7 @@ static struct drm_plane_state *mtk_plane_duplicate_state(struct drm_plane *plane
struct mtk_plane_state *old_state = to_mtk_plane_state(plane->state);
struct mtk_plane_state *state;
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index fe7451ff4ea4..4387d5f5898f 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -697,7 +697,7 @@ void mgag200_crtc_reset(struct drm_crtc *crtc)
if (crtc->state)
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
- mgag200_crtc_state = kzalloc_obj(*mgag200_crtc_state, GFP_KERNEL);
+ mgag200_crtc_state = kzalloc_obj(*mgag200_crtc_state);
if (mgag200_crtc_state)
__drm_atomic_helper_crtc_reset(crtc, &mgag200_crtc_state->base);
else
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
index 9cf06fd3a21e..d5a5fa9e2cf8 100644
--- a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
@@ -457,7 +457,7 @@ static void a2xx_dump(struct msm_gpu *gpu)
static struct msm_gpu_state *a2xx_gpu_state_get(struct msm_gpu *gpu)
{
- struct msm_gpu_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct msm_gpu_state *state = kzalloc_obj(*state);
if (!state)
return ERR_PTR(-ENOMEM);
@@ -509,7 +509,7 @@ static struct msm_gpu *a2xx_gpu_init(struct drm_device *dev)
goto fail;
}
- a2xx_gpu = kzalloc_obj(*a2xx_gpu, GFP_KERNEL);
+ a2xx_gpu = kzalloc_obj(*a2xx_gpu);
if (!a2xx_gpu) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
index 4e8148497295..d77b4774d414 100644
--- a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
+++ b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
@@ -95,7 +95,7 @@ struct msm_mmu *a2xx_gpummu_new(struct device *dev, struct msm_gpu *gpu)
{
struct a2xx_gpummu *gpummu;
- gpummu = kzalloc_obj(*gpummu, GFP_KERNEL);
+ gpummu = kzalloc_obj(*gpummu);
if (!gpummu)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
index 5d47f8c0b7ea..018183e0ac3f 100644
--- a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
@@ -480,7 +480,7 @@ static void a3xx_dump(struct msm_gpu *gpu)
static struct msm_gpu_state *a3xx_gpu_state_get(struct msm_gpu *gpu)
{
- struct msm_gpu_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct msm_gpu_state *state = kzalloc_obj(*state);
if (!state)
return ERR_PTR(-ENOMEM);
@@ -533,7 +533,7 @@ static struct msm_gpu *a3xx_gpu_init(struct drm_device *dev)
goto fail;
}
- a3xx_gpu = kzalloc_obj(*a3xx_gpu, GFP_KERNEL);
+ a3xx_gpu = kzalloc_obj(*a3xx_gpu);
if (!a3xx_gpu) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
index e44e45ce0714..8464d89e37f3 100644
--- a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
@@ -550,7 +550,7 @@ static const unsigned int a405_registers[] = {
static struct msm_gpu_state *a4xx_gpu_state_get(struct msm_gpu *gpu)
{
- struct msm_gpu_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct msm_gpu_state *state = kzalloc_obj(*state);
if (!state)
return ERR_PTR(-ENOMEM);
@@ -645,7 +645,7 @@ static struct msm_gpu *a4xx_gpu_init(struct drm_device *dev)
goto fail;
}
- a4xx_gpu = kzalloc_obj(*a4xx_gpu, GFP_KERNEL);
+ a4xx_gpu = kzalloc_obj(*a4xx_gpu);
if (!a4xx_gpu) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 66e6b828cb84..ef9fd6171af7 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -1570,7 +1570,7 @@ static void a5xx_gpu_state_get_hlsq_regs(struct msm_gpu *gpu,
static struct msm_gpu_state *a5xx_gpu_state_get(struct msm_gpu *gpu)
{
- struct a5xx_gpu_state *a5xx_state = kzalloc_obj(*a5xx_state, GFP_KERNEL);
+ struct a5xx_gpu_state *a5xx_state = kzalloc_obj(*a5xx_state);
bool stalled = !!(gpu_read(gpu, REG_A5XX_RBBM_STATUS3) & BIT(24));
if (!a5xx_state)
@@ -1734,7 +1734,7 @@ static struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
unsigned int nr_rings;
int ret;
- a5xx_gpu = kzalloc_obj(*a5xx_gpu, GFP_KERNEL);
+ a5xx_gpu = kzalloc_obj(*a5xx_gpu);
if (!a5xx_gpu)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index b8cc33fe7279..d6dfe6337bc3 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -2648,7 +2648,7 @@ static struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
bool is_a7xx;
int ret, nr_rings = 1;
- a6xx_gpu = kzalloc_obj(*a6xx_gpu, GFP_KERNEL);
+ a6xx_gpu = kzalloc_obj(*a6xx_gpu);
if (!a6xx_gpu)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index 40933f4d2424..2d56fe0a65b7 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -1584,7 +1584,7 @@ struct msm_gpu_state *a6xx_gpu_state_get(struct msm_gpu *gpu)
struct a6xx_crashdumper _dumper = { 0 }, *dumper = NULL;
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
- struct a6xx_gpu_state *a6xx_state = kzalloc_obj(*a6xx_state, GFP_KERNEL);
+ struct a6xx_gpu_state *a6xx_state = kzalloc_obj(*a6xx_state);
bool stalled;
if (!a6xx_state)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 39c1165c93a7..0f4921b1a892 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -887,7 +887,7 @@ static void _dpu_crtc_setup_cp_blocks(struct drm_crtc *crtc)
if (!state->gamma_lut) {
dspp->ops.setup_gc(dspp, NULL);
} else {
- gc_lut = kzalloc_obj(*gc_lut, GFP_KERNEL);
+ gc_lut = kzalloc_obj(*gc_lut);
if (!gc_lut)
continue;
_dpu_crtc_get_gc_lut(state, gc_lut);
@@ -1146,7 +1146,7 @@ end:
static void dpu_crtc_reset(struct drm_crtc *crtc)
{
- struct dpu_crtc_state *cstate = kzalloc_obj(*cstate, GFP_KERNEL);
+ struct dpu_crtc_state *cstate = kzalloc_obj(*cstate);
if (crtc->state)
dpu_crtc_destroy_state(crtc, crtc->state);
@@ -1343,7 +1343,7 @@ static int dpu_crtc_reassign_planes(struct drm_crtc *crtc, struct drm_crtc_state
if (!crtc_state->enable)
return 0;
- states = kzalloc_objs(*states, total_planes, GFP_KERNEL);
+ states = kzalloc_objs(*states, total_planes);
if (!states)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 35986cefbf8b..61d7e65469b3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -385,7 +385,7 @@ static int dpu_kms_global_obj_init(struct dpu_kms *dpu_kms)
{
struct dpu_global_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 59c44cce6753..547d084f2944 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1684,7 +1684,7 @@ static void dpu_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- pstate = kzalloc_obj(*pstate, GFP_KERNEL);
+ pstate = kzalloc_obj(*pstate);
if (!pstate) {
DPU_ERROR_PLANE(pdpu, "failed to allocate state\n");
return;
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
index 743517e29626..8bb503e0f962 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
@@ -133,7 +133,7 @@ static int mdp5_global_obj_init(struct mdp5_kms *mdp5_kms)
{
struct mdp5_global_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index 83088fd8f910..c4624a49b32f 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -89,7 +89,7 @@ static void mdp5_plane_reset(struct drm_plane *plane)
kfree(to_mdp5_plane_state(plane->state));
plane->state = NULL;
- mdp5_state = kzalloc_obj(*mdp5_state, GFP_KERNEL);
+ mdp5_state = kzalloc_obj(*mdp5_state);
if (!mdp5_state)
return;
__drm_atomic_helper_plane_reset(plane, &mdp5_state->base);
diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.c
index 60af5c02973f..d99771684728 100644
--- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.c
+++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.c
@@ -36,7 +36,7 @@ msm_disp_snapshot_state_sync(struct msm_kms *kms)
WARN_ON(!mutex_is_locked(&kms->dump_mutex));
- disp_state = kzalloc_obj(struct msm_disp_state, GFP_KERNEL);
+ disp_state = kzalloc_obj(struct msm_disp_state);
if (!disp_state)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
index fdb8ca642794..427d3ee2b833 100644
--- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
+++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
@@ -172,7 +172,7 @@ void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,
struct va_format vaf;
va_list va;
- new_blk = kzalloc_obj(struct msm_disp_state_block, GFP_KERNEL);
+ new_blk = kzalloc_obj(struct msm_disp_state_block);
if (!new_blk)
return;
diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 00c36fa75c5c..ef298c7d3e5e 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -921,7 +921,7 @@ static void _dp_ctrl_calc_tu(struct msm_dp_ctrl_private *ctrl,
uint EXTRA_PIXCLK_CYCLE_DELAY = 4;
uint HBLANK_MARGIN = 4;
- tu = kzalloc_obj(*tu, GFP_KERNEL);
+ tu = kzalloc_obj(*tu);
if (!tu)
return;
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c b/drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c
index c59c7b4c3ee0..8fb5497aac9f 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c
@@ -1400,7 +1400,7 @@ struct hdmi_hdcp_ctrl *msm_hdmi_hdcp_init(struct hdmi *hdmi)
return ERR_PTR(-EINVAL);
}
- hdcp_ctrl = kzalloc_obj(*hdcp_ctrl, GFP_KERNEL);
+ hdcp_ctrl = kzalloc_obj(*hdcp_ctrl);
if (!hdcp_ctrl)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
index 020b2f432b38..6b9265159195 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
@@ -246,7 +246,7 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
struct i2c_adapter *i2c = NULL;
int ret;
- hdmi_i2c = kzalloc_obj(*hdmi_i2c, GFP_KERNEL);
+ hdmi_i2c = kzalloc_obj(*hdmi_i2c);
if (!hdmi_i2c) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
index 785172f5d74f..1059a9b29d6a 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -76,7 +76,7 @@ static int msm_gpu_open(struct inode *inode, struct file *file)
if (!gpu || !gpu->funcs->gpu_state_get)
return -ENODEV;
- show_priv = kmalloc_obj(*show_priv, GFP_KERNEL);
+ show_priv = kmalloc_obj(*show_priv);
if (!show_priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 2fc0fa82a275..e5ab1e28851d 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -247,7 +247,7 @@ static int context_init(struct drm_device *dev, struct drm_file *file)
static atomic_t ident = ATOMIC_INIT(0);
struct msm_context *ctx;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c
index d784d1773dee..b3fdb83202ab 100644
--- a/drivers/gpu/drm/msm/msm_fb.c
+++ b/drivers/gpu/drm/msm/msm_fb.c
@@ -194,7 +194,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
goto fail;
}
- msm_fb = kzalloc_obj(*msm_fb, GFP_KERNEL);
+ msm_fb = kzalloc_obj(*msm_fb);
if (!msm_fb) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c
index eafd52f03d17..3dca8e09c192 100644
--- a/drivers/gpu/drm/msm/msm_fence.c
+++ b/drivers/gpu/drm/msm/msm_fence.c
@@ -46,7 +46,7 @@ msm_fence_context_alloc(struct drm_device *dev, volatile uint32_t *fenceptr,
struct msm_fence_context *fctx;
static int index = 0;
- fctx = kzalloc_obj(*fctx, GFP_KERNEL);
+ fctx = kzalloc_obj(*fctx);
if (!fctx)
return ERR_PTR(-ENOMEM);
@@ -176,7 +176,7 @@ msm_fence_alloc(void)
{
struct msm_fence *f;
- f = kzalloc_obj(*f, GFP_KERNEL);
+ f = kzalloc_obj(*f);
if (!f)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 5d4ab1900984..b27abaa13926 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -1215,7 +1215,7 @@ static int msm_gem_new_impl(struct drm_device *dev, uint32_t flags,
return -EINVAL;
}
- msm_obj = kzalloc_obj(*msm_obj, GFP_KERNEL);
+ msm_obj = kzalloc_obj(*msm_obj);
if (!msm_obj)
return -ENOMEM;
@@ -1301,7 +1301,7 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
msm_obj = to_msm_bo(obj);
msm_gem_lock(obj);
msm_obj->sgt = sgt;
- msm_obj->pages = kvmalloc_objs(struct page *, npages, GFP_KERNEL);
+ msm_obj->pages = kvmalloc_objs(struct page *, npages);
if (!msm_obj->pages) {
msm_gem_unlock(obj);
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c
index 3c43e27ce553..adf88cf8f41a 100644
--- a/drivers/gpu/drm/msm/msm_gem_vma.c
+++ b/drivers/gpu/drm/msm/msm_gem_vma.c
@@ -375,7 +375,7 @@ msm_gem_vma_new(struct drm_gpuvm *gpuvm, struct drm_gem_object *obj,
drm_gpuvm_resv_assert_held(&vm->base);
- vma = kzalloc_obj(*vma, GFP_KERNEL);
+ vma = kzalloc_obj(*vma);
if (!vma)
return ERR_PTR(-ENOMEM);
@@ -465,7 +465,7 @@ struct op_arg {
static int
vm_op_enqueue(struct op_arg *arg, struct msm_vm_op _op)
{
- struct msm_vm_op *op = kmalloc_obj(*op, GFP_KERNEL);
+ struct msm_vm_op *op = kmalloc_obj(*op);
if (!op)
return -ENOMEM;
@@ -819,7 +819,7 @@ msm_gem_vm_create(struct drm_device *drm, struct msm_mmu *mmu, const char *name,
if (IS_ERR(mmu))
return ERR_CAST(mmu);
- vm = kzalloc_obj(*vm, GFP_KERNEL);
+ vm = kzalloc_obj(*vm);
if (!vm)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 24f164a04f59..84d6c7f50c8d 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -346,7 +346,7 @@ static void crashstate_get_vm_logs(struct msm_gpu_state *state, struct msm_gem_v
state->nr_vm_logs = vm_log_len;
}
- state->vm_logs = kmalloc_objs(vm->log[0], state->nr_vm_logs, GFP_KERNEL);
+ state->vm_logs = kmalloc_objs(vm->log[0], state->nr_vm_logs);
if (!state->vm_logs) {
state->nr_vm_logs = 0;
}
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
index 425ae5eb9af3..7d449e5202c5 100644
--- a/drivers/gpu/drm/msm/msm_iommu.c
+++ b/drivers/gpu/drm/msm/msm_iommu.c
@@ -332,7 +332,7 @@ msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_preall
struct kmem_cache *pt_cache = get_pt_cache(mmu);
int ret;
- p->pages = kvmalloc_objs(*p->pages, p->count, GFP_KERNEL);
+ p->pages = kvmalloc_objs(*p->pages, p->count);
if (!p->pages)
return -ENOMEM;
@@ -521,7 +521,7 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent, bool kernel_m
if (WARN_ONCE(!ttbr1_cfg, "No per-process page tables"))
return ERR_PTR(-ENODEV);
- pagetable = kzalloc_obj(*pagetable, GFP_KERNEL);
+ pagetable = kzalloc_obj(*pagetable);
if (!pagetable)
return ERR_PTR(-ENOMEM);
@@ -734,7 +734,7 @@ struct msm_mmu *msm_iommu_new(struct device *dev, unsigned long quirks)
iommu_set_pgtable_quirks(domain, quirks);
- iommu = kzalloc_obj(*iommu, GFP_KERNEL);
+ iommu = kzalloc_obj(*iommu);
if (!iommu) {
iommu_domain_free(domain);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/msm_perf.c b/drivers/gpu/drm/msm/msm_perf.c
index e40f6aa5917d..7768bde6745f 100644
--- a/drivers/gpu/drm/msm/msm_perf.c
+++ b/drivers/gpu/drm/msm/msm_perf.c
@@ -204,7 +204,7 @@ int msm_perf_debugfs_init(struct drm_minor *minor)
if (priv->perf)
return 0;
- perf = kzalloc_obj(*perf, GFP_KERNEL);
+ perf = kzalloc_obj(*perf);
if (!perf)
return -ENOMEM;
diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c
index 3275ce9a4f07..8fab0b4ed8f4 100644
--- a/drivers/gpu/drm/msm/msm_rd.c
+++ b/drivers/gpu/drm/msm/msm_rd.c
@@ -245,7 +245,7 @@ static struct msm_rd_state *rd_init(struct drm_minor *minor, const char *name)
{
struct msm_rd_state *rd;
- rd = kzalloc_obj(*rd, GFP_KERNEL);
+ rd = kzalloc_obj(*rd);
if (!rd)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c
index 9540a615b7a9..30ddb5351e98 100644
--- a/drivers/gpu/drm/msm/msm_ringbuffer.c
+++ b/drivers/gpu/drm/msm/msm_ringbuffer.c
@@ -79,7 +79,7 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
/* We assume everywhere that MSM_GPU_RINGBUFFER_SZ is a power of 2 */
BUILD_BUG_ON(!is_power_of_2(MSM_GPU_RINGBUFFER_SZ));
- ring = kzalloc_obj(*ring, GFP_KERNEL);
+ ring = kzalloc_obj(*ring);
if (!ring) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c b/drivers/gpu/drm/msm/msm_submitqueue.c
index 04e4a2f2a3b0..2598d674a99d 100644
--- a/drivers/gpu/drm/msm/msm_submitqueue.c
+++ b/drivers/gpu/drm/msm/msm_submitqueue.c
@@ -151,7 +151,7 @@ get_sched_entity(struct msm_context *ctx, struct msm_ringbuffer *ring,
struct drm_gpu_scheduler *sched = &ring->sched;
int ret;
- entity = kzalloc_obj(*ctx->entities[idx], GFP_KERNEL);
+ entity = kzalloc_obj(*ctx->entities[idx]);
ret = drm_sched_entity_init(entity, sched_prio, &sched, 1, NULL);
if (ret) {
@@ -207,7 +207,7 @@ int msm_submitqueue_create(struct drm_device *drm, struct msm_context *ctx,
if (ret)
return ret;
- queue = kzalloc_obj(*queue, GFP_KERNEL);
+ queue = kzalloc_obj(*queue);
}
if (!queue)
diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c
index e6ef6e318df9..ef3250a5c54f 100644
--- a/drivers/gpu/drm/mxsfb/lcdif_kms.c
+++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c
@@ -595,7 +595,7 @@ static void lcdif_crtc_reset(struct drm_crtc *crtc)
crtc->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -609,7 +609,7 @@ lcdif_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
if (WARN_ON(!crtc->state))
return NULL;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index e8b4f272aa8c..500fd77b87d1 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1158,7 +1158,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
cli = chan->cli;
push = &chan->chan.push;
- s = kzalloc_obj(*s, GFP_KERNEL);
+ s = kzalloc_obj(*s);
if (!s)
return -ENOMEM;
@@ -1291,7 +1291,7 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num)
struct drm_plane *primary;
int ret;
- nv_crtc = kzalloc_obj(*nv_crtc, GFP_KERNEL);
+ nv_crtc = kzalloc_obj(*nv_crtc);
if (!nv_crtc)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c
index 4137e694a7b6..22f903258f96 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/dac.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c
@@ -532,7 +532,7 @@ nv04_dac_create(struct drm_connector *connector, struct dcb_output *entry)
struct drm_device *dev = connector->dev;
struct drm_encoder *encoder;
- nv_encoder = kzalloc_obj(*nv_encoder, GFP_KERNEL);
+ nv_encoder = kzalloc_obj(*nv_encoder);
if (!nv_encoder)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
index a1cfc8e562d9..c9f96ec8455d 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
@@ -697,7 +697,7 @@ nv04_dfp_create(struct drm_connector *connector, struct dcb_output *entry)
return -EINVAL;
}
- nv_encoder = kzalloc_obj(*nv_encoder, GFP_KERNEL);
+ nv_encoder = kzalloc_obj(*nv_encoder);
if (!nv_encoder)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c b/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
index 369646b00802..976ed59a86e4 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/i2c/ch7006_drv.c
@@ -444,7 +444,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
ch7006_dbg(client, "\n");
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c b/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
index 1af644b20b0b..7f402b901977 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/i2c/sil164_drv.c
@@ -399,7 +399,7 @@ sil164_encoder_init(struct i2c_client *client,
struct sil164_priv *priv;
struct i2c_client *slave_client;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
index 3ddcffe5c58e..9e1d4b353680 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
@@ -215,7 +215,7 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
return type;
/* Allocate the necessary memory */
- nv_encoder = kzalloc_obj(*nv_encoder, GFP_KERNEL);
+ nv_encoder = kzalloc_obj(*nv_encoder);
if (!nv_encoder)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 8d252e8013b6..2721a2e0c885 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -797,7 +797,7 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry)
struct drm_encoder *encoder;
struct nv17_tv_encoder *tv_enc = NULL;
- tv_enc = kzalloc_obj(*tv_enc, GFP_KERNEL);
+ tv_enc = kzalloc_obj(*tv_enc);
if (!tv_enc)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core507d.c b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
index 8997e53fd2be..46c945480522 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/core507d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
@@ -162,7 +162,7 @@ core507d_new_(const struct nv50_core_func *func, struct nouveau_drm *drm,
struct nv50_core *core;
int ret;
- if (!(core = *pcore = kzalloc_obj(*core, GFP_KERNEL)))
+ if (!(core = *pcore = kzalloc_obj(*core)))
return -ENOMEM;
core->func = func;
core->disp = disp;
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index c4c5ba876775..6c3a8712d38a 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1115,7 +1115,7 @@ nv50_msto_new(struct drm_device *dev, struct nv50_head *head, int id)
struct nv50_msto *msto;
int ret;
- msto = kzalloc_obj(*msto, GFP_KERNEL);
+ msto = kzalloc_obj(*msto);
if (!msto)
return ERR_PTR(-ENOMEM);
@@ -1267,7 +1267,7 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
struct nv50_mstc *mstc;
int ret;
- if (!(mstc = *pmstc = kzalloc_obj(*mstc, GFP_KERNEL)))
+ if (!(mstc = *pmstc = kzalloc_obj(*mstc)))
return -ENOMEM;
mstc->mstm = mstm;
mstc->port = port;
@@ -1520,7 +1520,7 @@ nv50_mstm_new(struct nouveau_encoder *outp, struct drm_dp_aux *aux, int aux_max,
struct nv50_mstm *mstm;
int ret;
- if (!(mstm = *pmstm = kzalloc_obj(*mstm, GFP_KERNEL)))
+ if (!(mstm = *pmstm = kzalloc_obj(*mstm)))
return -ENOMEM;
mstm->outp = outp;
mstm->mgr.cbs = &nv50_mstm;
@@ -2496,7 +2496,7 @@ nv50_disp_outp_atomic_add(struct nv50_atom *atom, struct drm_encoder *encoder)
return outp;
}
- outp = kzalloc_obj(*outp, GFP_KERNEL);
+ outp = kzalloc_obj(*outp);
if (!outp)
return ERR_PTR(-ENOMEM);
@@ -2643,7 +2643,7 @@ static struct drm_atomic_state *
nv50_disp_atomic_state_alloc(struct drm_device *dev)
{
struct nv50_atom *atom;
- if (!(atom = kzalloc_obj(*atom, GFP_KERNEL)) ||
+ if (!(atom = kzalloc_obj(*atom)) ||
drm_atomic_state_init(dev, &atom->state) < 0) {
kfree(atom);
return NULL;
@@ -2833,7 +2833,7 @@ nv50_display_create(struct drm_device *dev)
int ret, i;
bool has_mst = false;
- disp = kzalloc_obj(*disp, GFP_KERNEL);
+ disp = kzalloc_obj(*disp);
if (!disp)
return -ENOMEM;
@@ -2900,7 +2900,7 @@ nv50_display_create(struct drm_device *dev)
for_each_set_bit(i, &disp->disp->outp_mask, sizeof(disp->disp->outp_mask) * 8) {
struct nouveau_encoder *outp;
- outp = kzalloc_obj(*outp, GFP_KERNEL);
+ outp = kzalloc_obj(*outp);
if (!outp)
break;
@@ -2921,7 +2921,7 @@ nv50_display_create(struct drm_device *dev)
outp->base.base.possible_clones = 0;
outp->conn = nouveau_connector(connector);
- outp->dcb = kzalloc_obj(*outp->dcb, GFP_KERNEL);
+ outp->dcb = kzalloc_obj(*outp->dcb);
if (!outp->dcb)
break;
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index 3f1b3c6cc7d9..4ca7700fb784 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -470,7 +470,7 @@ nv50_head_atomic_duplicate_state(struct drm_crtc *crtc)
{
struct nv50_head_atom *armh = nv50_head_atom(crtc->state);
struct nv50_head_atom *asyh;
- if (!(asyh = kmalloc_obj(*asyh, GFP_KERNEL)))
+ if (!(asyh = kmalloc_obj(*asyh)))
return NULL;
__drm_atomic_helper_crtc_duplicate_state(crtc, &asyh->state);
asyh->wndw = armh->wndw;
@@ -496,7 +496,7 @@ nv50_head_reset(struct drm_crtc *crtc)
{
struct nv50_head_atom *asyh;
- if (WARN_ON(!(asyh = kzalloc_obj(*asyh, GFP_KERNEL))))
+ if (WARN_ON(!(asyh = kzalloc_obj(*asyh))))
return;
if (crtc->state)
@@ -577,7 +577,7 @@ nv50_head_create(struct drm_device *dev, int index)
const struct drm_crtc_funcs *funcs;
int ret;
- head = kzalloc_obj(*head, GFP_KERNEL);
+ head = kzalloc_obj(*head);
if (!head)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/nouveau/dispnv50/lut.c b/drivers/gpu/drm/nouveau/dispnv50/lut.c
index e07060917cc0..d9db2486ef6e 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/lut.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/lut.c
@@ -38,7 +38,7 @@ nv50_lut_load(struct nv50_lut *lut, int buffer, struct drm_property_blob *blob,
int i;
if (!in) {
- in = kvmalloc_objs(*in, 1024, GFP_KERNEL);
+ in = kvmalloc_objs(*in, 1024);
if (!WARN_ON(!in)) {
for (i = 0; i < 1024; i++) {
in[i].red =
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
index 54b4252f4f49..9ad4973716f7 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
@@ -80,7 +80,7 @@ nv50_wndw_ctxdma_new(struct nv50_wndw *wndw, struct drm_framebuffer *fb)
return ctxdma;
}
- if (!(ctxdma = kzalloc_obj(*ctxdma, GFP_KERNEL)))
+ if (!(ctxdma = kzalloc_obj(*ctxdma)))
return ERR_PTR(-ENOMEM);
list_add(&ctxdma->head, &wndw->ctxdma.list);
@@ -730,7 +730,7 @@ nv50_wndw_atomic_duplicate_state(struct drm_plane *plane)
{
struct nv50_wndw_atom *armw = nv50_wndw_atom(plane->state);
struct nv50_wndw_atom *asyw;
- if (!(asyw = kmalloc_obj(*asyw, GFP_KERNEL)))
+ if (!(asyw = kmalloc_obj(*asyw)))
return NULL;
__drm_atomic_helper_plane_duplicate_state(plane, &asyw->state);
asyw->sema = armw->sema;
@@ -757,7 +757,7 @@ nv50_wndw_reset(struct drm_plane *plane)
{
struct nv50_wndw_atom *asyw;
- if (WARN_ON(!(asyw = kzalloc_obj(*asyw, GFP_KERNEL))))
+ if (WARN_ON(!(asyw = kzalloc_obj(*asyw))))
return;
if (plane->state)
@@ -863,7 +863,7 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
int nformat;
int ret;
- if (!(wndw = *pwndw = kzalloc_obj(*wndw, GFP_KERNEL)))
+ if (!(wndw = *pwndw = kzalloc_obj(*wndw)))
return -ENOMEM;
wndw->func = func;
wndw->id = index;
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 8c0cfab73f8f..f9201f2e73a3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -44,7 +44,7 @@ nouveau_abi16(struct drm_file *file_priv)
struct nouveau_cli *cli = nouveau_cli(file_priv);
if (!cli->abi16) {
struct nouveau_abi16 *abi16;
- cli->abi16 = abi16 = kzalloc_obj(*abi16, GFP_KERNEL);
+ cli->abi16 = abi16 = kzalloc_obj(*abi16);
if (cli->abi16) {
abi16->cli = cli;
INIT_LIST_HEAD(&abi16->channels);
@@ -124,7 +124,7 @@ nouveau_abi16_obj_new(struct nouveau_abi16 *abi16, enum nouveau_abi16_obj_type t
if (obj)
return ERR_PTR(-EEXIST);
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
@@ -397,7 +397,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
return nouveau_abi16_put(abi16, -EINVAL);
/* allocate "abi16 channel" data and make up a handle for it */
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan)
return nouveau_abi16_put(abi16, -ENOMEM);
@@ -597,7 +597,7 @@ nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS)
if (!oclass)
return nouveau_abi16_put(abi16, -EINVAL);
- ntfy = kzalloc_obj(*ntfy, GFP_KERNEL);
+ ntfy = kzalloc_obj(*ntfy);
if (!ntfy)
return nouveau_abi16_put(abi16, -ENOMEM);
@@ -635,7 +635,7 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
if (!chan)
return nouveau_abi16_put(abi16, -ENOENT);
- ntfy = kzalloc_obj(*ntfy, GFP_KERNEL);
+ ntfy = kzalloc_obj(*ntfy);
if (!ntfy)
return nouveau_abi16_put(abi16, -ENOMEM);
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 1ddc8d1817f6..da1ee24a2531 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -314,7 +314,7 @@ nouveau_backlight_init(struct drm_connector *connector)
if (!nv_encoder)
return 0;
- bl = kzalloc_obj(*bl, GFP_KERNEL);
+ bl = kzalloc_obj(*bl);
if (!bl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 710f0551e091..3c7d2e5b3850 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -222,7 +222,7 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 domain,
return ERR_PTR(-EINVAL);
}
- nvbo = kzalloc_obj(struct nouveau_bo, GFP_KERNEL);
+ nvbo = kzalloc_obj(struct nouveau_bo);
if (!nvbo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index 5b94aa9c1d9d..598513f60449 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -149,7 +149,7 @@ nouveau_channel_prep(struct nouveau_cli *cli,
u32 target;
int ret;
- chan = *pchan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = *pchan = kzalloc_obj(*chan);
if (!chan)
return -ENOMEM;
@@ -545,7 +545,7 @@ nouveau_channels_init(struct nouveau_drm *drm)
drm->chan_nr = drm->chan_total = channels->data;
drm->runl_nr = fls64(runlists->data);
- drm->runl = kzalloc_objs(*drm->runl, drm->runl_nr, GFP_KERNEL);
+ drm->runl = kzalloc_objs(*drm->runl, drm->runl_nr);
if (!drm->runl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index a8250d04eaf4..00d4530aea71 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -232,7 +232,7 @@ nouveau_conn_atomic_duplicate_state(struct drm_connector *connector)
{
struct nouveau_conn_atom *armc = nouveau_conn_atom(connector->state);
struct nouveau_conn_atom *asyc;
- if (!(asyc = kmalloc_obj(*asyc, GFP_KERNEL)))
+ if (!(asyc = kmalloc_obj(*asyc)))
return NULL;
__drm_atomic_helper_connector_duplicate_state(connector, &asyc->state);
asyc->dither = armc->dither;
@@ -249,7 +249,7 @@ nouveau_conn_reset(struct drm_connector *connector)
struct nouveau_conn_atom *asyc;
if (drm_drv_uses_atomic_modeset(connector->dev)) {
- if (WARN_ON(!(asyc = kzalloc_obj(*asyc, GFP_KERNEL))))
+ if (WARN_ON(!(asyc = kzalloc_obj(*asyc))))
return;
if (connector->state)
@@ -1298,7 +1298,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
drm_connector_list_iter_end(&conn_iter);
- nv_connector = kzalloc_obj(*nv_connector, GFP_KERNEL);
+ nv_connector = kzalloc_obj(*nv_connector);
if (!nv_connector)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index cb7c77f5a9a8..47d5579c568d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -295,7 +295,7 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
int
nouveau_debugfs_init(struct nouveau_drm *drm)
{
- drm->debugfs = kzalloc_obj(*drm->debugfs, GFP_KERNEL);
+ drm->debugfs = kzalloc_obj(*drm->debugfs);
if (!drm->debugfs)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index ff51329c5565..d71dcfc6ee66 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -316,7 +316,7 @@ nouveau_framebuffer_new(struct drm_device *dev,
}
}
- if (!(fb = *pfb = kzalloc_obj(*fb, GFP_KERNEL)))
+ if (!(fb = *pfb = kzalloc_obj(*fb)))
return -ENOMEM;
drm_helper_mode_fill_fb_struct(dev, fb, info, mode_cmd);
@@ -646,7 +646,7 @@ nouveau_display_create(struct drm_device *dev)
struct nouveau_display *disp;
int ret;
- disp = drm->display = kzalloc_obj(*disp, GFP_KERNEL);
+ disp = drm->display = kzalloc_obj(*disp);
if (!disp)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index dbc87f8e64f9..9442ec6e1f6c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c
@@ -303,7 +303,7 @@ nouveau_dmem_chunk_alloc(struct nouveau_drm *drm, struct page **ppage,
unsigned long i, pfn_first, pfn;
int ret;
- chunk = kzalloc_obj(*chunk, GFP_KERNEL);
+ chunk = kzalloc_obj(*chunk);
if (chunk == NULL) {
ret = -ENOMEM;
goto out;
@@ -707,7 +707,7 @@ nouveau_dmem_init(struct nouveau_drm *drm)
if (drm->client.device.info.family < NV_DEVICE_INFO_V0_PASCAL)
return;
- if (!(drm->dmem = kzalloc_obj(*drm->dmem, GFP_KERNEL)))
+ if (!(drm->dmem = kzalloc_obj(*drm->dmem)))
return;
drm->dmem->drm = drm;
@@ -855,7 +855,7 @@ nouveau_dmem_migrate_vma(struct nouveau_drm *drm,
if (!args.dst)
goto out_free_src;
- dma_info = kmalloc_objs(*dma_info, max, GFP_KERNEL);
+ dma_info = kmalloc_objs(*dma_info, max);
if (!dma_info)
goto out_free_dst;
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index f5cfac289983..915f73279302 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -739,7 +739,7 @@ nouveau_drm_device_new(const struct drm_driver *drm_driver, struct device *paren
struct nouveau_drm *drm;
int ret;
- drm = kzalloc_obj(*drm, GFP_KERNEL);
+ drm = kzalloc_obj(*drm);
if (!drm)
return ERR_PTR(-ENOMEM);
@@ -1203,7 +1203,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
current->comm, pid_nr(rcu_dereference(fpriv->pid)));
rcu_read_unlock();
- if (!(cli = kzalloc_obj(*cli, GFP_KERNEL))) {
+ if (!(cli = kzalloc_obj(*cli))) {
ret = -ENOMEM;
goto done;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_exec.c b/drivers/gpu/drm/nouveau/nouveau_exec.c
index b0522e97ebb3..c01a01aee32b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_exec.c
+++ b/drivers/gpu/drm/nouveau/nouveau_exec.c
@@ -219,7 +219,7 @@ nouveau_exec_job_init(struct nouveau_exec_job **pjob,
}
}
- job = *pjob = kzalloc_obj(*job, GFP_KERNEL);
+ job = *pjob = kzalloc_obj(*job);
if (!job)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 6af37c49913f..903d326927ca 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -408,7 +408,7 @@ nouveau_fence_create(struct nouveau_fence **pfence,
if (unlikely(!chan->fence))
return -ENODEV;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 2ef7cb01a0c9..82621ede42e1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -168,7 +168,7 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma)
return;
}
- if (!(work = kmalloc_obj(*work, GFP_KERNEL))) {
+ if (!(work = kmalloc_obj(*work))) {
WARN_ON(dma_fence_wait_timeout(fence, false, 2 * HZ) <= 0);
nouveau_gem_object_delete(vma);
return;
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index a0f018380744..726397ab035d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -678,7 +678,7 @@ nouveau_hwmon_init(struct drm_device *dev)
return 0;
}
- hwmon = drm->hwmon = kzalloc_obj(*hwmon, GFP_KERNEL);
+ hwmon = drm->hwmon = kzalloc_obj(*hwmon);
if (!hwmon)
return -ENOMEM;
hwmon->dev = dev;
diff --git a/drivers/gpu/drm/nouveau/nouveau_led.c b/drivers/gpu/drm/nouveau/nouveau_led.c
index 87397fe57021..19e2110904d1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_led.c
+++ b/drivers/gpu/drm/nouveau/nouveau_led.c
@@ -89,7 +89,7 @@ nouveau_led_init(struct drm_device *dev)
if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, &logo_led))
return 0;
- drm->led = kzalloc_obj(*drm->led, GFP_KERNEL);
+ drm->led = kzalloc_obj(*drm->led);
if (!drm->led)
return -ENOMEM;
drm->led->dev = dev;
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index b370158ba3f7..b26c521166f1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -176,7 +176,7 @@ nouveau_mem_new(struct nouveau_drm *drm, u8 kind, u8 comp,
{
struct nouveau_mem *mem;
- if (!(mem = kzalloc_obj(*mem, GFP_KERNEL)))
+ if (!(mem = kzalloc_obj(*mem)))
return -ENOMEM;
mem->drm = drm;
diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c b/drivers/gpu/drm/nouveau/nouveau_sched.c
index 402ef5e95ad7..9bd3dc16a467 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sched.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sched.c
@@ -467,7 +467,7 @@ nouveau_sched_create(struct nouveau_sched **psched, struct nouveau_drm *drm,
struct nouveau_sched *sched;
int ret;
- sched = kzalloc_obj(*sched, GFP_KERNEL);
+ sched = kzalloc_obj(*sched);
if (!sched)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
index a22483f68a7c..fa3b4ebf38a8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
@@ -79,7 +79,7 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags)
else
caching = ttm_cached;
- nvbe = kzalloc_obj(*nvbe, GFP_KERNEL);
+ nvbe = kzalloc_obj(*nvbe);
if (!nvbe)
return NULL;
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
index 947601a8955b..72d7290a4394 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -223,7 +223,7 @@ nouveau_svmm_join(struct nouveau_svmm *svmm, u64 inst)
{
struct nouveau_ivmm *ivmm;
if (svmm) {
- if (!(ivmm = kmalloc_obj(*ivmm, GFP_KERNEL)))
+ if (!(ivmm = kmalloc_obj(*ivmm)))
return -ENOMEM;
ivmm->svmm = svmm;
ivmm->inst = inst;
@@ -326,7 +326,7 @@ nouveau_svmm_init(struct drm_device *dev, void *data,
return -ENOSYS;
/* Allocate tracking for SVM-enabled VMM. */
- if (!(svmm = kzalloc_obj(*svmm, GFP_KERNEL)))
+ if (!(svmm = kzalloc_obj(*svmm)))
return -ENOMEM;
svmm->vmm = &cli->svm;
svmm->unmanaged.start = args->unmanaged_addr;
@@ -475,7 +475,7 @@ nouveau_svm_fault_cache(struct nouveau_svm *svm,
nvif_mask(memory, offset + 0x1c, 0x80000000, 0x00000000);
if (!buffer->fault[buffer->fault_nr]) {
- fault = kmalloc_obj(*fault, GFP_KERNEL);
+ fault = kmalloc_obj(*fault);
if (WARN_ON(!fault)) {
nouveau_svm_fault_cancel(svm, inst, hub, gpc, client);
return;
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 89216d0a8e7e..ad01f922aa86 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -181,7 +181,7 @@ static int
nouveau_ttm_init_vram(struct nouveau_drm *drm)
{
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
- struct ttm_resource_manager *man = kzalloc_obj(*man, GFP_KERNEL);
+ struct ttm_resource_manager *man = kzalloc_obj(*man);
if (!man)
return -ENOMEM;
@@ -229,7 +229,7 @@ nouveau_ttm_init_gtt(struct nouveau_drm *drm)
return ttm_range_man_init(&drm->ttm.bdev, TTM_PL_TT, true,
size_pages);
- man = kzalloc_obj(*man, GFP_KERNEL);
+ man = kzalloc_obj(*man);
if (!man)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
index caa26db2b04b..36445915aa58 100644
--- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
@@ -218,7 +218,7 @@ nouveau_uvma_unmap(struct nouveau_uvma *uvma)
static int
nouveau_uvma_alloc(struct nouveau_uvma **puvma)
{
- *puvma = kzalloc_obj(**puvma, GFP_KERNEL);
+ *puvma = kzalloc_obj(**puvma);
if (!*puvma)
return -ENOMEM;
@@ -246,7 +246,7 @@ nouveau_uvma_gem_put(struct nouveau_uvma *uvma)
static int
nouveau_uvma_region_alloc(struct nouveau_uvma_region **preg)
{
- *preg = kzalloc_obj(**preg, GFP_KERNEL);
+ *preg = kzalloc_obj(**preg);
if (!*preg)
return -ENOMEM;
@@ -1020,7 +1020,7 @@ nouveau_uvmm_validate_range(struct nouveau_uvmm *uvmm, u64 addr, u64 range)
static int
nouveau_uvmm_bind_job_alloc(struct nouveau_uvmm_bind_job **pjob)
{
- *pjob = kzalloc_obj(**pjob, GFP_KERNEL);
+ *pjob = kzalloc_obj(**pjob);
if (!*pjob)
return -ENOMEM;
@@ -1618,7 +1618,7 @@ bind_job_op_from_uop(struct bind_job_op **pop,
{
struct bind_job_op *op;
- op = *pop = kzalloc_obj(*op, GFP_KERNEL);
+ op = *pop = kzalloc_obj(*op);
if (!op)
return -ENOMEM;
@@ -1911,7 +1911,7 @@ nouveau_uvmm_ioctl_vm_init(struct drm_device *dev,
goto out_unlock;
}
- uvmm = kzalloc_obj(*uvmm, GFP_KERNEL);
+ uvmm = kzalloc_obj(*uvmm);
if (!uvmm) {
ret = -ENOMEM;
goto out_unlock;
diff --git a/drivers/gpu/drm/nouveau/nouveau_vmm.c b/drivers/gpu/drm/nouveau/nouveau_vmm.c
index a5e8efc3042c..5812f27bfecf 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vmm.c
@@ -87,7 +87,7 @@ nouveau_vma_new(struct nouveau_bo *nvbo, struct nouveau_vmm *vmm,
return 0;
}
- if (!(vma = *pvma = kmalloc_obj(*vma, GFP_KERNEL)))
+ if (!(vma = *pvma = kmalloc_obj(*vma)))
return -ENOMEM;
vma->vmm = vmm;
vma->refs = 1;
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c
index 7fa9eede7c5d..a640430944ee 100644
--- a/drivers/gpu/drm/nouveau/nv04_fence.c
+++ b/drivers/gpu/drm/nouveau/nv04_fence.c
@@ -76,7 +76,7 @@ nv04_fence_context_del(struct nouveau_channel *chan)
static int
nv04_fence_context_new(struct nouveau_channel *chan)
{
- struct nv04_fence_chan *fctx = kzalloc_obj(*fctx, GFP_KERNEL);
+ struct nv04_fence_chan *fctx = kzalloc_obj(*fctx);
if (fctx) {
nouveau_fence_context_new(chan, &fctx->base);
fctx->base.emit = nv04_fence_emit;
@@ -101,7 +101,7 @@ nv04_fence_create(struct nouveau_drm *drm)
{
struct nv04_fence_priv *priv;
- priv = drm->fence = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = drm->fence = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c
index 0f859251d9db..6e88050f41fb 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -70,7 +70,7 @@ nv10_fence_context_new(struct nouveau_channel *chan)
{
struct nv10_fence_chan *fctx;
- fctx = chan->fence = kzalloc_obj(*fctx, GFP_KERNEL);
+ fctx = chan->fence = kzalloc_obj(*fctx);
if (!fctx)
return -ENOMEM;
@@ -96,7 +96,7 @@ nv10_fence_create(struct nouveau_drm *drm)
{
struct nv10_fence_priv *priv;
- priv = drm->fence = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = drm->fence = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nv17_fence.c b/drivers/gpu/drm/nouveau/nv17_fence.c
index 56682cb03d81..1e1a01699935 100644
--- a/drivers/gpu/drm/nouveau/nv17_fence.c
+++ b/drivers/gpu/drm/nouveau/nv17_fence.c
@@ -83,7 +83,7 @@ nv17_fence_context_new(struct nouveau_channel *chan)
u32 limit = start + priv->bo->bo.base.size - 1;
int ret = 0;
- fctx = chan->fence = kzalloc_obj(*fctx, GFP_KERNEL);
+ fctx = chan->fence = kzalloc_obj(*fctx);
if (!fctx)
return -ENOMEM;
@@ -120,7 +120,7 @@ nv17_fence_create(struct nouveau_drm *drm)
struct nv10_fence_priv *priv;
int ret = 0;
- priv = drm->fence = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = drm->fence = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nv50_fence.c b/drivers/gpu/drm/nouveau/nv50_fence.c
index d64c070fe48b..2dd0ef4e6497 100644
--- a/drivers/gpu/drm/nouveau/nv50_fence.c
+++ b/drivers/gpu/drm/nouveau/nv50_fence.c
@@ -42,7 +42,7 @@ nv50_fence_context_new(struct nouveau_channel *chan)
u32 limit = start + priv->bo->bo.base.size - 1;
int ret;
- fctx = chan->fence = kzalloc_obj(*fctx, GFP_KERNEL);
+ fctx = chan->fence = kzalloc_obj(*fctx);
if (!fctx)
return -ENOMEM;
@@ -71,7 +71,7 @@ nv50_fence_create(struct nouveau_drm *drm)
struct nv10_fence_priv *priv;
int ret = 0;
- priv = drm->fence = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = drm->fence = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c
index 7a2ad00870af..6e5eb279b3a8 100644
--- a/drivers/gpu/drm/nouveau/nv84_fence.c
+++ b/drivers/gpu/drm/nouveau/nv84_fence.c
@@ -131,7 +131,7 @@ nv84_fence_context_new(struct nouveau_channel *chan)
struct nv84_fence_chan *fctx;
int ret;
- fctx = chan->fence = kzalloc_obj(*fctx, GFP_KERNEL);
+ fctx = chan->fence = kzalloc_obj(*fctx);
if (!fctx)
return -ENOMEM;
@@ -198,7 +198,7 @@ nv84_fence_create(struct nouveau_drm *drm)
u32 domain;
int ret;
- priv = drm->fence = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = drm->fence = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvif/fifo.c b/drivers/gpu/drm/nouveau/nvif/fifo.c
index b42fc34cb5ce..59b3ba3265fe 100644
--- a/drivers/gpu/drm/nouveau/nvif/fifo.c
+++ b/drivers/gpu/drm/nouveau/nvif/fifo.c
@@ -36,7 +36,7 @@ nvif_fifo_runlists(struct nvif_device *device)
if (device->runlist)
return 0;
- if (!(a = kmalloc_obj(*a, GFP_KERNEL)))
+ if (!(a = kmalloc_obj(*a)))
return -ENOMEM;
a->m.version = 1;
a->m.count = sizeof(a->v) / sizeof(a->v.runlists);
diff --git a/drivers/gpu/drm/nouveau/nvif/mmu.c b/drivers/gpu/drm/nouveau/nvif/mmu.c
index eaa96608a264..e1e902750991 100644
--- a/drivers/gpu/drm/nouveau/nvif/mmu.c
+++ b/drivers/gpu/drm/nouveau/nvif/mmu.c
@@ -69,12 +69,12 @@ nvif_mmu_ctor(struct nvif_object *parent, const char *name, s32 oclass,
goto done;
mmu->mem = mems[ret].oclass;
- mmu->heap = kmalloc_objs(*mmu->heap, mmu->heap_nr, GFP_KERNEL);
- mmu->type = kmalloc_objs(*mmu->type, mmu->type_nr, GFP_KERNEL);
+ mmu->heap = kmalloc_objs(*mmu->heap, mmu->heap_nr);
+ mmu->type = kmalloc_objs(*mmu->type, mmu->type_nr);
if (ret = -ENOMEM, !mmu->heap || !mmu->type)
goto done;
- mmu->kind = kmalloc_objs(*mmu->kind, mmu->kind_nr, GFP_KERNEL);
+ mmu->kind = kmalloc_objs(*mmu->kind, mmu->kind_nr);
if (!mmu->kind && mmu->kind_nr)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nvif/object.c b/drivers/gpu/drm/nouveau/nvif/object.c
index 93ad63f9021f..6d5018a5e93c 100644
--- a/drivers/gpu/drm/nouveau/nvif/object.c
+++ b/drivers/gpu/drm/nouveau/nvif/object.c
@@ -81,7 +81,7 @@ nvif_object_sclass_get(struct nvif_object *object, struct nvif_sclass **psclass)
return ret;
}
- *psclass = kzalloc_objs(**psclass, args->sclass.count, GFP_KERNEL);
+ *psclass = kzalloc_objs(**psclass, args->sclass.count);
if (*psclass) {
for (i = 0; i < args->sclass.count; i++) {
(*psclass)[i].oclass = args->sclass.oclass[i].oclass;
diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c
index 567cacc04989..8cf4775a0a1e 100644
--- a/drivers/gpu/drm/nouveau/nvif/outp.c
+++ b/drivers/gpu/drm/nouveau/nvif/outp.c
@@ -438,7 +438,7 @@ nvif_outp_edid_get(struct nvif_outp *outp, u8 **pedid)
struct nvif_outp_edid_get_v0 *args;
int ret;
- args = kmalloc_obj(*args, GFP_KERNEL);
+ args = kmalloc_obj(*args);
if (!args)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvif/vmm.c b/drivers/gpu/drm/nouveau/nvif/vmm.c
index 15e5f423c680..65c3e883b119 100644
--- a/drivers/gpu/drm/nouveau/nvif/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvif/vmm.c
@@ -234,7 +234,7 @@ nvif_vmm_ctor(struct nvif_mmu *mmu, const char *name, s32 oclass,
vmm->limit = args->size;
vmm->page_nr = args->page_nr;
- vmm->page = kmalloc_objs(*vmm->page, vmm->page_nr, GFP_KERNEL);
+ vmm->page = kmalloc_objs(*vmm->page, vmm->page_nr);
if (!vmm->page) {
ret = -ENOMEM;
goto done;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/client.c b/drivers/gpu/drm/nouveau/nvkm/core/client.c
index 637fa5f89dc7..9590834d3777 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/client.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/client.c
@@ -109,7 +109,7 @@ nvkm_client_new(const char *name, u64 device, const char *cfg, const char *dbg,
struct nvkm_oclass oclass = { .base = nvkm_uclient_sclass };
struct nvkm_client *client;
- if (!(client = *pclient = kzalloc_obj(*client, GFP_KERNEL)))
+ if (!(client = *pclient = kzalloc_obj(*client)))
return -ENOMEM;
oclass.client = client;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/engine.c b/drivers/gpu/drm/nouveau/nvkm/core/engine.c
index 1b94e0aa0f28..b1453bc4ad79 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/engine.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/engine.c
@@ -183,7 +183,7 @@ nvkm_engine_new_(const struct nvkm_engine_func *func, struct nvkm_device *device
enum nvkm_subdev_type type, int inst, bool enable,
struct nvkm_engine **pengine)
{
- if (!(*pengine = kzalloc_obj(**pengine, GFP_KERNEL)))
+ if (!(*pengine = kzalloc_obj(**pengine)))
return -ENOMEM;
return nvkm_engine_ctor(func, device, type, inst, enable, *pengine);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
index a81eddf777ba..8916e31ee210 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
@@ -232,7 +232,7 @@ nvkm_gpuobj_new(struct nvkm_device *device, u32 size, int align, bool zero,
struct nvkm_gpuobj *gpuobj;
int ret;
- if (!(gpuobj = *pgpuobj = kzalloc_obj(*gpuobj, GFP_KERNEL)))
+ if (!(gpuobj = *pgpuobj = kzalloc_obj(*gpuobj)))
return -ENOMEM;
ret = nvkm_gpuobj_ctor(device, size, align, zero, parent, gpuobj);
@@ -249,7 +249,7 @@ nvkm_gpuobj_new(struct nvkm_device *device, u32 size, int align, bool zero,
int
nvkm_gpuobj_wrap(struct nvkm_memory *memory, struct nvkm_gpuobj **pgpuobj)
{
- if (!(*pgpuobj = kzalloc_obj(**pgpuobj, GFP_KERNEL)))
+ if (!(*pgpuobj = kzalloc_obj(**pgpuobj)))
return -ENOMEM;
(*pgpuobj)->addr = nvkm_memory_addr(memory);
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/intr.c b/drivers/gpu/drm/nouveau/nvkm/core/intr.c
index a58de178cdf6..f31aca949e2c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/intr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/intr.c
@@ -239,8 +239,8 @@ nvkm_intr_add(const struct nvkm_intr_func *func, const struct nvkm_intr_data *da
intr->data = data;
intr->subdev = subdev;
intr->leaves = leaves;
- intr->stat = kzalloc_objs(*intr->stat, leaves, GFP_KERNEL);
- intr->mask = kzalloc_objs(*intr->mask, leaves, GFP_KERNEL);
+ intr->stat = kzalloc_objs(*intr->stat, leaves);
+ intr->mask = kzalloc_objs(*intr->mask, leaves);
if (!intr->stat || !intr->mask) {
kfree(intr->stat);
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/memory.c b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
index bf69467e44da..548df7b76f02 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/memory.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
@@ -69,7 +69,7 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct nvkm_device *device,
return 0;
}
- if (!(tags = kmalloc_obj(*tags, GFP_KERNEL))) {
+ if (!(tags = kmalloc_obj(*tags))) {
mutex_unlock(&fb->tags.mutex);
return -ENOMEM;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/mm.c b/drivers/gpu/drm/nouveau/nvkm/core/mm.c
index bd47502d82ae..cc32003086a0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/mm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/mm.c
@@ -90,7 +90,7 @@ region_head(struct nvkm_mm *mm, struct nvkm_mm_node *a, u32 size)
if (a->length == size)
return a;
- b = kmalloc_obj(*b, GFP_KERNEL);
+ b = kmalloc_obj(*b);
if (unlikely(b == NULL))
return NULL;
@@ -165,7 +165,7 @@ region_tail(struct nvkm_mm *mm, struct nvkm_mm_node *a, u32 size)
if (a->length == size)
return a;
- b = kmalloc_obj(*b, GFP_KERNEL);
+ b = kmalloc_obj(*b);
if (unlikely(b == NULL))
return NULL;
@@ -247,7 +247,7 @@ nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block)
next = prev->offset + prev->length;
if (next != offset) {
BUG_ON(next > offset);
- if (!(node = kzalloc_obj(*node, GFP_KERNEL)))
+ if (!(node = kzalloc_obj(*node)))
return -ENOMEM;
node->type = NVKM_MM_TYPE_HOLE;
node->offset = next;
@@ -262,7 +262,7 @@ nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block)
mm->heap_nodes = 0;
}
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/object.c b/drivers/gpu/drm/nouveau/nvkm/core/object.c
index 6e84cf72bfc8..d2f827b9a435 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/object.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/object.c
@@ -290,7 +290,7 @@ nvkm_object_new_(const struct nvkm_object_func *func,
struct nvkm_object **pobject)
{
if (size == 0) {
- if (!(*pobject = kzalloc_obj(**pobject, GFP_KERNEL)))
+ if (!(*pobject = kzalloc_obj(**pobject)))
return -ENOMEM;
nvkm_object_ctor(func, oclass, *pobject);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/oproxy.c b/drivers/gpu/drm/nouveau/nvkm/core/oproxy.c
index bfa9821b3ac4..27406ac3171a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/oproxy.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/oproxy.c
@@ -178,7 +178,7 @@ int
nvkm_oproxy_new_(const struct nvkm_oproxy_func *func,
const struct nvkm_oclass *oclass, struct nvkm_oproxy **poproxy)
{
- if (!(*poproxy = kzalloc_obj(**poproxy, GFP_KERNEL)))
+ if (!(*poproxy = kzalloc_obj(**poproxy)))
return -ENOMEM;
nvkm_oproxy_ctor(func, oclass, *poproxy);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
index 97f5db788ba6..aab5a73f467a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
@@ -280,7 +280,7 @@ int
nvkm_subdev_new_(const struct nvkm_subdev_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_subdev **psubdev)
{
- if (!(*psubdev = kzalloc_obj(**psubdev, GFP_KERNEL)))
+ if (!(*psubdev = kzalloc_obj(**psubdev)))
return -ENOMEM;
nvkm_subdev_ctor(func, device, type, inst, *psubdev);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/uevent.c b/drivers/gpu/drm/nouveau/nvkm/core/uevent.c
index 5295b2b920e6..81ab29fffbf4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/uevent.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/uevent.c
@@ -144,7 +144,7 @@ nvkm_uevent_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
if (argc < sizeof(args->v0) || args->v0.version != 0)
return -ENOSYS;
- if (!(uevent = kzalloc_obj(*uevent, GFP_KERNEL)))
+ if (!(uevent = kzalloc_obj(*uevent)))
return -ENOMEM;
*pobject = &uevent->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
index 4d09157fd7c0..f2e9a06263ce 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
@@ -194,7 +194,7 @@ nvkm_control_new(struct nvkm_device *device, const struct nvkm_oclass *oclass,
{
struct nvkm_control *ctrl;
- if (!(ctrl = kzalloc_obj(*ctrl, GFP_KERNEL)))
+ if (!(ctrl = kzalloc_obj(*ctrl)))
return -ENOMEM;
*pobject = &ctrl->object;
ctrl->device = device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c
index 1e7b4a455049..248623b91e29 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c
@@ -1688,7 +1688,7 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
pcid++;
}
- if (!(pdev = kzalloc_obj(*pdev, GFP_KERNEL))) {
+ if (!(pdev = kzalloc_obj(*pdev))) {
pci_disable_device(pci_dev);
return -ENOMEM;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index d49d92fa4648..46bb55a1f565 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -253,7 +253,7 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
unsigned long rate;
int ret;
- if (!(tdev = kzalloc_obj(*tdev, GFP_KERNEL)))
+ if (!(tdev = kzalloc_obj(*tdev)))
return -ENOMEM;
tdev->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
index 7dea6bf31b10..23d11d8221cb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
@@ -327,7 +327,7 @@ nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size,
struct nvkm_client *client = oclass->client;
struct nvkm_udevice *udev;
- if (!(udev = kzalloc_obj(*udev, GFP_KERNEL)))
+ if (!(udev = kzalloc_obj(*udev)))
return -ENOMEM;
nvkm_object_ctor(&nvkm_udevice, oclass, &udev->object);
*pobject = &udev->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
index d25ef27ccf5d..d44c4316a578 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
@@ -232,7 +232,7 @@ nvkm_disp_new_(const struct nvkm_disp_func *func, struct nvkm_device *device,
struct nvkm_disp *disp;
int ret;
- if (!(disp = *pdisp = kzalloc_obj(**pdisp, GFP_KERNEL)))
+ if (!(disp = *pdisp = kzalloc_obj(**pdisp)))
return -ENOMEM;
disp->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c
index 9b7148ce8d1b..a8f72abbb371 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c
@@ -86,7 +86,7 @@ nvkm_disp_chan_child_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
struct nvkm_disp_chan_object *object;
int ret;
- if (!(object = kzalloc_obj(*object, GFP_KERNEL)))
+ if (!(object = kzalloc_obj(*object)))
return -ENOMEM;
nvkm_oproxy_ctor(&nvkm_disp_chan_child_func_, oclass, &object->oproxy);
object->disp = disp;
@@ -195,7 +195,7 @@ nvkm_disp_chan_new_(struct nvkm_disp *disp, int nr, const struct nvkm_oclass *oc
if (args->v0.id >= nr || !args->v0.pushbuf != !user->func->push)
return -EINVAL;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
*pobject = &chan->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c
index e4cfb172c383..e4e238aa514b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c
@@ -78,7 +78,7 @@ int
nvkm_conn_new(struct nvkm_disp *disp, int index, struct nvbios_connE *info,
struct nvkm_conn **pconn)
{
- if (!(*pconn = kzalloc_obj(**pconn, GFP_KERNEL)))
+ if (!(*pconn = kzalloc_obj(**pconn)))
return -ENOMEM;
nvkm_conn_ctor(disp, index, info, *pconn);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c
index bf79076081f6..dbd984da7501 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c
@@ -822,7 +822,7 @@ gv100_disp_caps_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
struct nvkm_disp *disp = nvkm_udisp(oclass->parent);
struct gv100_disp_caps *caps;
- if (!(caps = kzalloc_obj(*caps, GFP_KERNEL)))
+ if (!(caps = kzalloc_obj(*caps)))
return -ENOMEM;
*pobject = &caps->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c
index ffe2ec55a15a..c70cbbe418a3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c
@@ -56,7 +56,7 @@ nvkm_head_new_(const struct nvkm_head_func *func,
struct nvkm_disp *disp, int id)
{
struct nvkm_head *head;
- if (!(head = kzalloc_obj(*head, GFP_KERNEL)))
+ if (!(head = kzalloc_obj(*head)))
return -ENOMEM;
head->func = func;
head->disp = disp;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c
index d680ef5355a3..36bce3f75a57 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c
@@ -58,7 +58,7 @@ nvkm_ior_new_(const struct nvkm_ior_func *func, struct nvkm_disp *disp,
enum nvkm_ior_type type, int id, bool hda)
{
struct nvkm_ior *ior;
- if (!(ior = kzalloc_obj(*ior, GFP_KERNEL)))
+ if (!(ior = kzalloc_obj(*ior)))
return -ENOMEM;
ior->func = func;
ior->disp = disp;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
index c61453db7597..5360b4e223af 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
@@ -379,7 +379,7 @@ nvkm_outp_new_(const struct nvkm_outp_func *func, struct nvkm_disp *disp,
enum nvkm_ior_proto proto;
enum nvkm_ior_type type;
- if (!(outp = *poutp = kzalloc_obj(*outp, GFP_KERNEL)))
+ if (!(outp = *poutp = kzalloc_obj(*outp)))
return -ENOMEM;
outp->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c
index 8fcc4c587a28..151da7a0a6ea 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c
@@ -108,7 +108,7 @@ nvkm_dma_new_(const struct nvkm_dma_func *func, struct nvkm_device *device,
{
struct nvkm_dma *dma;
- if (!(dma = *pdma = kzalloc_obj(*dma, GFP_KERNEL)))
+ if (!(dma = *pdma = kzalloc_obj(*dma)))
return -ENOMEM;
dma->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf100.c
index 2c1b14f93fb2..dccf53585c0b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf100.c
@@ -78,7 +78,7 @@ gf100_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
u32 kind, user, unkn;
int ret;
- if (!(dmaobj = kzalloc_obj(*dmaobj, GFP_KERNEL)))
+ if (!(dmaobj = kzalloc_obj(*dmaobj)))
return -ENOMEM;
*pdmaobj = &dmaobj->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf119.c
index c16449eb3c95..89f707ac1657 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf119.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergf119.c
@@ -76,7 +76,7 @@ gf119_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
u32 kind, page;
int ret;
- if (!(dmaobj = kzalloc_obj(*dmaobj, GFP_KERNEL)))
+ if (!(dmaobj = kzalloc_obj(*dmaobj)))
return -ENOMEM;
*pdmaobj = &dmaobj->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergv100.c
index 982ee81fd2bc..1b65a6aa31d7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergv100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usergv100.c
@@ -75,7 +75,7 @@ gv100_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
u32 kind, page;
int ret;
- if (!(dmaobj = kzalloc_obj(*dmaobj, GFP_KERNEL)))
+ if (!(dmaobj = kzalloc_obj(*dmaobj)))
return -ENOMEM;
*pdmaobj = &dmaobj->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
index fcc87163c2d6..2201ca225fe1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
@@ -85,7 +85,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
struct nv04_dmaobj *dmaobj;
int ret;
- if (!(dmaobj = kzalloc_obj(*dmaobj, GFP_KERNEL)))
+ if (!(dmaobj = kzalloc_obj(*dmaobj)))
return -ENOMEM;
*pdmaobj = &dmaobj->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c
index 5cf0986c7944..e12c9544a856 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c
@@ -78,7 +78,7 @@ nv50_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
u32 user, part, comp, kind;
int ret;
- if (!(dmaobj = kzalloc_obj(*dmaobj, GFP_KERNEL)))
+ if (!(dmaobj = kzalloc_obj(*dmaobj)))
return -ENOMEM;
*pdmaobj = &dmaobj->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
index bf6a225f5673..fa34c223a46f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
@@ -341,7 +341,7 @@ nvkm_falcon_new_(const struct nvkm_falcon_func *func, struct nvkm_device *device
{
struct nvkm_falcon *falcon;
- if (!(falcon = kzalloc_obj(*falcon, GFP_KERNEL)))
+ if (!(falcon = kzalloc_obj(*falcon)))
return -ENOMEM;
falcon->func = func;
falcon->addr = addr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
index 7dad0bf10631..9dd924694306 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
@@ -377,7 +377,7 @@ nvkm_fifo_new_(const struct nvkm_fifo_func *func, struct nvkm_device *device,
{
struct nvkm_fifo *fifo;
- if (!(fifo = *pfifo = kzalloc_obj(*fifo, GFP_KERNEL)))
+ if (!(fifo = *pfifo = kzalloc_obj(*fifo)))
return -ENOMEM;
fifo->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c
index 2b852341d8f4..7e2d5711a1cb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c
@@ -69,7 +69,7 @@ nvkm_cgrp_ectx_get(struct nvkm_cgrp *cgrp, struct nvkm_engn *engn, struct nvkm_e
/* Nope - create a fresh one. */
CGRP_TRACE(cgrp, "ctor ectx %d[%s]", engn->id, engn->engine->subdev.name);
- if (!(ectx = *pectx = kzalloc_obj(*ectx, GFP_KERNEL)))
+ if (!(ectx = *pectx = kzalloc_obj(*ectx)))
return -ENOMEM;
ectx->engn = engn;
@@ -141,7 +141,7 @@ nvkm_cgrp_vctx_get(struct nvkm_cgrp *cgrp, struct nvkm_engn *engn, struct nvkm_c
/* Now, create the sub-context. */
CGRP_TRACE(cgrp, "ctor vctx %d[%s]", engn->id, engn->engine->subdev.name);
- if (!(vctx = *pvctx = kzalloc_obj(*vctx, GFP_KERNEL))) {
+ if (!(vctx = *pvctx = kzalloc_obj(*vctx))) {
nvkm_cgrp_ectx_put(cgrp, &ectx);
return -ENOMEM;
}
@@ -224,7 +224,7 @@ nvkm_cgrp_new(struct nvkm_runl *runl, const char *name, struct nvkm_vmm *vmm, bo
{
struct nvkm_cgrp *cgrp;
- if (!(cgrp = *pcgrp = kmalloc_obj(*cgrp, GFP_KERNEL)))
+ if (!(cgrp = *pcgrp = kmalloc_obj(*cgrp)))
return -ENOMEM;
cgrp->func = runl->fifo->func->cgrp.func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c
index 0c6a5220ef80..418a8918bcb8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c
@@ -117,7 +117,7 @@ nvkm_chan_cctx_get(struct nvkm_chan *chan, struct nvkm_engn *engn, struct nvkm_c
/* Now, create the channel context - to track engine binding. */
CHAN_TRACE(chan, "ctor cctx %d[%s]", engn->id, engn->engine->subdev.name);
- if (!(cctx = *pcctx = kzalloc_obj(*cctx, GFP_KERNEL))) {
+ if (!(cctx = *pcctx = kzalloc_obj(*cctx))) {
nvkm_cgrp_vctx_put(cgrp, &vctx);
ret = -ENOMEM;
goto done;
@@ -367,7 +367,7 @@ nvkm_chan_new_(const struct nvkm_chan_func *func, struct nvkm_runl *runl, int ru
return -EINVAL;
}
- if (!(chan = *pchan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = *pchan = kzalloc_obj(*chan)))
return -ENOMEM;
chan->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c
index 42e49781eb21..2092521053ef 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c
@@ -349,7 +349,7 @@ nvkm_runl_add(struct nvkm_runl *runl, int engi, const struct nvkm_engn_func *fun
return NULL;
}
- if (!(engn = kzalloc_obj(*engn, GFP_KERNEL)))
+ if (!(engn = kzalloc_obj(*engn)))
return NULL;
engn->func = func;
@@ -398,7 +398,7 @@ nvkm_runl_new(struct nvkm_fifo *fifo, int runi, u32 addr, int id_nr)
struct nvkm_runl *runl;
int ret;
- if (!(runl = kzalloc_obj(*runl, GFP_KERNEL)))
+ if (!(runl = kzalloc_obj(*runl)))
return ERR_PTR(-ENOMEM);
runl->func = fifo->func->runl;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c
index e26e0f093755..cc000adbcaf0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c
@@ -34,7 +34,7 @@ nvkm_runq_new(struct nvkm_fifo *fifo, int pbid)
{
struct nvkm_runq *runq;
- if (!(runq = kzalloc_obj(*runq, GFP_KERNEL)))
+ if (!(runq = kzalloc_obj(*runq)))
return NULL;
runq->func = fifo->func->runq;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c
index cea98ea25178..dfa3c7dbdf34 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c
@@ -104,7 +104,7 @@ nvkm_ucgrp_new(struct nvkm_fifo *fifo, const struct nvkm_oclass *oclass, void *a
return PTR_ERR(vmm);
/* Allocate channel group. */
- if (!(ucgrp = kzalloc_obj(*ucgrp, GFP_KERNEL))) {
+ if (!(ucgrp = kzalloc_obj(*ucgrp))) {
ret = -ENOMEM;
goto done;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c
index f986dbd14f73..d6a87cec2150 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c
@@ -166,7 +166,7 @@ nvkm_uchan_object_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
return -EINVAL;
/* Allocate SW object. */
- if (!(uobj = kzalloc_obj(*uobj, GFP_KERNEL)))
+ if (!(uobj = kzalloc_obj(*uobj)))
return -ENOMEM;
nvkm_oproxy_ctor(&nvkm_uchan_object, oclass, &uobj->oproxy);
@@ -375,7 +375,7 @@ nvkm_uchan_new(struct nvkm_fifo *fifo, struct nvkm_cgrp *cgrp, const struct nvkm
}
/* Allocate channel. */
- if (!(uchan = kzalloc_obj(*uchan, GFP_KERNEL))) {
+ if (!(uchan = kzalloc_obj(*uchan))) {
ret = -ENOMEM;
goto done;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
index 910ca0d4aa0f..c2a9dd9018b8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -285,7 +285,7 @@ gf100_gr_object_new(const struct nvkm_oclass *oclass, void *data, u32 size,
struct gf100_gr_chan *chan = gf100_gr_chan(oclass->parent);
struct gf100_gr_object *object;
- if (!(object = kzalloc_obj(*object, GFP_KERNEL)))
+ if (!(object = kzalloc_obj(*object)))
return -ENOMEM;
*pobject = &object->object;
@@ -384,7 +384,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nvkm_device *device = gr->base.engine.subdev.device;
int ret;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&gf100_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -2624,7 +2624,7 @@ gf100_gr_new_(const struct gf100_gr_fwif *fwif, struct nvkm_device *device,
struct gf100_gr *gr;
int ret;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
*pgr = &gr->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
index 3bf288190cd1..7568b3ddb2b8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
@@ -1188,7 +1188,7 @@ nv04_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv04_gr_chan *chan;
unsigned long flags;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv04_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -1417,7 +1417,7 @@ nv04_gr_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, st
{
struct nv04_gr *gr;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
spin_lock_init(&gr->lock);
*pgr = &gr->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c
index 8b724b3acdba..abcf1ffbf66c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c
@@ -1007,7 +1007,7 @@ nv10_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nvkm_device *device = gr->base.engine.subdev.device;
unsigned long flags;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv10_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -1177,7 +1177,7 @@ nv10_gr_new_(const struct nvkm_gr_func *func, struct nvkm_device *device,
{
struct nv10_gr *gr;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
spin_lock_init(&gr->lock);
*pgr = &gr->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c
index f12053d47fcf..66aa6398754b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c
@@ -79,7 +79,7 @@ nv20_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv20_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -334,7 +334,7 @@ nv20_gr_new_(const struct nvkm_gr_func *func, struct nvkm_device *device,
{
struct nv20_gr *gr;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
*pgr = &gr->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c
index 91c613e00e5e..bcf2a3697e7a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c
@@ -25,7 +25,7 @@ nv25_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv25_gr_chan, oclass, &chan->object);
chan->gr = gr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c
index 4435db568bb4..6526538dfdb0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c
@@ -25,7 +25,7 @@ nv2a_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv2a_gr_chan, oclass, &chan->object);
chan->gr = gr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c
index 6da312944498..00e25d68d72d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c
@@ -26,7 +26,7 @@ nv30_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv30_gr_chan, oclass, &chan->object);
chan->gr = gr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c
index 8cb48adc5d58..ffd1840f0271 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c
@@ -25,7 +25,7 @@ nv34_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv34_gr_chan, oclass, &chan->object);
chan->gr = gr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c
index 4116872fd2d1..22011e3fdbfd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c
@@ -25,7 +25,7 @@ nv35_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv20_gr_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv35_gr_chan, oclass, &chan->object);
chan->gr = gr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c
index 5af4fa408fb8..c8b97aabcb69 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c
@@ -152,7 +152,7 @@ nv40_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv40_gr_chan *chan;
unsigned long flags;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv40_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -433,7 +433,7 @@ nv40_gr_new_(const struct nvkm_gr_func *func, struct nvkm_device *device,
{
struct nv40_gr *gr;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
*pgr = &gr->base;
INIT_LIST_HEAD(&gr->chan);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c
index fae9254fa870..1aff861a845e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c
@@ -92,7 +92,7 @@ nv50_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
struct nv50_gr *gr = nv50_gr(base);
struct nv50_gr_chan *chan;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv50_gr_chan, oclass, &chan->object);
chan->gr = gr;
@@ -765,7 +765,7 @@ nv50_gr_new_(const struct nvkm_gr_func *func, struct nvkm_device *device,
{
struct nv50_gr *gr;
- if (!(gr = kzalloc_obj(*gr, GFP_KERNEL)))
+ if (!(gr = kzalloc_obj(*gr)))
return -ENOMEM;
spin_lock_init(&gr->lock);
*pgr = &gr->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
index ee907c2987a6..3652833c7951 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
@@ -89,7 +89,7 @@ nv31_mpeg_chan_new(struct nvkm_chan *fifoch, const struct nvkm_oclass *oclass,
unsigned long flags;
int ret = -EBUSY;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv31_mpeg_chan, oclass, &chan->object);
chan->mpeg = mpeg;
@@ -277,7 +277,7 @@ nv31_mpeg_new_(const struct nv31_mpeg_func *func, struct nvkm_device *device,
{
struct nv31_mpeg *mpeg;
- if (!(mpeg = kzalloc_obj(*mpeg, GFP_KERNEL)))
+ if (!(mpeg = kzalloc_obj(*mpeg)))
return -ENOMEM;
mpeg->func = func;
*pmpeg = &mpeg->engine;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
index c14b6efcaf6d..eeb9f90745b3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
@@ -107,7 +107,7 @@ nv44_mpeg_chan_new(struct nvkm_chan *fifoch, const struct nvkm_oclass *oclass,
struct nv44_mpeg_chan *chan;
unsigned long flags;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
nvkm_object_ctor(&nv44_mpeg_chan, oclass, &chan->object);
chan->mpeg = mpeg;
@@ -207,7 +207,7 @@ nv44_mpeg_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct nv44_mpeg *mpeg;
- if (!(mpeg = kzalloc_obj(*mpeg, GFP_KERNEL)))
+ if (!(mpeg = kzalloc_obj(*mpeg)))
return -ENOMEM;
INIT_LIST_HEAD(&mpeg->chan);
*pmpeg = &mpeg->engine;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c
index 175a372a1de4..b3b3d0e1efc4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c
@@ -43,7 +43,7 @@ nvkm_nvdec_new_(const struct nvkm_nvdec_fwif *fwif, struct nvkm_device *device,
struct nvkm_nvdec *nvdec;
int ret;
- if (!(nvdec = *pnvdec = kzalloc_obj(*nvdec, GFP_KERNEL)))
+ if (!(nvdec = *pnvdec = kzalloc_obj(*nvdec)))
return -ENOMEM;
ret = nvkm_engine_ctor(&nvkm_nvdec, device, type, inst, true,
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c
index d8e6c8b58643..aeda415a2dd3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c
@@ -44,7 +44,7 @@ nvkm_nvenc_new_(const struct nvkm_nvenc_fwif *fwif, struct nvkm_device *device,
struct nvkm_nvenc *nvenc;
int ret;
- if (!(nvenc = *pnvenc = kzalloc_obj(*nvenc, GFP_KERNEL)))
+ if (!(nvenc = *pnvenc = kzalloc_obj(*nvenc)))
return -ENOMEM;
ret = nvkm_engine_ctor(&nvkm_nvenc, device, type, inst, true,
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c
index f8c0656f74c1..417ed23a6b81 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c
@@ -137,7 +137,7 @@ nvkm_sec2_new_(const struct nvkm_sec2_fwif *fwif, struct nvkm_device *device,
struct nvkm_sec2 *sec2;
int ret;
- if (!(sec2 = *psec2 = kzalloc_obj(*sec2, GFP_KERNEL)))
+ if (!(sec2 = *psec2 = kzalloc_obj(*sec2)))
return -ENOMEM;
ret = nvkm_engine_ctor(&nvkm_sec2, device, type, inst, true, &sec2->engine);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sec2/r535.c b/drivers/gpu/drm/nouveau/nvkm/engine/sec2/r535.c
index fb5c05e49b80..c119f1415a12 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sec2/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sec2/r535.c
@@ -42,7 +42,7 @@ r535_sec2_new(const struct nvkm_sec2_func *func, struct nvkm_device *device,
struct nvkm_sec2 *sec2;
int ret;
- if (!(sec2 = *psec2 = kzalloc_obj(*sec2, GFP_KERNEL)))
+ if (!(sec2 = *psec2 = kzalloc_obj(*sec2)))
return -ENOMEM;
ret = nvkm_engine_ctor(&r535_sec2, device, type, inst, true, &sec2->engine);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c
index 3201ab862764..02aac061c1ee 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c
@@ -100,7 +100,7 @@ nvkm_sw_new_(const struct nvkm_sw_func *func, struct nvkm_device *device,
{
struct nvkm_sw *sw;
- if (!(sw = *psw = kzalloc_obj(*sw, GFP_KERNEL)))
+ if (!(sw = *psw = kzalloc_obj(*sw)))
return -ENOMEM;
INIT_LIST_HEAD(&sw->chan);
sw->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c
index 42a1fcacb45b..0171cdf6f639 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c
@@ -110,7 +110,7 @@ gf100_sw_chan_new(struct nvkm_sw *sw, struct nvkm_chan *fifoch,
struct nv50_sw_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
*pobject = &chan->base.object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c
index d1fc9c58653d..83b93ce06c64 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c
@@ -111,7 +111,7 @@ nv04_sw_chan_new(struct nvkm_sw *sw, struct nvkm_chan *fifo,
{
struct nv04_sw_chan *chan;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
atomic_set(&chan->ref, 0);
*pobject = &chan->base.object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c
index cac43cedebf9..2ca044861508 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c
@@ -41,7 +41,7 @@ nv10_sw_chan_new(struct nvkm_sw *sw, struct nvkm_chan *fifo,
{
struct nvkm_sw_chan *chan;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
*pobject = &chan->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c
index 62d719241cf6..0cfb1eaae6de 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c
@@ -106,7 +106,7 @@ nv50_sw_chan_new(struct nvkm_sw *sw, struct nvkm_chan *fifoch,
struct nv50_sw_chan *chan;
int ret, i;
- if (!(chan = kzalloc_obj(*chan, GFP_KERNEL)))
+ if (!(chan = kzalloc_obj(*chan)))
return -ENOMEM;
*pobject = &chan->base.object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c
index 023b94c7abe0..ff0dd2153052 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c
@@ -64,7 +64,7 @@ nvkm_nvsw_new_(const struct nvkm_nvsw_func *func, struct nvkm_sw_chan *chan,
{
struct nvkm_nvsw *nvsw;
- if (!(nvsw = kzalloc_obj(*nvsw, GFP_KERNEL)))
+ if (!(nvsw = kzalloc_obj(*nvsw)))
return -ENOMEM;
*pobject = &nvsw->object;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c b/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
index e1fa755134d5..127657d485b0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
@@ -181,7 +181,7 @@ nvkm_xtensa_new_(const struct nvkm_xtensa_func *func, struct nvkm_device *device
{
struct nvkm_xtensa *xtensa;
- if (!(xtensa = kzalloc_obj(*xtensa, GFP_KERNEL)))
+ if (!(xtensa = kzalloc_obj(*xtensa)))
return -ENOMEM;
xtensa->func = func;
xtensa->addr = addr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c b/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
index 449ef127e56c..a73783fb5557 100644
--- a/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
@@ -203,7 +203,7 @@ nvkm_falcon_cmdq_new(struct nvkm_falcon_qmgr *qmgr, const char *name,
{
struct nvkm_falcon_cmdq *cmdq = *pcmdq;
- if (!(cmdq = *pcmdq = kzalloc_obj(*cmdq, GFP_KERNEL)))
+ if (!(cmdq = *pcmdq = kzalloc_obj(*cmdq)))
return -ENOMEM;
cmdq->qmgr = qmgr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c b/drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
index 4bff735a08df..56d038ce9e6c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
@@ -203,7 +203,7 @@ nvkm_falcon_msgq_new(struct nvkm_falcon_qmgr *qmgr, const char *name,
{
struct nvkm_falcon_msgq *msgq = *pmsgq;
- if (!(msgq = *pmsgq = kzalloc_obj(*msgq, GFP_KERNEL)))
+ if (!(msgq = *pmsgq = kzalloc_obj(*msgq)))
return -ENOMEM;
msgq->qmgr = qmgr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c b/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
index 4e1518b43fed..96aa621be4ed 100644
--- a/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
@@ -73,7 +73,7 @@ nvkm_falcon_qmgr_new(struct nvkm_falcon *falcon,
struct nvkm_falcon_qmgr *qmgr;
int i;
- if (!(qmgr = *pqmgr = kzalloc_obj(*qmgr, GFP_KERNEL)))
+ if (!(qmgr = *pqmgr = kzalloc_obj(*qmgr)))
return -ENOMEM;
qmgr->falcon = falcon;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
index 0f83774f31a1..4c7745cd6ae5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
@@ -251,7 +251,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *subdev)
nvkm_falcon_put(lsfw->falcon, subdev);
- if (!(lsf = kmalloc_obj(*lsf, GFP_KERNEL)))
+ if (!(lsf = kmalloc_obj(*lsf)))
return -ENOMEM;
lsf->func = lsfw->func;
lsf->falcon = lsfw->falcon;
@@ -422,7 +422,7 @@ nvkm_acr_new_(const struct nvkm_acr_fwif *fwif, struct nvkm_device *device,
struct nvkm_acr *acr;
long wprfw;
- if (!(acr = *pacr = kzalloc_obj(*acr, GFP_KERNEL)))
+ if (!(acr = *pacr = kzalloc_obj(*acr)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_acr, device, type, inst, &acr->subdev);
INIT_LIST_HEAD(&acr->hsfw);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c
index 70405ba5a87e..b3f84345ee53 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c
@@ -37,7 +37,7 @@ ga100_acr_hsfw_ctor(struct nvkm_acr *acr, const char *bl, const char *fw,
{
struct nvkm_acr_hsfw *hsfw;
- if (!(hsfw = kzalloc_obj(*hsfw, GFP_KERNEL)))
+ if (!(hsfw = kzalloc_obj(*hsfw)))
return -ENOMEM;
hsfw->falcon_id = fwif->falcon_id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
index 77535b0d1d75..a9f0090b2310 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
@@ -32,7 +32,7 @@ ga102_acr_wpr_patch(struct nvkm_acr *acr, s64 adjust)
struct nvkm_acr_lsfw *lsfw;
u32 offset = 0;
- lsb = kvmalloc_obj(*lsb, GFP_KERNEL);
+ lsb = kvmalloc_obj(*lsb);
if (!lsb)
return -ENOMEM;
@@ -67,7 +67,7 @@ ga102_acr_wpr_build_lsb(struct nvkm_acr *acr, struct nvkm_acr_lsfw *lsfw)
if (WARN_ON(lsfw->sig->size != sizeof(hdr->signature)))
return -EINVAL;
- hdr = kvzalloc_obj(*hdr, GFP_KERNEL);
+ hdr = kvzalloc_obj(*hdr);
if (!hdr)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c
index 5b812bed400d..fd78965d841f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c
@@ -247,7 +247,7 @@ gm200_acr_hsfw_ctor(struct nvkm_acr *acr, const char *bl, const char *fw, const
{
struct nvkm_acr_hsfw *hsfw;
- if (!(hsfw = kzalloc_obj(*hsfw, GFP_KERNEL)))
+ if (!(hsfw = kzalloc_obj(*hsfw)))
return -ENOMEM;
hsfw->falcon_id = fwif->falcon_id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c
index ecf7500dc135..acb5e1dd4744 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c
@@ -71,7 +71,7 @@ nvkm_acr_lsfw_add(const struct nvkm_acr_lsf_func *func, struct nvkm_acr *acr,
}
if (!lsfw) {
- if (!(lsfw = kzalloc_obj(*lsfw, GFP_KERNEL)))
+ if (!(lsfw = kzalloc_obj(*lsfw)))
return ERR_PTR(-ENOMEM);
lsfw->id = id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
index 8f45161e3f2b..a1fa1b0c8954 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
@@ -165,7 +165,7 @@ gf100_bar_new_(const struct nvkm_bar_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_bar **pbar)
{
struct gf100_bar *bar;
- if (!(bar = kzalloc_obj(*bar, GFP_KERNEL)))
+ if (!(bar = kzalloc_obj(*bar)))
return -ENOMEM;
nvkm_bar_ctor(func, device, type, inst, &bar->base);
bar->bar2_halve = nvkm_boolopt(device->cfgopt, "NvBar2Halve", false);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
index eb66234bc478..cf3bbaf1a85a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
@@ -223,7 +223,7 @@ nv50_bar_new_(const struct nvkm_bar_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, u32 pgd_addr, struct nvkm_bar **pbar)
{
struct nv50_bar *bar;
- if (!(bar = kzalloc_obj(*bar, GFP_KERNEL)))
+ if (!(bar = kzalloc_obj(*bar)))
return -ENOMEM;
nvkm_bar_ctor(func, device, type, inst, &bar->base);
bar->pgd_addr = pgd_addr;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
index 9edc439ac790..fd3192df452e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
@@ -156,7 +156,7 @@ nvkm_bios_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct bit_entry bit_i;
int ret, idx = 0;
- if (!(bios = *pbios = kzalloc_obj(*bios, GFP_KERNEL)))
+ if (!(bios = *pbios = kzalloc_obj(*bios)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_bios, device, type, inst, &bios->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c
index f1fec267ebad..5a481fa56fd5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c
@@ -73,7 +73,7 @@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense)
}
iccsense->nr_entry = cnt;
- iccsense->rail = kmalloc_objs(struct pwr_rail_t, cnt, GFP_KERNEL);
+ iccsense->rail = kmalloc_objs(struct pwr_rail_t, cnt);
if (!iccsense->rail)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c
index 02c2551b82cf..e963090f95be 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c
@@ -58,7 +58,7 @@ of_init(struct nvkm_bios *bios, const char *name)
struct priv *priv;
if (!(dn = pci_device_to_OF_node(pdev)))
return ERR_PTR(-ENODEV);
- if (!(priv = kzalloc_obj(*priv, GFP_KERNEL)))
+ if (!(priv = kzalloc_obj(*priv)))
return ERR_PTR(-ENOMEM);
if ((priv->data = of_get_property(dn, "NVDA,BMP", &priv->size)))
return priv;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
index 72658f45cdf0..cb07c2a2d362 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
@@ -65,7 +65,7 @@ pcirom_init(struct nvkm_bios *bios, const char *name)
if (!(ret = pci_enable_rom(pdev))) {
if (ret = -ENOMEM,
- (priv = kmalloc_obj(*priv, GFP_KERNEL))) {
+ (priv = kmalloc_obj(*priv))) {
if (ret = -EFAULT,
(priv->rom = pci_map_rom(pdev, &priv->size))) {
priv->pdev = pdev;
@@ -104,7 +104,7 @@ platform_init(struct nvkm_bios *bios, const char *name)
if (!pdev->rom || pdev->romlen == 0)
return ERR_PTR(-ENODEV);
- if ((priv = kmalloc_obj(*priv, GFP_KERNEL))) {
+ if ((priv = kmalloc_obj(*priv))) {
priv->size = pdev->romlen;
if (ret = -ENODEV,
(priv->rom = ioremap(pdev->rom, pdev->romlen)))
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
index 0cae8502301a..d5411d176e3a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
@@ -102,7 +102,7 @@ pramin_init(struct nvkm_bios *bios, const char *name)
}
/* modify bar0 PRAMIN window to cover the bios image */
- if (!(priv = kmalloc_obj(*priv, GFP_KERNEL))) {
+ if (!(priv = kmalloc_obj(*priv))) {
nvkm_error(subdev, "... out of memory\n");
return ERR_PTR(-ENOMEM);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c
index 6c789ef5e341..ca1825b71669 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c
@@ -56,7 +56,7 @@ nvkm_bus_new_(const struct nvkm_bus_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_bus **pbus)
{
struct nvkm_bus *bus;
- if (!(bus = *pbus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = *pbus = kzalloc_obj(*bus)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_bus, device, type, inst, &bus->subdev);
bus->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
index 8cb4bc5fdedf..7cd19e77f6a1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
@@ -45,7 +45,7 @@ nvkm_hwsq_init(struct nvkm_subdev *subdev, struct nvkm_hwsq **phwsq)
{
struct nvkm_hwsq *hwsq;
- hwsq = *phwsq = kmalloc_obj(*hwsq, GFP_KERNEL);
+ hwsq = *phwsq = kmalloc_obj(*hwsq);
if (hwsq) {
hwsq->subdev = subdev;
hwsq->addr = ~0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
index 39b88d995411..572e63846315 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
@@ -239,7 +239,7 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate)
if (volt && nvkm_volt_map_min(volt, cstepX.voltage) > volt->max_uv)
return -EINVAL;
- cstate = kzalloc_obj(*cstate, GFP_KERNEL);
+ cstate = kzalloc_obj(*cstate);
if (!cstate)
return -ENOMEM;
@@ -416,7 +416,7 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx)
if (perfE.pstate == 0xff)
return 0;
- pstate = kzalloc_obj(*pstate, GFP_KERNEL);
+ pstate = kzalloc_obj(*pstate);
if (!pstate)
return -ENOMEM;
@@ -710,7 +710,7 @@ int
nvkm_clk_new_(const struct nvkm_clk_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, bool allow_reclock, struct nvkm_clk **pclk)
{
- if (!(*pclk = kzalloc_obj(**pclk, GFP_KERNEL)))
+ if (!(*pclk = kzalloc_obj(**pclk)))
return -ENOMEM;
return nvkm_clk_ctor(func, device, type, inst, allow_reclock, *pclk);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c
index ec1effd3417b..163c1b2b9b8d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c
@@ -473,7 +473,7 @@ gf100_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct gf100_clk *clk;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c
index 8ef413154f7e..9860a50bb4ca 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c
@@ -509,7 +509,7 @@ gk104_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct gk104_clk *clk;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
index 4a87023154ec..b1197fa70687 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
@@ -649,7 +649,7 @@ gk20a_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct gk20a_clk *clk;
int ret;
- clk = kzalloc_obj(*clk, GFP_KERNEL);
+ clk = kzalloc_obj(*clk);
if (!clk)
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
index 59132544985a..73d696dbb698 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
@@ -919,7 +919,7 @@ gm20b_clk_new_speedo0(struct nvkm_device *device, enum nvkm_subdev_type type, in
struct gk20a_clk *clk;
int ret;
- clk = kzalloc_obj(*clk, GFP_KERNEL);
+ clk = kzalloc_obj(*clk);
if (!clk)
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gp10b.c
index 13fea8f3e5c0..7fa8beb95180 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gp10b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gp10b.c
@@ -165,7 +165,7 @@ gp10b_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct gp10b_clk *clk;
int ret, i;
- clk = kzalloc_obj(*clk, GFP_KERNEL);
+ clk = kzalloc_obj(*clk);
if (!clk)
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
index ed792f2b251e..5421200282b9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
@@ -542,7 +542,7 @@ gt215_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct gt215_clk *clk;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
index 4960cf6acb2d..3d01de9b892c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
@@ -414,7 +414,7 @@ mcp77_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct mcp77_clk *clk;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv40.c
index de429f26fa4f..7fcba24855ba 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv40.c
@@ -223,7 +223,7 @@ nv40_clk_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct nv40_clk *clk;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
clk->base.pll_calc = nv04_clk_pll_calc;
clk->base.pll_prog = nv04_clk_pll_prog;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c
index aec4bb2b3550..630c4fc26500 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c
@@ -513,7 +513,7 @@ nv50_clk_new_(const struct nvkm_clk_func *func, struct nvkm_device *device,
struct nv50_clk *clk;
int ret;
- if (!(clk = kzalloc_obj(*clk, GFP_KERNEL)))
+ if (!(clk = kzalloc_obj(*clk)))
return -ENOMEM;
ret = nvkm_clk_ctor(func, device, type, inst, allow_reclock, &clk->base);
*pclk = &clk->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
index 92b846d28869..ab97a177ea97 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
@@ -439,7 +439,7 @@ nv04_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *devi
{
struct nv04_devinit *init;
- if (!(init = kzalloc_obj(*init, GFP_KERNEL)))
+ if (!(init = kzalloc_obj(*init)))
return -ENOMEM;
*pinit = &init->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
index 1eb0908dcb5c..0983a29a6655 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
@@ -150,7 +150,7 @@ nv50_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *devi
{
struct nv50_devinit *init;
- if (!(init = kzalloc_obj(*init, GFP_KERNEL)))
+ if (!(init = kzalloc_obj(*init)))
return -ENOMEM;
*pinit = &init->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c
index e226a2e24da5..9921dd3d3fd9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c
@@ -36,7 +36,7 @@ r535_devinit_new(const struct nvkm_devinit_func *hw,
struct nvkm_devinit_func *rm;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_devinit_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
index 0ebda68c7d96..92e38755c218 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
@@ -76,7 +76,7 @@ nvkm_fault_oneinit_buffer(struct nvkm_fault *fault, int id)
struct nvkm_fault_buffer *buffer;
int ret;
- if (!(buffer = kzalloc_obj(*buffer, GFP_KERNEL)))
+ if (!(buffer = kzalloc_obj(*buffer)))
return -ENOMEM;
buffer->fault = fault;
buffer->id = id;
@@ -156,7 +156,7 @@ nvkm_fault_new_(const struct nvkm_fault_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_fault **pfault)
{
struct nvkm_fault *fault;
- if (!(fault = *pfault = kzalloc_obj(*fault, GFP_KERNEL)))
+ if (!(fault = *pfault = kzalloc_obj(*fault)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_fault, device, type, inst, &fault->subdev);
fault->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
index f15635ea99b8..6f521653adaa 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
@@ -296,7 +296,7 @@ int
nvkm_fb_new_(const struct nvkm_fb_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_fb **pfb)
{
- if (!(*pfb = kzalloc_obj(**pfb, GFP_KERNEL)))
+ if (!(*pfb = kzalloc_obj(**pfb)))
return -ENOMEM;
return nvkm_fb_ctor(func, device, type, inst, *pfb);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
index 0c3e52e29baa..dc5cb6c54b13 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
@@ -112,7 +112,7 @@ gf100_fb_new_(const struct nvkm_fb_func *func, struct nvkm_device *device,
{
struct gf100_fb *fb;
- if (!(fb = kzalloc_obj(*fb, GFP_KERNEL)))
+ if (!(fb = kzalloc_obj(*fb)))
return -ENOMEM;
nvkm_fb_ctor(func, device, type, inst, &fb->base);
*pfb = &fb->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
index c2687ade0d7e..f1413fd193ad 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
@@ -244,7 +244,7 @@ nv50_fb_new_(const struct nv50_fb_func *func, struct nvkm_device *device,
{
struct nv50_fb *fb;
- if (!(fb = kzalloc_obj(*fb, GFP_KERNEL)))
+ if (!(fb = kzalloc_obj(*fb)))
return -ENOMEM;
nvkm_fb_ctor(&nv50_fb_, device, type, inst, &fb->base);
fb->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/r535.c
index 167eb70143ce..9db6accc75a8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/r535.c
@@ -35,7 +35,7 @@ r535_fb_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct nvkm_ram *ram;
int ret;
- if (!(ram = *pram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = *pram = kzalloc_obj(*ram)))
return -ENOMEM;
ram->func = &r535_fb_ram;
@@ -71,7 +71,7 @@ r535_fb_new(const struct nvkm_fb_func *hw,
struct nvkm_fb_func *rm;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_fb_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
index e3f161f27189..66274083e215 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
@@ -127,7 +127,7 @@ nvkm_ram_wrap(struct nvkm_device *device, u64 addr, u64 size,
return -ENODEV;
ram = device->fb->ram;
- if (!(vram = kzalloc_obj(*vram, GFP_KERNEL)))
+ if (!(vram = kzalloc_obj(*vram)))
return -ENOMEM;
nvkm_memory_ctor(&nvkm_vram, &vram->memory);
@@ -135,7 +135,7 @@ nvkm_ram_wrap(struct nvkm_device *device, u64 addr, u64 size,
vram->page = NVKM_RAM_MM_SHIFT;
*pmemory = &vram->memory;
- vram->mn = kzalloc_obj(*vram->mn, GFP_KERNEL);
+ vram->mn = kzalloc_obj(*vram->mn);
if (!vram->mn)
return -ENOMEM;
@@ -163,7 +163,7 @@ nvkm_ram_get(struct nvkm_device *device, u8 heap, u8 type, u8 rpage, u64 size,
ram = device->fb->ram;
mm = &ram->vram;
- if (!(vram = kzalloc_obj(*vram, GFP_KERNEL)))
+ if (!(vram = kzalloc_obj(*vram)))
return -ENOMEM;
nvkm_memory_ctor(&nvkm_vram, &vram->memory);
vram->ram = ram;
@@ -257,7 +257,7 @@ int
nvkm_ram_new_(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
enum nvkm_ram_type type, u64 size, struct nvkm_ram **pram)
{
- if (!(*pram = kzalloc_obj(**pram, GFP_KERNEL)))
+ if (!(*pram = kzalloc_obj(**pram)))
return -ENOMEM;
return nvkm_ram_ctor(func, fb, type, size, *pram);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
index 1367cb8adb8f..b6b8398eb254 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
@@ -572,7 +572,7 @@ gf100_ram_new_(const struct nvkm_ram_func *func,
struct gf100_ram *ram;
int ret;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
index 9bcbbe5469a3..f89e7101e65c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
@@ -1371,7 +1371,7 @@ gk104_ram_train_init(struct nvkm_ram *ram)
struct gk104_ram_train *train;
int ret, i;
- if (!(train = kzalloc_obj(*train, GFP_KERNEL)))
+ if (!(train = kzalloc_obj(*train)))
return -ENOMEM;
for (i = 0; i < 0x100; i++) {
@@ -1446,7 +1446,7 @@ gk104_ram_ctor_data(struct gk104_ram *ram, u8 ramcfg, int i)
u32 data;
int ret;
- if (!(cfg = kmalloc_obj(*cfg, GFP_KERNEL)))
+ if (!(cfg = kmalloc_obj(*cfg)))
return -ENOMEM;
p = &list_last_entry(&ram->cfg, typeof(*cfg), head)->bios;
n = &cfg->bios;
@@ -1530,7 +1530,7 @@ gk104_ram_new_(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
u8 ramcfg = nvbios_ramcfg_index(subdev);
u32 tmp;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
index fb958bb6c1d1..980aa9f2a7a1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
@@ -91,7 +91,7 @@ gp100_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{
struct nvkm_ram *ram;
- if (!(ram = *pram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = *pram = kzalloc_obj(*ram)))
return -ENOMEM;
return gf100_ram_ctor(&gp100_ram, fb, ram);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
index 6417ee503aaf..3135b46cbfcd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
@@ -942,7 +942,7 @@ gt215_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct gt215_ram *ram;
int ret, i;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
index 2e1890ada5f9..56605cbf0130 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
@@ -66,7 +66,7 @@ mcp77_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct mcp77_ram *ram;
int ret;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
index 5dc6012c67cd..53d37c9cc7ba 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
@@ -192,7 +192,7 @@ nv40_ram_new_(struct nvkm_fb *fb, enum nvkm_ram_type type, u64 size,
struct nvkm_ram **pram)
{
struct nv40_ram *ram;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
return nvkm_ram_ctor(&nv40_ram_func, fb, type, size, &ram->base);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
index d767a6488e4c..be15519d0c96 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
@@ -587,7 +587,7 @@ nv50_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct nv50_ram *ram;
int ret, i;
- if (!(ram = kzalloc_obj(*ram, GFP_KERNEL)))
+ if (!(ram = kzalloc_obj(*ram)))
return -ENOMEM;
*pram = &ram->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fsp/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fsp/base.c
index ba24758d5ed1..b782fef91dca 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fsp/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fsp/base.c
@@ -55,7 +55,7 @@ nvkm_fsp_new_(const struct nvkm_fsp_func *func,
{
struct nvkm_fsp *fsp;
- fsp = *pfsp = kzalloc_obj(*fsp, GFP_KERNEL);
+ fsp = *pfsp = kzalloc_obj(*fsp);
if (!fsp)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c
index ad5c0de62459..c1318e92e1f4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c
@@ -45,7 +45,7 @@ nvkm_fuse_new_(const struct nvkm_fuse_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_fuse **pfuse)
{
struct nvkm_fuse *fuse;
- if (!(fuse = *pfuse = kzalloc_obj(*fuse, GFP_KERNEL)))
+ if (!(fuse = *pfuse = kzalloc_obj(*fuse)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_fuse, device, type, inst, &fuse->subdev);
fuse->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
index d8b434a7276d..7a90196d2d09 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
@@ -227,7 +227,7 @@ nvkm_gpio_new_(const struct nvkm_gpio_func *func, struct nvkm_device *device,
{
struct nvkm_gpio *gpio;
- if (!(gpio = *pgpio = kzalloc_obj(*gpio, GFP_KERNEL)))
+ if (!(gpio = *pgpio = kzalloc_obj(*gpio)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_gpio, device, type, inst, &gpio->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c
index 3952b96a5abb..9ba1316831e7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c
@@ -132,7 +132,7 @@ nvkm_gsp_new_(const struct nvkm_gsp_fwif *fwif, struct nvkm_device *device,
{
struct nvkm_gsp *gsp;
- if (!(gsp = *pgsp = kzalloc_obj(*gsp, GFP_KERNEL)))
+ if (!(gsp = *pgsp = kzalloc_obj(*gsp)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_gsp, device, type, inst, &gsp->subdev);
@@ -148,7 +148,7 @@ nvkm_gsp_new_(const struct nvkm_gsp_fwif *fwif, struct nvkm_device *device,
if (fwif->rm) {
nvkm_info(&gsp->subdev, "RM version: %s\n", fwif->ver);
- gsp->rm = kzalloc_obj(*gsp->rm, GFP_KERNEL);
+ gsp->rm = kzalloc_obj(*gsp->rm);
if (!gsp->rm)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/engine.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/engine.c
index 01c90b592dca..b1a2ebd94a45 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/engine.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/engine.c
@@ -44,7 +44,7 @@ nvkm_rm_engine_obj_new(struct nvkm_gsp_object *chan, int chid, const struct nvkm
struct nvkm_rm_engine_obj *obj;
int ret;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return -ENOMEM;
@@ -130,7 +130,7 @@ nvkm_rm_engine_new_(struct nvkm_rm *rm, enum nvkm_subdev_type type, int inst, u3
struct nvkm_engine *engine;
int ret;
- engine = kzalloc_obj(*engine, GFP_KERNEL);
+ engine = kzalloc_obj(*engine);
if (!engine)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.c
index c13aaeb9fc89..a726f44583cb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/gr.c
@@ -74,7 +74,7 @@ nvkm_rm_gr_new(struct nvkm_rm *rm)
func->sclass[i].ctor = nvkm_rm_gr_obj_ctor;
}
- gr = kzalloc_obj(*gr, GFP_KERNEL);
+ gr = kzalloc_obj(*gr);
if (!gr) {
kfree(func);
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvdec.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvdec.c
index c0c6695bd547..e2a74973a1e8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvdec.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvdec.c
@@ -17,7 +17,7 @@ nvkm_rm_nvdec_new(struct nvkm_rm *rm, int inst)
struct nvkm_nvdec *nvdec;
int ret;
- nvdec = kzalloc_obj(*nvdec, GFP_KERNEL);
+ nvdec = kzalloc_obj(*nvdec);
if (!nvdec)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c
index db1c8b508b08..0da6a3e0c8f9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c
@@ -17,7 +17,7 @@ nvkm_rm_nvenc_new(struct nvkm_rm *rm, int inst)
struct nvkm_nvenc *nvenc;
int ret;
- nvenc = kzalloc_obj(*nvenc, GFP_KERNEL);
+ nvenc = kzalloc_obj(*nvenc);
if (!nvenc)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c
index 37d0e21905bf..fae08ac3b18c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c
@@ -169,7 +169,7 @@ r535_bar_new_(const struct nvkm_bar_func *hw, struct nvkm_device *device,
struct nvkm_bar *bar;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_bar_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c
index c0d3d4f66d30..700cea5def35 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c
@@ -184,7 +184,7 @@ fbsr_vram(struct fbsr *fbsr, const char *type, u64 addr, u64 size)
{
struct fbsr_item *item;
- if (!(item = kzalloc_obj(*item, GFP_KERNEL)))
+ if (!(item = kzalloc_obj(*item)))
return false;
item->type = type;
@@ -309,7 +309,7 @@ r535_instmem_new(const struct nvkm_instmem_func *hw,
struct nvkm_instmem_func *rm;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_instmem_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fifo.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fifo.c
index 3d20574f5f70..76ee938efea3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fifo.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fifo.c
@@ -591,7 +591,7 @@ r535_fifo_new(const struct nvkm_fifo_func *hw, struct nvkm_device *device,
const struct nvkm_rm_gpu *gpu = device->gsp->rm->gpu;
struct nvkm_fifo_func *rm;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_fifo_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c
index d9029a87c010..7fe488d4d5ff 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gr.c
@@ -147,7 +147,7 @@ r535_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *chan, const struct nvkm
struct r535_gr_chan *grc;
int ret;
- if (!(grc = kzalloc_obj(*grc, GFP_KERNEL)))
+ if (!(grc = kzalloc_obj(*grc)))
return -ENOMEM;
nvkm_object_ctor(&r535_gr_chan, oclass, &grc->object);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c
index 9fd073619c38..e10192fe1d0f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c
@@ -2003,7 +2003,7 @@ static void r535_gsp_retain_logging(struct nvkm_gsp *gsp)
goto exit;
}
- log = kzalloc_obj(*log, GFP_KERNEL);
+ log = kzalloc_obj(*log);
if (!log)
goto error;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/vmm.c
index 8ce33b757589..1ff42f1a8486 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/vmm.c
@@ -171,7 +171,7 @@ r535_mmu_new(const struct nvkm_mmu_func *hw,
struct nvkm_mmu_func *rm;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_mmu_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c
index 9e523e0d0a10..f01abe193e25 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c
@@ -107,7 +107,7 @@ anx9805_bus_new(struct nvkm_i2c_pad *base, int id, u8 drive,
struct anx9805_bus *bus;
int ret;
- if (!(bus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = kzalloc_obj(*bus)))
return -ENOMEM;
*pbus = &bus->base;
bus->pad = pad;
@@ -236,7 +236,7 @@ anx9805_aux_new(struct nvkm_i2c_pad *base, int id, u8 drive,
struct anx9805_aux *aux;
int ret;
- if (!(aux = kzalloc_obj(*aux, GFP_KERNEL)))
+ if (!(aux = kzalloc_obj(*aux)))
return -ENOMEM;
*pbus = &aux->base;
aux->pad = pad;
@@ -267,7 +267,7 @@ anx9805_pad_new(struct nvkm_i2c_bus *bus, int id, u8 addr,
{
struct anx9805_pad *pad;
- if (!(pad = kzalloc_obj(*pad, GFP_KERNEL)))
+ if (!(pad = kzalloc_obj(*pad)))
return -ENOMEM;
*ppad = &pad->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxch.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxch.c
index 62b8b9d2d03b..383af72f006e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxch.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxch.c
@@ -209,7 +209,7 @@ nvkm_i2c_aux_new_(const struct nvkm_i2c_aux_func *func,
struct nvkm_i2c_pad *pad, int id,
struct nvkm_i2c_aux **paux)
{
- if (!(*paux = kzalloc_obj(**paux, GFP_KERNEL)))
+ if (!(*paux = kzalloc_obj(**paux)))
return -ENOMEM;
return nvkm_i2c_aux_ctor(func, pad, id, *paux);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c
index 4906dad21347..f41bd332064d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c
@@ -171,7 +171,7 @@ g94_i2c_aux_new_(const struct nvkm_i2c_aux_func *func,
{
struct g94_i2c_aux *aux;
- if (!(aux = kzalloc_obj(*aux, GFP_KERNEL)))
+ if (!(aux = kzalloc_obj(*aux)))
return -ENOMEM;
*paux = &aux->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
index 3f0ed4057e9c..b8a16eddc553 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
@@ -177,7 +177,7 @@ gm200_i2c_aux_new(struct nvkm_i2c_pad *pad, int index, u8 drive,
{
struct gm200_i2c_aux *aux;
- if (!(aux = kzalloc_obj(*aux, GFP_KERNEL)))
+ if (!(aux = kzalloc_obj(*aux)))
return -ENOMEM;
*paux = &aux->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
index 42b9df6d6825..bd256e99feed 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
@@ -266,7 +266,7 @@ nvkm_i2c_new_(const struct nvkm_i2c_func *func, struct nvkm_device *device,
u8 ver, hdr;
int ret, i, ids;
- if (!(i2c = *pi2c = kzalloc_obj(*i2c, GFP_KERNEL)))
+ if (!(i2c = *pi2c = kzalloc_obj(*i2c)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_i2c, device, type, inst, &i2c->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
index 84d6c0238be2..5129f692ae1c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
@@ -232,7 +232,7 @@ nvkm_i2c_bus_ctor(const struct nvkm_i2c_bus_func *func,
if ( bus->func->drive_scl &&
!nvkm_boolopt(device->cfgopt, "NvI2C", internal)) {
- if (!(bit = kzalloc_obj(*bit, GFP_KERNEL)))
+ if (!(bit = kzalloc_obj(*bit)))
return -ENOMEM;
bit->udelay = 10;
bit->timeout = usecs_to_jiffies(2200);
@@ -258,7 +258,7 @@ nvkm_i2c_bus_new_(const struct nvkm_i2c_bus_func *func,
struct nvkm_i2c_pad *pad, int id,
struct nvkm_i2c_bus **pbus)
{
- if (!(*pbus = kzalloc_obj(**pbus, GFP_KERNEL)))
+ if (!(*pbus = kzalloc_obj(**pbus)))
return -ENOMEM;
return nvkm_i2c_bus_ctor(func, pad, id, *pbus);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busgf119.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busgf119.c
index 598df4da20b6..a0fdc623d204 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busgf119.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busgf119.c
@@ -85,7 +85,7 @@ gf119_i2c_bus_new(struct nvkm_i2c_pad *pad, int id, u8 drive,
{
struct gf119_i2c_bus *bus;
- if (!(bus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = kzalloc_obj(*bus)))
return -ENOMEM;
*pbus = &bus->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv04.c
index 1a83c872d9d0..04e180257553 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv04.c
@@ -85,7 +85,7 @@ nv04_i2c_bus_new(struct nvkm_i2c_pad *pad, int id, u8 drive, u8 sense,
{
struct nv04_i2c_bus *bus;
- if (!(bus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = kzalloc_obj(*bus)))
return -ENOMEM;
*pbus = &bus->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv4e.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv4e.c
index 3019cab91e4b..b9b08860939d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv4e.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv4e.c
@@ -76,7 +76,7 @@ nv4e_i2c_bus_new(struct nvkm_i2c_pad *pad, int id, u8 drive,
{
struct nv4e_i2c_bus *bus;
- if (!(bus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = kzalloc_obj(*bus)))
return -ENOMEM;
*pbus = &bus->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv50.c
index 995abbf8ef61..29db5cae8358 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/busnv50.c
@@ -102,7 +102,7 @@ nv50_i2c_bus_new(struct nvkm_i2c_pad *pad, int id, u8 drive,
return -ENODEV;
}
- if (!(bus = kzalloc_obj(*bus, GFP_KERNEL)))
+ if (!(bus = kzalloc_obj(*bus)))
return -ENOMEM;
*pbus = &bus->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.c
index 7b167b691fc6..b4b9c24b7130 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.c
@@ -109,7 +109,7 @@ int
nvkm_i2c_pad_new_(const struct nvkm_i2c_pad_func *func, struct nvkm_i2c *i2c,
int id, struct nvkm_i2c_pad **ppad)
{
- if (!(*ppad = kzalloc_obj(**ppad, GFP_KERNEL)))
+ if (!(*ppad = kzalloc_obj(**ppad)))
return -ENOMEM;
nvkm_i2c_pad_ctor(func, i2c, id, *ppad);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
index 365747909077..3ccdbbe2fad0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
@@ -188,7 +188,7 @@ nvkm_iccsense_create_sensor(struct nvkm_iccsense *iccsense, u8 id)
return NULL;
}
- sensor = kmalloc_obj(*sensor, GFP_KERNEL);
+ sensor = kmalloc_obj(*sensor);
if (!sensor)
return NULL;
@@ -279,7 +279,7 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev)
continue;
}
- rail = kmalloc_obj(*rail, GFP_KERNEL);
+ rail = kmalloc_obj(*rail);
if (!rail)
return -ENOMEM;
@@ -322,7 +322,7 @@ int
nvkm_iccsense_new_(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_iccsense **iccsense)
{
- if (!(*iccsense = kzalloc_obj(**iccsense, GFP_KERNEL)))
+ if (!(*iccsense = kzalloc_obj(**iccsense)))
return -ENOMEM;
INIT_LIST_HEAD(&(*iccsense)->sensors);
INIT_LIST_HEAD(&(*iccsense)->rails);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index dab22c47d85e..8f85fc88bdb6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -387,7 +387,7 @@ gk20a_instobj_ctor_dma(struct gk20a_instmem *imem, u32 npages, u32 align,
struct nvkm_subdev *subdev = &imem->base.subdev;
struct device *dev = subdev->device->dev;
- if (!(node = kzalloc_obj(*node, GFP_KERNEL)))
+ if (!(node = kzalloc_obj(*node)))
return -ENOMEM;
*_node = &node->base;
@@ -577,7 +577,7 @@ gk20a_instmem_new(struct nvkm_device *device, enum nvkm_subdev_type type, int in
struct nvkm_device_tegra *tdev = device->func->tegra(device);
struct gk20a_instmem *imem;
- if (!(imem = kzalloc_obj(*imem, GFP_KERNEL)))
+ if (!(imem = kzalloc_obj(*imem)))
return -ENOMEM;
nvkm_instmem_ctor(&gk20a_instmem, device, type, inst, &imem->base);
mutex_init(&imem->lock);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
index 247a7bf5fe39..c6859a775085 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
@@ -125,7 +125,7 @@ nv04_instobj_new(struct nvkm_instmem *base, u32 size, u32 align, bool zero,
struct nv04_instobj *iobj;
int ret;
- if (!(iobj = kzalloc_obj(*iobj, GFP_KERNEL)))
+ if (!(iobj = kzalloc_obj(*iobj)))
return -ENOMEM;
*pmemory = &iobj->base.memory;
@@ -267,7 +267,7 @@ nv04_instmem_new(struct nvkm_device *device, enum nvkm_subdev_type type, int ins
{
struct nv04_instmem *imem;
- if (!(imem = kzalloc_obj(*imem, GFP_KERNEL)))
+ if (!(imem = kzalloc_obj(*imem)))
return -ENOMEM;
nvkm_instmem_ctor(&nv04_instmem, device, type, inst, &imem->base);
*pimem = &imem->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
index 5a0f30d94198..ee790d70a92b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
@@ -124,7 +124,7 @@ nv40_instobj_new(struct nvkm_instmem *base, u32 size, u32 align, bool zero,
struct nv40_instobj *iobj;
int ret;
- if (!(iobj = kzalloc_obj(*iobj, GFP_KERNEL)))
+ if (!(iobj = kzalloc_obj(*iobj)))
return -ENOMEM;
*pmemory = &iobj->base.memory;
@@ -240,7 +240,7 @@ nv40_instmem_new(struct nvkm_device *device, enum nvkm_subdev_type type, int ins
{
struct nv40_instmem *imem;
- if (!(imem = kzalloc_obj(*imem, GFP_KERNEL)))
+ if (!(imem = kzalloc_obj(*imem)))
return -ENOMEM;
nvkm_instmem_ctor(&nv40_instmem, device, type, inst, &imem->base);
*pimem = &imem->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
index d6c781ae57e9..6fbaa1e5876d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
@@ -360,7 +360,7 @@ nv50_instobj_wrap(struct nvkm_instmem *base,
struct nv50_instmem *imem = nv50_instmem(base);
struct nv50_instobj *iobj;
- if (!(iobj = kzalloc_obj(*iobj, GFP_KERNEL)))
+ if (!(iobj = kzalloc_obj(*iobj)))
return -ENOMEM;
*pmemory = &iobj->base.memory;
@@ -431,7 +431,7 @@ nv50_instmem_new_(const struct nvkm_instmem_func *func,
{
struct nv50_instmem *imem;
- if (!(imem = kzalloc_obj(*imem, GFP_KERNEL)))
+ if (!(imem = kzalloc_obj(*imem)))
return -ENOMEM;
nvkm_instmem_ctor(func, device, type, inst, &imem->base);
INIT_LIST_HEAD(&imem->lru);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
index 7c1652bc28cd..371892c9cf44 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
@@ -133,7 +133,7 @@ nvkm_ltc_new_(const struct nvkm_ltc_func *func, struct nvkm_device *device,
{
struct nvkm_ltc *ltc;
- if (!(ltc = *pltc = kzalloc_obj(*ltc, GFP_KERNEL)))
+ if (!(ltc = *pltc = kzalloc_obj(*ltc)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_ltc, device, type, inst, &ltc->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
index 2d7e6d6f8760..5f85c806abd7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
@@ -130,7 +130,7 @@ nvkm_mc_new_(const struct nvkm_mc_func *func, struct nvkm_device *device,
struct nvkm_mc *mc;
int ret;
- if (!(mc = *pmc = kzalloc_obj(*mc, GFP_KERNEL)))
+ if (!(mc = *pmc = kzalloc_obj(*mc)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_mc, device, type, inst, &mc->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
index 2d9c4d6f9162..df86214183cc 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
@@ -68,13 +68,13 @@ nvkm_mmu_ptp_get(struct nvkm_mmu *mmu, u32 size, bool zero)
struct nvkm_mmu_ptp *ptp;
int slot;
- if (!(pt = kzalloc_obj(*pt, GFP_KERNEL)))
+ if (!(pt = kzalloc_obj(*pt)))
return NULL;
ptp = list_first_entry_or_null(&mmu->ptp.list, typeof(*ptp), head);
if (!ptp) {
/* Need to allocate a new parent to sub-allocate from. */
- if (!(ptp = kmalloc_obj(*ptp, GFP_KERNEL))) {
+ if (!(ptp = kmalloc_obj(*ptp))) {
kfree(pt);
return NULL;
}
@@ -126,7 +126,7 @@ nvkm_mmu_ptc_find(struct nvkm_mmu *mmu, u32 size)
return ptc;
}
- ptc = kmalloc_obj(*ptc, GFP_KERNEL);
+ ptc = kmalloc_obj(*ptc);
if (ptc) {
INIT_LIST_HEAD(&ptc->item);
ptc->size = size;
@@ -199,7 +199,7 @@ nvkm_mmu_ptc_get(struct nvkm_mmu *mmu, u32 size, u32 align, bool zero)
mutex_unlock(&mmu->ptc.mutex);
/* No such luck, we need to allocate. */
- if (!(pt = kmalloc_obj(*pt, GFP_KERNEL)))
+ if (!(pt = kmalloc_obj(*pt)))
return NULL;
pt->ptc = ptc;
pt->sub = false;
@@ -434,7 +434,7 @@ int
nvkm_mmu_new_(const struct nvkm_mmu_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_mmu **pmmu)
{
- if (!(*pmmu = kzalloc_obj(**pmmu, GFP_KERNEL)))
+ if (!(*pmmu = kzalloc_obj(**pmmu)))
return -ENOMEM;
nvkm_mmu_ctor(func, device, type, inst, *pmmu);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c
index 96b620ed07ca..81fecf852e98 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c
@@ -163,7 +163,7 @@ nvkm_mem_new_host(struct nvkm_mmu *mmu, int type, u8 page, u64 size,
if (page != PAGE_SHIFT)
return -EINVAL;
- if (!(mem = kzalloc_obj(*mem, GFP_KERNEL)))
+ if (!(mem = kzalloc_obj(*mem)))
return -ENOMEM;
mem->target = target;
mem->mmu = mmu;
@@ -191,9 +191,9 @@ nvkm_mem_new_host(struct nvkm_mmu *mmu, int type, u8 page, u64 size,
nvkm_memory_ctor(&nvkm_mem_dma, &mem->memory);
size = ALIGN(size, PAGE_SIZE) >> PAGE_SHIFT;
- if (!(mem->mem = kvmalloc_objs(*mem->mem, size, GFP_KERNEL)))
+ if (!(mem->mem = kvmalloc_objs(*mem->mem, size)))
return -ENOMEM;
- if (!(mem->dma = kvmalloc_objs(*mem->dma, size, GFP_KERNEL)))
+ if (!(mem->dma = kvmalloc_objs(*mem->dma, size)))
return -ENOMEM;
if (mmu->dma_bits > 32)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
index 79ab3a99d98c..456d7356b3e5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
@@ -161,7 +161,7 @@ nvkm_umem_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
if (type >= mmu->type_nr)
return -EINVAL;
- if (!(umem = kzalloc_obj(*umem, GFP_KERNEL)))
+ if (!(umem = kzalloc_obj(*umem)))
return -ENOMEM;
nvkm_object_ctor(&nvkm_umem, oclass, &umem->object);
umem->mmu = mmu;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c
index 8de3a707b5c2..cc450e7bb3fd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c
@@ -172,7 +172,7 @@ nvkm_ummu_new(struct nvkm_device *device, const struct nvkm_oclass *oclass,
} else
return ret;
- if (!(ummu = kzalloc_obj(*ummu, GFP_KERNEL)))
+ if (!(ummu = kzalloc_obj(*ummu)))
return -ENOMEM;
nvkm_object_ctor(&nvkm_ummu, oclass, &ummu->object);
ummu->mmu = mmu;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
index 1778daa0af3a..fefbe65af9f1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
@@ -551,7 +551,7 @@ nvkm_uvmm_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
} else
return ret;
- if (!(uvmm = kzalloc_obj(*uvmm, GFP_KERNEL)))
+ if (!(uvmm = kzalloc_obj(*uvmm)))
return -ENOMEM;
nvkm_object_ctor(&nvkm_uvmm, oclass, &uvmm->object);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
index 3a53ce15ea29..958fd78080bd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@ -59,7 +59,7 @@ nvkm_vmm_pt_new(const struct nvkm_vmm_desc *desc, bool sparse,
pgt->sparse = sparse;
if (desc->type == PGD) {
- pgt->pde = kvzalloc_objs(*pgt->pde, pten, GFP_KERNEL);
+ pgt->pde = kvzalloc_objs(*pgt->pde, pten);
if (!pgt->pde) {
kfree(pgt);
return NULL;
@@ -823,7 +823,7 @@ nvkm_vmm_ptes_get_map(struct nvkm_vmm *vmm, const struct nvkm_vmm_page *page,
struct nvkm_vma *
nvkm_vma_new(u64 addr, u64 size)
{
- struct nvkm_vma *vma = kzalloc_obj(*vma, GFP_KERNEL);
+ struct nvkm_vma *vma = kzalloc_obj(*vma);
if (vma) {
vma->addr = addr;
vma->size = size;
@@ -1226,7 +1226,7 @@ nvkm_vmm_new_(const struct nvkm_vmm_func *func, struct nvkm_mmu *mmu,
struct lock_class_key *key, const char *name,
struct nvkm_vmm **pvmm)
{
- if (!(*pvmm = kzalloc_obj(**pvmm, GFP_KERNEL)))
+ if (!(*pvmm = kzalloc_obj(**pvmm)))
return -ENOMEM;
return nvkm_vmm_ctor(func, mmu, hdr, managed, addr, size, key, name, *pvmm);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c
index 86f038ebb360..5217ce64d005 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c
@@ -346,7 +346,7 @@ nv50_vmm_join(struct nvkm_vmm *vmm, struct nvkm_memory *inst)
u64 data;
u32 pdei;
- if (!(join = kmalloc_obj(*join, GFP_KERNEL)))
+ if (!(join = kmalloc_obj(*join)))
return -ENOMEM;
join->inst = inst;
list_add_tail(&join->head, &vmm->join);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
index 6d6c4b831a58..26ec50b66e66 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
@@ -238,7 +238,7 @@ nvkm_mxm_new_(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
u8 ver, len;
u16 data;
- if (!(mxm = *pmxm = kzalloc_obj(*mxm, GFP_KERNEL)))
+ if (!(mxm = *pmxm = kzalloc_obj(*mxm)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_mxm, device, type, inst, &mxm->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c
index f357d777bc96..bd421d5b1faf 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c
@@ -162,7 +162,7 @@ nvkm_pci_new_(const struct nvkm_pci_func *func, struct nvkm_device *device,
{
struct nvkm_pci *pci;
- if (!(pci = *ppci = kzalloc_obj(**ppci, GFP_KERNEL)))
+ if (!(pci = *ppci = kzalloc_obj(**ppci)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_pci_func, device, type, inst, &pci->subdev);
pci->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
index 0d7cfd73ff17..e556b1905702 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
@@ -161,7 +161,7 @@ nvkm_pmu_new_(const struct nvkm_pmu_fwif *fwif, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_pmu **ppmu)
{
struct nvkm_pmu *pmu;
- if (!(pmu = *ppmu = kzalloc_obj(*pmu, GFP_KERNEL)))
+ if (!(pmu = *ppmu = kzalloc_obj(*pmu)))
return -ENOMEM;
return nvkm_pmu_ctor(fwif, device, type, inst, *ppmu);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c
index 46abf56cc830..9831d849e4d7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c
@@ -215,7 +215,7 @@ gk20a_pmu_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct gk20a_pmu *pmu;
int ret;
- if (!(pmu = kzalloc_obj(*pmu, GFP_KERNEL)))
+ if (!(pmu = kzalloc_obj(*pmu)))
return -ENOMEM;
*ppmu = &pmu->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c
index 0fed890a8f95..cdbadb5b71d7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c
@@ -53,7 +53,7 @@ nvkm_memx_init(struct nvkm_pmu *pmu, struct nvkm_memx **pmemx)
if (ret)
return ret;
- memx = *pmemx = kzalloc_obj(*memx, GFP_KERNEL);
+ memx = *pmemx = kzalloc_obj(*memx);
if (!memx)
return -ENOMEM;
memx->pmu = pmu;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
index 2613f5872bcd..224222914f1c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
@@ -447,7 +447,7 @@ nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device,
{
struct nvkm_therm *therm;
- if (!(therm = *ptherm = kzalloc_obj(*therm, GFP_KERNEL)))
+ if (!(therm = *ptherm = kzalloc_obj(*therm)))
return -ENOMEM;
nvkm_therm_ctor(therm, device, type, inst, func);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fannil.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fannil.c
index 92737c2770b6..8970422c9eeb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fannil.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fannil.c
@@ -40,7 +40,7 @@ nvkm_fannil_create(struct nvkm_therm *therm)
{
struct nvkm_fan *priv;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
therm->fan = priv;
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c
index aa13cd45785a..7e61be4bcf88 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c
@@ -97,7 +97,7 @@ nvkm_fanpwm_create(struct nvkm_therm *therm, struct dcb_gpio_func *func)
therm->func->pwm_get(therm, func->line, &divs, &duty) == -ENODEV)
return -ENODEV;
- fan = kzalloc_obj(*fan, GFP_KERNEL);
+ fan = kzalloc_obj(*fan);
if (!fan)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c
index 6cfe7fee54f0..4b8e2c3bef59 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c
@@ -99,7 +99,7 @@ nvkm_fantog_create(struct nvkm_therm *therm, struct dcb_gpio_func *func)
return ret;
}
- fan = kzalloc_obj(*fan, GFP_KERNEL);
+ fan = kzalloc_obj(*fan);
if (!fan)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
index f58f4add5ef3..b816fd304238 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.c
@@ -112,7 +112,7 @@ gk104_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device,
const struct gf100_idle_filter *idle_filter,
struct nvkm_therm **ptherm)
{
- struct gk104_therm *therm = kzalloc_obj(*therm, GFP_KERNEL);
+ struct gk104_therm *therm = kzalloc_obj(*therm);
if (!therm)
return -ENOMEM;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c
index dcb4763e1c08..e971b6643483 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c
@@ -187,7 +187,7 @@ nvkm_timer_new_(const struct nvkm_timer_func *func, struct nvkm_device *device,
{
struct nvkm_timer *tmr;
- if (!(tmr = *ptmr = kzalloc_obj(*tmr, GFP_KERNEL)))
+ if (!(tmr = *ptmr = kzalloc_obj(*tmr)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_timer, device, type, inst, &tmr->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
index fb55ff2b2a46..c987c4abe15c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
@@ -26,7 +26,7 @@
struct nvkm_top_device *
nvkm_top_device_new(struct nvkm_top *top)
{
- struct nvkm_top_device *info = kmalloc_obj(*info, GFP_KERNEL);
+ struct nvkm_top_device *info = kmalloc_obj(*info);
if (info) {
info->type = NVKM_SUBDEV_NR;
info->inst = -1;
@@ -152,7 +152,7 @@ nvkm_top_new_(const struct nvkm_top_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_top **ptop)
{
struct nvkm_top *top;
- if (!(top = *ptop = kzalloc_obj(*top, GFP_KERNEL)))
+ if (!(top = *ptop = kzalloc_obj(*top)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_top, device, type, inst, &top->subdev);
top->func = func;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c
index 3d584be9e201..c0258bcfe8f5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c
@@ -39,7 +39,7 @@ nvkm_vfn_new_(const struct nvkm_vfn_func *func, struct nvkm_device *device,
struct nvkm_vfn *vfn;
int ret;
- if (!(vfn = *pvfn = kzalloc_obj(*vfn, GFP_KERNEL)))
+ if (!(vfn = *pvfn = kzalloc_obj(*vfn)))
return -ENOMEM;
nvkm_subdev_ctor(&nvkm_vfn, device, type, inst, &vfn->subdev);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/r535.c
index e01ea0dcd529..36709c0e3bb4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/r535.c
@@ -38,7 +38,7 @@ r535_vfn_new(const struct nvkm_vfn_func *hw,
struct nvkm_vfn_func *rm;
int ret;
- if (!(rm = kzalloc_obj(*rm, GFP_KERNEL)))
+ if (!(rm = kzalloc_obj(*rm)))
return -ENOMEM;
rm->dtor = r535_vfn_dtor;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
index 27fd15559796..0004cf642ec6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
@@ -56,7 +56,7 @@ nvkm_uvfn_new(struct nvkm_device *device, const struct nvkm_oclass *oclass,
if (argc != 0)
return -ENOSYS;
- if (!(uvfn = kzalloc_obj(*uvfn, GFP_KERNEL)))
+ if (!(uvfn = kzalloc_obj(*uvfn)))
return -ENOMEM;
nvkm_object_ctor(&nvkm_uvfn, oclass, &uvfn->object);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
index 8bb3761e547b..f0c66f9b4b1f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
@@ -321,7 +321,7 @@ int
nvkm_volt_new_(const struct nvkm_volt_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_volt **pvolt)
{
- if (!(*pvolt = kzalloc_obj(**pvolt, GFP_KERNEL)))
+ if (!(*pvolt = kzalloc_obj(**pvolt)))
return -ENOMEM;
nvkm_volt_ctor(func, device, type, inst, *pvolt);
return 0;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
index 5146666ea0f5..7bc264fb753b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
@@ -113,7 +113,7 @@ gk104_volt_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
volt_func = &gk104_volt_pwm;
}
- if (!(volt = kzalloc_obj(*volt, GFP_KERNEL)))
+ if (!(volt = kzalloc_obj(*volt)))
return -ENOMEM;
nvkm_volt_ctor(volt_func, device, type, inst, &volt->base);
*pvolt = &volt->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
index 5941a1eeabd9..5aef95c9f20f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
@@ -176,7 +176,7 @@ gk20a_volt_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
{
struct gk20a_volt *volt;
- volt = kzalloc_obj(*volt, GFP_KERNEL);
+ volt = kzalloc_obj(*volt);
if (!volt)
return -ENOMEM;
*pvolt = &volt->base;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
index 7348acb147bf..5a2a909b57eb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
@@ -77,7 +77,7 @@ gm20b_volt_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
return -EINVAL;
}
- volt = kzalloc_obj(*volt, GFP_KERNEL);
+ volt = kzalloc_obj(*volt);
if (!volt)
return -ENOMEM;
*pvolt = &volt->base;
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index c3cca5234f67..78b74217f952 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -4603,7 +4603,7 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
int r = 0;
struct device_node *np = pdev->dev.of_node;
- dispc = kzalloc_obj(*dispc, GFP_KERNEL);
+ dispc = kzalloc_obj(*dispc);
if (!dispc)
return -ENOMEM;
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 1269978ba292..27fe7bca9e2c 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -1041,7 +1041,7 @@ static int dsi_dump_dsi_irqs(struct seq_file *s, void *p)
unsigned long flags;
struct dsi_irq_stats *stats;
- stats = kmalloc_obj(*stats, GFP_KERNEL);
+ stats = kmalloc_obj(*stats);
if (!stats)
return -ENOMEM;
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
index 791d88933084..53b7938a3d05 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -928,7 +928,7 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name,
{
struct dss_debugfs_entry *entry;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return ERR_PTR(-ENOMEM);
@@ -1419,7 +1419,7 @@ static int dss_probe(struct platform_device *pdev)
struct dss_device *dss;
int r;
- dss = kzalloc_obj(*dss, GFP_KERNEL);
+ dss = kzalloc_obj(*dss);
if (!dss)
return -ENOMEM;
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index ba730242ad74..ee4c0119d408 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -716,7 +716,7 @@ static void omap_crtc_reset(struct drm_crtc *crtc)
kfree(crtc->state);
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
@@ -731,7 +731,7 @@ omap_crtc_duplicate_state(struct drm_crtc *crtc)
current_state = to_omap_crtc_state(crtc->state);
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
@@ -793,7 +793,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
DBG("%s", channel_names[channel]);
- omap_crtc = kzalloc_obj(*omap_crtc, GFP_KERNEL);
+ omap_crtc = kzalloc_obj(*omap_crtc);
if (!omap_crtc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 8312c4d14348..839b8d0092f2 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -536,7 +536,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, u16 w,
unsigned long flags;
u32 slot_bytes;
- block = kzalloc_obj(*block, GFP_KERNEL);
+ block = kzalloc_obj(*block);
if (!block)
return ERR_PTR(-ENOMEM);
@@ -571,7 +571,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, u16 w,
struct tiler_block *tiler_reserve_1d(size_t size)
{
- struct tiler_block *block = kzalloc_obj(*block, GFP_KERNEL);
+ struct tiler_block *block = kzalloc_obj(*block);
int num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
unsigned long flags;
@@ -774,7 +774,7 @@ static int omap_dmm_probe(struct platform_device *dev)
u32 hwinfo, pat_geom;
struct resource *mem;
- omap_dmm = kzalloc_obj(*omap_dmm, GFP_KERNEL);
+ omap_dmm = kzalloc_obj(*omap_dmm);
if (!omap_dmm)
goto fail;
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 206018aab88e..bf0bad8c8cf1 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -146,7 +146,7 @@ static int omap_atomic_update_normalize_zpos(struct drm_device *dev,
struct drm_plane_state **states;
int ret = 0;
- states = kmalloc_objs(*states, total_planes, GFP_KERNEL);
+ states = kmalloc_objs(*states, total_planes);
if (!states)
return -ENOMEM;
@@ -285,7 +285,7 @@ static int omap_global_obj_init(struct drm_device *dev)
struct omap_drm_private *priv = dev->dev_private;
struct omap_global_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
@@ -798,7 +798,7 @@ static int pdev_probe(struct platform_device *pdev)
}
/* Allocate and initialize the driver private structure. */
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
index 2577ba92b1b9..b02c46d70f29 100644
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@ -122,7 +122,7 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev,
struct drm_encoder *encoder = NULL;
struct omap_encoder *omap_encoder;
- omap_encoder = kzalloc_obj(*omap_encoder, GFP_KERNEL);
+ omap_encoder = kzalloc_obj(*omap_encoder);
if (!omap_encoder)
goto fail;
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c
index c3b1bea75f7f..1df232232a64 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -390,7 +390,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
goto fail;
}
- omap_fb = kzalloc_obj(*omap_fb, GFP_KERNEL);
+ omap_fb = kzalloc_obj(*omap_fb);
if (!omap_fb) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 63c4bfc9a5c0..8e013e4f2c6b 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -254,7 +254,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
* DSS, GPU, etc. are not cache coherent:
*/
if (omap_obj->flags & (OMAP_BO_WC|OMAP_BO_UNCACHED)) {
- addrs = kmalloc_objs(*addrs, npages, GFP_KERNEL);
+ addrs = kmalloc_objs(*addrs, npages);
if (!addrs) {
ret = -ENOMEM;
goto free_pages;
@@ -278,7 +278,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
}
}
} else {
- addrs = kzalloc_objs(*addrs, npages, GFP_KERNEL);
+ addrs = kzalloc_objs(*addrs, npages);
if (!addrs) {
ret = -ENOMEM;
goto free_pages;
@@ -989,7 +989,7 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj,
if (sgt)
goto out;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt) {
ret = -ENOMEM;
goto err_unpin;
@@ -1319,7 +1319,7 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
}
/* Allocate the initialize the OMAP GEM object. */
- omap_obj = kzalloc_obj(*omap_obj, GFP_KERNEL);
+ omap_obj = kzalloc_obj(*omap_obj);
if (!omap_obj)
return NULL;
@@ -1410,7 +1410,7 @@ struct drm_gem_object *omap_gem_new_dmabuf(struct drm_device *dev, size_t size,
unsigned int ret;
npages = DIV_ROUND_UP(size, PAGE_SIZE);
- pages = kzalloc_objs(*pages, npages, GFP_KERNEL);
+ pages = kzalloc_objs(*pages, npages);
if (!pages) {
omap_gem_free_object(obj);
return ERR_PTR(-ENOMEM);
@@ -1470,7 +1470,7 @@ void omap_gem_init(struct drm_device *dev)
return;
}
- usergart = kzalloc_objs(*usergart, 3, GFP_KERNEL);
+ usergart = kzalloc_objs(*usergart, 3);
if (!usergart)
return;
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index b1da72838824..d0f895c43ee4 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -43,7 +43,7 @@ struct omap_irq_wait * omap_irq_wait_init(struct drm_device *dev,
u32 irqmask, int count)
{
struct omap_drm_private *priv = dev->dev_private;
- struct omap_irq_wait *wait = kzalloc_obj(*wait, GFP_KERNEL);
+ struct omap_irq_wait *wait = kzalloc_obj(*wait);
unsigned long flags;
init_waitqueue_head(&wait->wq);
diff --git a/drivers/gpu/drm/omapdrm/omap_overlay.c b/drivers/gpu/drm/omapdrm/omap_overlay.c
index 3b673662bf99..77c1b78d0163 100644
--- a/drivers/gpu/drm/omapdrm/omap_overlay.c
+++ b/drivers/gpu/drm/omapdrm/omap_overlay.c
@@ -159,7 +159,7 @@ static struct omap_hw_overlay *omap_overlay_init(enum omap_plane_id overlay_id,
{
struct omap_hw_overlay *overlay;
- overlay = kzalloc_obj(*overlay, GFP_KERNEL);
+ overlay = kzalloc_obj(*overlay);
if (!overlay)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index ff2c692c3ede..0e09d8f1fe5e 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -410,7 +410,7 @@ static void omap_plane_reset(struct drm_plane *plane)
if (plane->state)
drm_atomic_helper_plane_destroy_state(plane, plane->state);
- omap_state = kzalloc_obj(*omap_state, GFP_KERNEL);
+ omap_state = kzalloc_obj(*omap_state);
if (!omap_state)
return;
@@ -427,7 +427,7 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane)
current_state = to_omap_plane_state(plane->state);
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
@@ -533,7 +533,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev,
if (WARN_ON(idx >= num_planes))
return ERR_PTR(-EINVAL);
- omap_plane = kzalloc_obj(*omap_plane, GFP_KERNEL);
+ omap_plane = kzalloc_obj(*omap_plane);
if (!omap_plane)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 191d909f5845..711f5101aa04 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -316,7 +316,7 @@ static int panfrost_ioctl_submit(struct drm_device *dev, void *data,
goto out_put_syncout;
}
- job = kzalloc_obj(*job, GFP_KERNEL);
+ job = kzalloc_obj(*job);
if (!job) {
ret = -ENOMEM;
goto out_put_jm_ctx;
@@ -597,7 +597,7 @@ static int panfrost_ioctl_sync_bo(struct drm_device *ddev, void *data,
if (!args->op_count)
return 0;
- ops = kvmalloc_objs(*ops, args->op_count, GFP_KERNEL);
+ ops = kvmalloc_objs(*ops, args->op_count);
if (!ops) {
DRM_DEBUG("Failed to allocate incoming BO sync ops array\n");
return -ENOMEM;
@@ -682,7 +682,7 @@ panfrost_open(struct drm_device *dev, struct drm_file *file)
struct panfrost_device *pfdev = to_panfrost_device(dev);
struct panfrost_file_priv *panfrost_priv;
- panfrost_priv = kzalloc_obj(*panfrost_priv, GFP_KERNEL);
+ panfrost_priv = kzalloc_obj(*panfrost_priv);
if (!panfrost_priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
index a70847a73f98..822633da741e 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
@@ -175,7 +175,7 @@ int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv)
struct panfrost_file_priv *priv = file_priv->driver_priv;
struct panfrost_gem_mapping *mapping;
- mapping = kzalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kzalloc_obj(*mapping);
if (!mapping)
return -ENOMEM;
@@ -429,7 +429,7 @@ struct drm_gem_object *panfrost_gem_create_object(struct drm_device *dev, size_t
struct panfrost_device *pfdev = to_panfrost_device(dev);
struct panfrost_gem_object *obj;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index 862acf9c8422..d59b4863b8ad 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -95,7 +95,7 @@ static struct dma_fence *panfrost_fence_create(struct panfrost_device *pfdev, in
struct panfrost_fence *fence;
struct panfrost_job_slot *js = pfdev->js;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return ERR_PTR(-ENOMEM);
@@ -1053,7 +1053,7 @@ int panfrost_jm_ctx_create(struct drm_file *file,
struct panfrost_jm_ctx *jm_ctx;
int ret;
- jm_ctx = kzalloc_obj(*jm_ctx, GFP_KERNEL);
+ jm_ctx = kzalloc_obj(*jm_ctx);
if (!jm_ctx)
return -ENOMEM;
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index 71eef57af549..4a3162c3b659 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -794,7 +794,7 @@ struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev)
fmt = ARM_MALI_LPAE;
}
- mmu = kzalloc_obj(*mmu, GFP_KERNEL);
+ mmu = kzalloc_obj(*mmu);
if (!mmu)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
index e1e51daba356..1bcec6a2e3e0 100644
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@ -382,7 +382,7 @@ panthor_submit_ctx_add_sync_signal(struct panthor_submit_ctx *ctx, u32 handle, u
struct dma_fence *cur_fence;
int ret;
- sig_sync = kzalloc_obj(*sig_sync, GFP_KERNEL);
+ sig_sync = kzalloc_obj(*sig_sync);
if (!sig_sync)
return -ENOMEM;
@@ -1471,7 +1471,7 @@ panthor_open(struct drm_device *ddev, struct drm_file *file)
struct panthor_file *pfile;
int ret;
- pfile = kzalloc_obj(*pfile, GFP_KERNEL);
+ pfile = kzalloc_obj(*pfile);
if (!pfile)
return -ENOMEM;
diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
index 3d94f9cc94d6..4b4575dd6e90 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.c
+++ b/drivers/gpu/drm/panthor/panthor_gem.c
@@ -183,7 +183,7 @@ panthor_kernel_bo_create(struct panthor_device *ptdev, struct panthor_vm *vm,
if (drm_WARN_ON(&ptdev->base, !vm))
return ERR_PTR(-EINVAL);
- kbo = kzalloc_obj(*kbo, GFP_KERNEL);
+ kbo = kzalloc_obj(*kbo);
if (!kbo)
return ERR_PTR(-ENOMEM);
@@ -399,7 +399,7 @@ struct drm_gem_object *panthor_gem_create_object(struct drm_device *ddev, size_t
{
struct panthor_gem_object *obj;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panthor/panthor_heap.c b/drivers/gpu/drm/panthor/panthor_heap.c
index ded9cb83842c..1ee30dc7066f 100644
--- a/drivers/gpu/drm/panthor/panthor_heap.c
+++ b/drivers/gpu/drm/panthor/panthor_heap.c
@@ -145,7 +145,7 @@ static int panthor_alloc_heap_chunk(struct panthor_heap_pool *pool,
struct panthor_heap_chunk_header *hdr;
int ret;
- chunk = kmalloc_obj(*chunk, GFP_KERNEL);
+ chunk = kmalloc_obj(*chunk);
if (!chunk)
return -ENOMEM;
@@ -303,7 +303,7 @@ int panthor_heap_create(struct panthor_heap_pool *pool,
if (!vm)
return -EINVAL;
- heap = kzalloc_obj(*heap, GFP_KERNEL);
+ heap = kzalloc_obj(*heap);
if (!heap) {
ret = -ENOMEM;
goto err_put_vm;
@@ -541,7 +541,7 @@ panthor_heap_pool_create(struct panthor_device *ptdev, struct panthor_vm *vm)
struct panthor_heap_pool *pool;
int ret = 0;
- pool = kzalloc_obj(*pool, GFP_KERNEL);
+ pool = kzalloc_obj(*pool);
if (!pool)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
index c482bbe6fffd..c5ebe68d5a97 100644
--- a/drivers/gpu/drm/panthor/panthor_mmu.c
+++ b/drivers/gpu/drm/panthor/panthor_mmu.c
@@ -1159,7 +1159,7 @@ panthor_vm_op_ctx_prealloc_vmas(struct panthor_vm_op_ctx *op_ctx)
}
for (u32 i = 0; i < vma_count; i++) {
- struct panthor_vma *vma = kzalloc_obj(*vma, GFP_KERNEL);
+ struct panthor_vma *vma = kzalloc_obj(*vma);
if (!vma)
return -ENOMEM;
@@ -1586,7 +1586,7 @@ void panthor_vm_pool_destroy(struct panthor_file *pfile)
*/
int panthor_vm_pool_create(struct panthor_file *pfile)
{
- pfile->vms = kzalloc_obj(*pfile->vms, GFP_KERNEL);
+ pfile->vms = kzalloc_obj(*pfile->vms);
if (!pfile->vms)
return -ENOMEM;
@@ -2425,7 +2425,7 @@ panthor_vm_create(struct panthor_device *ptdev, bool for_mcu,
struct panthor_vm *vm;
int ret;
- vm = kzalloc_obj(*vm, GFP_KERNEL);
+ vm = kzalloc_obj(*vm);
if (!vm)
return ERR_PTR(-ENOMEM);
@@ -2608,7 +2608,7 @@ panthor_vm_bind_job_create(struct drm_file *file,
if (vm->destroyed || vm->unusable)
return ERR_PTR(-EINVAL);
- job = kzalloc_obj(*job, GFP_KERNEL);
+ job = kzalloc_obj(*job);
if (!job)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index e40d7be90bb9..bd703a2904a1 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -3512,7 +3512,7 @@ group_create_queue(struct panthor_group *group,
if (args->priority > CSF_MAX_QUEUE_PRIO)
return ERR_PTR(-EINVAL);
- queue = kzalloc_obj(*queue, GFP_KERNEL);
+ queue = kzalloc_obj(*queue);
if (!queue)
return ERR_PTR(-ENOMEM);
@@ -3659,7 +3659,7 @@ int panthor_group_create(struct panthor_file *pfile,
hweight64(group_args->tiler_core_mask) < group_args->max_tiler_cores)
return -EINVAL;
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
@@ -3853,7 +3853,7 @@ int panthor_group_pool_create(struct panthor_file *pfile)
{
struct panthor_group_pool *gpool;
- gpool = kzalloc_obj(*gpool, GFP_KERNEL);
+ gpool = kzalloc_obj(*gpool);
if (!gpool)
return -ENOMEM;
@@ -3979,7 +3979,7 @@ panthor_job_create(struct panthor_file *pfile,
if (qsubmit->latest_flush & GENMASK(30, 24))
return ERR_PTR(-EINVAL);
- job = kzalloc_obj(*job, GFP_KERNEL);
+ job = kzalloc_obj(*job);
if (!job)
return ERR_PTR(-ENOMEM);
@@ -4011,7 +4011,7 @@ panthor_job_create(struct panthor_file *pfile,
* the previously submitted job.
*/
if (job->call_info.size) {
- job->done_fence = kzalloc_obj(*job->done_fence, GFP_KERNEL);
+ job->done_fence = kzalloc_obj(*job->done_fence);
if (!job->done_fence) {
ret = -ENOMEM;
goto err_put_job;
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 47c7f4e68dc6..0be2c4334b74 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -63,7 +63,7 @@ qxl_ring_create(struct qxl_ring_header *header,
{
struct qxl_ring *ring;
- ring = kmalloc_obj(*ring, GFP_KERNEL);
+ ring = kmalloc_obj(*ring);
if (!ring)
return NULL;
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 3b6e48b28480..f5bd6e96fb90 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -1008,7 +1008,7 @@ static int qdev_crtc_init(struct drm_device *dev, int crtc_id)
struct qxl_device *qdev = to_qxl(dev);
int r;
- qxl_crtc = kzalloc_obj(struct qxl_crtc, GFP_KERNEL);
+ qxl_crtc = kzalloc_obj(struct qxl_crtc);
if (!qxl_crtc)
return -ENOMEM;
@@ -1159,7 +1159,7 @@ static int qdev_output_init(struct drm_device *dev, int num_output)
struct drm_encoder *encoder;
int ret;
- qxl_output = kzalloc_obj(struct qxl_output, GFP_KERNEL);
+ qxl_output = kzalloc_obj(struct qxl_output);
if (!qxl_output)
return -ENOMEM;
diff --git a/drivers/gpu/drm/qxl/qxl_image.c b/drivers/gpu/drm/qxl/qxl_image.c
index 01c56913b582..578e8aa63f24 100644
--- a/drivers/gpu/drm/qxl/qxl_image.c
+++ b/drivers/gpu/drm/qxl/qxl_image.c
@@ -40,7 +40,7 @@ qxl_allocate_chunk(struct qxl_device *qdev,
struct qxl_drm_chunk *chunk;
int ret;
- chunk = kmalloc_obj(struct qxl_drm_chunk, GFP_KERNEL);
+ chunk = kmalloc_obj(struct qxl_drm_chunk);
if (!chunk)
return -ENOMEM;
@@ -63,7 +63,7 @@ qxl_image_alloc_objects(struct qxl_device *qdev,
struct qxl_drm_image *image;
int ret;
- image = kmalloc_obj(struct qxl_drm_image, GFP_KERNEL);
+ image = kmalloc_obj(struct qxl_drm_image);
if (!image)
return -ENOMEM;
diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c
index 14b325703034..313f6c30cac8 100644
--- a/drivers/gpu/drm/qxl/qxl_object.c
+++ b/drivers/gpu/drm/qxl/qxl_object.c
@@ -116,7 +116,7 @@ int qxl_bo_create(struct qxl_device *qdev, unsigned long size,
else
type = ttm_bo_type_device;
*bo_ptr = NULL;
- bo = kzalloc_obj(struct qxl_bo, GFP_KERNEL);
+ bo = kzalloc_obj(struct qxl_bo);
if (bo == NULL)
return -ENOMEM;
size = roundup(size, PAGE_SIZE);
diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
index ec2b1120aef9..b1bf1e798cc6 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -177,7 +177,7 @@ int qxl_release_list_add(struct qxl_release *release, struct qxl_bo *bo)
return 0;
}
- entry = kmalloc_obj(struct qxl_bo_list, GFP_KERNEL);
+ entry = kmalloc_obj(struct qxl_bo_list);
if (!entry)
return -ENOMEM;
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 7ac5e40ac851..5d495c4798a3 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -109,7 +109,7 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
{
struct ttm_tt *ttm;
- ttm = kzalloc_obj(struct ttm_tt, GFP_KERNEL);
+ ttm = kzalloc_obj(struct ttm_tt);
if (ttm == NULL)
return NULL;
if (ttm_tt_init(ttm, bo, page_flags, ttm_cached, 0)) {
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index 01bbbde30914..dbd192650c69 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -1281,7 +1281,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
{
int base;
struct atom_context *ctx =
- kzalloc_obj(struct atom_context, GFP_KERNEL);
+ kzalloc_obj(struct atom_context);
char *str;
char name[512];
int i;
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 0ed85b5dd193..eba8618ccbf1 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -218,7 +218,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
return;
}
- pdata = kmalloc_obj(struct radeon_backlight_privdata, GFP_KERNEL);
+ pdata = kmalloc_obj(struct radeon_backlight_privdata);
if (!pdata) {
DRM_ERROR("Memory allocation failed\n");
goto error;
@@ -2678,7 +2678,7 @@ radeon_add_atom_encoder(struct drm_device *dev,
}
/* add a new one */
- radeon_encoder = kzalloc_obj(struct radeon_encoder, GFP_KERNEL);
+ radeon_encoder = kzalloc_obj(struct radeon_encoder);
if (!radeon_encoder)
return;
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index 36486a9c7b06..670cb0683396 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -1992,7 +1992,7 @@ static int btc_initialize_mc_reg_table(struct radeon_device *rdev)
struct evergreen_mc_reg_table *eg_table = &eg_pi->mc_reg_table;
u8 module_index = rv770_get_memory_module_index(rdev);
- table = kzalloc_obj(struct atom_mc_reg_table, GFP_KERNEL);
+ table = kzalloc_obj(struct atom_mc_reg_table);
if (!table)
return -ENOMEM;
@@ -2526,7 +2526,7 @@ int btc_dpm_init(struct radeon_device *rdev)
struct atom_clock_dividers dividers;
int ret;
- eg_pi = kzalloc_obj(struct evergreen_power_info, GFP_KERNEL);
+ eg_pi = kzalloc_obj(struct evergreen_power_info);
if (eg_pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = eg_pi;
diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index f8de657c3ed0..6814262d2c8f 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -4579,7 +4579,7 @@ static int ci_initialize_mc_reg_table(struct radeon_device *rdev)
u8 module_index = rv770_get_memory_module_index(rdev);
int ret;
- table = kzalloc_obj(struct atom_mc_reg_table, GFP_KERNEL);
+ table = kzalloc_obj(struct atom_mc_reg_table);
if (!table)
return -ENOMEM;
@@ -5533,7 +5533,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
ret = -EINVAL;
goto err_free_ps;
}
- ps = kzalloc_obj(struct ci_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct ci_ps);
if (ps == NULL) {
ret = -ENOMEM;
goto err_free_ps;
@@ -5637,7 +5637,7 @@ int ci_dpm_init(struct radeon_device *rdev)
struct pci_dev *root = rdev->pdev->bus->self;
int ret;
- pi = kzalloc_obj(struct ci_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct ci_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 1fe0eecb3ea3..aef702ff12ee 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -2028,7 +2028,7 @@ int cypress_dpm_init(struct radeon_device *rdev)
struct atom_clock_dividers dividers;
int ret;
- eg_pi = kzalloc_obj(struct evergreen_power_info, GFP_KERNEL);
+ eg_pi = kzalloc_obj(struct evergreen_power_info);
if (eg_pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = eg_pi;
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index 257caf19583a..3142ef4da7f4 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -2769,7 +2769,7 @@ int evergreen_cs_parse(struct radeon_cs_parser *p)
if (p->track == NULL) {
/* initialize tracker, we are in kms */
- track = kzalloc_obj(*track, GFP_KERNEL);
+ track = kzalloc_obj(*track);
if (track == NULL)
return -ENOMEM;
evergreen_cs_track_init(track);
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index 7c896c24f03d..1544c24f4647 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -2470,7 +2470,7 @@ static int kv_parse_power_table(struct radeon_device *rdev)
&non_clock_info_array->nonClockInfo[non_clock_array_index];
if (!rdev->pm.power_state[i].clock_info)
return -EINVAL;
- ps = kzalloc_obj(struct kv_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct kv_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -2519,7 +2519,7 @@ int kv_dpm_init(struct radeon_device *rdev)
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;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index c4305bacd47d..05bc2131376c 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -2104,7 +2104,7 @@ static int ni_init_smc_spll_table(struct radeon_device *rdev)
if (ni_pi->spll_table_start == 0)
return -EINVAL;
- spll_table = kzalloc_obj(SMC_NISLANDS_SPLL_DIV_TABLE, GFP_KERNEL);
+ spll_table = kzalloc_obj(SMC_NISLANDS_SPLL_DIV_TABLE);
if (spll_table == NULL)
return -ENOMEM;
@@ -2879,7 +2879,7 @@ static int ni_initialize_mc_reg_table(struct radeon_device *rdev)
struct ni_mc_reg_table *ni_table = &ni_pi->mc_reg_table;
u8 module_index = rv770_get_memory_module_index(rdev);
- table = kzalloc_obj(struct atom_mc_reg_table, GFP_KERNEL);
+ table = kzalloc_obj(struct atom_mc_reg_table);
if (!table)
return -ENOMEM;
@@ -3147,7 +3147,7 @@ static int ni_initialize_smc_cac_tables(struct radeon_device *rdev)
if (ni_pi->enable_cac == false)
return 0;
- cac_tables = kzalloc_obj(PP_NIslands_CACTABLES, GFP_KERNEL);
+ cac_tables = kzalloc_obj(PP_NIslands_CACTABLES);
if (!cac_tables)
return -ENOMEM;
@@ -4018,7 +4018,7 @@ static int ni_parse_power_table(struct radeon_device *rdev)
power_info->pplib.ucNonClockSize));
if (power_info->pplib.ucStateEntrySize - 1) {
u8 *idx;
- ps = kzalloc_obj(struct ni_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct ni_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -4051,7 +4051,7 @@ int ni_dpm_init(struct radeon_device *rdev)
struct atom_clock_dividers dividers;
int ret;
- ni_pi = kzalloc_obj(struct ni_power_info, GFP_KERNEL);
+ ni_pi = kzalloc_obj(struct ni_power_info);
if (ni_pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = ni_pi;
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 53d336b15662..3ac1a79b6f13 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -2063,7 +2063,7 @@ int r100_cs_parse(struct radeon_cs_parser *p)
struct r100_cs_track *track;
int r;
- track = kzalloc_obj(*track, GFP_KERNEL);
+ track = kzalloc_obj(*track);
if (!track)
return -ENOMEM;
r100_cs_track_clear(p->rdev, track);
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index aad94b49671c..60a784769120 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -1284,7 +1284,7 @@ int r300_cs_parse(struct radeon_cs_parser *p)
struct r100_cs_track *track;
int r;
- track = kzalloc_obj(*track, GFP_KERNEL);
+ track = kzalloc_obj(*track);
if (track == NULL)
return -ENOMEM;
r100_cs_track_clear(p->rdev, track);
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 5db10ad3fd8b..17b2ff2387aa 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -2282,7 +2282,7 @@ int r600_cs_parse(struct radeon_cs_parser *p)
if (p->track == NULL) {
/* initialize tracker, we are in kms */
- track = kzalloc_obj(*track, GFP_KERNEL);
+ track = kzalloc_obj(*track);
if (track == NULL)
return -ENOMEM;
r600_cs_track_init(track);
diff --git a/drivers/gpu/drm/radeon/r600_dpm.c b/drivers/gpu/drm/radeon/r600_dpm.c
index cfe851bf1848..c407db0c26aa 100644
--- a/drivers/gpu/drm/radeon/r600_dpm.c
+++ b/drivers/gpu/drm/radeon/r600_dpm.c
@@ -1197,7 +1197,7 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
(mode_info->atom_context->bios + data_offset +
le16_to_cpu(ext_hdr->usPPMTableOffset));
rdev->pm.dpm.dyn_state.ppm_table =
- kzalloc_obj(struct radeon_ppm_table, GFP_KERNEL);
+ kzalloc_obj(struct radeon_ppm_table);
if (!rdev->pm.dpm.dyn_state.ppm_table) {
r600_free_extended_power_table(rdev);
return -ENOMEM;
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index fb75d0bb8726..84cf71bc1330 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -132,7 +132,7 @@ struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev)
struct pci_dev *pdev = to_pci_dev(dev->dev);
struct radeon_agp_head *head;
- head = kzalloc_obj(*head, GFP_KERNEL);
+ head = kzalloc_obj(*head);
if (!head)
return NULL;
head->bridge = agp_find_bridge(pdev);
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 35c37b6054ad..c4c11d25c636 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1632,7 +1632,7 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
lvds_info =
(union lvds_info *)(mode_info->atom_context->bios + data_offset);
lvds =
- kzalloc_obj(struct radeon_encoder_atom_dig, GFP_KERNEL);
+ kzalloc_obj(struct radeon_encoder_atom_dig);
if (!lvds)
return NULL;
@@ -1961,7 +1961,7 @@ radeon_atombios_get_tv_dac_info(struct radeon_encoder *encoder)
dac_info = (struct _COMPASSIONATE_DATA *)
(mode_info->atom_context->bios + data_offset);
- tv_dac = kzalloc_obj(struct radeon_encoder_tv_dac, GFP_KERNEL);
+ tv_dac = kzalloc_obj(struct radeon_encoder_tv_dac);
if (!tv_dac)
return NULL;
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 6cb0b7cfe510..b96b556b80c8 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -851,7 +851,7 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
struct radeon_encoder_primary_dac *p_dac;
int found = 0;
- p_dac = kzalloc_obj(struct radeon_encoder_primary_dac, GFP_KERNEL);
+ p_dac = kzalloc_obj(struct radeon_encoder_primary_dac);
if (!p_dac)
return NULL;
@@ -1001,7 +1001,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
struct radeon_encoder_tv_dac *tv_dac;
int found = 0;
- tv_dac = kzalloc_obj(struct radeon_encoder_tv_dac, GFP_KERNEL);
+ tv_dac = kzalloc_obj(struct radeon_encoder_tv_dac);
if (!tv_dac)
return NULL;
@@ -1089,7 +1089,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
uint32_t ppll_div_sel, ppll_val;
uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL);
- lvds = kzalloc_obj(struct radeon_encoder_lvds, GFP_KERNEL);
+ lvds = kzalloc_obj(struct radeon_encoder_lvds);
if (!lvds)
return NULL;
@@ -1164,7 +1164,7 @@ struct radeon_encoder_lvds *radeon_combios_get_lvds_info(struct radeon_encoder
lcd_info = combios_get_table_offset(dev, COMBIOS_LCD_INFO_TABLE);
if (lcd_info) {
- lvds = kzalloc_obj(struct radeon_encoder_lvds, GFP_KERNEL);
+ lvds = kzalloc_obj(struct radeon_encoder_lvds);
if (!lvds)
return NULL;
@@ -2634,9 +2634,9 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
if (rdev->pm.power_state) {
/* allocate 1 clock mode per state */
rdev->pm.power_state[0].clock_info =
- kzalloc_objs(struct radeon_pm_clock_info, 1, GFP_KERNEL);
+ kzalloc_objs(struct radeon_pm_clock_info, 1);
rdev->pm.power_state[1].clock_info =
- kzalloc_objs(struct radeon_pm_clock_info, 1, GFP_KERNEL);
+ kzalloc_objs(struct radeon_pm_clock_info, 1);
if (!rdev->pm.power_state[0].clock_info ||
!rdev->pm.power_state[1].clock_info)
goto pm_failed;
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index e5bf06d7b981..b4377dbc99f0 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1887,7 +1887,7 @@ radeon_add_atom_connector(struct drm_device *dev,
}
}
- radeon_connector = kzalloc_obj(struct radeon_connector, GFP_KERNEL);
+ radeon_connector = kzalloc_obj(struct radeon_connector);
if (!radeon_connector)
return;
@@ -2385,7 +2385,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
}
}
- radeon_connector = kzalloc_obj(struct radeon_connector, GFP_KERNEL);
+ radeon_connector = kzalloc_obj(struct radeon_connector);
if (!radeon_connector)
return;
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 3b2cbd69b58b..f021e58d454f 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -93,7 +93,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
p->dma_reloc_idx = 0;
/* FIXME: we assume that each relocs use 4 dwords */
p->nrelocs = chunk->length_dw / 4;
- p->relocs = kvzalloc_objs(struct radeon_bo_list, p->nrelocs, GFP_KERNEL);
+ p->relocs = kvzalloc_objs(struct radeon_bo_list, p->nrelocs);
if (p->relocs == NULL) {
return -ENOMEM;
}
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index c58d24fe74f9..5d523d5dae88 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -974,7 +974,7 @@ static uint32_t cail_ioreg_read(struct card_info *info, uint32_t reg)
int radeon_atombios_init(struct radeon_device *rdev)
{
struct card_info *atom_card_info =
- kzalloc_obj(struct card_info, GFP_KERNEL);
+ kzalloc_obj(struct card_info);
if (!atom_card_info)
return -ENOMEM;
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 4296ebd3dd94..589dc9df34aa 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -494,7 +494,7 @@ static int radeon_crtc_page_flip_target(struct drm_crtc *crtc,
unsigned long flags;
int r;
- work = kzalloc_obj(*work, GFP_KERNEL);
+ work = kzalloc_obj(*work);
if (work == NULL)
return -ENOMEM;
@@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
struct radeon_device *rdev = dev->dev_private;
struct radeon_crtc *radeon_crtc;
- radeon_crtc = kzalloc_obj(*radeon_crtc, GFP_KERNEL);
+ radeon_crtc = kzalloc_obj(*radeon_crtc);
if (radeon_crtc == NULL)
return;
@@ -1346,7 +1346,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
return ERR_PTR(-EINVAL);
}
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (fb == NULL) {
drm_gem_object_put(obj);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c
index 9d760c221c5a..18d61f3f7344 100644
--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
+++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
@@ -228,7 +228,7 @@ int radeon_fbdev_driver_fbdev_probe(struct drm_fb_helper *fb_helper,
}
rbo = gem_to_radeon_bo(gobj);
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (!fb) {
ret = -ENOMEM;
goto err_radeon_fbdev_destroy_pinned_object;
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 6a13299089d5..02a40e4750c7 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -137,7 +137,7 @@ int radeon_fence_emit(struct radeon_device *rdev,
u64 seq;
/* we are protected by the ring emission mutex */
- *fence = kmalloc_obj(struct radeon_fence, GFP_KERNEL);
+ *fence = kmalloc_obj(struct radeon_fence);
if ((*fence) == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index 007d9353b1ab..13a091ec797b 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -912,7 +912,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
if (rec->mm_i2c && (radeon_hw_i2c == 0))
return NULL;
- i2c = kzalloc_obj(struct radeon_i2c_chan, GFP_KERNEL);
+ i2c = kzalloc_obj(struct radeon_i2c_chan);
if (i2c == NULL)
return NULL;
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 9833d77170fc..dc43fd790a9c 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -640,7 +640,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
/* new gpu have virtual address space support */
if (rdev->family >= CHIP_CAYMAN) {
- fpriv = kzalloc_obj(*fpriv, GFP_KERNEL);
+ fpriv = kzalloc_obj(*fpriv);
if (unlikely(!fpriv)) {
r = -ENOMEM;
goto err_suspend;
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index f2bb046a595e..1f82e2b57f5d 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -394,7 +394,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
return;
}
- pdata = kmalloc_obj(struct radeon_backlight_privdata, GFP_KERNEL);
+ pdata = kmalloc_obj(struct radeon_backlight_privdata);
if (!pdata) {
DRM_ERROR("Memory allocation failed\n");
goto error;
@@ -1695,7 +1695,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
struct radeon_encoder_int_tmds *tmds;
bool ret;
- tmds = kzalloc_obj(struct radeon_encoder_int_tmds, GFP_KERNEL);
+ tmds = kzalloc_obj(struct radeon_encoder_int_tmds);
if (!tmds)
return NULL;
@@ -1721,7 +1721,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra
if (rdev->is_atom_bios)
return NULL;
- tmds = kzalloc_obj(struct radeon_encoder_ext_tmds, GFP_KERNEL);
+ tmds = kzalloc_obj(struct radeon_encoder_ext_tmds);
if (!tmds)
return NULL;
@@ -1752,7 +1752,7 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_
}
/* add a new one */
- radeon_encoder = kzalloc_obj(struct radeon_encoder, GFP_KERNEL);
+ radeon_encoder = kzalloc_obj(struct radeon_encoder);
if (!radeon_encoder)
return;
diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
index 28331fef03c5..da0a0b28f2b8 100644
--- a/drivers/gpu/drm/radeon/radeon_semaphore.c
+++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
@@ -36,7 +36,7 @@ int radeon_semaphore_create(struct radeon_device *rdev,
{
int r;
- *semaphore = kmalloc_obj(struct radeon_semaphore, GFP_KERNEL);
+ *semaphore = kmalloc_obj(struct radeon_semaphore);
if (*semaphore == NULL) {
return -ENOMEM;
}
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
index cab04dccbd1d..0b459f7df23b 100644
--- a/drivers/gpu/drm/radeon/radeon_test.c
+++ b/drivers/gpu/drm/radeon/radeon_test.c
@@ -60,7 +60,7 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag)
n = rdev->mc.gtt_size - rdev->gart_pin_size;
n /= size;
- gtt_obj = kzalloc_objs(*gtt_obj, n, GFP_KERNEL);
+ gtt_obj = kzalloc_objs(*gtt_obj, n);
if (!gtt_obj) {
DRM_ERROR("Failed to allocate %d pointers\n", n);
r = 1;
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 4cb141b052b6..e7ab8162ac69 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -492,7 +492,7 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo,
#endif
rbo = container_of(bo, struct radeon_bo, tbo);
- gtt = kzalloc_obj(struct radeon_ttm_tt, GFP_KERNEL);
+ gtt = kzalloc_obj(struct radeon_ttm_tt);
if (gtt == NULL) {
return NULL;
}
@@ -533,7 +533,7 @@ static int radeon_ttm_tt_populate(struct ttm_device *bdev,
bool slave = !!(ttm->page_flags & TTM_TT_FLAG_EXTERNAL);
if (gtt && gtt->userptr) {
- ttm->sg = kzalloc_obj(struct sg_table, GFP_KERNEL);
+ ttm->sg = kzalloc_obj(struct sg_table);
if (!ttm->sg)
return -ENOMEM;
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 5be6cf123d8d..170f1688c211 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -321,7 +321,7 @@ struct radeon_bo_va *radeon_vm_bo_add(struct radeon_device *rdev,
{
struct radeon_bo_va *bo_va;
- bo_va = kzalloc_obj(struct radeon_bo_va, GFP_KERNEL);
+ bo_va = kzalloc_obj(struct radeon_bo_va);
if (bo_va == NULL)
return NULL;
@@ -495,7 +495,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
if (bo_va->it.start || bo_va->it.last) {
/* add a clone of the bo_va to clear the old address */
struct radeon_bo_va *tmp;
- tmp = kzalloc_obj(struct radeon_bo_va, GFP_KERNEL);
+ tmp = kzalloc_obj(struct radeon_bo_va);
if (!tmp) {
mutex_unlock(&vm->mutex);
r = -ENOMEM;
diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs780_dpm.c
index 813ef291b349..af0a032e3ded 100644
--- a/drivers/gpu/drm/radeon/rs780_dpm.c
+++ b/drivers/gpu/drm/radeon/rs780_dpm.c
@@ -826,7 +826,7 @@ static int rs780_parse_power_table(struct radeon_device *rdev)
le16_to_cpu(power_info->pplib.usClockInfoArrayOffset) +
(power_state->v1.ucClockStateIndices[0] *
power_info->pplib.ucClockInfoSize));
- ps = kzalloc_obj(struct igp_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct igp_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -853,7 +853,7 @@ int rs780_dpm_init(struct radeon_device *rdev)
u8 frev, crev;
int ret;
- pi = kzalloc_obj(struct igp_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct igp_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c b/drivers/gpu/drm/radeon/rv6xx_dpm.c
index 2a4c5d79271b..3cb8842fce65 100644
--- a/drivers/gpu/drm/radeon/rv6xx_dpm.c
+++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c
@@ -1905,7 +1905,7 @@ static int rv6xx_parse_power_table(struct radeon_device *rdev)
power_info->pplib.ucNonClockSize));
if (power_info->pplib.ucStateEntrySize - 1) {
u8 *idx;
- ps = kzalloc_obj(struct rv6xx_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct rv6xx_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -1936,7 +1936,7 @@ int rv6xx_dpm_init(struct radeon_device *rdev)
struct rv6xx_power_info *pi;
int ret;
- pi = kzalloc_obj(struct rv6xx_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct rv6xx_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index 0de4b5171aac..4d6ed9668ad1 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -2301,7 +2301,7 @@ int rv7xx_parse_power_table(struct radeon_device *rdev)
power_info->pplib.ucNonClockSize));
if (power_info->pplib.ucStateEntrySize - 1) {
u8 *idx;
- ps = kzalloc_obj(struct rv7xx_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct rv7xx_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -2348,7 +2348,7 @@ int rv770_dpm_init(struct radeon_device *rdev)
struct atom_clock_dividers dividers;
int ret;
- pi = kzalloc_obj(struct rv7xx_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct rv7xx_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index b7897f89dee8..e4e725e4f4e7 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2419,7 +2419,7 @@ static int si_initialize_smc_dte_tables(struct radeon_device *rdev)
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;
@@ -2599,7 +2599,7 @@ static int si_initialize_smc_cac_tables(struct radeon_device *rdev)
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;
@@ -2794,7 +2794,7 @@ static int si_init_smc_spll_table(struct radeon_device *rdev)
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;
@@ -5479,7 +5479,7 @@ static int si_initialize_mc_reg_table(struct radeon_device *rdev)
u8 module_index = rv770_get_memory_module_index(rdev);
int ret;
- table = kzalloc_obj(struct atom_mc_reg_table, GFP_KERNEL);
+ table = kzalloc_obj(struct atom_mc_reg_table);
if (!table)
return -ENOMEM;
@@ -6791,7 +6791,7 @@ static int si_parse_power_table(struct radeon_device *rdev)
&non_clock_info_array->nonClockInfo[non_clock_array_index];
if (!rdev->pm.power_state[i].clock_info)
return -EINVAL;
- ps = kzalloc_obj(struct ni_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct ni_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -6848,7 +6848,7 @@ int si_dpm_init(struct radeon_device *rdev)
struct pci_dev *root = rdev->pdev->bus->self;
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;
rdev->pm.dpm.priv = si_pi;
diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c
index 43d452b65c6a..5f14adeee13e 100644
--- a/drivers/gpu/drm/radeon/sumo_dpm.c
+++ b/drivers/gpu/drm/radeon/sumo_dpm.c
@@ -1494,7 +1494,7 @@ static int sumo_parse_power_table(struct radeon_device *rdev)
kfree(rdev->pm.dpm.ps);
return -EINVAL;
}
- ps = kzalloc_obj(struct sumo_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct sumo_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -1744,7 +1744,7 @@ int sumo_dpm_init(struct radeon_device *rdev)
u32 hw_rev = (RREG32(HW_REV) & ATI_REV_ID_MASK) >> ATI_REV_ID_SHIFT;
int ret;
- pi = kzalloc_obj(struct sumo_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct sumo_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
index a8e8cb8e2b01..34b7beb9cf9a 100644
--- a/drivers/gpu/drm/radeon/trinity_dpm.c
+++ b/drivers/gpu/drm/radeon/trinity_dpm.c
@@ -1725,7 +1725,7 @@ static int trinity_parse_power_table(struct radeon_device *rdev)
kfree(rdev->pm.dpm.ps);
return -EINVAL;
}
- ps = kzalloc_obj(struct sumo_ps, GFP_KERNEL);
+ ps = kzalloc_obj(struct sumo_ps);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
return -ENOMEM;
@@ -1902,7 +1902,7 @@ int trinity_dpm_init(struct radeon_device *rdev)
struct trinity_power_info *pi;
int ret, i;
- pi = kzalloc_obj(struct trinity_power_info, GFP_KERNEL);
+ pi = kzalloc_obj(struct trinity_power_info);
if (pi == NULL)
return -ENOMEM;
rdev->pm.dpm.priv = pi;
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
index dad019714c3e..28a5aa5a14d8 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
@@ -1006,7 +1006,7 @@ static void rcar_du_crtc_reset(struct drm_crtc *crtc)
crtc->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state == NULL)
return;
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
index 6ef11717b2ff..60e6f43b8ab2 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
@@ -381,7 +381,7 @@ struct drm_gem_object *rcar_du_gem_prime_import_sg_table(struct drm_device *dev,
return drm_gem_dma_prime_import_sg_table(dev, attach, sgt);
/* Create a DMA GEM buffer. */
- dma_obj = kzalloc_obj(*dma_obj, GFP_KERNEL);
+ dma_obj = kzalloc_obj(*dma_obj);
if (!dma_obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c
index 29d5574a5d8e..01840feabdbe 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c
@@ -721,7 +721,7 @@ static void rcar_du_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state == NULL)
return;
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
index 87eb80cb931e..94c22d2db197 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
@@ -404,7 +404,7 @@ rcar_du_vsp_plane_atomic_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- copy = kzalloc_obj(*copy, GFP_KERNEL);
+ copy = kzalloc_obj(*copy);
if (copy == NULL)
return NULL;
@@ -429,7 +429,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state == NULL)
return;
@@ -488,7 +488,7 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
num_planes = rcdu->info->num_rpf;
- vsp->planes = kzalloc_objs(*vsp->planes, num_planes, GFP_KERNEL);
+ vsp->planes = kzalloc_objs(*vsp->planes, num_planes);
if (!vsp->planes)
return -ENOMEM;
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
index 0d818663b1ce..e5e6e6a156aa 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
@@ -57,7 +57,7 @@ static int rcar_du_wb_prepare_job(struct drm_writeback_connector *connector,
if (!job->fb)
return 0;
- rjob = kzalloc_obj(*rjob, GFP_KERNEL);
+ rjob = kzalloc_obj(*rjob);
if (!rjob)
return -ENOMEM;
@@ -99,7 +99,7 @@ rcar_du_wb_conn_duplicate_state(struct drm_connector *connector)
if (WARN_ON(!connector->state))
return NULL;
- copy = kzalloc_obj(*copy, GFP_KERNEL);
+ copy = kzalloc_obj(*copy);
if (!copy)
return NULL;
@@ -124,7 +124,7 @@ static void rcar_du_wb_conn_reset(struct drm_connector *connector)
connector->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state == NULL)
return;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
index e9a95a026a2a..18e2b981b691 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
@@ -336,7 +336,7 @@ static void rzg2l_du_crtc_reset(struct drm_crtc *crtc)
crtc->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
index 525889dba500..bd486377f037 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
@@ -249,7 +249,7 @@ rzg2l_du_vsp_plane_atomic_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- copy = kzalloc_obj(*copy, GFP_KERNEL);
+ copy = kzalloc_obj(*copy);
if (!copy)
return NULL;
@@ -274,7 +274,7 @@ static void rzg2l_du_vsp_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return;
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index 931d797c598a..5f460b38596c 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -551,7 +551,7 @@ shmob_drm_connector_init(struct shmob_drm_device *sdev,
return ERR_PTR(-EINVAL);
}
- scon = kzalloc_obj(*scon, GFP_KERNEL);
+ scon = kzalloc_obj(*scon);
if (!scon)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
index 983e4c72002a..b61fda52d17a 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
@@ -260,7 +260,7 @@ static void shmob_drm_plane_reset(struct drm_plane *plane)
plane->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state == NULL)
return;
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index 43688d0322d7..45588b79b3d4 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -36,7 +36,7 @@ rockchip_fb_create(struct drm_device *dev, struct drm_file *file,
struct drm_afbc_framebuffer *afbc_fb;
int ret;
- afbc_fb = kzalloc_obj(*afbc_fb, GFP_KERNEL);
+ afbc_fb = kzalloc_obj(*afbc_fb);
if (!afbc_fb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
index e6216773a6c4..09d14a072d27 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
@@ -289,7 +289,7 @@ static struct rockchip_gem_object *
size = round_up(size, PAGE_SIZE);
- rk_obj = kzalloc_obj(*rk_obj, GFP_KERNEL);
+ rk_obj = kzalloc_obj(*rk_obj);
if (!rk_obj)
return ERR_PTR(-ENOMEM);
@@ -434,7 +434,7 @@ struct sg_table *rockchip_gem_prime_get_sg_table(struct drm_gem_object *obj)
if (rk_obj->pages)
return drm_prime_pages_to_sg(obj->dev, rk_obj->pages, rk_obj->num_pages);
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index b12970bcc588..a195f5c819a2 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -2140,7 +2140,7 @@ static void vop2_crtc_destroy_state(struct drm_crtc *crtc,
static void vop2_crtc_reset(struct drm_crtc *crtc)
{
- struct rockchip_crtc_state *vcstate = kzalloc_obj(*vcstate, GFP_KERNEL);
+ struct rockchip_crtc_state *vcstate = kzalloc_obj(*vcstate);
if (crtc->state)
vop2_crtc_destroy_state(crtc, crtc->state);
diff --git a/drivers/gpu/drm/sitronix/st7920.c b/drivers/gpu/drm/sitronix/st7920.c
index 21d9369d01c3..18fe7a28ed07 100644
--- a/drivers/gpu/drm/sitronix/st7920.c
+++ b/drivers/gpu/drm/sitronix/st7920.c
@@ -459,7 +459,7 @@ static void st7920_primary_plane_reset(struct drm_plane *plane)
drm_WARN_ON_ONCE(plane->dev, plane->state);
- st7920_state = kzalloc_obj(*st7920_state, GFP_KERNEL);
+ st7920_state = kzalloc_obj(*st7920_state);
if (!st7920_state)
return;
@@ -474,7 +474,7 @@ static struct drm_plane_state *st7920_primary_plane_duplicate_state(struct drm_p
if (drm_WARN_ON_ONCE(plane->dev, !plane->state))
return NULL;
- st7920_state = kzalloc_obj(*st7920_state, GFP_KERNEL);
+ st7920_state = kzalloc_obj(*st7920_state);
if (!st7920_state)
return NULL;
@@ -581,7 +581,7 @@ static void st7920_crtc_reset(struct drm_crtc *crtc)
drm_WARN_ON_ONCE(crtc->dev, crtc->state);
- st7920_state = kzalloc_obj(*st7920_state, GFP_KERNEL);
+ st7920_state = kzalloc_obj(*st7920_state);
if (!st7920_state)
return;
@@ -595,7 +595,7 @@ static struct drm_crtc_state *st7920_crtc_duplicate_state(struct drm_crtc *crtc)
if (drm_WARN_ON_ONCE(crtc->dev, !crtc->state))
return NULL;
- st7920_state = kzalloc_obj(*st7920_state, GFP_KERNEL);
+ st7920_state = kzalloc_obj(*st7920_state);
if (!st7920_state)
return NULL;
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index aa08e13e4bb7..6ecf9e2ff61b 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -1396,7 +1396,7 @@ static void ssd130x_primary_plane_reset(struct drm_plane *plane)
drm_WARN_ON_ONCE(plane->dev, plane->state);
- ssd130x_state = kzalloc_obj(*ssd130x_state, GFP_KERNEL);
+ ssd130x_state = kzalloc_obj(*ssd130x_state);
if (!ssd130x_state)
return;
@@ -1553,7 +1553,7 @@ static void ssd130x_crtc_reset(struct drm_crtc *crtc)
drm_WARN_ON_ONCE(crtc->dev, crtc->state);
- ssd130x_state = kzalloc_obj(*ssd130x_state, GFP_KERNEL);
+ ssd130x_state = kzalloc_obj(*ssd130x_state);
if (!ssd130x_state)
return;
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index b0c73fe2731d..d02d71866f2a 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -151,7 +151,7 @@ static int sti_init(struct drm_device *ddev)
{
struct sti_private *private;
- private = kzalloc_obj(*private, GFP_KERNEL);
+ private = kzalloc_obj(*private);
if (!private)
return -ENOMEM;
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index 10e8dbdc6a76..63cb8c7c3636 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -29,7 +29,7 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane)
plane->state = NULL;
}
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state)
__drm_atomic_helper_plane_reset(plane, &state->state);
}
@@ -40,7 +40,7 @@ sun4i_backend_layer_duplicate_state(struct drm_plane *plane)
struct sun4i_layer_state *orig = state_to_sun4i_layer_state(plane->state);
struct sun4i_layer_state *copy;
- copy = kzalloc_obj(*copy, GFP_KERNEL);
+ copy = kzalloc_obj(*copy);
if (!copy)
return NULL;
diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
index 02c59d401b45..808b1eda871a 100644
--- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
+++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
@@ -427,7 +427,7 @@ void drm_sysfb_plane_reset(struct drm_plane *plane)
if (plane->state)
drm_sysfb_plane_state_destroy(to_drm_sysfb_plane_state(plane->state));
- sysfb_plane_state = kzalloc_obj(*sysfb_plane_state, GFP_KERNEL);
+ sysfb_plane_state = kzalloc_obj(*sysfb_plane_state);
if (sysfb_plane_state)
__drm_gem_reset_shadow_plane(plane, &sysfb_plane_state->base);
else
@@ -447,7 +447,7 @@ struct drm_plane_state *drm_sysfb_plane_atomic_duplicate_state(struct drm_plane
return NULL;
sysfb_plane_state = to_drm_sysfb_plane_state(plane_state);
- new_sysfb_plane_state = kzalloc_obj(*new_sysfb_plane_state, GFP_KERNEL);
+ new_sysfb_plane_state = kzalloc_obj(*new_sysfb_plane_state);
if (!new_sysfb_plane_state)
return NULL;
new_shadow_plane_state = &new_sysfb_plane_state->base;
@@ -523,7 +523,7 @@ void drm_sysfb_crtc_reset(struct drm_crtc *crtc)
if (crtc->state)
drm_sysfb_crtc_state_destroy(to_drm_sysfb_crtc_state(crtc->state));
- sysfb_crtc_state = kzalloc_obj(*sysfb_crtc_state, GFP_KERNEL);
+ sysfb_crtc_state = kzalloc_obj(*sysfb_crtc_state);
if (sysfb_crtc_state) {
sysfb_crtc_state->format = sysfb->fb_format;
__drm_atomic_helper_crtc_reset(crtc, &sysfb_crtc_state->base);
@@ -543,7 +543,7 @@ struct drm_crtc_state *drm_sysfb_crtc_atomic_duplicate_state(struct drm_crtc *cr
if (drm_WARN_ON(dev, !crtc_state))
return NULL;
- new_sysfb_crtc_state = kzalloc_obj(*new_sysfb_crtc_state, GFP_KERNEL);
+ new_sysfb_crtc_state = kzalloc_obj(*new_sysfb_crtc_state);
if (!new_sysfb_crtc_state)
return NULL;
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 21cadb50c671..06370b7e0e56 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -812,7 +812,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
const u32 *formats;
int err;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
@@ -1115,7 +1115,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
const u32 *formats;
int err;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
@@ -1263,7 +1263,7 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
const u32 *formats;
int err;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
@@ -1389,7 +1389,7 @@ static void tegra_dc_destroy(struct drm_crtc *crtc)
static void tegra_crtc_reset(struct drm_crtc *crtc)
{
- struct tegra_dc_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct tegra_dc_state *state = kzalloc_obj(*state);
if (crtc->state)
tegra_crtc_atomic_destroy_state(crtc, crtc->state);
@@ -1406,7 +1406,7 @@ tegra_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
struct tegra_dc_state *state = to_dc_state(crtc->state);
struct tegra_dc_state *copy;
- copy = kmalloc_obj(*copy, GFP_KERNEL);
+ copy = kmalloc_obj(*copy);
if (!copy)
return NULL;
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 1d1bbeae4522..1dcef4e7d104 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -104,7 +104,7 @@ static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp)
{
struct tegra_drm_file *fpriv;
- fpriv = kzalloc_obj(*fpriv, GFP_KERNEL);
+ fpriv = kzalloc_obj(*fpriv);
if (!fpriv)
return -ENOMEM;
@@ -212,7 +212,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
*/
num_refs = num_cmdbufs + num_relocs * 2;
- refs = kmalloc_objs(*refs, num_refs, GFP_KERNEL);
+ refs = kmalloc_objs(*refs, num_refs);
if (!refs) {
err = -ENOMEM;
goto put;
@@ -465,7 +465,7 @@ static int tegra_open_channel(struct drm_device *drm, void *data,
struct tegra_drm_client *client;
int err = -ENODEV;
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context)
return -ENOMEM;
@@ -1147,7 +1147,7 @@ static int host1x_drm_probe(struct host1x_device *dev)
if (IS_ERR(drm))
return PTR_ERR(drm);
- tegra = kzalloc_obj(*tegra, GFP_KERNEL);
+ tegra = kzalloc_obj(*tegra);
if (!tegra) {
err = -ENOMEM;
goto put;
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index f28e7bd63508..2c5aefe9621a 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -772,7 +772,7 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi)
static void tegra_dsi_connector_reset(struct drm_connector *connector)
{
- struct tegra_dsi_state *state = kzalloc_obj(*state, GFP_KERNEL);
+ struct tegra_dsi_state *state = kzalloc_obj(*state);
if (!state)
return;
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index e795570776fd..1e4803d355dd 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -112,7 +112,7 @@ struct drm_framebuffer *tegra_fb_alloc(struct drm_device *drm,
unsigned int i;
int err;
- fb = kzalloc_obj(*fb, GFP_KERNEL);
+ fb = kzalloc_obj(*fb);
if (!fb)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index c7355b11424c..d2bae88ad545 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -64,7 +64,7 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_
struct host1x_bo_mapping *map;
int err;
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map)
return ERR_PTR(-ENOMEM);
@@ -103,7 +103,7 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_
* If we don't have a mapping for this buffer yet, return an SG table
* so that host1x can do the mapping for us via the DMA API.
*/
- map->sgt = kzalloc_obj(*map->sgt, GFP_KERNEL);
+ map->sgt = kzalloc_obj(*map->sgt);
if (!map->sgt) {
err = -ENOMEM;
goto free;
@@ -240,7 +240,7 @@ static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)
if (bo->mm)
return -EBUSY;
- bo->mm = kzalloc_obj(*bo->mm, GFP_KERNEL);
+ bo->mm = kzalloc_obj(*bo->mm);
if (!bo->mm)
return -ENOMEM;
@@ -302,7 +302,7 @@ static struct tegra_bo *tegra_bo_alloc_object(struct drm_device *drm,
struct tegra_bo *bo;
int err;
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
@@ -639,7 +639,7 @@ tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach,
struct tegra_bo *bo = to_tegra_bo(gem);
struct sg_table *sgt;
- sgt = kmalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kmalloc_obj(*sgt);
if (!sgt)
return NULL;
diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c
index e0f84efb3b76..a6fa196c2813 100644
--- a/drivers/gpu/drm/tegra/hub.c
+++ b/drivers/gpu/drm/tegra/hub.c
@@ -769,7 +769,7 @@ struct drm_plane *tegra_shared_plane_create(struct drm_device *drm,
const u32 *formats;
int err;
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
@@ -943,7 +943,7 @@ static int tegra_display_hub_init(struct host1x_client *client)
struct tegra_drm *tegra = drm->dev_private;
struct tegra_display_hub_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
index ce49c2de2c08..0cb30910773f 100644
--- a/drivers/gpu/drm/tegra/plane.c
+++ b/drivers/gpu/drm/tegra/plane.c
@@ -36,7 +36,7 @@ static void tegra_plane_reset(struct drm_plane *plane)
kfree(plane->state);
plane->state = NULL;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (state) {
plane->state = &state->base;
plane->state->plane = plane;
@@ -55,7 +55,7 @@ tegra_plane_atomic_duplicate_state(struct drm_plane *plane)
struct tegra_plane_state *copy;
unsigned int i;
- copy = kmalloc_obj(*copy, GFP_KERNEL);
+ copy = kmalloc_obj(*copy);
if (!copy)
return NULL;
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index a2cb68f42612..de8b2dfc4984 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1721,7 +1721,7 @@ static void tegra_sor_connector_reset(struct drm_connector *connector)
{
struct tegra_sor_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return;
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 7747d5b9f3ca..3009b8b9e619 100644
--- a/drivers/gpu/drm/tegra/submit.c
+++ b/drivers/gpu/drm/tegra/submit.c
@@ -71,7 +71,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction
struct host1x_bo_mapping *map;
int err;
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map)
return ERR_PTR(-ENOMEM);
@@ -80,7 +80,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction
map->direction = direction;
map->dev = dev;
- map->sgt = kzalloc_obj(*map->sgt, GFP_KERNEL);
+ map->sgt = kzalloc_obj(*map->sgt);
if (!map->sgt) {
err = -ENOMEM;
goto free;
@@ -193,7 +193,7 @@ static int submit_copy_gather_data(struct gather_bo **pbo, struct device *dev,
return -EINVAL;
}
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo) {
SUBMIT_ERR(context, "failed to allocate memory for bo info");
return -ENOMEM;
@@ -270,7 +270,7 @@ static int submit_process_bufs(struct tegra_drm_context *context, struct gather_
return PTR_ERR(bufs);
}
- mappings = kzalloc_objs(*mappings, args->num_bufs, GFP_KERNEL);
+ mappings = kzalloc_objs(*mappings, args->num_bufs);
if (!mappings) {
SUBMIT_ERR(context, "failed to allocate memory for mapping info");
err = -ENOMEM;
@@ -560,7 +560,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
if (err)
goto unlock;
- job_data = kzalloc_obj(*job_data, GFP_KERNEL);
+ job_data = kzalloc_obj(*job_data);
if (!job_data) {
SUBMIT_ERR(context, "failed to allocate memory for job data");
err = -ENOMEM;
diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c
index c4061d0f69a7..c0ac6b45f2d7 100644
--- a/drivers/gpu/drm/tegra/uapi.c
+++ b/drivers/gpu/drm/tegra/uapi.c
@@ -86,7 +86,7 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_
if (args->flags)
return -EINVAL;
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context)
return -ENOMEM;
@@ -206,7 +206,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f
return -EINVAL;
}
- mapping = kzalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kzalloc_obj(*mapping);
if (!mapping) {
err = -ENOMEM;
goto unlock;
diff --git a/drivers/gpu/drm/tests/drm_gem_shmem_test.c b/drivers/gpu/drm/tests/drm_gem_shmem_test.c
index f401b9c42a9c..44a190109249 100644
--- a/drivers/gpu/drm/tests/drm_gem_shmem_test.c
+++ b/drivers/gpu/drm/tests/drm_gem_shmem_test.c
@@ -80,7 +80,7 @@ static void drm_gem_shmem_test_obj_create_private(struct kunit *test)
buf = kunit_kzalloc(test, TEST_SIZE, GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, buf);
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
KUNIT_ASSERT_NOT_NULL(test, sgt);
ret = kunit_add_action_or_reset(test, kfree_wrapper, sgt);
diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c
index 6a1a27ee5f36..f4f473f87838 100644
--- a/drivers/gpu/drm/tests/drm_mm_test.c
+++ b/drivers/gpu/drm/tests/drm_mm_test.c
@@ -252,7 +252,7 @@ static void drm_test_mm_align_pot(struct kunit *test, int max)
for (bit = max - 1; bit; bit--) {
u64 align, size;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node) {
KUNIT_FAIL(test, "failed to allocate node");
goto out;
diff --git a/drivers/gpu/drm/tests/drm_panic_test.c b/drivers/gpu/drm/tests/drm_panic_test.c
index a36f5106c139..ad2f3a2f93b6 100644
--- a/drivers/gpu/drm/tests/drm_panic_test.c
+++ b/drivers/gpu/drm/tests/drm_panic_test.c
@@ -127,7 +127,7 @@ static void drm_test_panic_screen_user_page(struct kunit *test)
fb_size = params->width * params->height * sb->format->cpp[0];
npages = DIV_ROUND_UP(fb_size, PAGE_SIZE);
- pages = kmalloc_objs(struct page *, npages, GFP_KERNEL);
+ pages = kmalloc_objs(struct page *, npages);
KUNIT_ASSERT_NOT_NULL(test, pages);
for (p = 0; p < npages; p++) {
diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c
index e7fc496e2ce4..a31c21c5f855 100644
--- a/drivers/gpu/drm/tidss/tidss_crtc.c
+++ b/drivers/gpu/drm/tidss/tidss_crtc.c
@@ -364,7 +364,7 @@ static void tidss_crtc_reset(struct drm_crtc *crtc)
if (crtc->state)
tidss_crtc_destroy_state(crtc, crtc->state);
- tstate = kzalloc_obj(*tstate, GFP_KERNEL);
+ tstate = kzalloc_obj(*tstate);
if (!tstate) {
crtc->state = NULL;
return;
@@ -382,7 +382,7 @@ static struct drm_crtc_state *tidss_crtc_duplicate_state(struct drm_crtc *crtc)
current_state = to_tidss_crtc_state(crtc->state);
- state = kmalloc_obj(*state, GFP_KERNEL);
+ state = kmalloc_obj(*state);
if (!state)
return NULL;
@@ -425,7 +425,7 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
bool has_ctm = tidss->feat->vp_feat.color.has_ctm;
int ret;
- tcrtc = kzalloc_obj(*tcrtc, GFP_KERNEL);
+ tcrtc = kzalloc_obj(*tcrtc);
if (!tcrtc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/tidss/tidss_plane.c b/drivers/gpu/drm/tidss/tidss_plane.c
index a8e681c4e03b..aaa02c851c59 100644
--- a/drivers/gpu/drm/tidss/tidss_plane.c
+++ b/drivers/gpu/drm/tidss/tidss_plane.c
@@ -203,7 +203,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
BIT(DRM_MODE_BLEND_COVERAGE));
int ret;
- tplane = kzalloc_obj(*tplane, GFP_KERNEL);
+ tplane = kzalloc_obj(*tplane);
if (!tplane)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index ed0822b3a020..1de3996501f7 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -272,7 +272,7 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
return NULL;
}
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
goto put_node;
diff --git a/drivers/gpu/drm/tiny/appletbdrm.c b/drivers/gpu/drm/tiny/appletbdrm.c
index 585c1a0ec025..0b0c058e9013 100644
--- a/drivers/gpu/drm/tiny/appletbdrm.c
+++ b/drivers/gpu/drm/tiny/appletbdrm.c
@@ -225,7 +225,7 @@ static int appletbdrm_send_msg(struct appletbdrm_device *adev, __le32 msg)
struct appletbdrm_msg_simple_request *request;
int ret;
- request = kzalloc_obj(*request, GFP_KERNEL);
+ request = kzalloc_obj(*request);
if (!request)
return -ENOMEM;
@@ -260,7 +260,7 @@ static int appletbdrm_get_information(struct appletbdrm_device *adev)
__le32 pixel_format;
int ret;
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
@@ -506,7 +506,7 @@ static void appletbdrm_primary_plane_reset(struct drm_plane *plane)
WARN_ON(plane->state);
- appletbdrm_state = kzalloc_obj(*appletbdrm_state, GFP_KERNEL);
+ appletbdrm_state = kzalloc_obj(*appletbdrm_state);
if (!appletbdrm_state)
return;
@@ -521,7 +521,7 @@ static struct drm_plane_state *appletbdrm_primary_plane_duplicate_state(struct d
if (WARN_ON(!plane->state))
return NULL;
- appletbdrm_state = kzalloc_obj(*appletbdrm_state, GFP_KERNEL);
+ appletbdrm_state = kzalloc_obj(*appletbdrm_state);
if (!appletbdrm_state)
return NULL;
diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
index 5cefc50304e4..5cfe8f3f80d7 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
@@ -49,7 +49,7 @@ static struct ttm_tt *ttm_tt_simple_create(struct ttm_buffer_object *bo, u32 pag
{
struct ttm_tt *tt;
- tt = kzalloc_obj(*tt, GFP_KERNEL);
+ tt = kzalloc_obj(*tt);
ttm_tt_init(tt, bo, page_flags, ttm_cached, 0);
return tt;
diff --git a/drivers/gpu/drm/ttm/tests/ttm_mock_manager.c b/drivers/gpu/drm/ttm/tests/ttm_mock_manager.c
index d6558f5c7e48..c97e8b7a4e7a 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_mock_manager.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_mock_manager.c
@@ -35,7 +35,7 @@ static int ttm_mock_manager_alloc(struct ttm_resource_manager *man,
u64 lpfn, fpfn, alloc_size;
int err;
- mock_res = kzalloc_obj(*mock_res, GFP_KERNEL);
+ mock_res = kzalloc_obj(*mock_res);
if (!mock_res)
return -ENOMEM;
@@ -100,7 +100,7 @@ int ttm_mock_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size)
struct ttm_resource_manager *base;
int err;
- manager = kzalloc_obj(*manager, GFP_KERNEL);
+ manager = kzalloc_obj(*manager);
if (!manager)
return -ENOMEM;
@@ -194,7 +194,7 @@ int ttm_bad_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size)
{
struct ttm_resource_manager *man;
- man = kzalloc_obj(*man, GFP_KERNEL);
+ man = kzalloc_obj(*man);
if (!man)
return -ENOMEM;
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index a973aafd6f7f..147e25ee53ba 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -128,7 +128,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
{
struct ttm_agp_backend *agp_be;
- agp_be = kmalloc_obj(*agp_be, GFP_KERNEL);
+ agp_be = kmalloc_obj(*agp_be);
if (!agp_be)
return NULL;
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 93871aaa33b2..f83b7d5ec6c6 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -233,7 +233,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
struct ttm_transfer_obj *fbo;
int ret;
- fbo = kmalloc_obj(*fbo, GFP_KERNEL);
+ fbo = kmalloc_obj(*fbo);
if (!fbo)
return -ENOMEM;
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index b1fa78edad1f..c0d95559197c 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -164,7 +164,7 @@ static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
return p;
}
- dma = kmalloc_obj(*dma, GFP_KERNEL);
+ dma = kmalloc_obj(*dma);
if (!dma)
return NULL;
diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
index b223b873d0c6..616978b8d945 100644
--- a/drivers/gpu/drm/ttm/ttm_range_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
@@ -184,7 +184,7 @@ int ttm_range_man_init_nocheck(struct ttm_device *bdev,
struct ttm_resource_manager *man;
struct ttm_range_manager *rman;
- rman = kzalloc_obj(*rman, GFP_KERNEL);
+ rman = kzalloc_obj(*rman);
if (!rman)
return -ENOMEM;
diff --git a/drivers/gpu/drm/ttm/ttm_sys_manager.c b/drivers/gpu/drm/ttm/ttm_sys_manager.c
index fb3e9869704a..04398bb9c710 100644
--- a/drivers/gpu/drm/ttm/ttm_sys_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_sys_manager.c
@@ -12,7 +12,7 @@ static int ttm_sys_man_alloc(struct ttm_resource_manager *man,
const struct ttm_place *place,
struct ttm_resource **res)
{
- *res = kzalloc_obj(**res, GFP_KERNEL);
+ *res = kzalloc_obj(**res);
if (!*res)
return -ENOMEM;
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index 27dac7cc50a6..08a0e9480d70 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -218,7 +218,7 @@ retry:
udl->urbs.size = size;
while (udl->urbs.count * size < wanted_size) {
- unode = kzalloc_obj(struct urb_node, GFP_KERNEL);
+ unode = kzalloc_obj(struct urb_node);
if (!unode)
break;
unode->dev = udl;
diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
index 146bcb30f37b..a847d2f0ccf5 100644
--- a/drivers/gpu/drm/v3d/v3d_bo.c
+++ b/drivers/gpu/drm/v3d/v3d_bo.c
@@ -86,7 +86,7 @@ struct drm_gem_object *v3d_create_object(struct drm_device *dev, size_t size)
if (size == 0)
return ERR_PTR(-EINVAL);
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
obj = &bo->base.base;
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 0ed83100c95a..dd60acdf52c2 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -133,7 +133,7 @@ v3d_open(struct drm_device *dev, struct drm_file *file)
struct drm_gpu_scheduler *sched;
int i;
- v3d_priv = kzalloc_obj(*v3d_priv, GFP_KERNEL);
+ v3d_priv = kzalloc_obj(*v3d_priv);
if (!v3d_priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/v3d/v3d_fence.c b/drivers/gpu/drm/v3d/v3d_fence.c
index 0deaf636387e..3c999f60003c 100644
--- a/drivers/gpu/drm/v3d/v3d_fence.c
+++ b/drivers/gpu/drm/v3d/v3d_fence.c
@@ -8,7 +8,7 @@ struct dma_fence *v3d_fence_create(struct v3d_dev *v3d, enum v3d_queue q)
struct v3d_queue_state *queue = &v3d->queue[q];
struct v3d_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c
index 86229323eeac..9c11a6b945ff 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
@@ -528,7 +528,7 @@ static struct drm_plane *vbox_create_plane(struct vbox_private *vbox,
return ERR_PTR(-EINVAL);
}
- plane = kzalloc_obj(*plane, GFP_KERNEL);
+ plane = kzalloc_obj(*plane);
if (!plane)
return ERR_PTR(-ENOMEM);
@@ -562,7 +562,7 @@ static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i)
if (ret)
return ERR_PTR(ret);
- vbox_crtc = kzalloc_obj(*vbox_crtc, GFP_KERNEL);
+ vbox_crtc = kzalloc_obj(*vbox_crtc);
if (!vbox_crtc)
return ERR_PTR(-ENOMEM);
@@ -622,7 +622,7 @@ static struct drm_encoder *vbox_encoder_init(struct drm_device *dev,
{
struct vbox_encoder *vbox_encoder;
- vbox_encoder = kzalloc_obj(*vbox_encoder, GFP_KERNEL);
+ vbox_encoder = kzalloc_obj(*vbox_encoder);
if (!vbox_encoder)
return NULL;
@@ -808,7 +808,7 @@ static int vbox_connector_init(struct drm_device *dev,
struct vbox_connector *vbox_connector;
struct drm_connector *connector;
- vbox_connector = kzalloc_obj(*vbox_connector, GFP_KERNEL);
+ vbox_connector = kzalloc_obj(*vbox_connector);
if (!vbox_connector)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 274cad424059..7e86e89360e2 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -205,7 +205,7 @@ static struct list_head *vc4_get_cache_list_for_size(struct drm_device *dev,
struct list_head *new_list;
uint32_t i;
- new_list = kmalloc_objs(struct list_head, new_size, GFP_KERNEL);
+ new_list = kmalloc_objs(struct list_head, new_size);
if (!new_list)
return NULL;
@@ -399,7 +399,7 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4))
return ERR_PTR(-ENODEV);
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index 27a9eab1c2d0..4a606986afcc 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -997,7 +997,7 @@ vc4_async_page_flip_common(struct drm_crtc *crtc,
struct drm_plane *plane = crtc->primary;
struct vc4_async_flip_state *flip_state;
- flip_state = kzalloc_obj(*flip_state, GFP_KERNEL);
+ flip_state = kzalloc_obj(*flip_state);
if (!flip_state)
return -ENOMEM;
@@ -1105,7 +1105,7 @@ struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc)
{
struct vc4_crtc_state *vc4_state, *old_vc4_state;
- vc4_state = kzalloc_obj(*vc4_state, GFP_KERNEL);
+ vc4_state = kzalloc_obj(*vc4_state);
if (!vc4_state)
return NULL;
@@ -1142,7 +1142,7 @@ void vc4_crtc_reset(struct drm_crtc *crtc)
if (crtc->state)
vc4_crtc_destroy_state(crtc, crtc->state);
- vc4_crtc_state = kzalloc_obj(*vc4_crtc_state, GFP_KERNEL);
+ vc4_crtc_state = kzalloc_obj(*vc4_crtc_state);
if (!vc4_crtc_state) {
crtc->state = NULL;
return;
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 0677458e28f8..a14ecb769461 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -152,7 +152,7 @@ static int vc4_open(struct drm_device *dev, struct drm_file *file)
if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4))
return -ENODEV;
- vc4file = kzalloc_obj(*vc4file, GFP_KERNEL);
+ vc4file = kzalloc_obj(*vc4file);
if (!vc4file)
return -ENOMEM;
vc4file->dev = vc4;
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 42b6dcbaa01b..ad8cbd727b80 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -110,7 +110,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data,
state->bo = get_state->bo;
memcpy(get_state, state, sizeof(*state));
- bo_state = kzalloc_objs(*bo_state, state->bo_count, GFP_KERNEL);
+ bo_state = kzalloc_objs(*bo_state, state->bo_count);
if (!bo_state) {
ret = -ENOMEM;
goto err_free;
@@ -161,7 +161,7 @@ vc4_save_hang_state(struct drm_device *dev)
unsigned long irqflags;
unsigned int i, j, k, unref_list_count;
- kernel_state = kzalloc_objs(*kernel_state, 1, GFP_KERNEL);
+ kernel_state = kzalloc_objs(*kernel_state, 1);
if (!kernel_state)
return;
@@ -622,7 +622,7 @@ vc4_queue_submit(struct drm_device *dev, struct vc4_exec_info *exec,
unsigned long irqflags;
struct vc4_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return -ENOMEM;
fence->dev = dev;
@@ -1043,7 +1043,7 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
}
- exec = kzalloc_objs(*exec, 1, GFP_KERNEL);
+ exec = kzalloc_objs(*exec, 1);
if (!exec)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index ef5825a00bc3..fda214b5a466 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2941,7 +2941,7 @@ static int vc4_hdmi_build_regset(struct drm_device *drm,
unsigned int i;
int ret;
- regs = kzalloc_objs(*regs, variant->num_registers, GFP_KERNEL);
+ regs = kzalloc_objs(*regs, variant->num_registers);
if (!regs)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index de39992bbaa2..245485e744a5 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -103,7 +103,7 @@ static int vc4_ctm_obj_init(struct vc4_dev *vc4)
drm_modeset_lock_init(&vc4->ctm_state_lock);
- ctm_state = kzalloc_obj(*ctm_state, GFP_KERNEL);
+ ctm_state = kzalloc_obj(*ctm_state);
if (!ctm_state)
return -ENOMEM;
@@ -734,7 +734,7 @@ static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)
{
struct vc4_load_tracker_state *load_state;
- load_state = kzalloc_obj(*load_state, GFP_KERNEL);
+ load_state = kzalloc_obj(*load_state);
if (!load_state)
return -ENOMEM;
@@ -752,7 +752,7 @@ vc4_hvs_channels_duplicate_state(struct drm_private_obj *obj)
struct vc4_hvs_state *state;
unsigned int i;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
@@ -817,7 +817,7 @@ static int vc4_hvs_channels_obj_init(struct vc4_dev *vc4)
{
struct vc4_hvs_state *state;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
@@ -911,7 +911,7 @@ static int vc4_pv_muxing_atomic_check(struct drm_device *dev,
* If the layout changes and doesn't give us that in the future,
* we will need to have something smarter, but it works so far.
*/
- sorted_crtcs = kmalloc_objs(*sorted_crtcs, dev->num_crtcs, GFP_KERNEL);
+ sorted_crtcs = kmalloc_objs(*sorted_crtcs, dev->num_crtcs);
if (!sorted_crtcs)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 26392ae43b99..91d499fefba2 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -374,7 +374,7 @@ static void vc4_plane_reset(struct drm_plane *plane)
kfree(plane->state);
- vc4_state = kzalloc_obj(*vc4_state, GFP_KERNEL);
+ vc4_state = kzalloc_obj(*vc4_state);
if (!vc4_state)
return;
diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c
index 8e2fe5eef1b9..d48cf76983c0 100644
--- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c
+++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c
@@ -803,7 +803,7 @@ vc4_validate_shader(struct drm_gem_dma_object *shader_obj)
if (!validation_state.branch_targets)
goto fail;
- validated_shader = kzalloc_objs(*validated_shader, 1, GFP_KERNEL);
+ validated_shader = kzalloc_objs(*validated_shader, 1);
if (!validated_shader)
goto fail;
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 7dc9e2e422f5..a9f5c247db71 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -60,7 +60,7 @@ static int vgem_open(struct drm_device *dev, struct drm_file *file)
struct vgem_file *vfile;
int ret;
- vfile = kzalloc_obj(*vfile, GFP_KERNEL);
+ vfile = kzalloc_obj(*vfile);
if (!vfile)
return -ENOMEM;
@@ -94,7 +94,7 @@ static struct drm_gem_object *vgem_gem_create_object(struct drm_device *dev, siz
{
struct drm_gem_shmem_object *obj;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c
index 313e706abe37..0e53ba7db629 100644
--- a/drivers/gpu/drm/vgem/vgem_fence.c
+++ b/drivers/gpu/drm/vgem/vgem_fence.c
@@ -71,7 +71,7 @@ static struct dma_fence *vgem_fence_create(struct vgem_file *vfile,
{
struct vgem_fence *fence;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (!fence)
return NULL;
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index a4b7761d9250..f1dae9569805 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -334,7 +334,7 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
if (!obj)
return ERR_PTR(-EINVAL);
- virtio_gpu_fb = kzalloc_obj(*virtio_gpu_fb, GFP_KERNEL);
+ virtio_gpu_fb = kzalloc_obj(*virtio_gpu_fb);
if (virtio_gpu_fb == NULL) {
drm_gem_object_put(obj);
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
index b1a13946d4db..80ba69b4860b 100644
--- a/drivers/gpu/drm/virtio/virtgpu_kms.c
+++ b/drivers/gpu/drm/virtio/virtgpu_kms.c
@@ -316,7 +316,7 @@ int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file)
return 0;
/* allocate a virt GPU context for this opener */
- vfpriv = kzalloc_obj(*vfpriv, GFP_KERNEL);
+ vfpriv = kzalloc_obj(*vfpriv);
if (!vfpriv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index c7381c564492..ec9efacc6919 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -149,7 +149,7 @@ struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev,
struct virtio_gpu_object_shmem *shmem;
struct drm_gem_shmem_object *dshmem;
- shmem = kzalloc_obj(*shmem, GFP_KERNEL);
+ shmem = kzalloc_obj(*shmem);
if (!shmem)
return ERR_PTR(-ENOMEM);
@@ -177,7 +177,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
else
*nents = pages->orig_nents;
- *ents = kvmalloc_objs(struct virtio_gpu_mem_entry, *nents, GFP_KERNEL);
+ *ents = kvmalloc_objs(struct virtio_gpu_mem_entry, *nents);
if (!(*ents)) {
DRM_ERROR("failed to allocate ent list\n");
return -ENOMEM;
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 9b72ece71264..a126d1b25f46 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -79,7 +79,7 @@ drm_plane_state *virtio_gpu_plane_duplicate_state(struct drm_plane *plane)
if (WARN_ON(!plane->state))
return NULL;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
index 9cae1f3b18e8..94ad448c35b6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_prime.c
+++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
@@ -314,7 +314,7 @@ struct drm_gem_object *virtgpu_gem_prime_import(struct drm_device *dev,
if (!vgdev->has_resource_blob || vgdev->has_virgl_3d)
return drm_gem_prime_import(dev, buf);
- bo = kzalloc_obj(*bo, GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c b/drivers/gpu/drm/virtio/virtgpu_submit.c
index 8f171d87545f..dae761fa5788 100644
--- a/drivers/gpu/drm/virtio/virtgpu_submit.c
+++ b/drivers/gpu/drm/virtio/virtgpu_submit.c
@@ -104,7 +104,7 @@ virtio_gpu_parse_deps(struct virtio_gpu_submit *submit)
* internally for allocations larger than a page size, preventing
* storm of KMSG warnings.
*/
- syncobjs = kvzalloc_objs(*syncobjs, num_in_syncobjs, GFP_KERNEL);
+ syncobjs = kvzalloc_objs(*syncobjs, num_in_syncobjs);
if (!syncobjs)
return -ENOMEM;
@@ -195,7 +195,7 @@ static int virtio_gpu_parse_post_deps(struct virtio_gpu_submit *submit)
if (!num_out_syncobjs)
return 0;
- post_deps = kvzalloc_objs(*post_deps, num_out_syncobjs, GFP_KERNEL);
+ post_deps = kvzalloc_objs(*post_deps, num_out_syncobjs);
if (!post_deps)
return -ENOMEM;
@@ -277,7 +277,7 @@ static int virtio_gpu_fence_event_create(struct drm_device *dev,
struct virtio_gpu_fence_event *e = NULL;
int ret;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
return -ENOMEM;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 9a45a58e9f58..67865810a2e7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -312,7 +312,7 @@ static struct sg_table *vmalloc_to_sgt(char *data, uint32_t size, int *sg_ents)
if (WARN_ON(!PAGE_ALIGNED(data)))
return NULL;
- sgt = kmalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kmalloc_obj(*sgt);
if (!sgt)
return NULL;
@@ -936,7 +936,7 @@ int virtio_gpu_cmd_get_display_info(struct virtio_gpu_device *vgdev)
struct virtio_gpu_vbuffer *vbuf;
void *resp_buf;
- resp_buf = kzalloc_obj(struct virtio_gpu_resp_display_info, GFP_KERNEL);
+ resp_buf = kzalloc_obj(struct virtio_gpu_resp_display_info);
if (!resp_buf)
return -ENOMEM;
@@ -958,7 +958,7 @@ int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx)
struct virtio_gpu_vbuffer *vbuf;
void *resp_buf;
- resp_buf = kzalloc_obj(struct virtio_gpu_resp_capset_info, GFP_KERNEL);
+ resp_buf = kzalloc_obj(struct virtio_gpu_resp_capset_info);
if (!resp_buf)
return -ENOMEM;
@@ -993,7 +993,7 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,
if (version > vgdev->capsets[idx].max_version)
return -EINVAL;
- cache_ent = kzalloc_obj(*cache_ent, GFP_KERNEL);
+ cache_ent = kzalloc_obj(*cache_ent);
if (!cache_ent)
return -ENOMEM;
@@ -1061,7 +1061,7 @@ int virtio_gpu_cmd_get_edids(struct virtio_gpu_device *vgdev)
return -EINVAL;
for (scanout = 0; scanout < vgdev->num_scanouts; scanout++) {
- resp_buf = kzalloc_obj(struct virtio_gpu_resp_edid, GFP_KERNEL);
+ resp_buf = kzalloc_obj(struct virtio_gpu_resp_edid);
if (!resp_buf)
return -ENOMEM;
@@ -1338,7 +1338,7 @@ virtio_gpu_cmd_resource_assign_uuid(struct virtio_gpu_device *vgdev,
struct virtio_gpu_vbuffer *vbuf;
struct virtio_gpu_resp_resource_uuid *resp_buf;
- resp_buf = kzalloc_obj(*resp_buf, GFP_KERNEL);
+ resp_buf = kzalloc_obj(*resp_buf);
if (!resp_buf) {
spin_lock(&vgdev->resource_export_lock);
bo->uuid_state = STATE_ERR;
@@ -1391,7 +1391,7 @@ int virtio_gpu_cmd_map(struct virtio_gpu_device *vgdev,
struct virtio_gpu_vbuffer *vbuf;
struct virtio_gpu_resp_map_info *resp_buf;
- resp_buf = kzalloc_obj(*resp_buf, GFP_KERNEL);
+ resp_buf = kzalloc_obj(*resp_buf);
if (!resp_buf)
return -ENOMEM;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vram.c b/drivers/gpu/drm/virtio/virtgpu_vram.c
index da5d4ee8ddef..084e80227433 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vram.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vram.c
@@ -79,7 +79,7 @@ struct sg_table *virtio_gpu_vram_map_dma_buf(struct virtio_gpu_object *bo,
dma_addr_t addr;
int ret;
- sgt = kzalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kzalloc_obj(*sgt);
if (!sgt)
return ERR_PTR(-ENOMEM);
@@ -193,7 +193,7 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev,
struct virtio_gpu_object_vram *vram;
int ret;
- vram = kzalloc_obj(*vram, GFP_KERNEL);
+ vram = kzalloc_obj(*vram);
if (!vram)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vkms/vkms_colorop.c b/drivers/gpu/drm/vkms/vkms_colorop.c
index 8aeea73de617..bf8a0e4fc719 100644
--- a/drivers/gpu/drm/vkms/vkms_colorop.c
+++ b/drivers/gpu/drm/vkms/vkms_colorop.c
@@ -24,7 +24,7 @@ static int vkms_initialize_color_pipeline(struct drm_plane *plane, struct drm_pr
memset(ops, 0, sizeof(ops));
/* 1st op: 1d curve */
- ops[i] = kzalloc_obj(*ops[i], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[i]);
if (!ops[i]) {
drm_err(dev, "KMS: Failed to allocate colorop\n");
ret = -ENOMEM;
@@ -41,7 +41,7 @@ static int vkms_initialize_color_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 2nd op: 3x4 matrix */
- ops[i] = kzalloc_obj(*ops[i], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[i]);
if (!ops[i]) {
drm_err(dev, "KMS: Failed to allocate colorop\n");
ret = -ENOMEM;
@@ -57,7 +57,7 @@ static int vkms_initialize_color_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 3rd op: 3x4 matrix */
- ops[i] = kzalloc_obj(*ops[i], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[i]);
if (!ops[i]) {
drm_err(dev, "KMS: Failed to allocate colorop\n");
ret = -ENOMEM;
@@ -73,7 +73,7 @@ static int vkms_initialize_color_pipeline(struct drm_plane *plane, struct drm_pr
i++;
/* 4th op: 1d curve */
- ops[i] = kzalloc_obj(*ops[i], GFP_KERNEL);
+ ops[i] = kzalloc_obj(*ops[i]);
if (!ops[i]) {
drm_err(dev, "KMS: Failed to allocate colorop\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/vkms/vkms_config.c b/drivers/gpu/drm/vkms/vkms_config.c
index 8447b654e229..5a654d6dead8 100644
--- a/drivers/gpu/drm/vkms/vkms_config.c
+++ b/drivers/gpu/drm/vkms/vkms_config.c
@@ -12,7 +12,7 @@ struct vkms_config *vkms_config_create(const char *dev_name)
{
struct vkms_config *config;
- config = kzalloc_obj(*config, GFP_KERNEL);
+ config = kzalloc_obj(*config);
if (!config)
return ERR_PTR(-ENOMEM);
@@ -388,7 +388,7 @@ struct vkms_config_plane *vkms_config_create_plane(struct vkms_config *config)
{
struct vkms_config_plane *plane_cfg;
- plane_cfg = kzalloc_obj(*plane_cfg, GFP_KERNEL);
+ plane_cfg = kzalloc_obj(*plane_cfg);
if (!plane_cfg)
return ERR_PTR(-ENOMEM);
@@ -448,7 +448,7 @@ struct vkms_config_crtc *vkms_config_create_crtc(struct vkms_config *config)
{
struct vkms_config_crtc *crtc_cfg;
- crtc_cfg = kzalloc_obj(*crtc_cfg, GFP_KERNEL);
+ crtc_cfg = kzalloc_obj(*crtc_cfg);
if (!crtc_cfg)
return ERR_PTR(-ENOMEM);
@@ -527,7 +527,7 @@ struct vkms_config_encoder *vkms_config_create_encoder(struct vkms_config *confi
{
struct vkms_config_encoder *encoder_cfg;
- encoder_cfg = kzalloc_obj(*encoder_cfg, GFP_KERNEL);
+ encoder_cfg = kzalloc_obj(*encoder_cfg);
if (!encoder_cfg)
return ERR_PTR(-ENOMEM);
@@ -591,7 +591,7 @@ struct vkms_config_connector *vkms_config_create_connector(struct vkms_config *c
{
struct vkms_config_connector *connector_cfg;
- connector_cfg = kzalloc_obj(*connector_cfg, GFP_KERNEL);
+ connector_cfg = kzalloc_obj(*connector_cfg);
if (!connector_cfg)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c b/drivers/gpu/drm/vkms/vkms_configfs.c
index f6471ee9a58c..7551b8c7766d 100644
--- a/drivers/gpu/drm/vkms/vkms_configfs.c
+++ b/drivers/gpu/drm/vkms/vkms_configfs.c
@@ -769,7 +769,7 @@ static struct config_group *make_device_group(struct config_group *group,
if (strcmp(name, DEFAULT_DEVICE_NAME) == 0)
return ERR_PTR(-EINVAL);
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index f5b99ebb37e3..92e54c27897e 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -62,7 +62,7 @@ vkms_atomic_crtc_duplicate_state(struct drm_crtc *crtc)
if (WARN_ON(!crtc->state))
return NULL;
- vkms_state = kzalloc_obj(*vkms_state, GFP_KERNEL);
+ vkms_state = kzalloc_obj(*vkms_state);
if (!vkms_state)
return NULL;
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 73d3c4af7743..ca7aee101a95 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -56,11 +56,11 @@ vkms_plane_duplicate_state(struct drm_plane *plane)
struct vkms_plane_state *vkms_state;
struct vkms_frame_info *frame_info;
- vkms_state = kzalloc_obj(*vkms_state, GFP_KERNEL);
+ vkms_state = kzalloc_obj(*vkms_state);
if (!vkms_state)
return NULL;
- frame_info = kzalloc_obj(*frame_info, GFP_KERNEL);
+ frame_info = kzalloc_obj(*frame_info);
if (!frame_info) {
DRM_DEBUG_KMS("Couldn't allocate frame_info\n");
kfree(vkms_state);
@@ -104,7 +104,7 @@ static void vkms_plane_reset(struct drm_plane *plane)
plane->state = NULL; /* must be set to NULL here */
}
- vkms_state = kzalloc_obj(*vkms_state, GFP_KERNEL);
+ vkms_state = kzalloc_obj(*vkms_state);
if (!vkms_state) {
DRM_ERROR("Cannot allocate vkms_plane_state\n");
return;
diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
index 1cd760f75779..908b7e602ffb 100644
--- a/drivers/gpu/drm/vkms/vkms_writeback.c
+++ b/drivers/gpu/drm/vkms/vkms_writeback.c
@@ -81,7 +81,7 @@ static int vkms_wb_prepare_job(struct drm_writeback_connector *wb_connector,
if (!job->fb)
return 0;
- vkmsjob = kzalloc_obj(*vkmsjob, GFP_KERNEL);
+ vkmsjob = kzalloc_obj(*vkmsjob);
if (!vkmsjob)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c
index 23ffb7069d01..2421b0dd057c 100644
--- a/drivers/gpu/drm/vmwgfx/ttm_object.c
+++ b/drivers/gpu/drm/vmwgfx/ttm_object.c
@@ -318,7 +318,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile,
if (require_existed)
return -EPERM;
- ref = kmalloc_obj(*ref, GFP_KERNEL);
+ ref = kmalloc_obj(*ref);
if (unlikely(ref == NULL)) {
return -ENOMEM;
}
@@ -404,7 +404,7 @@ void ttm_object_file_release(struct ttm_object_file **p_tfile)
struct ttm_object_file *ttm_object_file_init(struct ttm_object_device *tdev)
{
- struct ttm_object_file *tfile = kmalloc_obj(*tfile, GFP_KERNEL);
+ struct ttm_object_file *tfile = kmalloc_obj(*tfile);
if (unlikely(tfile == NULL))
return NULL;
@@ -422,7 +422,7 @@ struct ttm_object_file *ttm_object_file_init(struct ttm_object_device *tdev)
struct ttm_object_device *
ttm_object_device_init(const struct dma_buf_ops *ops)
{
- struct ttm_object_device *tdev = kmalloc_obj(*tdev, GFP_KERNEL);
+ struct ttm_object_device *tdev = kmalloc_obj(*tdev);
if (unlikely(tdev == NULL))
return NULL;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 97290b5d65d0..9c7a73c0b0dc 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -449,7 +449,7 @@ int vmw_bo_create(struct vmw_private *vmw,
{
int ret;
- *p_bo = kmalloc_obj(**p_bo, GFP_KERNEL);
+ *p_bo = kmalloc_obj(**p_bo);
if (unlikely(!*p_bo)) {
DRM_ERROR("Failed to allocate a buffer.\n");
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
index cfecea9bfa24..d932e38d7942 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
@@ -103,7 +103,7 @@ struct vmw_fifo_state *vmw_fifo_create(struct vmw_private *dev_priv)
if (!dev_priv->fifo_mem)
return NULL;
- fifo = kzalloc_obj(*fifo, GFP_KERNEL);
+ fifo = kzalloc_obj(*fifo);
if (!fifo)
return ERR_PTR(-ENOMEM);
fifo->static_buffer_size = VMWGFX_FIFO_STATIC_SIZE;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index 5756af107555..2170b45c30e9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -961,7 +961,7 @@ void *vmw_cmdbuf_alloc(struct vmw_cmdbuf_man *man,
*p_header = NULL;
- header = kzalloc_obj(*header, GFP_KERNEL);
+ header = kzalloc_obj(*header);
if (!header)
return ERR_PTR(-ENOMEM);
@@ -1296,7 +1296,7 @@ struct vmw_cmdbuf_man *vmw_cmdbuf_man_create(struct vmw_private *dev_priv)
if (!(dev_priv->capabilities & SVGA_CAP_COMMAND_BUFFERS))
return ERR_PTR(-ENOSYS);
- man = kzalloc_obj(*man, GFP_KERNEL);
+ man = kzalloc_obj(*man);
if (!man)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
index b8b4834d40fb..fe1ba1a61a68 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
@@ -200,7 +200,7 @@ int vmw_cmdbuf_res_add(struct vmw_cmdbuf_res_manager *man,
{
struct vmw_cmdbuf_res *cres;
- cres = kzalloc_obj(*cres, GFP_KERNEL);
+ cres = kzalloc_obj(*cres);
if (unlikely(!cres))
return -ENOMEM;
@@ -284,7 +284,7 @@ vmw_cmdbuf_res_man_create(struct vmw_private *dev_priv)
{
struct vmw_cmdbuf_res_manager *man;
- man = kzalloc_obj(*man, GFP_KERNEL);
+ man = kzalloc_obj(*man);
if (!man)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
index 0845c00e777d..bd96f4d5e090 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
@@ -738,7 +738,7 @@ static int vmw_context_define(struct drm_device *dev, void *data,
return -EINVAL;
}
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (unlikely(!ctx)) {
ret = -ENOMEM;
goto out_ret;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
index 6220a1a0326a..091f1039a052 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
@@ -604,7 +604,7 @@ struct vmw_resource *vmw_cotable_alloc(struct vmw_private *dev_priv,
int ret;
u32 num_entries;
- vcotbl = kzalloc_obj(*vcotbl, GFP_KERNEL);
+ vcotbl = kzalloc_obj(*vcotbl);
if (unlikely(!vcotbl)) {
ret = -ENOMEM;
goto out_no_alloc;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index eb5695bcae89..0f101aedb49a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1209,7 +1209,7 @@ static int vmw_driver_open(struct drm_device *dev, struct drm_file *file_priv)
struct vmw_fpriv *vmw_fp;
int ret = -ENOMEM;
- vmw_fp = kzalloc_obj(*vmw_fp, GFP_KERNEL);
+ vmw_fp = kzalloc_obj(*vmw_fp);
if (unlikely(!vmw_fp))
return ret;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 4500771a8f42..3469e2c9e706 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -129,7 +129,7 @@ static const struct dma_fence_ops vmw_fence_ops = {
struct vmw_fence_manager *vmw_fence_manager_init(struct vmw_private *dev_priv)
{
- struct vmw_fence_manager *fman = kzalloc_obj(*fman, GFP_KERNEL);
+ struct vmw_fence_manager *fman = kzalloc_obj(*fman);
if (unlikely(!fman))
return NULL;
@@ -251,7 +251,7 @@ int vmw_fence_create(struct vmw_fence_manager *fman,
struct vmw_fence_obj *fence;
int ret;
- fence = kzalloc_obj(*fence, GFP_KERNEL);
+ fence = kzalloc_obj(*fence);
if (unlikely(!fence))
return -ENOMEM;
@@ -298,7 +298,7 @@ int vmw_user_fence_create(struct drm_file *file_priv,
struct vmw_fence_obj *tmp;
int ret;
- ufence = kzalloc_obj(*ufence, GFP_KERNEL);
+ ufence = kzalloc_obj(*ufence);
if (unlikely(!ufence)) {
ret = -ENOMEM;
goto out_no_object;
@@ -580,7 +580,7 @@ int vmw_event_fence_action_queue(struct drm_file *file_priv,
struct vmw_event_fence_action *eaction;
struct vmw_fence_manager *fman = fman_from_fence(fence);
- eaction = kzalloc_obj(*eaction, GFP_KERNEL);
+ eaction = kzalloc_obj(*eaction);
if (unlikely(!eaction))
return -ENOMEM;
@@ -612,7 +612,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv,
struct drm_device *dev = &fman->dev_priv->drm;
int ret;
- event = kzalloc_obj(*event, GFP_KERNEL);
+ event = kzalloc_obj(*event);
if (unlikely(!event)) {
DRM_ERROR("Failed to allocate an event.\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
index 1a45220d3607..d607452dff6a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
@@ -57,7 +57,7 @@ static int vmw_gmrid_man_get_node(struct ttm_resource_manager *man,
struct vmwgfx_gmrid_man *gman = to_gmrid_manager(man);
int id;
- *res = kmalloc_obj(**res, GFP_KERNEL);
+ *res = kmalloc_obj(**res);
if (!*res)
return -ENOMEM;
@@ -154,7 +154,7 @@ static const struct ttm_resource_manager_func vmw_gmrid_manager_func;
int vmw_gmrid_man_init(struct vmw_private *dev_priv, int type)
{
struct ttm_resource_manager *man;
- struct vmwgfx_gmrid_man *gman = kzalloc_obj(*gman, GFP_KERNEL);
+ struct vmwgfx_gmrid_man *gman = kzalloc_obj(*gman);
if (unlikely(!gman))
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index 1c4fc5f0d586..d962ef2ef316 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
@@ -196,7 +196,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
goto out_clips;
}
- clips = kzalloc_objs(*clips, num_clips, GFP_KERNEL);
+ clips = kzalloc_objs(*clips, num_clips);
if (clips == NULL) {
DRM_ERROR("Failed to allocate clip rect list.\n");
ret = -ENOMEM;
@@ -273,7 +273,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
goto out_clips;
}
- clips = kzalloc_objs(*clips, num_clips, GFP_KERNEL);
+ clips = kzalloc_objs(*clips, num_clips);
if (clips == NULL) {
DRM_ERROR("Failed to allocate clip rect list.\n");
ret = -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index ca6aec15f113..60306d075428 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -224,7 +224,7 @@ void vmw_du_crtc_reset(struct drm_crtc *crtc)
kfree(vmw_crtc_state_to_vcs(crtc->state));
}
- vcs = kzalloc_obj(*vcs, GFP_KERNEL);
+ vcs = kzalloc_obj(*vcs);
if (!vcs) {
DRM_ERROR("Cannot allocate vmw_crtc_state\n");
@@ -300,7 +300,7 @@ void vmw_du_plane_reset(struct drm_plane *plane)
if (plane->state)
vmw_du_plane_destroy_state(plane, plane->state);
- vps = kzalloc_obj(*vps, GFP_KERNEL);
+ vps = kzalloc_obj(*vps);
if (!vps) {
DRM_ERROR("Cannot allocate vmw_plane_state\n");
@@ -382,7 +382,7 @@ void vmw_du_connector_reset(struct drm_connector *connector)
kfree(vmw_connector_state_to_vcs(connector->state));
}
- vcs = kzalloc_obj(*vcs, GFP_KERNEL);
+ vcs = kzalloc_obj(*vcs);
if (!vcs) {
DRM_ERROR("Cannot allocate vmw_connector_state\n");
@@ -543,7 +543,7 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,
return -EINVAL;
}
- vfbs = kzalloc_obj(*vfbs, GFP_KERNEL);
+ vfbs = kzalloc_obj(*vfbs);
if (!vfbs) {
ret = -ENOMEM;
goto out_err1;
@@ -632,7 +632,7 @@ static int vmw_kms_new_framebuffer_bo(struct vmw_private *dev_priv,
return -EINVAL;
}
- vfbd = kzalloc_obj(*vfbd, GFP_KERNEL);
+ vfbd = kzalloc_obj(*vfbd);
if (!vfbd) {
ret = -ENOMEM;
goto out_err1;
@@ -1422,7 +1422,7 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
}
rects_size = arg->num_outputs * sizeof(struct drm_vmw_rect);
- rects = kzalloc_objs(struct drm_vmw_rect, arg->num_outputs, GFP_KERNEL);
+ rects = kzalloc_objs(struct drm_vmw_rect, arg->num_outputs);
if (unlikely(!rects))
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index e07ee831064b..f07669b27fba 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -416,7 +416,7 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
struct drm_crtc *crtc;
int ret;
- ldu = kzalloc_obj(*ldu, GFP_KERNEL);
+ ldu = kzalloc_obj(*ldu);
if (!ldu)
return -ENOMEM;
@@ -547,7 +547,7 @@ int vmw_kms_ldu_init_display(struct vmw_private *dev_priv)
return -EINVAL;
}
- dev_priv->ldu_priv = kmalloc_obj(*dev_priv->ldu_priv, GFP_KERNEL);
+ dev_priv->ldu_priv = kmalloc_obj(*dev_priv->ldu_priv);
if (!dev_priv->ldu_priv)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
index d29ac15a742b..de7a504de9ce 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
@@ -390,7 +390,7 @@ static unsigned long vmw_mob_calculate_pt_pages(unsigned long data_pages)
*/
struct vmw_mob *vmw_mob_create(unsigned long data_pages)
{
- struct vmw_mob *mob = kzalloc_obj(*mob, GFP_KERNEL);
+ struct vmw_mob *mob = kzalloc_obj(*mob);
if (unlikely(!mob))
return NULL;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
index 9a75a35f605b..679adf7c7183 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
@@ -539,7 +539,7 @@ int vmw_overlay_init(struct vmw_private *dev_priv)
if (dev_priv->overlay_priv)
return -EINVAL;
- overlay = kzalloc_obj(*overlay, GFP_KERNEL);
+ overlay = kzalloc_obj(*overlay);
if (!overlay)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 37bcdfb585ce..605d037d18c6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -811,7 +811,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
struct drm_crtc *crtc;
int ret;
- sou = kzalloc_obj(*sou, GFP_KERNEL);
+ sou = kzalloc_obj(*sou);
if (!sou)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
index d74d9b72f80d..eca4e3e97eb4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
@@ -595,7 +595,7 @@ int vmw_dx_shader_add(struct vmw_cmdbuf_res_manager *man,
if (!vmw_shader_id_ok(user_key, shader_type))
return -EINVAL;
- shader = kmalloc_obj(*shader, GFP_KERNEL);
+ shader = kmalloc_obj(*shader);
if (!shader) {
return -ENOMEM;
}
@@ -696,7 +696,7 @@ static int vmw_user_shader_alloc(struct vmw_private *dev_priv,
struct vmw_resource *res, *tmp;
int ret;
- ushader = kzalloc_obj(*ushader, GFP_KERNEL);
+ ushader = kzalloc_obj(*ushader);
if (unlikely(!ushader)) {
ret = -ENOMEM;
goto out;
@@ -746,7 +746,7 @@ static struct vmw_resource *vmw_shader_alloc(struct vmw_private *dev_priv,
struct vmw_resource *res;
int ret;
- shader = kzalloc_obj(*shader, GFP_KERNEL);
+ shader = kzalloc_obj(*shader);
if (unlikely(!shader)) {
ret = -ENOMEM;
goto out_err;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 14f583ab4bac..dcbacee97f61 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -1541,7 +1541,7 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
struct drm_crtc *crtc;
int ret;
- stdu = kzalloc_obj(*stdu, GFP_KERNEL);
+ stdu = kzalloc_obj(*stdu);
if (!stdu)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c b/drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c
index 6805c03ae248..52c6cfa163da 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c
@@ -284,7 +284,7 @@ int vmw_dx_streamoutput_add(struct vmw_cmdbuf_res_manager *man,
struct vmw_private *dev_priv = ctx->dev_priv;
int ret;
- so = kmalloc_obj(*so, GFP_KERNEL);
+ so = kmalloc_obj(*so);
if (!so) {
return -ENOMEM;
}
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 9ff2d54d548e..865621839d03 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -741,7 +741,7 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
}
- user_srf = kzalloc_obj(*user_srf, GFP_KERNEL);
+ user_srf = kzalloc_obj(*user_srf);
if (unlikely(!user_srf)) {
ret = -ENOMEM;
goto out_unlock;
@@ -2144,7 +2144,7 @@ int vmw_gb_surface_define(struct vmw_private *dev_priv,
if (req->sizes != NULL)
return -EINVAL;
- user_srf = kzalloc_obj(*user_srf, GFP_KERNEL);
+ user_srf = kzalloc_obj(*user_srf);
if (unlikely(!user_srf)) {
ret = -ENOMEM;
goto out_unlock;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c
index 08b492534fe9..585996b6c9b7 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c
@@ -37,7 +37,7 @@ static int vmw_sys_man_alloc(struct ttm_resource_manager *man,
const struct ttm_place *place,
struct ttm_resource **res)
{
- *res = kzalloc_obj(**res, GFP_KERNEL);
+ *res = kzalloc_obj(**res);
if (!*res)
return -ENOMEM;
@@ -60,7 +60,7 @@ static const struct ttm_resource_manager_func vmw_sys_manager_func = {
int vmw_sys_man_init(struct vmw_private *dev_priv)
{
struct ttm_device *bdev = &dev_priv->bdev;
- struct ttm_resource_manager *man = kzalloc_obj(*man, GFP_KERNEL);
+ struct ttm_resource_manager *man = kzalloc_obj(*man);
if (!man)
return -ENOMEM;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index 232c2b8ff520..dfd08ee19041 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -404,7 +404,7 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,
int ret;
bool external = bo->type == ttm_bo_type_sg;
- vmw_be = kzalloc_obj(*vmw_be, GFP_KERNEL);
+ vmw_be = kzalloc_obj(*vmw_be);
if (!vmw_be)
return NULL;
diff --git a/drivers/gpu/drm/xe/display/intel_bo.c b/drivers/gpu/drm/xe/display/intel_bo.c
index 89ee5f3491c6..05d5e5c0a0de 100644
--- a/drivers/gpu/drm/xe/display/intel_bo.c
+++ b/drivers/gpu/drm/xe/display/intel_bo.c
@@ -57,7 +57,7 @@ struct intel_frontbuffer *intel_bo_frontbuffer_get(struct drm_gem_object *obj)
{
struct xe_frontbuffer *front;
- front = kmalloc_obj(*front, GFP_KERNEL);
+ front = kmalloc_obj(*front);
if (!front)
return NULL;
diff --git a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
index 1c35eb2def8c..8ffc13855ef7 100644
--- a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
+++ b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
@@ -43,7 +43,7 @@ struct intel_dsb_buffer *intel_dsb_buffer_create(struct drm_device *drm, size_t
struct xe_bo *obj;
int ret;
- dsb_buf = kzalloc_obj(*dsb_buf, GFP_KERNEL);
+ dsb_buf = kzalloc_obj(*dsb_buf);
if (!dsb_buf)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
index 0266deccb31a..29c72aa4b0d2 100644
--- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
+++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
@@ -95,7 +95,7 @@ static struct intel_hdcp_gsc_context *intel_hdcp_gsc_context_alloc(struct drm_de
struct intel_hdcp_gsc_context *gsc_context;
int ret;
- gsc_context = kzalloc_obj(*gsc_context, GFP_KERNEL);
+ gsc_context = kzalloc_obj(*gsc_context);
if (!gsc_context)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/display/xe_panic.c b/drivers/gpu/drm/xe/display/xe_panic.c
index e68abd9268f2..bebb21d617f0 100644
--- a/drivers/gpu/drm/xe/display/xe_panic.c
+++ b/drivers/gpu/drm/xe/display/xe_panic.c
@@ -79,7 +79,7 @@ static struct intel_panic *xe_panic_alloc(void)
{
struct intel_panic *panic;
- panic = kzalloc_obj(*panic, GFP_KERNEL);
+ panic = kzalloc_obj(*panic);
return panic;
}
diff --git a/drivers/gpu/drm/xe/display/xe_stolen.c b/drivers/gpu/drm/xe/display/xe_stolen.c
index fac3d60e8a31..5c7df67be8f9 100644
--- a/drivers/gpu/drm/xe/display/xe_stolen.c
+++ b/drivers/gpu/drm/xe/display/xe_stolen.c
@@ -86,7 +86,7 @@ static struct intel_stolen_node *xe_stolen_node_alloc(struct drm_device *drm)
struct xe_device *xe = to_xe_device(drm);
struct intel_stolen_node *node;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return NULL;
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index acbc7802cc5e..49c95ed67d7e 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -482,7 +482,7 @@ static int shrink_test_run_device(struct xe_device *xe)
unsigned int mem_type;
struct xe_ttm_tt *xe_tt;
- link = kzalloc_obj(*link, GFP_KERNEL);
+ link = kzalloc_obj(*link);
if (!link) {
KUNIT_FAIL(test, "Unexpected link allocation failure\n");
failed = true;
diff --git a/drivers/gpu/drm/xe/xe_bb.c b/drivers/gpu/drm/xe/xe_bb.c
index 18236fbe8e63..4749aa7f9466 100644
--- a/drivers/gpu/drm/xe/xe_bb.c
+++ b/drivers/gpu/drm/xe/xe_bb.c
@@ -31,7 +31,7 @@ static int bb_prefetch(struct xe_gt *gt)
struct xe_bb *xe_bb_new(struct xe_gt *gt, u32 dwords, bool usm)
{
struct xe_tile *tile = gt_to_tile(gt);
- struct xe_bb *bb = kmalloc_obj(*bb, GFP_KERNEL);
+ struct xe_bb *bb = kmalloc_obj(*bb);
int err;
if (!bb)
@@ -62,7 +62,7 @@ err:
struct xe_bb *xe_bb_ccs_new(struct xe_gt *gt, u32 dwords,
enum xe_sriov_vf_ccs_rw_ctxs ctx_id)
{
- struct xe_bb *bb = kmalloc_obj(*bb, GFP_KERNEL);
+ struct xe_bb *bb = kmalloc_obj(*bb);
struct xe_device *xe = gt_to_xe(gt);
struct xe_sa_manager *bb_pool;
int err;
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 31eacbbfe50a..29fffc81f240 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -480,7 +480,7 @@ static struct ttm_tt *xe_ttm_tt_create(struct ttm_buffer_object *ttm_bo,
enum ttm_caching caching = ttm_cached;
int err;
- xe_tt = kzalloc_obj(*xe_tt, GFP_KERNEL);
+ xe_tt = kzalloc_obj(*xe_tt);
if (!xe_tt)
return NULL;
@@ -2089,7 +2089,7 @@ static const struct drm_gem_object_funcs xe_gem_object_funcs = {
*/
struct xe_bo *xe_bo_alloc(void)
{
- struct xe_bo *bo = kzalloc_obj(*bo, GFP_KERNEL);
+ struct xe_bo *bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index b58191735e31..c59b1414df22 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -998,7 +998,7 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro
if (!match)
return ERR_PTR(-ENOENT);
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_dep_scheduler.c b/drivers/gpu/drm/xe/xe_dep_scheduler.c
index f1620711fbd2..51d99fee9aa5 100644
--- a/drivers/gpu/drm/xe/xe_dep_scheduler.c
+++ b/drivers/gpu/drm/xe/xe_dep_scheduler.c
@@ -86,7 +86,7 @@ xe_dep_scheduler_create(struct xe_device *xe,
};
int err;
- dep_scheduler = kzalloc_obj(*dep_scheduler, GFP_KERNEL);
+ dep_scheduler = kzalloc_obj(*dep_scheduler);
if (!dep_scheduler)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index f96d992b2ca4..52ee24e9cd3a 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -86,7 +86,7 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
int ret = -ENOMEM;
struct task_struct *task = NULL;
- xef = kzalloc_obj(*xef, GFP_KERNEL);
+ xef = kzalloc_obj(*xef);
if (!xef)
return ret;
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index b7284acc379c..84b66147bf49 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -88,7 +88,7 @@ struct xe_drm_client *xe_drm_client_alloc(void)
{
struct xe_drm_client *client;
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (!client)
return NULL;
diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c
index a9fa39bfeca7..36ad47ce22b6 100644
--- a/drivers/gpu/drm/xe/xe_eu_stall.c
+++ b/drivers/gpu/drm/xe/xe_eu_stall.c
@@ -238,7 +238,7 @@ int xe_eu_stall_init(struct xe_gt *gt)
if (!xe_eu_stall_supported_on_platform(xe))
return 0;
- gt->eu_stall = kzalloc_obj(*gt->eu_stall, GFP_KERNEL);
+ gt->eu_stall = kzalloc_obj(*gt->eu_stall);
if (!gt->eu_stall) {
ret = -ENOMEM;
goto exit;
@@ -906,7 +906,7 @@ static int xe_eu_stall_stream_open_locked(struct drm_device *dev,
return -EBUSY;
}
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (!stream)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c
index 45b7a7fd7a3b..e05dabfcd43c 100644
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
@@ -162,7 +162,7 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
}
if (args->num_syncs) {
- syncs = kzalloc_objs(*syncs, args->num_syncs, GFP_KERNEL);
+ syncs = kzalloc_objs(*syncs, args->num_syncs);
if (!syncs) {
err = -ENOMEM;
goto err_exec_queue;
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 36b0bd32e2a6..c41e7cc13d8a 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -681,7 +681,7 @@ static int xe_exec_queue_group_init(struct xe_device *xe, struct xe_exec_queue *
struct xe_exec_queue_group *group;
struct xe_bo *bo;
- group = kzalloc_obj(*group, GFP_KERNEL);
+ group = kzalloc_obj(*group);
if (!group)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_execlist.c b/drivers/gpu/drm/xe/xe_execlist.c
index 405069c72773..371983c94a1b 100644
--- a/drivers/gpu/drm/xe/xe_execlist.c
+++ b/drivers/gpu/drm/xe/xe_execlist.c
@@ -352,7 +352,7 @@ static int execlist_exec_queue_init(struct xe_exec_queue *q)
drm_info(&xe->drm, "Enabling execlist submission (GuC submission disabled)\n");
- exl = kzalloc_obj(*exl, GFP_KERNEL);
+ exl = kzalloc_obj(*exl);
if (!exl)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_gt_sysfs.c b/drivers/gpu/drm/xe/xe_gt_sysfs.c
index e2ab22643c63..7fc0bed6ece0 100644
--- a/drivers/gpu/drm/xe/xe_gt_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_sysfs.c
@@ -36,7 +36,7 @@ int xe_gt_sysfs_init(struct xe_gt *gt)
struct kobj_gt *kg;
int err;
- kg = kzalloc_obj(*kg, GFP_KERNEL);
+ kg = kzalloc_obj(*kg);
if (!kg)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index e15a38ff7354..799ef9f48003 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1903,7 +1903,7 @@ static int guc_exec_queue_init(struct xe_exec_queue *q)
xe_gt_assert(guc_to_gt(guc), xe_device_uc_enabled(guc_to_xe(guc)));
- ge = kzalloc_obj(*ge, GFP_KERNEL);
+ ge = kzalloc_obj(*ge);
if (!ge)
return -ENOMEM;
@@ -2057,7 +2057,7 @@ static int guc_exec_queue_set_priority(struct xe_exec_queue *q,
exec_queue_killed_or_banned_or_wedged(q))
return 0;
- msg = kmalloc_obj(*msg, GFP_KERNEL);
+ msg = kmalloc_obj(*msg);
if (!msg)
return -ENOMEM;
@@ -2075,7 +2075,7 @@ static int guc_exec_queue_set_timeslice(struct xe_exec_queue *q, u32 timeslice_u
exec_queue_killed_or_banned_or_wedged(q))
return 0;
- msg = kmalloc_obj(*msg, GFP_KERNEL);
+ msg = kmalloc_obj(*msg);
if (!msg)
return -ENOMEM;
@@ -2094,7 +2094,7 @@ static int guc_exec_queue_set_preempt_timeout(struct xe_exec_queue *q,
exec_queue_killed_or_banned_or_wedged(q))
return 0;
- msg = kmalloc_obj(*msg, GFP_KERNEL);
+ msg = kmalloc_obj(*msg);
if (!msg)
return -ENOMEM;
@@ -2115,7 +2115,7 @@ static int guc_exec_queue_set_multi_queue_priority(struct xe_exec_queue *q,
exec_queue_killed_or_banned_or_wedged(q))
return 0;
- msg = kmalloc_obj(*msg, GFP_KERNEL);
+ msg = kmalloc_obj(*msg);
if (!msg)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
index 1e0eeb77427c..5af8903e10af 100644
--- a/drivers/gpu/drm/xe/xe_heci_gsc.c
+++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
@@ -131,7 +131,7 @@ static int heci_gsc_add_device(struct xe_device *xe, const struct heci_gsc_def *
struct mei_aux_device *adev;
int ret;
- adev = kzalloc_obj(*adev, GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev)
return -ENOMEM;
adev->irq = heci_gsc->irq;
diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
index 4425a1ce140f..d42e263e0611 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
@@ -549,7 +549,7 @@ kobj_xe_hw_engine_class(struct xe_device *xe, struct kobject *parent, const char
struct kobj_eclass *keclass;
int err = 0;
- keclass = kzalloc_obj(*keclass, GFP_KERNEL);
+ keclass = kzalloc_obj(*keclass);
if (!keclass)
return NULL;
@@ -582,7 +582,7 @@ static int xe_add_hw_engine_class_defaults(struct xe_device *xe,
struct kobject *kobj;
int err = 0;
- kobj = kzalloc_obj(*kobj, GFP_KERNEL);
+ kobj = kzalloc_obj(*kobj);
if (!kobj)
return -ENOMEM;
@@ -629,7 +629,7 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
u16 class_mask = 0;
int err = 0;
- kobj = kzalloc_obj(*kobj, GFP_KERNEL);
+ kobj = kzalloc_obj(*kobj);
if (!kobj)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 4b2091d552fd..b0f037bc227f 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -1616,7 +1616,7 @@ struct xe_lrc *xe_lrc_create(struct xe_hw_engine *hwe, struct xe_vm *vm,
struct xe_lrc *lrc;
int err;
- lrc = kzalloc_obj(*lrc, GFP_KERNEL);
+ lrc = kzalloc_obj(*lrc);
if (!lrc)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 9d463a48a4d4..e58b9b433654 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -2303,7 +2303,7 @@ static struct drm_pagemap_addr *xe_migrate_dma_map(struct xe_device *xe,
struct drm_pagemap_addr *pagemap_addr;
unsigned long i, npages = DIV_ROUND_UP(len, PAGE_SIZE);
- pagemap_addr = kzalloc_objs(*pagemap_addr, npages, GFP_KERNEL);
+ pagemap_addr = kzalloc_objs(*pagemap_addr, npages);
if (!pagemap_addr)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_mmio_gem.c b/drivers/gpu/drm/xe/xe_mmio_gem.c
index c4fb55d2dcce..8c803ef233cc 100644
--- a/drivers/gpu/drm/xe/xe_mmio_gem.c
+++ b/drivers/gpu/drm/xe/xe_mmio_gem.c
@@ -78,7 +78,7 @@ struct xe_mmio_gem *xe_mmio_gem_create(struct xe_device *xe, struct drm_file *fi
if ((phys_addr % PAGE_SIZE != 0) || (size % PAGE_SIZE != 0))
return ERR_PTR(-EINVAL);
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_nvm.c b/drivers/gpu/drm/xe/xe_nvm.c
index fb5eb9099921..9c4ccd3b39d4 100644
--- a/drivers/gpu/drm/xe/xe_nvm.c
+++ b/drivers/gpu/drm/xe/xe_nvm.c
@@ -133,7 +133,7 @@ int xe_nvm_init(struct xe_device *xe)
if (WARN_ON(xe->nvm))
return -EFAULT;
- xe->nvm = kzalloc_obj(*nvm, GFP_KERNEL);
+ xe->nvm = kzalloc_obj(*nvm);
if (!xe->nvm)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index 283cd72ef40b..e40cfeb64911 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -905,7 +905,7 @@ __xe_oa_alloc_config_buffer(struct xe_oa_stream *stream, struct xe_oa_config *oa
size_t config_length;
struct xe_bb *bb;
- oa_bo = kzalloc_obj(*oa_bo, GFP_KERNEL);
+ oa_bo = kzalloc_obj(*oa_bo);
if (!oa_bo)
return ERR_PTR(-ENOMEM);
@@ -997,7 +997,7 @@ static int xe_oa_emit_oa_config(struct xe_oa_stream *stream, struct xe_oa_config
int i, err, num_signal = 0;
struct dma_fence *fence;
- ofence = kzalloc_obj(*ofence, GFP_KERNEL);
+ ofence = kzalloc_obj(*ofence);
if (!ofence) {
err = -ENOMEM;
goto exit;
@@ -1853,7 +1853,7 @@ static int xe_oa_stream_open_ioctl_locked(struct xe_oa *oa,
if (ret)
goto exit;
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (!stream) {
ret = -ENOMEM;
goto err_syncobj;
@@ -2260,7 +2260,7 @@ xe_oa_alloc_regs(struct xe_oa *oa, bool (*is_valid)(struct xe_oa *oa, u32 addr),
int err;
u32 i;
- oa_regs = kmalloc_objs(*oa_regs, n_regs, GFP_KERNEL);
+ oa_regs = kmalloc_objs(*oa_regs, n_regs);
if (!oa_regs)
return ERR_PTR(-ENOMEM);
@@ -2362,7 +2362,7 @@ int xe_oa_add_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *fi
XE_IOCTL_DBG(oa->xe, !arg->n_regs))
return -EINVAL;
- oa_config = kzalloc_obj(*oa_config, GFP_KERNEL);
+ oa_config = kzalloc_obj(*oa_config);
if (!oa_config)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_pmu.c b/drivers/gpu/drm/xe/xe_pmu.c
index ac8303509d48..ce1b110f762b 100644
--- a/drivers/gpu/drm/xe/xe_pmu.c
+++ b/drivers/gpu/drm/xe/xe_pmu.c
@@ -142,7 +142,7 @@ static bool event_gt_forcewake(struct perf_event *event)
gt = xe_device_get_gt(xe, config_to_gt_id(config));
- fw_ref = kzalloc_obj(*fw_ref, GFP_KERNEL);
+ fw_ref = kzalloc_obj(*fw_ref);
if (!fw_ref)
return false;
diff --git a/drivers/gpu/drm/xe/xe_preempt_fence.c b/drivers/gpu/drm/xe/xe_preempt_fence.c
index 85c792ee0818..d6427b473ddd 100644
--- a/drivers/gpu/drm/xe/xe_preempt_fence.c
+++ b/drivers/gpu/drm/xe/xe_preempt_fence.c
@@ -101,7 +101,7 @@ struct xe_preempt_fence *xe_preempt_fence_alloc(void)
{
struct xe_preempt_fence *pfence;
- pfence = kmalloc_obj(*pfence, GFP_KERNEL);
+ pfence = kmalloc_obj(*pfence);
if (!pfence)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 5d3a84baa80b..c6ccef09916d 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -109,11 +109,11 @@ struct xe_pt *xe_pt_create(struct xe_vm *vm, struct xe_tile *tile,
int err;
if (level) {
- struct xe_pt_dir *dir = kzalloc_obj(*dir, GFP_KERNEL);
+ struct xe_pt_dir *dir = kzalloc_obj(*dir);
pt = (dir) ? &dir->pt : NULL;
} else {
- pt = kzalloc_obj(*pt, GFP_KERNEL);
+ pt = kzalloc_obj(*pt);
}
if (!pt)
return ERR_PTR(-ENOMEM);
@@ -2573,7 +2573,7 @@ xe_pt_update_ops_run(struct xe_tile *tile, struct xe_vma_ops *vops)
}
}
- rfence = kzalloc_obj(*rfence, GFP_KERNEL);
+ rfence = kzalloc_obj(*rfence);
if (!rfence) {
err = -ENOMEM;
goto free_ijob;
diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c
index 80532bbce727..2e5c78940b41 100644
--- a/drivers/gpu/drm/xe/xe_reg_sr.c
+++ b/drivers/gpu/drm/xe/xe_reg_sr.c
@@ -89,7 +89,7 @@ int xe_reg_sr_add(struct xe_reg_sr *sr,
return 0;
}
- pentry = kmalloc_obj(*pentry, GFP_KERNEL);
+ pentry = kmalloc_obj(*pentry);
if (!pentry) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/xe/xe_shrinker.c b/drivers/gpu/drm/xe/xe_shrinker.c
index f798404ac337..83374cd57660 100644
--- a/drivers/gpu/drm/xe/xe_shrinker.c
+++ b/drivers/gpu/drm/xe/xe_shrinker.c
@@ -282,7 +282,7 @@ static void xe_shrinker_fini(struct drm_device *drm, void *arg)
*/
int xe_shrinker_create(struct xe_device *xe)
{
- struct xe_shrinker *shrinker = kzalloc_obj(*shrinker, GFP_KERNEL);
+ struct xe_shrinker *shrinker = kzalloc_obj(*shrinker);
if (!shrinker)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_sriov_packet.c b/drivers/gpu/drm/xe/xe_sriov_packet.c
index 26905bc61979..968f32496282 100644
--- a/drivers/gpu/drm/xe/xe_sriov_packet.c
+++ b/drivers/gpu/drm/xe/xe_sriov_packet.c
@@ -89,7 +89,7 @@ struct xe_sriov_packet *xe_sriov_packet_alloc(struct xe_device *xe)
{
struct xe_sriov_packet *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return NULL;
diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c b/drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c
index 457676713402..0b88cdade6f1 100644
--- a/drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c
@@ -364,7 +364,7 @@ static struct kobject *create_xe_sriov_kobj(struct xe_device *xe, unsigned int v
xe_sriov_pf_assert_vfid(xe, vfid);
- vkobj = kzalloc_obj(*vkobj, GFP_KERNEL);
+ vkobj = kzalloc_obj(*vkobj);
if (!vkobj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index ead9a61b1cdb..ca67d0bdbfac 100644
--- a/drivers/gpu/drm/xe/xe_svm.c
+++ b/drivers/gpu/drm/xe/xe_svm.c
@@ -109,7 +109,7 @@ xe_svm_range_alloc(struct drm_gpusvm *gpusvm)
{
struct xe_svm_range *range;
- range = kzalloc_obj(*range, GFP_KERNEL);
+ range = kzalloc_obj(*range);
if (!range)
return NULL;
@@ -1748,7 +1748,7 @@ static struct xe_pagemap *xe_pagemap_create(struct xe_device *xe, struct xe_vram
void *addr;
int err;
- xpagemap = kzalloc_obj(*xpagemap, GFP_KERNEL);
+ xpagemap = kzalloc_obj(*xpagemap);
if (!xpagemap)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index 69a723a8c68e..eb136390dafd 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -59,7 +59,7 @@ static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
if (get_user(prefetch_val, ptr))
return ERR_PTR(-EFAULT);
- ufence = kzalloc_obj(*ufence, GFP_KERNEL);
+ ufence = kzalloc_obj(*ufence);
if (!ufence)
return ERR_PTR(-ENOMEM);
@@ -343,7 +343,7 @@ xe_sync_in_fence_get(struct xe_sync_entry *sync, int num_sync,
num_fence++;
}
- fences = kmalloc_objs(*fences, num_fence, GFP_KERNEL);
+ fences = kmalloc_objs(*fences, num_fence);
if (!fences)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c b/drivers/gpu/drm/xe/xe_tile_sysfs.c
index 39f04b309e73..0bfd28422dc2 100644
--- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
@@ -36,7 +36,7 @@ int xe_tile_sysfs_init(struct xe_tile *tile)
struct kobj_tile *kt;
int err;
- kt = kzalloc_obj(*kt, GFP_KERNEL);
+ kt = kzalloc_obj(*kt);
if (!kt)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_tlb_inval_job.c b/drivers/gpu/drm/xe/xe_tlb_inval_job.c
index 0560605588db..04d21015cd5d 100644
--- a/drivers/gpu/drm/xe/xe_tlb_inval_job.c
+++ b/drivers/gpu/drm/xe/xe_tlb_inval_job.c
@@ -108,7 +108,7 @@ xe_tlb_inval_job_create(struct xe_exec_queue *q, struct xe_tlb_inval *tlb_inval,
xe_assert(vm->xe, type == XE_EXEC_QUEUE_TLB_INVAL_MEDIA_GT ||
type == XE_EXEC_QUEUE_TLB_INVAL_PRIMARY_GT);
- job = kmalloc_obj(*job, GFP_KERNEL);
+ job = kmalloc_obj(*job);
if (!job)
return ERR_PTR(-ENOMEM);
@@ -125,7 +125,7 @@ xe_tlb_inval_job_create(struct xe_exec_queue *q, struct xe_tlb_inval *tlb_inval,
xe_exec_queue_get(q); /* Pairs with put in xe_tlb_inval_job_destroy */
xe_vm_get(vm); /* Pairs with put in xe_tlb_inval_job_destroy */
- ifence = kmalloc_obj(*ifence, GFP_KERNEL);
+ ifence = kmalloc_obj(*ifence);
if (!ifence) {
err = -ENOMEM;
goto err_job;
diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
index 93ad02ec76eb..344769d939e0 100644
--- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
@@ -64,7 +64,7 @@ static int xe_ttm_vram_mgr_new(struct ttm_resource_manager *man,
if (tbo->base.size >> PAGE_SHIFT > (lpfn - place->fpfn))
return -E2BIG; /* don't trigger eviction for the impossible */
- vres = kzalloc_obj(*vres, GFP_KERNEL);
+ vres = kzalloc_obj(*vres);
if (!vres)
return -ENOMEM;
@@ -371,7 +371,7 @@ int xe_ttm_vram_mgr_alloc_sgt(struct xe_device *xe,
if (vres->used_visible_size < res->size)
return -EOPNOTSUPP;
- *sgt = kmalloc_obj(**sgt, GFP_KERNEL);
+ *sgt = kmalloc_obj(**sgt);
if (!*sgt)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index b53d76dc62b2..a82e3a4fb389 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -667,7 +667,7 @@ static int xe_vm_ops_add_rebind(struct xe_vma_ops *vops, struct xe_vma *vma,
{
struct xe_vma_op *op;
- op = kzalloc_obj(*op, GFP_KERNEL);
+ op = kzalloc_obj(*op);
if (!op)
return -ENOMEM;
@@ -803,7 +803,7 @@ xe_vm_ops_add_range_rebind(struct xe_vma_ops *vops,
{
struct xe_vma_op *op;
- op = kzalloc_obj(*op, GFP_KERNEL);
+ op = kzalloc_obj(*op);
if (!op)
return -ENOMEM;
@@ -889,7 +889,7 @@ xe_vm_ops_add_range_unbind(struct xe_vma_ops *vops,
{
struct xe_vma_op *op;
- op = kzalloc_obj(*op, GFP_KERNEL);
+ op = kzalloc_obj(*op);
if (!op)
return -ENOMEM;
@@ -1008,14 +1008,14 @@ static struct xe_vma *xe_vma_create(struct xe_vm *vm,
* matches what was allocated.
*/
if (!bo && !is_null && !is_cpu_addr_mirror) {
- struct xe_userptr_vma *uvma = kzalloc_obj(*uvma, GFP_KERNEL);
+ struct xe_userptr_vma *uvma = kzalloc_obj(*uvma);
if (!uvma)
return ERR_PTR(-ENOMEM);
vma = &uvma->vma;
} else {
- vma = kzalloc_obj(*vma, GFP_KERNEL);
+ vma = kzalloc_obj(*vma);
if (!vma)
return ERR_PTR(-ENOMEM);
@@ -1235,7 +1235,7 @@ static struct drm_gpuva_op *xe_vm_op_alloc(void)
{
struct xe_vma_op *op;
- op = kzalloc_obj(*op, GFP_KERNEL);
+ op = kzalloc_obj(*op);
if (unlikely(!op))
return NULL;
@@ -3161,7 +3161,7 @@ static struct dma_fence *ops_execute(struct xe_vm *vm,
++n_fence;
}
- fences = kmalloc_objs(*fences, n_fence, GFP_KERNEL);
+ fences = kmalloc_objs(*fences, n_fence);
if (!fences) {
fence = ERR_PTR(-ENOMEM);
goto err_trace;
@@ -3705,7 +3705,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
}
if (args->num_syncs) {
- syncs = kzalloc_objs(*syncs, args->num_syncs, GFP_KERNEL);
+ syncs = kzalloc_objs(*syncs, args->num_syncs);
if (!syncs) {
err = -ENOMEM;
goto put_obj;
diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 79dce72c9bc4..e1890d0c7369 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -171,7 +171,7 @@ int xen_drm_front_dbuf_create(struct xen_drm_front_info *front_info,
if (unlikely(!evtchnl))
return -EIO;
- dbuf = kzalloc_obj(*dbuf, GFP_KERNEL);
+ dbuf = kzalloc_obj(*dbuf);
if (!dbuf)
return -ENOMEM;
@@ -496,7 +496,7 @@ static int xen_drm_drv_init(struct xen_drm_front_info *front_info)
DRM_INFO("Creating %s\n", xen_drm_driver.desc);
- drm_info = kzalloc_obj(*drm_info, GFP_KERNEL);
+ drm_info = kzalloc_obj(*drm_info);
if (!drm_info) {
ret = -ENOMEM;
goto fail;
diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c b/drivers/gpu/drm/xen/xen_drm_front_gem.c
index afad19fe01d2..c80043a6a99f 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_gem.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_gem.c
@@ -118,7 +118,7 @@ static struct xen_gem_object *gem_create_obj(struct drm_device *dev,
struct xen_gem_object *xen_obj;
int ret;
- xen_obj = kzalloc_obj(*xen_obj, GFP_KERNEL);
+ xen_obj = kzalloc_obj(*xen_obj);
if (!xen_obj)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c
index db1053161e35..9a8f38230cb4 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
@@ -1360,7 +1360,7 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
struct zynqmp_disp *disp;
int ret;
- disp = kzalloc_obj(*disp, GFP_KERNEL);
+ disp = kzalloc_obj(*disp);
if (!disp)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index 4f21dc062170..379180fb3004 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -1739,7 +1739,7 @@ static const struct drm_edid *zynqmp_dp_bridge_edid_read(struct drm_bridge *brid
static u32 *zynqmp_dp_bridge_default_bus_fmts(unsigned int *num_input_fmts)
{
- u32 *formats = kzalloc_obj(*formats, GFP_KERNEL);
+ u32 *formats = kzalloc_obj(*formats);
if (formats)
*formats = MEDIA_BUS_FMT_FIXED;
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
index 137d3e85e0fb..53ab1a2a5aaf 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
@@ -189,7 +189,7 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
int ret;
/* Allocate private data. */
- dpsub = kzalloc_obj(*dpsub, GFP_KERNEL);
+ dpsub = kzalloc_obj(*dpsub);
if (!dpsub)
return -ENOMEM;