Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Feb 2026 04:03:00 +0000 (20:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Feb 2026 04:03:00 +0000 (20:03 -0800)
This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
826 files changed:
arch/arm/mach-omap1/mcbsp.c
arch/arm64/kernel/vdso.c
arch/loongarch/kernel/vdso.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/mm/book3s64/mmu_context.c
arch/powerpc/perf/hv-24x7.c
arch/powerpc/perf/imc-pmu.c
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/memtrace.c
arch/powerpc/platforms/powernv/opal-imc.c
arch/powerpc/platforms/powernv/opal-powercap.c
arch/powerpc/platforms/powernv/opal-psr.c
arch/powerpc/platforms/powernv/opal-sensor-groups.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/mpic_msgr.c
arch/riscv/kernel/vdso.c
arch/s390/kvm/pci.c
arch/s390/pci/pci.c
arch/sh/drivers/pci/pcie-sh7786.c
arch/sparc/kernel/smp_64.c
arch/sparc/kernel/sys_sparc_64.c
arch/um/drivers/vector_kern.c
arch/x86/events/intel/uncore_snbep.c
arch/x86/hyperv/hv_init.c
arch/x86/kernel/amd_nb.c
arch/x86/kernel/cpu/sgx/main.c
arch/x86/kvm/cpuid.c
arch/x86/kvm/vmx/tdx.c
block/blk-crypto-fallback.c
block/blk-crypto-profile.c
drivers/accel/amdxdna/amdxdna_gem.c
drivers/accel/ethosu/ethosu_drv.c
drivers/accel/ethosu/ethosu_gem.c
drivers/accel/habanalabs/common/command_submission.c
drivers/accel/habanalabs/common/debugfs.c
drivers/accel/habanalabs/common/hw_queue.c
drivers/accel/habanalabs/common/mmu/mmu.c
drivers/accel/habanalabs/common/security.c
drivers/accel/habanalabs/gaudi2/gaudi2_security.c
drivers/accel/qaic/qaic_ssr.c
drivers/acpi/apei/einj-core.c
drivers/acpi/cppc_acpi.c
drivers/acpi/mipi-disco-img.c
drivers/acpi/platform_profile.c
drivers/acpi/processor_perflib.c
drivers/acpi/processor_throttling.c
drivers/acpi/riscv/irq.c
drivers/acpi/scan.c
drivers/ata/libahci_platform.c
drivers/atm/he.c
drivers/atm/iphase.c
drivers/base/physical_location.c
drivers/block/drbd/drbd_receiver.c
drivers/block/ps3vram.c
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/xenbus.c
drivers/block/xen-blkfront.c
drivers/block/z2ram.c
drivers/bus/mhi/ep/main.c
drivers/bus/mhi/host/boot.c
drivers/bus/mhi/host/init.c
drivers/char/agp/sworks-agp.c
drivers/char/agp/uninorth-agp.c
drivers/char/virtio_console.c
drivers/clk/aspeed/clk-aspeed.c
drivers/clk/bcm/clk-iproc-asiu.c
drivers/clk/clk-gemini.c
drivers/clk/clk-milbeaut.c
drivers/clk/clk-stm32f4.c
drivers/clk/imx/clk-imx6q.c
drivers/clk/imx/clk-imx6sl.c
drivers/clk/imx/clk-imx6sll.c
drivers/clk/imx/clk-imx6sx.c
drivers/clk/imx/clk-imx6ul.c
drivers/clk/imx/clk-imx7ulp.c
drivers/clk/imx/clk-imx8mm.c
drivers/clk/ingenic/cgu.c
drivers/clk/mvebu/common.c
drivers/clk/st/clk-flexgen.c
drivers/clk/st/clkgen-pll.c
drivers/clk/tegra/clk.c
drivers/clocksource/dw_apb_timer.c
drivers/clocksource/sh_cmt.c
drivers/clocksource/sh_mtu2.c
drivers/clocksource/sh_tmu.c
drivers/comedi/drivers/ni_670x.c
drivers/connector/cn_proc.c
drivers/cpufreq/acpi-cpufreq.c
drivers/cpufreq/armada-37xx-cpufreq.c
drivers/cpufreq/longhaul.c
drivers/cpufreq/sparc-us2e-cpufreq.c
drivers/cpufreq/sparc-us3-cpufreq.c
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/cavium/nitrox/nitrox_mbx.c
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/sec2/sec_crypto.c
drivers/crypto/hisilicon/zip/zip_crypto.c
drivers/crypto/intel/qat/qat_common/adf_fw_counters.c
drivers/crypto/intel/qat/qat_common/adf_sriov.c
drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
drivers/crypto/stm32/stm32-cryp.c
drivers/crypto/virtio/virtio_crypto_core.c
drivers/devfreq/governor_userspace.c
drivers/dma-buf/udmabuf.c
drivers/dma/amba-pl08x.c
drivers/dma/plx_dma.c
drivers/dma/xilinx/zynqmp_dma.c
drivers/edac/edac_device.c
drivers/edac/edac_mc.c
drivers/edac/i7core_edac.c
drivers/extcon/extcon.c
drivers/firmware/efi/apple-properties.c
drivers/firmware/efi/test/efi_test.c
drivers/firmware/qcom/qcom_tzmem.c
drivers/fpga/dfl.c
drivers/gpib/agilent_82350b/agilent_82350b.c
drivers/gpib/agilent_82357a/agilent_82357a.c
drivers/gpib/common/gpib_os.c
drivers/gpio/gpio-sim.c
drivers/gpio/gpio-virtuser.c
drivers/gpio/gpiolib-shared.c
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_virt_ras_cmd.c
drivers/gpu/drm/arm/malidp_mw.c
drivers/gpu/drm/ast/ast_dp.c
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_atomic_state_helper.c
drivers/gpu/drm/drm_buddy.c
drivers/gpu/drm/drm_client_modeset.c
drivers/gpu/drm/drm_gem_atomic_helper.c
drivers/gpu/drm/drm_lease.c
drivers/gpu/drm/drm_plane.c
drivers/gpu/drm/drm_plane_helper.c
drivers/gpu/drm/drm_writeback.c
drivers/gpu/drm/etnaviv/etnaviv_flop_reset.c
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
drivers/gpu/drm/exynos/exynos_drm_g2d.c
drivers/gpu/drm/gma500/intel_gmbus.c
drivers/gpu/drm/gma500/psb_intel_sdvo.c
drivers/gpu/drm/gud/gud_connector.c
drivers/gpu/drm/gud/gud_drv.c
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_dp_tunnel.c
drivers/gpu/drm/i915/gem/i915_gem_create.c
drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
drivers/gpu/drm/i915/gt/intel_workarounds.c
drivers/gpu/drm/i915/gt/selftest_execlists.c
drivers/gpu/drm/i915/gt/selftest_timeline.c
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
drivers/gpu/drm/i915/i915_cmd_parser.c
drivers/gpu/drm/i915/selftests/i915_request.c
drivers/gpu/drm/mgag200/mgag200_mode.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
drivers/gpu/drm/nouveau/dispnv04/overlay.c
drivers/gpu/drm/nouveau/nouveau_svm.c
drivers/gpu/drm/nouveau/nvif/fifo.c
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
drivers/gpu/drm/qxl/qxl_display.c
drivers/gpu/drm/qxl/qxl_ioctl.c
drivers/gpu/drm/radeon/atombios_encoders.c
drivers/gpu/drm/radeon/btc_dpm.c
drivers/gpu/drm/radeon/ci_dpm.c
drivers/gpu/drm/radeon/ni_dpm.c
drivers/gpu/drm/radeon/r600_dpm.c
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_cs.c
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/radeon_vm.c
drivers/gpu/drm/radeon/si_dpm.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/scheduler/sched_main.c
drivers/gpu/drm/tiny/appletbdrm.c
drivers/gpu/drm/ttm/ttm_tt.c
drivers/gpu/drm/v3d/v3d_submit.c
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/virtio/virtgpu_fence.c
drivers/gpu/drm/virtio/virtgpu_prime.c
drivers/gpu/drm/vkms/vkms_crtc.c
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
drivers/gpu/drm/xe/xe_eu_stall.c
drivers/gpu/drm/xe/xe_oa.c
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_vm_madvise.c
drivers/gpu/drm/xen/xen_drm_front_gem.c
drivers/gpu/host1x/channel.c
drivers/greybus/manifest.c
drivers/greybus/svc.c
drivers/hid/hid-google-hammer.c
drivers/hid/hid-haptic.c
drivers/hid/intel-ish-hid/ishtp/hbm.c
drivers/hv/hv.c
drivers/hv/ring_buffer.c
drivers/hwmon/coretemp.c
drivers/hwmon/ibmpex.c
drivers/hwtracing/coresight/coresight-tmc-etr.c
drivers/i2c/busses/i2c-qcom-geni.c
drivers/i2c/i2c-dev.c
drivers/i3c/master.c
drivers/i3c/master/mipi-i3c-hci/dma.c
drivers/infiniband/core/cache.c
drivers/infiniband/core/cm.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/roce_gid_mgmt.c
drivers/infiniband/core/rw.c
drivers/infiniband/core/sa_query.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/bng_re/bng_fw.c
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/cxgb4/qp.c
drivers/infiniband/hw/efa/efa_verbs.c
drivers/infiniband/hw/hfi1/pio.c
drivers/infiniband/hw/hfi1/user_exp_rcv.c
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/ionic/ionic_admin.c
drivers/infiniband/hw/ionic/ionic_controlpath.c
drivers/infiniband/hw/ionic/ionic_hw_stats.c
drivers/infiniband/hw/irdma/cm.c
drivers/infiniband/hw/irdma/icrdma_if.c
drivers/infiniband/hw/irdma/ig3rdma_if.c
drivers/infiniband/hw/irdma/verbs.c
drivers/infiniband/hw/mlx4/alias_GUID.c
drivers/infiniband/hw/mlx4/mad.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/sysfs.c
drivers/infiniband/hw/mlx5/counters.c
drivers/infiniband/hw/mlx5/fs.c
drivers/infiniband/hw/mlx5/gsi.c
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/mthca/mthca_allocator.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/infiniband/ulp/rtrs/rtrs-srv.c
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/ipack/carriers/tpci200.c
drivers/irqchip/irq-alpine-msi.c
drivers/irqchip/irq-bcm6345-l1.c
drivers/irqchip/irq-bcm7038-l1.c
drivers/irqchip/irq-bcm7120-l2.c
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v5-iwb.c
drivers/irqchip/irq-riscv-intc.c
drivers/isdn/capi/capi.c
drivers/macintosh/windfarm_pm121.c
drivers/macintosh/windfarm_pm91.c
drivers/md/dm-snap-persistent.c
drivers/md/dm-snap.c
drivers/md/dm-zoned-metadata.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid5-ppl.c
drivers/md/raid5.c
drivers/media/common/b2c2/flexcop.c
drivers/media/dvb-core/dvbdev.c
drivers/media/dvb-frontends/dib0070.c
drivers/media/dvb-frontends/dib0090.c
drivers/media/dvb-frontends/s5h1420.c
drivers/media/dvb-frontends/stv0900_core.c
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
drivers/media/platform/renesas/vsp1/vsp1_video.c
drivers/media/test-drivers/vidtv/vidtv_psi.c
drivers/media/test-drivers/vimc/vimc-core.c
drivers/media/usb/dvb-usb/cinergyT2-fe.c
drivers/media/usb/dvb-usb/vp702x-fe.c
drivers/media/usb/dvb-usb/vp7045-fe.c
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
drivers/media/v4l2-core/v4l2-ctrls-core.c
drivers/media/v4l2-core/v4l2-flash-led-class.c
drivers/media/v4l2-core/v4l2-subdev.c
drivers/message/fusion/mptlan.c
drivers/message/fusion/mptsas.c
drivers/mfd/timberdale.c
drivers/misc/altera-stapl/altera.c
drivers/misc/fastrpc.c
drivers/misc/genwqe/card_ddcb.c
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
drivers/misc/mei/interrupt.c
drivers/misc/sgi-xp/xpc_main.c
drivers/misc/sgi-xp/xpc_uv.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_probe.c
drivers/mtd/chips/jedec_probe.c
drivers/mtd/ftl.c
drivers/mtd/mtdconcat.c
drivers/mtd/parsers/bcm47xxpart.c
drivers/mtd/parsers/parser_trx.c
drivers/mtd/parsers/scpart.c
drivers/mtd/rfd_ftl.c
drivers/mtd/sm_ftl.c
drivers/mtd/ubi/eba.c
drivers/net/bonding/bond_main.c
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/sja1105/sja1105_devlink.c
drivers/net/ethernet/amd/pcnet32.c
drivers/net/ethernet/apm/xgene-v2/main.c
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
drivers/net/ethernet/broadcom/cnic.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/sb1250-mac.c
drivers/net/ethernet/brocade/bna/bnad.c
drivers/net/ethernet/calxeda/xgmac.c
drivers/net/ethernet/cavium/liquidio/lio_core.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
drivers/net/ethernet/cisco/enic/enic_main.c
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/google/gve/gve_ethtool.c
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_rx.c
drivers/net/ethernet/google/gve/gve_rx_dqo.c
drivers/net/ethernet/google/gve/gve_tx.c
drivers/net/ethernet/google/gve/gve_tx_dqo.c
drivers/net/ethernet/hisilicon/hns/hnae.c
drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c
drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c
drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/e1000e/ethtool.c
drivers/net/ethernet/intel/fm10k/fm10k_main.c
drivers/net/ethernet/intel/i40e/i40e_debugfs.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/ice/ice_arfs.c
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/idpf/idpf_controlq.c
drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
drivers/net/ethernet/intel/idpf/idpf_lib.c
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/intel/libie/fwlog.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
drivers/net/ethernet/marvell/octeon_ep/octep_main.c
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/marvell/prestera/prestera_counter.c
drivers/net/ethernet/marvell/sky2.c
drivers/net/ethernet/mellanox/mlx4/alloc.c
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
drivers/net/ethernet/mellanox/mlx5/core/rl.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
drivers/net/ethernet/mellanox/mlxsw/pci.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/micrel/ksz884x.c
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
drivers/net/ethernet/microchip/sparx5/sparx5_main.c
drivers/net/ethernet/microsoft/mana/mana_en.c
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
drivers/net/ethernet/netronome/nfp/bpf/offload.c
drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
drivers/net/ethernet/netronome/nfp/nfd3/rings.c
drivers/net/ethernet/netronome/nfp/nfdk/rings.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_main.c
drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/ethernet/pasemi/pasemi_mac.c
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
drivers/net/ethernet/qlogic/qed/qed_cxt.c
drivers/net/ethernet/qlogic/qed/qed_debug.c
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
drivers/net/ethernet/qlogic/qede/qede_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
drivers/net/ethernet/renesas/ravb_main.c
drivers/net/ethernet/renesas/rswitch_main.c
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/rocker/rocker_main.c
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
drivers/net/ethernet/sfc/falcon/rx.c
drivers/net/ethernet/sfc/falcon/selftest.c
drivers/net/ethernet/sfc/mcdi_mon.c
drivers/net/ethernet/sfc/rx_common.c
drivers/net/ethernet/sfc/selftest.c
drivers/net/ethernet/sfc/siena/mcdi_mon.c
drivers/net/ethernet/sfc/siena/rx_common.c
drivers/net/ethernet/sfc/siena/selftest.c
drivers/net/ethernet/smsc/smsc9420.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c
drivers/net/ethernet/ti/k3-cppi-desc-pool.c
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/ieee802154/ca8210.c
drivers/net/ipa/gsi_trans.c
drivers/net/pcs/pcs-rzn1-miic.c
drivers/net/usb/hso.c
drivers/net/usb/smsc75xx.c
drivers/net/wan/fsl_ucc_hdlc.c
drivers/net/wireless/ath/ath10k/ce.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/wil6210/fw_inc.c
drivers/net/wireless/ath/wil6210/pmc.c
drivers/net/wireless/ath/wil6210/txrx_edma.c
drivers/net/wireless/broadcom/b43/debugfs.c
drivers/net/wireless/broadcom/b43/dma.c
drivers/net/wireless/broadcom/b43legacy/dma.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/libipw_module.c
drivers/net/wireless/intel/iwlegacy/common.c
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
drivers/net/wireless/intel/iwlwifi/mld/d3.c
drivers/net/wireless/intel/iwlwifi/mld/sta.c
drivers/net/wireless/intel/iwlwifi/mld/time_sync.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c
drivers/net/wireless/intersil/p54/eeprom.c
drivers/net/wireless/marvell/mwifiex/scan.c
drivers/net/wireless/microchip/wilc1000/cfg80211.c
drivers/net/wireless/quantenna/qtnfmac/commands.c
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
drivers/net/wireless/realtek/rtw88/sdio.c
drivers/net/wireless/realtek/rtw89/usb.c
drivers/net/wireless/st/cw1200/debug.c
drivers/net/wireless/st/cw1200/queue.c
drivers/net/wireless/st/cw1200/scan.c
drivers/net/wireless/ti/wl1251/init.c
drivers/net/wwan/iosm/iosm_ipc_protocol.c
drivers/net/xen-netfront.c
drivers/nvdimm/btt.c
drivers/nvdimm/nd_perf.c
drivers/nvdimm/region_devs.c
drivers/nvme/host/auth.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/configfs.c
drivers/nvme/target/core.c
drivers/nvme/target/fc.c
drivers/nvme/target/loop.c
drivers/nvme/target/pci-epf.c
drivers/opp/core.c
drivers/opp/of.c
drivers/pci/hotplug/cpqphp_nvram.c
drivers/pci/hotplug/cpqphp_pci.c
drivers/pci/hotplug/ibmphp_ebda.c
drivers/pci/hotplug/ibmphp_pci.c
drivers/pci/hotplug/ibmphp_res.c
drivers/perf/riscv_pmu_sbi.c
drivers/pinctrl/bcm/pinctrl-bcm2835.c
drivers/pinctrl/berlin/berlin.c
drivers/pinctrl/pinctrl-apple-gpio.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c
drivers/pinctrl/vt8500/pinctrl-wmt.c
drivers/platform/chrome/chromeos_laptop.c
drivers/platform/x86/asus-armoury.c
drivers/platform/x86/dell/dell-smbios-base.c
drivers/platform/x86/intel/int3472/tps68470.c
drivers/platform/x86/intel/speed_select_if/isst_if_common.c
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c
drivers/platform/x86/sony-laptop.c
drivers/platform/x86/uv_sysfs.c
drivers/platform/x86/x86-android-tablets/core.c
drivers/powercap/intel_rapl_common.c
drivers/regulator/of_regulator.c
drivers/s390/block/dcssblk.c
drivers/s390/block/scm_blk.c
drivers/s390/char/con3270.c
drivers/s390/cio/css.c
drivers/s390/cio/qdio_thinint.c
drivers/s390/cio/vfio_ccw_ops.c
drivers/scsi/53c700.c
drivers/scsi/BusLogic.c
drivers/scsi/aacraid/linit.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
drivers/scsi/bnx2fc/bnx2fc_io.c
drivers/scsi/csiostor/csio_lnode.c
drivers/scsi/elx/efct/efct_hw.c
drivers/scsi/esas2r/esas2r_init.c
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ipr.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_mem.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_vport.c
drivers/scsi/megaraid/megaraid_mm.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c
drivers/scsi/mpi3mr/mpi3mr_fw.c
drivers/scsi/mpi3mr/mpi3mr_transport.c
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_ctl.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mvumi.c
drivers/scsi/qedf/qedf_io.c
drivers/scsi/qedf/qedf_main.c
drivers/scsi/qedi/qedi_main.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_inline.h
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mid.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/scsi_debug.c
drivers/scsi/ses.c
drivers/scsi/smartpqi/smartpqi_init.c
drivers/scsi/vmw_pvscsi.c
drivers/soc/qcom/pdr_interface.c
drivers/soc/renesas/rz-sysc.c
drivers/soundwire/amd_init.c
drivers/soundwire/amd_manager.c
drivers/soundwire/intel.c
drivers/soundwire/intel_ace2x.c
drivers/soundwire/intel_init.c
drivers/spi/spi-bcm-qspi.c
drivers/spi/spi-mpc52xx.c
drivers/spi/spi-virtio.c
drivers/staging/greybus/light.c
drivers/staging/greybus/power_supply.c
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/sh_css.c
drivers/staging/media/atomisp/pci/sh_css_firmware.c
drivers/staging/media/atomisp/pci/sh_css_params.c
drivers/staging/vme_user/vme_tsi148.c
drivers/target/target_core_iblock.c
drivers/target/target_core_pr.c
drivers/tee/qcomtee/call.c
drivers/tee/qcomtee/mem_obj.c
drivers/tee/tee_core.c
drivers/thermal/intel/intel_hfi.c
drivers/thermal/testing/zone.c
drivers/thermal/thermal_of.c
drivers/thunderbolt/switch.c
drivers/tty/goldfish.c
drivers/tty/serial/8250/8250_platform.c
drivers/tty/serial/jsm/jsm_tty.c
drivers/tty/serial/serial_core.c
drivers/tty/tty_io.c
drivers/tty/vt/keyboard.c
drivers/usb/core/hcd.c
drivers/usb/gadget/function/f_midi.c
drivers/usb/gadget/function/f_midi2.c
drivers/usb/gadget/udc/bdc/bdc_core.c
drivers/usb/host/uhci-hcd.c
drivers/usb/host/xhci-mtk-sch.c
drivers/usb/mon/mon_bin.c
drivers/usb/serial/mos7840.c
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/usbip/vhci_sysfs.c
drivers/vdpa/mlx5/net/mlx5_vnet.c
drivers/vdpa/vdpa_sim/vdpa_sim.c
drivers/vfio/pci/pds/dirty.c
drivers/vfio/pci/vfio_pci_dmabuf.c
drivers/vhost/net.c
drivers/vhost/scsi.c
drivers/vhost/vhost.c
drivers/video/fbdev/arkfb.c
drivers/video/fbdev/mmp/fb/mmpfb.c
drivers/video/fbdev/omap2/omapfb/dss/manager.c
drivers/video/fbdev/smscufx.c
drivers/video/fbdev/udlfb.c
drivers/video/fbdev/uvesafb.c
drivers/video/of_display_timing.c
drivers/virt/acrn/mm.c
drivers/virt/nitro_enclaves/ne_misc_dev.c
drivers/virtio/virtio_pci_common.c
drivers/xen/gntdev.c
drivers/xen/grant-table.c
drivers/xen/xen-acpi-processor.c
drivers/xen/xen-scsiback.c
fs/aio.c
fs/binfmt_elf.c
fs/btrfs/ioctl.c
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/zoned.c
fs/cachefiles/ondemand.c
fs/coredump.c
fs/erofs/xattr.c
fs/exfat/balloc.c
fs/ext2/super.c
fs/ext4/orphan.c
fs/fhandle.c
fs/jbd2/journal.c
fs/jffs2/summary.c
fs/jffs2/xattr.c
fs/mbcache.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/journal.c
fs/ocfs2/slot_map.c
fs/orangefs/orangefs-bufmap.c
fs/pstore/ram.c
fs/select.c
fs/smb/client/misc.c
fs/xfs/xfs_super.c
fs/xfs/xfs_zone_gc.c
fs/zonefs/super.c
include/net/udp.h
kernel/bpf/core.c
kernel/gcov/fs.c
kernel/gcov/gcc_4_7.c
kernel/locking/locktorture.c
kernel/padata.c
kernel/params.c
kernel/rcu/rcuscale.c
kernel/rcu/rcutorture.c
kernel/sched/ext.c
kernel/trace/trace.c
kernel/trace/trace_events_hist.c
kernel/trace/trace_probe.c
kernel/unwind/deferred.c
lib/assoc_array.c
lib/kunit/executor.c
lib/tests/test_ratelimit.c
mm/damon/sysfs-schemes.c
mm/damon/sysfs.c
mm/damon/tests/core-kunit.h
mm/damon/vaddr.c
mm/ksm.c
mm/memory-tiers.c
mm/mempolicy.c
mm/mmu_notifier.c
mm/swapfile.c
net/bluetooth/l2cap_sock.c
net/can/af_can.c
net/ceph/mon_client.c
net/core/dev.c
net/core/drop_monitor.c
net/core/flow_offload.c
net/ethtool/mse.c
net/ipv4/af_inet.c
net/ipv4/fib_semantics.c
net/ipv4/nexthop.c
net/ipv6/addrconf.c
net/ipv6/af_inet6.c
net/ipv6/ip6_fib.c
net/mac80211/util.c
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_mh.c
net/netfilter/nfnetlink_cthelper.c
net/netlink/policy.c
net/openvswitch/conntrack.c
net/openvswitch/datapath.c
net/openvswitch/vport.c
net/packet/af_packet.c
net/rds/ib.c
net/rds/rdma.c
net/sched/cls_api.c
net/sched/cls_u32.c
net/sched/sch_cake.c
net/sched/sch_fq_codel.c
net/sched/sch_hhf.c
net/sched/sch_mq.c
net/sched/sch_mqprio.c
net/sched/sch_taprio.c
net/smc/smc_wr.c
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/cache.c
net/sunrpc/svcsock.c
net/tipc/netlink_compat.c
net/unix/af_unix.c
net/wireless/nl80211.c
net/xdp/xsk_buff_pool.c
security/apparmor/policy_unpack.c
security/integrity/ima/ima_policy.c
security/selinux/ss/conditional.c
security/selinux/ss/policydb.c
sound/aoa/codecs/onyx.c
sound/core/oss/pcm_plugin.c
sound/core/seq/seq_memory.c
sound/core/ump.c
sound/drivers/vx/vx_pcm.c
sound/hda/codecs/ca0132.c
sound/hda/common/proc.c
sound/hda/core/ext/stream.c
sound/hda/core/sysfs.c
sound/pci/cs46xx/dsp_spos.c
sound/pci/emu10k1/emufx.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/soc/au1x/dma.c
sound/soc/codecs/aw88395/aw88395_lib.c
sound/soc/codecs/da7219.c
sound/soc/codecs/lpass-rx-macro.c
sound/soc/codecs/lpass-wsa-macro.c
sound/soc/codecs/tas2781-fmwlib.c
sound/soc/codecs/wm_adsp.c
sound/soc/soc-dapm.c
sound/soc/sof/ipc3-topology.c
sound/soc/sof/ipc4-topology.c
sound/synth/emux/emux.c
sound/synth/emux/emux_seq.c
sound/usb/6fire/control.c
sound/usb/line6/capture.c
sound/usb/line6/playback.c
sound/usb/mixer.c
sound/usb/mixer_quirks.c
sound/usb/usx2y/usbusx2yaudio.c
sound/xen/xen_snd_front_alsa.c

index a4dae1b..b6cce51 100644 (file)
@@ -294,8 +294,7 @@ static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
 {
        int i;
 
-       omap_mcbsp_devices = kzalloc_objs(struct platform_device *, size,
-                                         GFP_KERNEL);
+       omap_mcbsp_devices = kzalloc_objs(struct platform_device *, size);
        if (!omap_mcbsp_devices) {
                printk(KERN_ERR "Could not register McBSP devices\n");
                return;
index 34d761e..592dd86 100644 (file)
@@ -81,8 +81,7 @@ static int __init __vdso_init(enum vdso_abi abi)
                        vdso_info[abi].vdso_code_start) >>
                        PAGE_SHIFT;
 
-       vdso_pagelist = kzalloc_objs(struct page *, vdso_info[abi].vdso_pages,
-                                    GFP_KERNEL);
+       vdso_pagelist = kzalloc_objs(struct page *, vdso_info[abi].vdso_pages);
        if (vdso_pagelist == NULL)
                return -ENOMEM;
 
index 222be8f..0aa10ca 100644 (file)
@@ -52,8 +52,7 @@ static int __init init_vdso(void)
 
        vdso_info.size = PAGE_ALIGN(vdso_end - vdso_start);
        vdso_info.code_mapping.pages =
-               kzalloc_objs(struct page *, vdso_info.size / PAGE_SIZE,
-                            GFP_KERNEL);
+               kzalloc_objs(struct page *, vdso_info.size / PAGE_SIZE);
 
        if (!vdso_info.code_mapping.pages)
                return -ENOMEM;
index b7fdb08..2ba2dd2 100644 (file)
@@ -1738,8 +1738,7 @@ static int kvmppc_core_vcpu_create_pr(struct kvm_vcpu *vcpu)
        vcpu->arch.book3s = vcpu_book3s;
 
 #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
-       vcpu->arch.shadow_vcpu = kzalloc_obj(*vcpu->arch.shadow_vcpu,
-                                            GFP_KERNEL);
+       vcpu->arch.shadow_vcpu = kzalloc_obj(*vcpu->arch.shadow_vcpu);
        if (!vcpu->arch.shadow_vcpu)
                goto free_vcpu3s;
 #endif
index c7302dd..2fe787e 100644 (file)
@@ -96,8 +96,7 @@ static int hash__init_new_context(struct mm_struct *mm)
 {
        int index;
 
-       mm->context.hash_context = kmalloc_obj(struct hash_mm_context,
-                                              GFP_KERNEL);
+       mm->context.hash_context = kmalloc_obj(struct hash_mm_context);
        if (!mm->context.hash_context)
                return -ENOMEM;
 
@@ -124,8 +123,7 @@ static int hash__init_new_context(struct mm_struct *mm)
 #ifdef CONFIG_PPC_SUBPAGE_PROT
                /* inherit subpage prot details if we have one. */
                if (current->mm->context.hash_context->spt) {
-                       mm->context.hash_context->spt = kmalloc_obj(struct subpage_prot_table,
-                                                                   GFP_KERNEL);
+                       mm->context.hash_context->spt = kmalloc_obj(struct subpage_prot_table);
                        if (!mm->context.hash_context->spt) {
                                kfree(mm->context.hash_context);
                                return -ENOMEM;
index 8a8d8c2..243c0a1 100644 (file)
@@ -917,8 +917,7 @@ static int create_events_from_catalog(struct attribute ***events_,
                goto e_event_attrs;
        }
 
-       event_long_descs = kmalloc_objs(*event_long_descs, event_idx + 1,
-                                       GFP_KERNEL);
+       event_long_descs = kmalloc_objs(*event_long_descs, event_idx + 1);
        if (!event_long_descs) {
                ret = -ENOMEM;
                goto e_event_descs;
index e3cb239..db98e9a 100644 (file)
@@ -1527,8 +1527,7 @@ static int init_nest_pmu_ref(void)
 {
        int nid, i, cpu;
 
-       nest_imc_refc = kzalloc_objs(*nest_imc_refc, num_possible_nodes(),
-                                    GFP_KERNEL);
+       nest_imc_refc = kzalloc_objs(*nest_imc_refc, num_possible_nodes());
 
        if (!nest_imc_refc)
                return -ENOMEM;
@@ -1714,14 +1713,12 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
                        goto err;
 
                nr_cores = DIV_ROUND_UP(num_possible_cpus(), threads_per_core);
-               pmu_ptr->mem_info = kzalloc_objs(struct imc_mem_info, nr_cores,
-                                                GFP_KERNEL);
+               pmu_ptr->mem_info = kzalloc_objs(struct imc_mem_info, nr_cores);
 
                if (!pmu_ptr->mem_info)
                        goto err;
 
-               core_imc_refc = kzalloc_objs(struct imc_pmu_ref, nr_cores,
-                                            GFP_KERNEL);
+               core_imc_refc = kzalloc_objs(struct imc_pmu_ref, nr_cores);
 
                if (!core_imc_refc) {
                        kfree(pmu_ptr->mem_info);
@@ -1754,8 +1751,7 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
                        return -ENOMEM;
 
                nr_cores = DIV_ROUND_UP(num_possible_cpus(), threads_per_core);
-               trace_imc_refc = kzalloc_objs(struct imc_pmu_ref, nr_cores,
-                                             GFP_KERNEL);
+               trace_imc_refc = kzalloc_objs(struct imc_pmu_ref, nr_cores);
                if (!trace_imc_refc)
                        return -ENOMEM;
 
index 1389a31..6cd461f 100644 (file)
@@ -1336,8 +1336,7 @@ static int __init pnv_parse_cpuidle_dt(void)
        nr_idle_states = of_property_count_u32_elems(np,
                                                "ibm,cpu-idle-state-flags");
 
-       pnv_idle_states = kzalloc_objs(*pnv_idle_states, nr_idle_states,
-                                      GFP_KERNEL);
+       pnv_idle_states = kzalloc_objs(*pnv_idle_states, nr_idle_states);
        temp_u32 = kcalloc(nr_idle_states, sizeof(u32),  GFP_KERNEL);
        temp_u64 = kcalloc(nr_idle_states, sizeof(u64),  GFP_KERNEL);
        temp_string = kcalloc(nr_idle_states, sizeof(char *),  GFP_KERNEL);
index 5214e2d..6aa578e 100644 (file)
@@ -133,8 +133,7 @@ static int memtrace_init_regions_runtime(u64 size)
        u32 nid;
        u64 m;
 
-       memtrace_array = kzalloc_objs(struct memtrace_entry, num_online_nodes(),
-                                     GFP_KERNEL);
+       memtrace_array = kzalloc_objs(struct memtrace_entry, num_online_nodes());
        if (!memtrace_array) {
                pr_err("Failed to allocate memtrace_array\n");
                return -EINVAL;
index ed2842b..b3fd5c6 100644 (file)
@@ -108,8 +108,7 @@ static int imc_get_mem_addr_nest(struct device_node *node,
                                                                nr_chips))
                goto error;
 
-       pmu_ptr->mem_info = kzalloc_objs(*pmu_ptr->mem_info, nr_chips + 1,
-                                        GFP_KERNEL);
+       pmu_ptr->mem_info = kzalloc_objs(*pmu_ptr->mem_info, nr_chips + 1);
        if (!pmu_ptr->mem_info)
                goto error;
 
index 0e297d7..9bb73cb 100644 (file)
@@ -181,13 +181,11 @@ void __init opal_powercap_init(void)
                        has_cur = true;
                }
 
-               pcaps[i].pattrs = kzalloc_objs(struct powercap_attr, j,
-                                              GFP_KERNEL);
+               pcaps[i].pattrs = kzalloc_objs(struct powercap_attr, j);
                if (!pcaps[i].pattrs)
                        goto out_pcaps_pattrs;
 
-               pcaps[i].pg.attrs = kzalloc_objs(struct attribute *, j + 1,
-                                                GFP_KERNEL);
+               pcaps[i].pg.attrs = kzalloc_objs(struct attribute *, j + 1);
                if (!pcaps[i].pg.attrs) {
                        kfree(pcaps[i].pattrs);
                        goto out_pcaps_pattrs;
index 731d8b3..24d0a89 100644 (file)
@@ -132,8 +132,7 @@ void __init opal_psr_init(void)
                return;
        }
 
-       psr_attrs = kzalloc_objs(*psr_attrs, of_get_child_count(psr),
-                                GFP_KERNEL);
+       psr_attrs = kzalloc_objs(*psr_attrs, of_get_child_count(psr));
        if (!psr_attrs)
                goto out_put_psr;
 
index 2a34742..87fd6d7 100644 (file)
@@ -190,13 +190,11 @@ void __init opal_sensor_groups_init(void)
                if (!nr_attrs)
                        continue;
 
-               sgs[i].sgattrs = kzalloc_objs(*sgs[i].sgattrs, nr_attrs,
-                                             GFP_KERNEL);
+               sgs[i].sgattrs = kzalloc_objs(*sgs[i].sgattrs, nr_attrs);
                if (!sgs[i].sgattrs)
                        goto out_sgs_sgattrs;
 
-               sgs[i].sg.attrs = kzalloc_objs(*sgs[i].sg.attrs, nr_attrs + 1,
-                                              GFP_KERNEL);
+               sgs[i].sg.attrs = kzalloc_objs(*sgs[i].sg.attrs, nr_attrs + 1);
 
                if (!sgs[i].sg.attrs) {
                        kfree(sgs[i].sgattrs);
index eba2771..257886e 100644 (file)
@@ -1639,8 +1639,7 @@ void __init mpic_init(struct mpic *mpic)
 
 #ifdef CONFIG_PM
        /* allocate memory to save mpic state */
-       mpic->save_data = kmalloc_objs(*mpic->save_data, mpic->num_sources,
-                                      GFP_KERNEL);
+       mpic->save_data = kmalloc_objs(*mpic->save_data, mpic->num_sources);
        BUG_ON(mpic->save_data == NULL);
 #endif
 
index e9af4fa..26f62ae 100644 (file)
@@ -188,8 +188,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
                dev_info(&dev->dev, "Found %d message registers\n",
                                mpic_msgr_count);
 
-               mpic_msgrs = kzalloc_objs(*mpic_msgrs, mpic_msgr_count,
-                                         GFP_KERNEL);
+               mpic_msgrs = kzalloc_objs(*mpic_msgrs, mpic_msgr_count);
                if (!mpic_msgrs) {
                        dev_err(&dev->dev,
                                "No memory for message register blocks\n");
index 7e37491..9c2f5e4 100644 (file)
@@ -55,8 +55,7 @@ static void __init __vdso_init(struct __vdso_info *vdso_info)
                vdso_info->vdso_code_start) >>
                PAGE_SHIFT;
 
-       vdso_pagelist = kzalloc_objs(struct page *, vdso_info->vdso_pages,
-                                    GFP_KERNEL);
+       vdso_pagelist = kzalloc_objs(struct page *, vdso_info->vdso_pages);
        if (vdso_pagelist == NULL)
                panic("vDSO kcalloc failed!\n");
 
index fc80495..86d93e8 100644 (file)
@@ -126,8 +126,7 @@ int kvm_s390_pci_aen_init(u8 nisc)
                return -EPERM;
 
        mutex_lock(&aift->aift_lock);
-       aift->kzdev = kzalloc_objs(struct kvm_zdev *, ZPCI_NR_DEVICES,
-                                  GFP_KERNEL);
+       aift->kzdev = kzalloc_objs(struct kvm_zdev *, ZPCI_NR_DEVICES);
        if (!aift->kzdev) {
                rc = -ENOMEM;
                goto unlock;
index 0ae82e5..2a43072 100644 (file)
@@ -1073,8 +1073,7 @@ static int zpci_mem_init(void)
        if (!zdev_fmb_cache)
                goto error_fmb;
 
-       zpci_iomap_start = kzalloc_objs(*zpci_iomap_start, ZPCI_IOMAP_ENTRIES,
-                                       GFP_KERNEL);
+       zpci_iomap_start = kzalloc_objs(*zpci_iomap_start, ZPCI_IOMAP_ENTRIES);
        if (!zpci_iomap_start)
                goto error_iomap;
 
index 1e67082..cbbb94d 100644 (file)
@@ -558,8 +558,7 @@ static int __init sh7786_pcie_init(void)
        if (unlikely(nr_ports == 0))
                return -ENODEV;
 
-       sh7786_pcie_ports = kzalloc_objs(struct sh7786_pcie_port, nr_ports,
-                                        GFP_KERNEL);
+       sh7786_pcie_ports = kzalloc_objs(struct sh7786_pcie_port, nr_ports);
        if (unlikely(!sh7786_pcie_ports))
                return -ENOMEM;
 
index 81f0be7..371460e 100644 (file)
@@ -297,8 +297,7 @@ static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg,
        unsigned long hv_err;
        int i;
 
-       hdesc = kzalloc_flex(*hdesc, maps, num_kernel_image_mappings,
-                            GFP_KERNEL);
+       hdesc = kzalloc_flex(*hdesc, maps, num_kernel_image_mappings);
        if (!hdesc) {
                printk(KERN_ERR "ldom_startcpu_cpuid: Cannot allocate "
                       "hvtramp_descr.\n");
index 8d5e2d5..ecefcff 100644 (file)
@@ -647,8 +647,7 @@ SYSCALL_DEFINE5(utrap_install, utrap_entry_t, type,
        }
        if (!current_thread_info()->utraps) {
                current_thread_info()->utraps =
-                       kzalloc_objs(long, UT_TRAP_INSTRUCTION_31 + 1,
-                                    GFP_KERNEL);
+                       kzalloc_objs(long, UT_TRAP_INSTRUCTION_31 + 1);
                if (!current_thread_info()->utraps)
                        return -ENOMEM;
                current_thread_info()->utraps[0] = 1;
@@ -658,8 +657,7 @@ SYSCALL_DEFINE5(utrap_install, utrap_entry_t, type,
                        unsigned long *p = current_thread_info()->utraps;
 
                        current_thread_info()->utraps =
-                               kmalloc_objs(long, UT_TRAP_INSTRUCTION_31 + 1,
-                                            GFP_KERNEL);
+                               kmalloc_objs(long, UT_TRAP_INSTRUCTION_31 + 1);
                        if (!current_thread_info()->utraps) {
                                current_thread_info()->utraps = p;
                                return -ENOMEM;
index 5434c87..2cc9005 100644 (file)
@@ -544,11 +544,9 @@ static struct vector_queue *create_queue(
        result->max_iov_frags = num_extra_frags;
        for (i = 0; i < max_size; i++) {
                if (vp->header_size > 0)
-                       iov = kmalloc_objs(struct iovec, 3 + num_extra_frags,
-                                          GFP_KERNEL);
+                       iov = kmalloc_objs(struct iovec, 3 + num_extra_frags);
                else
-                       iov = kmalloc_objs(struct iovec, 2 + num_extra_frags,
-                                          GFP_KERNEL);
+                       iov = kmalloc_objs(struct iovec, 2 + num_extra_frags);
                if (iov == NULL)
                        goto out_fail;
                mmsg_vector->msg_hdr.msg_iov = iov;
index 069e6b7..5ed6e0b 100644 (file)
@@ -3753,8 +3753,7 @@ static int pmu_alloc_topology(struct intel_uncore_type *type, int topology_type)
                goto err;
 
        for (die = 0; die < uncore_max_dies(); die++) {
-               topology[die] = kzalloc_objs(**topology, type->num_boxes,
-                                            GFP_KERNEL);
+               topology[die] = kzalloc_objs(**topology, type->num_boxes);
                if (!topology[die])
                        goto clear;
                for (idx = 0; idx < type->num_boxes; idx++) {
index e945ed6..323adc9 100644 (file)
@@ -467,8 +467,7 @@ void __init hyperv_init(void)
        if (hv_isolation_type_tdx())
                hv_vp_assist_page = NULL;
        else
-               hv_vp_assist_page = kzalloc_objs(*hv_vp_assist_page, nr_cpu_ids,
-                                                GFP_KERNEL);
+               hv_vp_assist_page = kzalloc_objs(*hv_vp_assist_page, nr_cpu_ids);
        if (!hv_vp_assist_page) {
                ms_hyperv.hints &= ~HV_X64_ENLIGHTENED_VMCS_RECOMMENDED;
 
index 852e8ff..5d36454 100644 (file)
@@ -68,8 +68,7 @@ static int amd_cache_northbridges(void)
 
        amd_northbridges.num = amd_num_nodes();
 
-       nb = kzalloc_objs(struct amd_northbridge, amd_northbridges.num,
-                         GFP_KERNEL);
+       nb = kzalloc_objs(struct amd_northbridge, amd_northbridges.num);
        if (!nb)
                return -ENOMEM;
 
index 1021a4e..38b7fd2 100644 (file)
@@ -798,8 +798,7 @@ static bool __init sgx_page_cache_init(void)
        int nid;
        int i;
 
-       sgx_numa_nodes = kmalloc_objs(*sgx_numa_nodes, num_possible_nodes(),
-                                     GFP_KERNEL);
+       sgx_numa_nodes = kmalloc_objs(*sgx_numa_nodes, num_possible_nodes());
        if (!sgx_numa_nodes)
                return false;
 
index c196aa0..d248650 100644 (file)
@@ -1991,8 +1991,7 @@ int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
        if (sanity_check_entries(entries, cpuid->nent, type))
                return -EINVAL;
 
-       array.entries = kvzalloc_objs(struct kvm_cpuid_entry2, cpuid->nent,
-                                     GFP_KERNEL);
+       array.entries = kvzalloc_objs(struct kvm_cpuid_entry2, cpuid->nent);
        if (!array.entries)
                return -ENOMEM;
 
index 8517d5f..d22cabe 100644 (file)
@@ -2218,8 +2218,7 @@ static int tdx_get_capabilities(struct kvm_tdx_cmd *cmd)
        if (nr_user_entries < td_conf->num_cpuid_config)
                return -E2BIG;
 
-       caps = kzalloc_flex(*caps, cpuid.entries, td_conf->num_cpuid_config,
-                           GFP_KERNEL);
+       caps = kzalloc_flex(*caps, cpuid.entries, td_conf->num_cpuid_config);
        if (!caps)
                return -ENOMEM;
 
index 9a05abe..24b8b1c 100644 (file)
@@ -546,8 +546,7 @@ static int blk_crypto_fallback_init(void)
                goto out;
 
        /* Dynamic allocation is needed because of lockdep_register_key(). */
-       blk_crypto_fallback_profile = kzalloc_obj(*blk_crypto_fallback_profile,
-                                                 GFP_KERNEL);
+       blk_crypto_fallback_profile = kzalloc_obj(*blk_crypto_fallback_profile);
        if (!blk_crypto_fallback_profile) {
                err = -ENOMEM;
                goto fail_free_bioset;
index 970880d..4ac7444 100644 (file)
@@ -120,8 +120,7 @@ int blk_crypto_profile_init(struct blk_crypto_profile *profile,
 
        profile->log_slot_ht_size = ilog2(slot_hashtable_size);
        profile->slot_hashtable =
-               kvmalloc_objs(profile->slot_hashtable[0], slot_hashtable_size,
-                             GFP_KERNEL);
+               kvmalloc_objs(profile->slot_hashtable[0], slot_hashtable_size);
        if (!profile->slot_hashtable)
                goto err_destroy;
        for (i = 0; i < slot_hashtable_size; i++)
index a561674..8c290dd 100644 (file)
@@ -210,8 +210,7 @@ static int amdxdna_hmm_register(struct amdxdna_gem_obj *abo,
                return -ENOMEM;
 
        nr_pages = (PAGE_ALIGN(addr + len) - (addr & PAGE_MASK)) >> PAGE_SHIFT;
-       mapp->range.hmm_pfns = kvzalloc_objs(*mapp->range.hmm_pfns, nr_pages,
-                                            GFP_KERNEL);
+       mapp->range.hmm_pfns = kvzalloc_objs(*mapp->range.hmm_pfns, nr_pages);
        if (!mapp->range.hmm_pfns) {
                ret = -ENOMEM;
                goto free_map;
index ae5e6b1..9992193 100644 (file)
@@ -144,8 +144,7 @@ static int ethosu_open(struct drm_device *ddev, struct drm_file *file)
        if (!try_module_get(THIS_MODULE))
                return -EINVAL;
 
-       struct ethosu_file_priv __free(kfree) *priv = kzalloc_obj(*priv,
-                                                                 GFP_KERNEL);
+       struct ethosu_file_priv __free(kfree) *priv = kzalloc_obj(*priv);
        if (!priv) {
                ret = -ENOMEM;
                goto err_put_mod;
index cbd74e3..4fbd4bb 100644 (file)
@@ -352,8 +352,7 @@ static int ethosu_gem_cmdstream_copy_and_validate(struct drm_device *ddev,
                                                  struct ethosu_gem_object *bo,
                                                  u32 size)
 {
-       struct ethosu_validated_cmdstream_info __free(kfree) *info = kzalloc_obj(*info,
-                                                                                GFP_KERNEL);
+       struct ethosu_validated_cmdstream_info __free(kfree) *info = kzalloc_obj(*info);
        struct ethosu_device *edev = to_ethosu_device(ddev);
        u32 *bocmds = bo->base.vaddr;
        struct cmd_state st;
index 6c896eb..ba4257b 100644 (file)
@@ -1422,8 +1422,7 @@ static int hl_cs_copy_chunk_array(struct hl_device *hdev,
 
        *cs_chunk_array = kmalloc_objs(**cs_chunk_array, num_chunks, GFP_ATOMIC);
        if (!*cs_chunk_array)
-               *cs_chunk_array = kmalloc_objs(**cs_chunk_array, num_chunks,
-                                              GFP_KERNEL);
+               *cs_chunk_array = kmalloc_objs(**cs_chunk_array, num_chunks);
        if (!*cs_chunk_array) {
                atomic64_inc(&ctx->cs_counters.out_of_mem_drop_cnt);
                atomic64_inc(&hdev->aggregated_cs_counters.out_of_mem_drop_cnt);
index 05b1cc7..1d5e29f 100644 (file)
@@ -2052,8 +2052,7 @@ int hl_debugfs_device_init(struct hl_device *hdev)
        int count = ARRAY_SIZE(hl_debugfs_list);
 
        dev_entry->hdev = hdev;
-       dev_entry->entry_arr = kmalloc_objs(struct hl_debugfs_entry, count,
-                                           GFP_KERNEL);
+       dev_entry->entry_arr = kmalloc_objs(struct hl_debugfs_entry, count);
        if (!dev_entry->entry_arr)
                return -ENOMEM;
 
index d499063..f0ab99d 100644 (file)
@@ -837,8 +837,7 @@ static int ext_and_cpu_queue_init(struct hl_device *hdev, struct hl_hw_queue *q,
 
        q->kernel_address = p;
 
-       q->shadow_queue = kmalloc_objs(struct hl_cs_job *, HL_QUEUE_LENGTH,
-                                      GFP_KERNEL);
+       q->shadow_queue = kmalloc_objs(struct hl_cs_job *, HL_QUEUE_LENGTH);
        if (!q->shadow_queue) {
                dev_err(hdev->dev,
                        "Failed to allocate shadow queue for H/W queue %d\n",
index 1f8f7cf..6c7c4ff 100644 (file)
@@ -843,8 +843,7 @@ int hl_mmu_hr_init(struct hl_device *hdev, struct hl_mmu_hr_priv *hr_priv, u32 h
                return -ENOMEM;
        }
 
-       hr_priv->mmu_asid_hop0 = kvzalloc_objs(struct pgt_info, prop->max_asid,
-                                              GFP_KERNEL);
+       hr_priv->mmu_asid_hop0 = kvzalloc_objs(struct pgt_info, prop->max_asid);
        if (ZERO_OR_NULL_PTR(hr_priv->mmu_asid_hop0)) {
                dev_err(hdev->dev, "Failed to allocate hr-mmu hop0 table\n");
                rc = -ENOMEM;
index 8a0da01..abe5ed0 100644 (file)
@@ -312,8 +312,7 @@ int hl_init_pb_with_mask(struct hl_device *hdev, u32 num_dcores,
        int i, j;
        struct hl_block_glbl_sec *glbl_sec;
 
-       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size,
-                               GFP_KERNEL);
+       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size);
        if (!glbl_sec)
                return -ENOMEM;
 
@@ -392,8 +391,7 @@ int hl_init_pb_ranges_with_mask(struct hl_device *hdev, u32 num_dcores,
        int i, j, rc = 0;
        struct hl_block_glbl_sec *glbl_sec;
 
-       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size,
-                               GFP_KERNEL);
+       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size);
        if (!glbl_sec)
                return -ENOMEM;
 
@@ -474,8 +472,7 @@ int hl_init_pb_single_dcore(struct hl_device *hdev, u32 dcore_offset,
        int i, rc = 0;
        struct hl_block_glbl_sec *glbl_sec;
 
-       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size,
-                               GFP_KERNEL);
+       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size);
        if (!glbl_sec)
                return -ENOMEM;
 
@@ -521,8 +518,7 @@ int hl_init_pb_ranges_single_dcore(struct hl_device *hdev, u32 dcore_offset,
        int i;
        struct hl_block_glbl_sec *glbl_sec;
 
-       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size,
-                               GFP_KERNEL);
+       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, blocks_array_size);
        if (!glbl_sec)
                return -ENOMEM;
 
index f4f8f91..ea3a0e5 100644 (file)
@@ -2620,8 +2620,7 @@ static int gaudi2_init_pb_tpc(struct hl_device *hdev)
 
        block_array_size = ARRAY_SIZE(gaudi2_pb_dcr0_tpc0);
 
-       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, block_array_size,
-                               GFP_KERNEL);
+       glbl_sec = kzalloc_objs(struct hl_block_glbl_sec, block_array_size);
        if (!glbl_sec)
                return -ENOMEM;
 
index e3daeaa..a5bb607 100644 (file)
@@ -457,8 +457,7 @@ static struct ssr_dump_info *alloc_dump_info(struct qaic_device *qdev,
        }
 
        /* Buffer used to send MEMORY READ request to device via MHI */
-       dump_info->read_buf_req = kzalloc_obj(*dump_info->read_buf_req,
-                                             GFP_KERNEL);
+       dump_info->read_buf_req = kzalloc_obj(*dump_info->read_buf_req);
        if (!dump_info->read_buf_req) {
                ret = -ENOMEM;
                goto free_dump_info;
index 7516978..a9248af 100644 (file)
@@ -1021,8 +1021,7 @@ static bool setup_einjv2_component_files(void)
 {
        char name[32];
 
-       syndrome_data = kzalloc_objs(syndrome_data[0], max_nr_components,
-                                    GFP_KERNEL);
+       syndrome_data = kzalloc_objs(syndrome_data[0], max_nr_components);
        if (!syndrome_data)
                return false;
 
index 5c21161..f0e513e 100644 (file)
@@ -636,8 +636,7 @@ static int pcc_data_alloc(int pcc_ss_id)
        if (pcc_data[pcc_ss_id]) {
                pcc_data[pcc_ss_id]->refcount++;
        } else {
-               pcc_data[pcc_ss_id] = kzalloc_obj(struct cppc_pcc_data,
-                                                 GFP_KERNEL);
+               pcc_data[pcc_ss_id] = kzalloc_obj(struct cppc_pcc_data);
                if (!pcc_data[pcc_ss_id])
                        return -ENOMEM;
                pcc_data[pcc_ss_id]->refcount++;
index 328093e..ea4bffe 100644 (file)
@@ -91,8 +91,7 @@ static acpi_status parse_csi2_resource(struct acpi_resource *res, void *context)
                return AE_OK;
        }
 
-       conn = kmalloc_flex(*conn, remote_name, csi2_res_src_length + 1,
-                           GFP_KERNEL);
+       conn = kmalloc_flex(*conn, remote_name, csi2_res_src_length + 1);
        if (!conn)
                return AE_OK;
 
index bd4d332..79d2e92 100644 (file)
@@ -560,8 +560,7 @@ struct device *platform_profile_register(struct device *dev, const char *name,
            !ops->profile_set || !ops->probe))
                return ERR_PTR(-EINVAL);
 
-       struct platform_profile_handler *pprof __free(kfree) = kzalloc_obj(*pprof,
-                                                                          GFP_KERNEL);
+       struct platform_profile_handler *pprof __free(kfree) = kzalloc_obj(*pprof);
        if (!pprof)
                return ERR_PTR(-ENOMEM);
 
index f1c7c2a..fdf55c2 100644 (file)
@@ -341,8 +341,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
 
        pr->performance->state_count = pss->package.count;
        pr->performance->states =
-           kmalloc_objs(struct acpi_processor_px, pss->package.count,
-                        GFP_KERNEL);
+           kmalloc_objs(struct acpi_processor_px, pss->package.count);
        if (!pr->performance->states) {
                result = -ENOMEM;
                goto end;
index 2d398ae..c0f92b9 100644 (file)
@@ -512,8 +512,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 
        pr->throttling.state_count = tss->package.count;
        pr->throttling.states_tss =
-           kmalloc_objs(struct acpi_processor_tx_tss, tss->package.count,
-                        GFP_KERNEL);
+           kmalloc_objs(struct acpi_processor_tx_tss, tss->package.count);
        if (!pr->throttling.states_tss) {
                result = -ENOMEM;
                goto end;
index c1f759f..afffde4 100644 (file)
@@ -384,8 +384,7 @@ static u32 riscv_acpi_add_irq_dep(acpi_handle handle)
             riscv_acpi_irq_get_dep(handle, i, &gsi_handle);
             i++) {
                dep_devices.count = 1;
-               dep_devices.handles = kzalloc_objs(*dep_devices.handles, 1,
-                                                  GFP_KERNEL);
+               dep_devices.handles = kzalloc_objs(*dep_devices.handles, 1);
                if (!dep_devices.handles) {
                        acpi_handle_err(handle, "failed to allocate memory\n");
                        continue;
index a6f453d..dfdd004 100644 (file)
@@ -757,8 +757,7 @@ int acpi_device_add(struct acpi_device *device)
                if (result)
                        goto err_unlock;
        } else {
-               acpi_device_bus_id = kzalloc_obj(*acpi_device_bus_id,
-                                                GFP_KERNEL);
+               acpi_device_bus_id = kzalloc_obj(*acpi_device_bus_id);
                if (!acpi_device_bus_id) {
                        result = -ENOMEM;
                        goto err_unlock;
index 12c3a03..f37247e 100644 (file)
@@ -594,8 +594,7 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
         * We cannot use devm_ here, since ahci_platform_put_resources() uses
         * target_pwrs after devm_ have freed memory
         */
-       hpriv->target_pwrs = kzalloc_objs(*hpriv->target_pwrs, hpriv->nports,
-                                         GFP_KERNEL);
+       hpriv->target_pwrs = kzalloc_objs(*hpriv->target_pwrs, hpriv->nports);
        if (!hpriv->target_pwrs) {
                rc = -ENOMEM;
                goto err_out;
index 8108ef0..bb9cb00 100644 (file)
@@ -786,8 +786,7 @@ static int he_init_group(struct he_dev *he_dev, int group)
        }
 
        /* rbpl_virt 64-bit pointers */
-       he_dev->rbpl_virt = kmalloc_objs(*he_dev->rbpl_virt, RBPL_TABLE_SIZE,
-                                        GFP_KERNEL);
+       he_dev->rbpl_virt = kmalloc_objs(*he_dev->rbpl_virt, RBPL_TABLE_SIZE);
        if (!he_dev->rbpl_virt) {
                hprintk("unable to allocate rbpl virt table\n");
                goto out_free_rbpl_table;
index b90761d..0d38e93 100644 (file)
@@ -1978,8 +1978,7 @@ static int tx_init(struct atm_dev *dev)
                buf_desc_ptr++;           
                tx_pkt_start += iadev->tx_buf_sz;  
        }  
-       iadev->tx_buf = kmalloc_objs(*iadev->tx_buf, iadev->num_tx_desc,
-                                    GFP_KERNEL);
+       iadev->tx_buf = kmalloc_objs(*iadev->tx_buf, iadev->num_tx_desc);
         if (!iadev->tx_buf) {
             printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
            goto err_free_dle;
@@ -1999,8 +1998,7 @@ static int tx_init(struct atm_dev *dev)
                                                       sizeof(*cpcs),
                                                       DMA_TO_DEVICE);
         }
-       iadev->desc_tbl = kmalloc_objs(*iadev->desc_tbl, iadev->num_tx_desc,
-                                      GFP_KERNEL);
+       iadev->desc_tbl = kmalloc_objs(*iadev->desc_tbl, iadev->num_tx_desc);
        if (!iadev->desc_tbl) {
                printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
                goto err_free_all_tx_bufs;
@@ -2128,8 +2126,7 @@ static int tx_init(struct atm_dev *dev)
        memset((caddr_t)(iadev->seg_ram+i),  0, iadev->num_vc*4);
        vc = (struct main_vc *)iadev->MAIN_VC_TABLE_ADDR;  
        evc = (struct ext_vc *)iadev->EXT_VC_TABLE_ADDR;  
-       iadev->testTable = kmalloc_objs(*iadev->testTable, iadev->num_vc,
-                                       GFP_KERNEL);
+       iadev->testTable = kmalloc_objs(*iadev->testTable, iadev->num_vc);
         if (!iadev->testTable) {
            printk("Get freepage  failed\n");
           goto err_free_desc_tbl;
@@ -2138,8 +2135,7 @@ static int tx_init(struct atm_dev *dev)
        {  
                memset((caddr_t)vc, 0, sizeof(*vc));  
                memset((caddr_t)evc, 0, sizeof(*evc));  
-                iadev->testTable[i] = kmalloc_obj(struct testTable_t,
-                                                 GFP_KERNEL);
+                iadev->testTable[i] = kmalloc_obj(struct testTable_t);
                if (!iadev->testTable[i])
                        goto err_free_test_tables;
                iadev->testTable[i]->lastTime = 0;
index 06a2797..2e723ff 100644 (file)
@@ -21,8 +21,7 @@ bool dev_add_physical_location(struct device *dev)
        if (!acpi_get_physical_device_location(ACPI_HANDLE(dev), &pld))
                return false;
 
-       dev->physical_location = kzalloc_obj(*dev->physical_location,
-                                            GFP_KERNEL);
+       dev->physical_location = kzalloc_obj(*dev->physical_location);
        if (!dev->physical_location) {
                ACPI_FREE(pld);
                return false;
index c2dd784..3cfef45 100644 (file)
@@ -3932,8 +3932,7 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info
                if (my_usize != p_usize) {
                        struct disk_conf *old_disk_conf, *new_disk_conf = NULL;
 
-                       new_disk_conf = kzalloc_obj(struct disk_conf,
-                                                   GFP_KERNEL);
+                       new_disk_conf = kzalloc_obj(struct disk_conf);
                        if (!new_disk_conf) {
                                put_ldev(device);
                                return -ENOMEM;
index 7844424..41cc8ce 100644 (file)
@@ -401,8 +401,7 @@ static int ps3vram_cache_init(struct ps3_system_bus_device *dev)
 
        priv->cache.page_count = CACHE_PAGE_COUNT;
        priv->cache.page_size = CACHE_PAGE_SIZE;
-       priv->cache.tags = kzalloc_objs(struct ps3vram_tag, CACHE_PAGE_COUNT,
-                                       GFP_KERNEL);
+       priv->cache.tags = kzalloc_objs(struct ps3vram_tag, CACHE_PAGE_COUNT);
        if (!priv->cache.tags)
                return -ENOMEM;
 
index bc665b8..7871099 100644 (file)
@@ -846,8 +846,7 @@ again:
                         * We are using persistent grants, the grant is
                         * not mapped but we might have room for it.
                         */
-                       persistent_gnt = kmalloc_obj(struct persistent_gnt,
-                                                    GFP_KERNEL);
+                       persistent_gnt = kmalloc_obj(struct persistent_gnt);
                        if (!persistent_gnt) {
                                /*
                                 * If we don't have enough memory to
index adfd61a..4b865ef 100644 (file)
@@ -131,8 +131,7 @@ static int xen_blkif_alloc_rings(struct xen_blkif *blkif)
 {
        unsigned int r;
 
-       blkif->rings = kzalloc_objs(struct xen_blkif_ring, blkif->nr_rings,
-                                   GFP_KERNEL);
+       blkif->rings = kzalloc_objs(struct xen_blkif_ring, blkif->nr_rings);
        if (!blkif->rings)
                return -ENOMEM;
 
@@ -1014,14 +1013,12 @@ static int read_per_ring_refs(struct xen_blkif_ring *ring, const char *dir)
                        goto fail;
                list_add_tail(&req->free_list, &ring->pending_free);
                for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++) {
-                       req->segments[j] = kzalloc_obj(*req->segments[0],
-                                                      GFP_KERNEL);
+                       req->segments[j] = kzalloc_obj(*req->segments[0]);
                        if (!req->segments[j])
                                goto fail;
                }
                for (j = 0; j < MAX_INDIRECT_PAGES; j++) {
-                       req->indirect_pages[j] = kzalloc_obj(*req->indirect_pages[0],
-                                                            GFP_KERNEL);
+                       req->indirect_pages[j] = kzalloc_obj(*req->indirect_pages[0]);
                        if (!req->indirect_pages[j])
                                goto fail;
                }
index 777a5ae..8fc7fc3 100644 (file)
@@ -2207,8 +2207,7 @@ static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo)
 
        for (i = 0; i < BLK_RING_SIZE(info); i++) {
                rinfo->shadow[i].grants_used =
-                       kvzalloc_objs(rinfo->shadow[i].grants_used[0], grants,
-                                     GFP_KERNEL);
+                       kvzalloc_objs(rinfo->shadow[i].grants_used[0], grants);
                rinfo->shadow[i].sg = kvzalloc_objs(rinfo->shadow[i].sg[0],
                                                    psegs, GFP_KERNEL);
                if (info->max_indirect_segments)
index e12abde..b216cba 100644 (file)
@@ -187,8 +187,7 @@ static int z2_open(struct gendisk *disk, blk_mode_t mode)
                            (unsigned long)z_remap_nocache_nonser(paddr, size);
 #endif
                        z2ram_map =
-                           kmalloc_objs(z2ram_map[0], size / Z2RAM_CHUNKSIZE,
-                                        GFP_KERNEL);
+                           kmalloc_objs(z2ram_map[0], size / Z2RAM_CHUNKSIZE);
                        if (z2ram_map == NULL) {
                                printk(KERN_ERR DEVICE_NAME
                                       ": cannot get mem for z2ram_map\n");
index a272619..879b8b7 100644 (file)
@@ -1459,8 +1459,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
        if (ret)
                return ret;
 
-       mhi_cntrl->mhi_cmd = kzalloc_objs(*mhi_cntrl->mhi_cmd, NR_OF_CMD_RINGS,
-                                         GFP_KERNEL);
+       mhi_cntrl->mhi_cmd = kzalloc_objs(*mhi_cntrl->mhi_cmd, NR_OF_CMD_RINGS);
        if (!mhi_cntrl->mhi_cmd) {
                ret = -ENOMEM;
                goto err_free_ch;
index 7845fc7..f16a1e6 100644 (file)
@@ -380,8 +380,7 @@ int mhi_alloc_bhie_table(struct mhi_controller *mhi_cntrl,
                return -ENOMEM;
 
        /* Allocate memory for entries */
-       img_info->mhi_buf = kzalloc_objs(*img_info->mhi_buf, segments,
-                                        GFP_KERNEL);
+       img_info->mhi_buf = kzalloc_objs(*img_info->mhi_buf, segments);
        if (!img_info->mhi_buf)
                goto error_alloc_mhi_buf;
 
index 790b362..0a728ca 100644 (file)
@@ -699,8 +699,7 @@ static int parse_ev_cfg(struct mhi_controller *mhi_cntrl,
 
        num = config->num_events;
        mhi_cntrl->total_ev_rings = num;
-       mhi_cntrl->mhi_event = kzalloc_objs(*mhi_cntrl->mhi_event, num,
-                                           GFP_KERNEL);
+       mhi_cntrl->mhi_event = kzalloc_objs(*mhi_cntrl->mhi_event, num);
        if (!mhi_cntrl->mhi_event)
                return -ENOMEM;
 
@@ -938,8 +937,7 @@ int mhi_register_controller(struct mhi_controller *mhi_cntrl,
        if (ret)
                return -EINVAL;
 
-       mhi_cntrl->mhi_cmd = kzalloc_objs(*mhi_cntrl->mhi_cmd, NR_OF_CMD_RINGS,
-                                         GFP_KERNEL);
+       mhi_cntrl->mhi_cmd = kzalloc_objs(*mhi_cntrl->mhi_cmd, NR_OF_CMD_RINGS);
        if (!mhi_cntrl->mhi_cmd) {
                ret = -ENOMEM;
                goto err_free_event;
index a6d8988..8f6781c 100644 (file)
@@ -96,8 +96,7 @@ static int serverworks_create_gatt_pages(int nr_tables)
        int retval = 0;
        int i;
 
-       tables = kzalloc_objs(struct serverworks_page_map *, nr_tables + 1,
-                             GFP_KERNEL);
+       tables = kzalloc_objs(struct serverworks_page_map *, nr_tables + 1);
        if (tables == NULL)
                return -ENOMEM;
 
index 5d5ba7c..08175fe 100644 (file)
@@ -404,8 +404,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
        if (table == NULL)
                return -ENOMEM;
 
-       uninorth_priv.pages_arr = kmalloc_objs(struct page *, 1 << page_order,
-                                              GFP_KERNEL);
+       uninorth_priv.pages_arr = kmalloc_objs(struct page *, 1 << page_order);
        if (uninorth_priv.pages_arr == NULL)
                goto enomem;
 
index 40d7e45..9a33217 100644 (file)
@@ -1812,8 +1812,7 @@ static int init_vqs(struct ports_device *portdev)
        vqs = kmalloc_objs(struct virtqueue *, nr_queues);
        vqs_info = kzalloc_objs(*vqs_info, nr_queues);
        portdev->in_vqs = kmalloc_objs(struct virtqueue *, nr_ports);
-       portdev->out_vqs = kmalloc_objs(struct virtqueue *, nr_ports,
-                                       GFP_KERNEL);
+       portdev->out_vqs = kmalloc_objs(struct virtqueue *, nr_ports);
        if (!vqs || !vqs_info || !portdev->in_vqs || !portdev->out_vqs) {
                err = -ENOMEM;
                goto free;
index 0614fca..38a5766 100644 (file)
@@ -698,8 +698,7 @@ static void __init aspeed_cc_init(struct device_node *np)
        if (!scu_base)
                return;
 
-       aspeed_clk_data = kzalloc_flex(*aspeed_clk_data, hws, ASPEED_NUM_CLKS,
-                                      GFP_KERNEL);
+       aspeed_clk_data = kzalloc_flex(*aspeed_clk_data, hws, ASPEED_NUM_CLKS);
        if (!aspeed_clk_data)
                return;
        aspeed_clk_data->num = ASPEED_NUM_CLKS;
index eea9903..819ab1b 100644 (file)
@@ -192,8 +192,7 @@ void __init iproc_asiu_setup(struct device_node *node,
        if (WARN_ON(!asiu))
                return;
 
-       asiu->clk_data = kzalloc_flex(*asiu->clk_data, hws, num_clks,
-                                     GFP_KERNEL);
+       asiu->clk_data = kzalloc_flex(*asiu->clk_data, hws, num_clks);
        if (WARN_ON(!asiu->clk_data))
                goto err_clks;
        asiu->clk_data->num = num_clks;
index e51de34..9c0e6e7 100644 (file)
@@ -398,8 +398,7 @@ static void __init gemini_cc_init(struct device_node *np)
        int ret;
        int i;
 
-       gemini_clk_data = kzalloc_flex(*gemini_clk_data, hws, GEMINI_NUM_CLKS,
-                                      GFP_KERNEL);
+       gemini_clk_data = kzalloc_flex(*gemini_clk_data, hws, GEMINI_NUM_CLKS);
        if (!gemini_clk_data)
                return;
        gemini_clk_data->num = GEMINI_NUM_CLKS;
index 6022418..4265bc4 100644 (file)
@@ -611,8 +611,7 @@ static void __init m10v_cc_init(struct device_node *np)
        const char *parent_name;
        struct clk_hw *hw;
 
-       m10v_clk_data = kzalloc_flex(*m10v_clk_data, hws, M10V_NUM_CLKS,
-                                    GFP_KERNEL);
+       m10v_clk_data = kzalloc_flex(*m10v_clk_data, hws, M10V_NUM_CLKS);
 
        if (!m10v_clk_data)
                return;
index 090e7f1..565b4d9 100644 (file)
@@ -1855,8 +1855,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
 
        stm32fx_end_primary_clk = data->end_primary;
 
-       clks = kmalloc_objs(*clks, data->gates_num + stm32fx_end_primary_clk,
-                           GFP_KERNEL);
+       clks = kmalloc_objs(*clks, data->gates_num + stm32fx_end_primary_clk);
        if (!clks)
                goto fail;
 
index 7d8a811..f726c00 100644 (file)
@@ -439,8 +439,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
        void __iomem *anatop_base, *base;
        int ret;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6QDL_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6QDL_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return;
 
index de7392f..49639ad 100644 (file)
@@ -185,8 +185,7 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
        void __iomem *base;
        int ret;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SL_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SL_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return;
 
index 96c1fbb..aa9e93a 100644 (file)
@@ -81,8 +81,7 @@ static void __init imx6sll_clocks_init(struct device_node *ccm_node)
        struct device_node *np;
        void __iomem *base;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SLL_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SLL_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return;
 
index c96606f..a7266e2 100644 (file)
@@ -123,8 +123,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
        void __iomem *base;
        bool lcdif1_assigned_clk;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SX_CLK_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6SX_CLK_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return;
 
index 4ccc272..c14856e 100644 (file)
@@ -130,8 +130,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
        struct device_node *np;
        void __iomem *base;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6UL_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX6UL_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return;
 
index 322c84d..5c333da 100644 (file)
@@ -49,8 +49,7 @@ static void __init imx7ulp_clk_scg1_init(struct device_node *np)
        struct clk_hw **hws;
        void __iomem *base;
 
-       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_SCG1_END,
-                               GFP_KERNEL);
+       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_SCG1_END);
        if (!clk_data)
                return;
 
@@ -138,8 +137,7 @@ static void __init imx7ulp_clk_pcc2_init(struct device_node *np)
        struct clk_hw **hws;
        void __iomem *base;
 
-       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_PCC2_END,
-                               GFP_KERNEL);
+       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_PCC2_END);
        if (!clk_data)
                return;
 
@@ -186,8 +184,7 @@ static void __init imx7ulp_clk_pcc3_init(struct device_node *np)
        struct clk_hw **hws;
        void __iomem *base;
 
-       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_PCC3_END,
-                               GFP_KERNEL);
+       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_PCC3_END);
        if (!clk_data)
                return;
 
@@ -233,8 +230,7 @@ static void __init imx7ulp_clk_smc1_init(struct device_node *np)
        struct clk_hw **hws;
        void __iomem *base;
 
-       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_SMC1_END,
-                               GFP_KERNEL);
+       clk_data = kzalloc_flex(*clk_data, hws, IMX7ULP_CLK_SMC1_END);
        if (!clk_data)
                return;
 
index fb9b199..319af4d 100644 (file)
@@ -303,8 +303,7 @@ static int imx8mm_clocks_probe(struct platform_device *pdev)
        void __iomem *base;
        int ret;
 
-       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX8MM_CLK_END,
-                                  GFP_KERNEL);
+       clk_hw_data = kzalloc_flex(*clk_hw_data, hws, IMX8MM_CLK_END);
        if (WARN_ON(!clk_hw_data))
                return -ENOMEM;
 
index 1a73ceb..41e4c69 100644 (file)
@@ -819,8 +819,7 @@ int ingenic_cgu_register_clocks(struct ingenic_cgu *cgu)
        unsigned i;
        int err;
 
-       cgu->clocks.clks = kzalloc_objs(struct clk *, cgu->clocks.clk_num,
-                                       GFP_KERNEL);
+       cgu->clocks.clks = kzalloc_objs(struct clk *, cgu->clocks.clk_num);
        if (!cgu->clocks.clks) {
                err = -ENOMEM;
                goto err_out;
index 4f4457f..28f2e1b 100644 (file)
@@ -124,8 +124,7 @@ void __init mvebu_coreclk_setup(struct device_node *np,
        if (desc->get_refclk_freq)
                clk_data.clk_num += 1;
 
-       clk_data.clks = kzalloc_objs(*clk_data.clks, clk_data.clk_num,
-                                    GFP_KERNEL);
+       clk_data.clks = kzalloc_objs(*clk_data.clks, clk_data.clk_num);
        if (WARN_ON(!clk_data.clks)) {
                iounmap(base);
                return;
index 6362ffb..211535f 100644 (file)
@@ -612,8 +612,7 @@ static void __init st_of_flexgen_setup(struct device_node *np)
        } else
                clk_data->clk_num = data->outputs_nb;
 
-       clk_data->clks = kzalloc_objs(struct clk *, clk_data->clk_num,
-                                     GFP_KERNEL);
+       clk_data->clks = kzalloc_objs(struct clk *, clk_data->clk_num);
        if (!clk_data->clks)
                goto err;
 
index 38d1d2e..9eb2cb8 100644 (file)
@@ -788,8 +788,7 @@ static void __init clkgen_c32_pll_setup(struct device_node *np,
                return;
 
        clk_data->clk_num = num_odfs;
-       clk_data->clks = kzalloc_objs(struct clk *, clk_data->clk_num,
-                                     GFP_KERNEL);
+       clk_data->clks = kzalloc_objs(struct clk *, clk_data->clk_num);
 
        if (!clk_data->clks)
                goto err;
index e6c7872..7865542 100644 (file)
@@ -227,8 +227,7 @@ struct clk ** __init tegra_clk_init(void __iomem *regs, int num, int banks)
        if (WARN_ON(banks > ARRAY_SIZE(periph_regs)))
                return NULL;
 
-       periph_clk_enb_refcnt = kzalloc_objs(*periph_clk_enb_refcnt, 32 * banks,
-                                            GFP_KERNEL);
+       periph_clk_enb_refcnt = kzalloc_objs(*periph_clk_enb_refcnt, 32 * banks);
        if (!periph_clk_enb_refcnt)
                return NULL;
 
index b719b24..5019803 100644 (file)
@@ -222,8 +222,7 @@ struct dw_apb_clock_event_device *
 dw_apb_clockevent_init(int cpu, const char *name, unsigned rating,
                       void __iomem *base, int irq, unsigned long freq)
 {
-       struct dw_apb_clock_event_device *dw_ced = kzalloc_obj(*dw_ced,
-                                                              GFP_KERNEL);
+       struct dw_apb_clock_event_device *dw_ced = kzalloc_obj(*dw_ced);
        int err;
 
        if (!dw_ced)
index 66d0051..cf057f5 100644 (file)
@@ -1084,8 +1084,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
 
        /* Allocate and setup the channels. */
        cmt->num_channels = hweight8(cmt->hw_channels);
-       cmt->channels = kzalloc_objs(*cmt->channels, cmt->num_channels,
-                                    GFP_KERNEL);
+       cmt->channels = kzalloc_objs(*cmt->channels, cmt->num_channels);
        if (cmt->channels == NULL) {
                ret = -ENOMEM;
                goto err_unmap;
index eb9ecc9..1997639 100644 (file)
@@ -420,8 +420,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
        mtu->num_channels = min_t(unsigned int, ret,
                                  ARRAY_SIZE(sh_mtu2_channel_offsets));
 
-       mtu->channels = kzalloc_objs(*mtu->channels, mtu->num_channels,
-                                    GFP_KERNEL);
+       mtu->channels = kzalloc_objs(*mtu->channels, mtu->num_channels);
        if (mtu->channels == NULL) {
                ret = -ENOMEM;
                goto err_unmap;
index ba20745..8d6a9e2 100644 (file)
@@ -546,8 +546,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
        }
 
        /* Allocate and setup the channels. */
-       tmu->channels = kzalloc_objs(*tmu->channels, tmu->num_channels,
-                                    GFP_KERNEL);
+       tmu->channels = kzalloc_objs(*tmu->channels, tmu->num_channels);
        if (tmu->channels == NULL) {
                ret = -ENOMEM;
                goto err_unmap;
index bc0344d..9455c2a 100644 (file)
@@ -198,8 +198,7 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
        if (s->n_chan == 32) {
                const struct comedi_lrange **range_table_list;
 
-               range_table_list = kmalloc_objs(*range_table_list, 32,
-                                               GFP_KERNEL);
+               range_table_list = kmalloc_objs(*range_table_list, 32);
                if (!range_table_list)
                        return -ENOMEM;
                s->range_table_list = range_table_list;
index 7f8bd50..0056ab8 100644 (file)
@@ -429,8 +429,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
        if (nsp->sk) {
                sk = nsp->sk;
                if (sk->sk_user_data == NULL) {
-                       sk->sk_user_data = kzalloc_obj(struct proc_input,
-                                                      GFP_KERNEL);
+                       sk->sk_user_data = kzalloc_obj(struct proc_input);
                        if (sk->sk_user_data == NULL) {
                                err = ENOMEM;
                                goto out;
index 3b95a36..e7eff6c 100644 (file)
@@ -798,8 +798,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
                goto err_unreg;
        }
 
-       freq_table = kzalloc_objs(*freq_table, perf->state_count + 1,
-                                 GFP_KERNEL);
+       freq_table = kzalloc_objs(*freq_table, perf->state_count + 1);
        if (!freq_table) {
                result = -ENOMEM;
                goto err_unreg;
index 1b25207..1ec54fc 100644 (file)
@@ -467,8 +467,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
                return -EINVAL;
        }
 
-       armada37xx_cpufreq_state = kmalloc_obj(*armada37xx_cpufreq_state,
-                                              GFP_KERNEL);
+       armada37xx_cpufreq_state = kmalloc_obj(*armada37xx_cpufreq_state);
        if (!armada37xx_cpufreq_state) {
                clk_put(clk);
                return -ENOMEM;
index d9d9d1c..a18d1d1 100644 (file)
@@ -475,8 +475,7 @@ static int longhaul_get_ranges(void)
                return -EINVAL;
        }
 
-       longhaul_table = kzalloc_objs(*longhaul_table, numscales + 1,
-                                     GFP_KERNEL);
+       longhaul_table = kzalloc_objs(*longhaul_table, numscales + 1);
        if (!longhaul_table)
                return -ENOMEM;
 
index 6c26cf0..a687064 100644 (file)
@@ -323,8 +323,7 @@ static int __init us2e_freq_init(void)
        impl  = ((ver >> 32) & 0xffff);
 
        if (manuf == 0x17 && impl == 0x13) {
-               us2e_freq_table = kzalloc_objs(*us2e_freq_table, NR_CPUS,
-                                              GFP_KERNEL);
+               us2e_freq_table = kzalloc_objs(*us2e_freq_table, NR_CPUS);
                if (!us2e_freq_table)
                        return -ENOMEM;
 
index ae0f4f9..5a8ad86 100644 (file)
@@ -171,8 +171,7 @@ static int __init us3_freq_init(void)
             impl == CHEETAH_PLUS_IMPL ||
             impl == JAGUAR_IMPL ||
             impl == PANTHER_IMPL)) {
-               us3_freq_table = kzalloc_objs(*us3_freq_table, NR_CPUS,
-                                             GFP_KERNEL);
+               us3_freq_table = kzalloc_objs(*us3_freq_table, NR_CPUS);
                if (!us3_freq_table)
                        return -ENOMEM;
 
index c61f447..b7b6c97 100644 (file)
@@ -173,8 +173,7 @@ static u32 crypto4xx_build_pdr(struct crypto4xx_device *dev)
        if (!dev->pdr)
                return -ENOMEM;
 
-       dev->pdr_uinfo = kzalloc_objs(struct pd_uinfo, PPC4XX_NUM_PD,
-                                     GFP_KERNEL);
+       dev->pdr_uinfo = kzalloc_objs(struct pd_uinfo, PPC4XX_NUM_PD);
        if (!dev->pdr_uinfo) {
                dma_free_coherent(dev->core_dev->device,
                                  sizeof(struct ce_pd) * PPC4XX_NUM_PD,
index a9e290a..944d8b8 100644 (file)
@@ -181,8 +181,7 @@ int nitrox_mbox_init(struct nitrox_device *ndev)
        struct nitrox_vfdev *vfdev;
        int i;
 
-       ndev->iov.vfdev = kzalloc_objs(struct nitrox_vfdev, ndev->iov.num_vfs,
-                                      GFP_KERNEL);
+       ndev->iov.vfdev = kzalloc_objs(struct nitrox_vfdev, ndev->iov.num_vfs);
        if (!ndev->iov.vfdev)
                return -ENOMEM;
 
index d00a790..d162668 100644 (file)
@@ -5771,8 +5771,7 @@ static int hisi_qp_alloc_memory(struct hisi_qm *qm)
        if (!qm->qp_array)
                return -ENOMEM;
 
-       qm->poll_data = kzalloc_objs(struct hisi_qm_poll_data, qm->qp_num,
-                                    GFP_KERNEL);
+       qm->poll_data = kzalloc_objs(struct hisi_qm_poll_data, qm->qp_num);
        if (!qm->poll_data) {
                kfree(qm->qp_array);
                return -ENOMEM;
@@ -5837,8 +5836,7 @@ static int hisi_qm_memory_init(struct hisi_qm *qm)
 
        if (test_bit(QM_SUPPORT_FUNC_QOS, &qm->caps)) {
                total_func = pci_sriov_get_totalvfs(qm->pdev) + 1;
-               qm->factor = kzalloc_objs(struct qm_shaper_factor, total_func,
-                                         GFP_KERNEL);
+               qm->factor = kzalloc_objs(struct qm_shaper_factor, total_func);
                if (!qm->factor)
                        return -ENOMEM;
 
index 3373f9b..1517421 100644 (file)
@@ -672,8 +672,7 @@ static int sec_ctx_base_init(struct sec_ctx *ctx)
        ctx->hlf_q_num = sec->ctx_q_num >> 1;
 
        ctx->pbuf_supported = ctx->sec->iommu_used;
-       ctx->qp_ctx = kzalloc_objs(struct sec_qp_ctx, sec->ctx_q_num,
-                                  GFP_KERNEL);
+       ctx->qp_ctx = kzalloc_objs(struct sec_qp_ctx, sec->ctx_q_num);
        if (!ctx->qp_ctx) {
                ret = -ENOMEM;
                goto err_destroy_qps;
index 0bb65e1..70adde0 100644 (file)
@@ -479,8 +479,7 @@ static int hisi_zip_create_req_q(struct hisi_zip_ctx *ctx)
                }
                spin_lock_init(&req_q->req_lock);
 
-               req_q->q = kzalloc_objs(struct hisi_zip_req, req_q->size,
-                                       GFP_KERNEL);
+               req_q->q = kzalloc_objs(struct hisi_zip_req, req_q->size);
                if (!req_q->q) {
                        ret = -ENOMEM;
                        if (i == 0)
index fe37f53..608cd02 100644 (file)
@@ -83,8 +83,7 @@ static struct adf_fw_counters *adf_fw_counters_allocate(unsigned long ae_count)
        if (unlikely(!ae_count))
                return ERR_PTR(-EINVAL);
 
-       fw_counters = kmalloc_flex(*fw_counters, ae_counters, ae_count,
-                                  GFP_KERNEL);
+       fw_counters = kmalloc_flex(*fw_counters, ae_counters, ae_count);
        if (!fw_counters)
                return ERR_PTR(-ENOMEM);
 
index bacaa4a..8bf0fe1 100644 (file)
@@ -173,8 +173,7 @@ static int adf_do_enable_sriov(struct adf_accel_dev *accel_dev)
                goto err_del_cfg;
 
        /* Allocate memory for VF info structs */
-       accel_dev->pf.vf_info = kzalloc_objs(struct adf_accel_vf_info, totalvfs,
-                                            GFP_KERNEL);
+       accel_dev->pf.vf_info = kzalloc_objs(struct adf_accel_vf_info, totalvfs);
        ret = -ENOMEM;
        if (!accel_dev->pf.vf_info)
                goto err_del_cfg;
index 37eb56a..346d134 100644 (file)
@@ -340,8 +340,7 @@ static int cptpf_flr_wq_init(struct otx2_cptpf_dev *cptpf, int num_vfs)
        if (!cptpf->flr_wq)
                return -ENOMEM;
 
-       cptpf->flr_work = kzalloc_objs(struct cptpf_flr_work, num_vfs,
-                                      GFP_KERNEL);
+       cptpf->flr_work = kzalloc_objs(struct cptpf_flr_work, num_vfs);
        if (!cptpf->flr_work)
                goto destroy_wq;
 
index 9818b9e..3c9b3f6 100644 (file)
@@ -1498,8 +1498,7 @@ static int stm32_cryp_truncate_sg(struct scatterlist **new_sg, size_t *new_sg_le
                return alloc_sg_len;
 
        /* We allocate to much sg entry, but it is easier */
-       *new_sg = kmalloc_objs(struct scatterlist, (size_t)alloc_sg_len,
-                              GFP_KERNEL);
+       *new_sg = kmalloc_objs(struct scatterlist, (size_t)alloc_sg_len);
        if (!*new_sg)
                return -ENOMEM;
 
index a3cdcf6..955bff8 100644 (file)
@@ -170,8 +170,7 @@ err_vq:
 
 static int virtcrypto_alloc_queues(struct virtio_crypto *vi)
 {
-       vi->data_vq = kzalloc_objs(*vi->data_vq, vi->max_data_queues,
-                                  GFP_KERNEL);
+       vi->data_vq = kzalloc_objs(*vi->data_vq, vi->max_data_queues);
        if (!vi->data_vq)
                return -ENOMEM;
 
index 70509a1..3906ebe 100644 (file)
@@ -87,8 +87,7 @@ static const struct attribute_group dev_attr_group = {
 static int userspace_init(struct devfreq *devfreq)
 {
        int err = 0;
-       struct userspace_data *data = kzalloc_obj(struct userspace_data,
-                                                 GFP_KERNEL);
+       struct userspace_data *data = kzalloc_obj(struct userspace_data);
 
        if (!data) {
                err = -ENOMEM;
index 7173dad..94b8ecb 100644 (file)
@@ -215,8 +215,7 @@ static __always_inline int init_udmabuf(struct udmabuf *ubuf, pgoff_t pgcnt)
        if (!ubuf->offsets)
                return -ENOMEM;
 
-       ubuf->pinned_folios = kvmalloc_objs(*ubuf->pinned_folios, pgcnt,
-                                           GFP_KERNEL);
+       ubuf->pinned_folios = kvmalloc_objs(*ubuf->pinned_folios, pgcnt);
        if (!ubuf->pinned_folios)
                return -ENOMEM;
 
index a960d04..5e88fd4 100644 (file)
@@ -2855,8 +2855,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
        }
 
        /* Initialize physical channels */
-       pl08x->phy_chans = kzalloc_objs(*pl08x->phy_chans, vd->channels,
-                                       GFP_KERNEL);
+       pl08x->phy_chans = kzalloc_objs(*pl08x->phy_chans, vd->channels);
        if (!pl08x->phy_chans) {
                ret = -ENOMEM;
                goto out_no_phychans;
index 33354fc..84941a9 100644 (file)
@@ -378,8 +378,7 @@ static int plx_dma_alloc_desc(struct plx_dma_dev *plxdev)
        struct plx_dma_desc *desc;
        int i;
 
-       plxdev->desc_ring = kzalloc_objs(*plxdev->desc_ring, PLX_DMA_RING_COUNT,
-                                        GFP_KERNEL);
+       plxdev->desc_ring = kzalloc_objs(*plxdev->desc_ring, PLX_DMA_RING_COUNT);
        if (!plxdev->desc_ring)
                return -ENOMEM;
 
index b9133f4..f6a812e 100644 (file)
@@ -482,8 +482,7 @@ static int zynqmp_dma_alloc_chan_resources(struct dma_chan *dchan)
        if (ret < 0)
                return ret;
 
-       chan->sw_desc_pool = kzalloc_objs(*desc, ZYNQMP_DMA_NUM_DESCS,
-                                         GFP_KERNEL);
+       chan->sw_desc_pool = kzalloc_objs(*desc, ZYNQMP_DMA_NUM_DESCS);
        if (!chan->sw_desc_pool)
                return -ENOMEM;
 
index 4ff421b..0c5ad5a 100644 (file)
@@ -71,8 +71,7 @@ edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_name, unsigned nr_instance
        if (!dev_ctl)
                return NULL;
 
-       dev_inst = kzalloc_objs(struct edac_device_instance, nr_instances,
-                               GFP_KERNEL);
+       dev_inst = kzalloc_objs(struct edac_device_instance, nr_instances);
        if (!dev_inst)
                goto free;
 
@@ -648,8 +647,7 @@ int edac_dev_register(struct device *parent, char *name,
        if (!ctx)
                return -ENOMEM;
 
-       ras_attr_groups = kzalloc_objs(*ras_attr_groups, attr_gcnt + 1,
-                                      GFP_KERNEL);
+       ras_attr_groups = kzalloc_objs(*ras_attr_groups, attr_gcnt + 1);
        if (!ras_attr_groups)
                goto ctx_free;
 
@@ -660,8 +658,7 @@ int edac_dev_register(struct device *parent, char *name,
        }
 
        if (mem_repair_cnt) {
-               ctx->mem_repair = kzalloc_objs(*ctx->mem_repair, mem_repair_cnt,
-                                              GFP_KERNEL);
+               ctx->mem_repair = kzalloc_objs(*ctx->mem_repair, mem_repair_cnt);
                if (!ctx->mem_repair)
                        goto data_mem_free;
        }
index 47bd26f..29e9828 100644 (file)
@@ -231,8 +231,7 @@ static int edac_mc_alloc_csrows(struct mem_ctl_info *mci)
                csr->csrow_idx = row;
                csr->mci = mci;
                csr->nr_channels = tot_channels;
-               csr->channels = kzalloc_objs(*csr->channels, tot_channels,
-                                            GFP_KERNEL);
+               csr->channels = kzalloc_objs(*csr->channels, tot_channels);
                if (!csr->channels)
                        return -ENOMEM;
 
index 5a8cd90..0f78317 100644 (file)
@@ -459,8 +459,7 @@ static struct i7core_dev *alloc_i7core_dev(u8 socket,
        if (!i7core_dev)
                return NULL;
 
-       i7core_dev->pdev = kzalloc_objs(*i7core_dev->pdev, table->n_devs,
-                                       GFP_KERNEL);
+       i7core_dev->pdev = kzalloc_objs(*i7core_dev->pdev, table->n_devs);
        if (!i7core_dev->pdev) {
                kfree(i7core_dev);
                return NULL;
@@ -1177,8 +1176,7 @@ static int i7core_create_sysfs_devices(struct mem_ctl_info *mci)
                goto err_put_addrmatch;
 
        if (!pvt->is_registered) {
-               pvt->chancounts_dev = kzalloc_obj(*pvt->chancounts_dev,
-                                                 GFP_KERNEL);
+               pvt->chancounts_dev = kzalloc_obj(*pvt->chancounts_dev);
                if (!pvt->chancounts_dev) {
                        rc = -ENOMEM;
                        goto err_del_addrmatch;
index b5d3223..b2c6a16 100644 (file)
@@ -1098,8 +1098,7 @@ static int extcon_alloc_cables(struct extcon_dev *edev)
        if (!edev->max_supported)
                return 0;
 
-       edev->cables = kzalloc_objs(*edev->cables, edev->max_supported,
-                                   GFP_KERNEL);
+       edev->cables = kzalloc_objs(*edev->cables, edev->max_supported);
        if (!edev->cables)
                return -ENOMEM;
 
@@ -1160,13 +1159,11 @@ static int extcon_alloc_muex(struct extcon_dev *edev)
        for (index = 0; edev->mutually_exclusive[index]; index++)
                ;
 
-       edev->attrs_muex = kzalloc_objs(*edev->attrs_muex, index + 1,
-                                       GFP_KERNEL);
+       edev->attrs_muex = kzalloc_objs(*edev->attrs_muex, index + 1);
        if (!edev->attrs_muex)
                return -ENOMEM;
 
-       edev->d_attrs_muex = kzalloc_objs(*edev->d_attrs_muex, index,
-                                         GFP_KERNEL);
+       edev->d_attrs_muex = kzalloc_objs(*edev->d_attrs_muex, index);
        if (!edev->d_attrs_muex) {
                kfree(edev->attrs_muex);
                return -ENOMEM;
@@ -1294,8 +1291,7 @@ int extcon_dev_register(struct extcon_dev *edev)
 
        spin_lock_init(&edev->lock);
        if (edev->max_supported) {
-               edev->nh = kzalloc_objs(*edev->nh, edev->max_supported,
-                                       GFP_KERNEL);
+               edev->nh = kzalloc_objs(*edev->nh, edev->max_supported);
                if (!edev->nh) {
                        ret = -ENOMEM;
                        goto err_alloc_nh;
index c458852..13ac287 100644 (file)
@@ -146,8 +146,7 @@ static int __init unmarshal_devices(struct properties_header *properties)
                        goto skip_device;
                }
 
-               entry = kzalloc_objs(*entry, dev_header->prop_count + 1,
-                                    GFP_KERNEL);
+               entry = kzalloc_objs(*entry, dev_header->prop_count + 1);
                if (!entry) {
                        dev_err(dev, "cannot allocate properties\n");
                        goto skip_device;
index 0e3b00a..d54d6a6 100644 (file)
@@ -614,8 +614,7 @@ static long efi_runtime_query_capsulecaps(unsigned long arg)
        if (qcaps.capsule_count == ULONG_MAX)
                return -EINVAL;
 
-       capsules = kzalloc_objs(efi_capsule_header_t, qcaps.capsule_count + 1,
-                               GFP_KERNEL);
+       capsules = kzalloc_objs(efi_capsule_header_t, qcaps.capsule_count + 1);
        if (!capsules)
                return -ENOMEM;
 
index 74ea67a..0635cbe 100644 (file)
@@ -262,8 +262,7 @@ qcom_tzmem_pool_new(const struct qcom_tzmem_pool_config *config)
                return ERR_PTR(-EINVAL);
        }
 
-       struct qcom_tzmem_pool *pool __free(kfree) = kzalloc_obj(*pool,
-                                                                GFP_KERNEL);
+       struct qcom_tzmem_pool *pool __free(kfree) = kzalloc_obj(*pool);
        if (!pool)
                return ERR_PTR(-ENOMEM);
 
index 138fefd..4087a36 100644 (file)
@@ -397,8 +397,7 @@ dfl_dev_add(struct dfl_feature_dev_data *fdata,
 
        /* then add irq resource */
        if (feature->nr_irqs) {
-               ddev->irqs = kzalloc_objs(*ddev->irqs, feature->nr_irqs,
-                                         GFP_KERNEL);
+               ddev->irqs = kzalloc_objs(*ddev->irqs, feature->nr_irqs);
                if (!ddev->irqs) {
                        ret = -ENOMEM;
                        goto put_dev;
@@ -1182,8 +1181,7 @@ create_feature_instance(struct build_feature_devs_info *binfo,
        if (binfo->len - ofst < size)
                return -EINVAL;
 
-       finfo = kzalloc_flex(*finfo, params, dfh_psize / sizeof(u64),
-                            GFP_KERNEL);
+       finfo = kzalloc_flex(*finfo, params, dfh_psize / sizeof(u64));
        if (!finfo)
                return -ENOMEM;
 
index 021da74..9787c09 100644 (file)
@@ -481,8 +481,7 @@ static void agilent_82350b_return_to_local(struct gpib_board *board)
 
 static int agilent_82350b_allocate_private(struct gpib_board *board)
 {
-       board->private_data = kzalloc_obj(struct agilent_82350b_priv,
-                                         GFP_KERNEL);
+       board->private_data = kzalloc_obj(struct agilent_82350b_priv);
        if (!board->private_data)
                return -ENOMEM;
        return 0;
index 2904bb0..e1349af 100644 (file)
@@ -1196,8 +1196,7 @@ static int agilent_82357a_allocate_private(struct gpib_board *board)
 {
        struct agilent_82357a_priv *a_priv;
 
-       board->private_data = kzalloc_obj(struct agilent_82357a_priv,
-                                         GFP_KERNEL);
+       board->private_data = kzalloc_obj(struct agilent_82357a_priv);
        if (!board->private_data)
                return -ENOMEM;
        a_priv = board->private_data;
index 06d19e9..be757db 100644 (file)
@@ -1241,8 +1241,7 @@ static int open_dev_ioctl(struct file *filep, struct gpib_board *board, unsigned
                mutex_unlock(&file_priv->descriptors_mutex);
                return -ERANGE;
        }
-       file_priv->descriptors[i] = kmalloc_obj(struct gpib_descriptor,
-                                               GFP_KERNEL);
+       file_priv->descriptors[i] = kmalloc_obj(struct gpib_descriptor);
        if (!file_priv->descriptors[i]) {
                mutex_unlock(&file_priv->descriptors_mutex);
                return -ENOMEM;
index 8dc1649..13b87c8 100644 (file)
@@ -1569,8 +1569,7 @@ gpio_sim_config_make_device_group(struct config_group *group, const char *name)
 {
        int id;
 
-       struct gpio_sim_device *dev __free(kfree) = kzalloc_obj(*dev,
-                                                               GFP_KERNEL);
+       struct gpio_sim_device *dev __free(kfree) = kzalloc_obj(*dev);
        if (!dev)
                return ERR_PTR(-ENOMEM);
 
index 8ea3ba6..955b5ef 100644 (file)
@@ -1711,8 +1711,7 @@ static struct config_group *
 gpio_virtuser_config_make_device_group(struct config_group *group,
                                       const char *name)
 {
-       struct gpio_virtuser_device *dev __free(kfree) = kzalloc_obj(*dev,
-                                                                    GFP_KERNEL);
+       struct gpio_virtuser_device *dev __free(kfree) = kzalloc_obj(*dev);
        if (!dev)
                return ERR_PTR(-ENOMEM);
 
index a6f4d8b..d2614ac 100644 (file)
@@ -84,8 +84,7 @@ static struct gpio_shared_ref *gpio_shared_make_ref(struct fwnode_handle *fwnode
 {
        char *con_id_cpy __free(kfree) = NULL;
 
-       struct gpio_shared_ref *ref __free(kfree) = kzalloc_obj(*ref,
-                                                               GFP_KERNEL);
+       struct gpio_shared_ref *ref __free(kfree) = kzalloc_obj(*ref);
        if (!ref)
                return NULL;
 
index b08752c..62807b6 100644 (file)
@@ -260,8 +260,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
        switch (acp_machine_id) {
        case ST_JADEITE:
        {
-               adev->acp.acp_cell = kzalloc_objs(struct mfd_cell, 2,
-                                                 GFP_KERNEL);
+               adev->acp.acp_cell = kzalloc_objs(struct mfd_cell, 2);
                if (!adev->acp.acp_cell) {
                        r = -ENOMEM;
                        goto failure;
@@ -273,8 +272,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
                        goto failure;
                }
 
-               i2s_pdata = kzalloc_objs(struct i2s_platform_data, 1,
-                                        GFP_KERNEL);
+               i2s_pdata = kzalloc_objs(struct i2s_platform_data, 1);
                if (!i2s_pdata) {
                        r = -ENOMEM;
                        goto failure;
@@ -325,8 +323,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
                break;
        }
        default:
-               adev->acp.acp_cell = kzalloc_objs(struct mfd_cell, ACP_DEVS,
-                                                 GFP_KERNEL);
+               adev->acp.acp_cell = kzalloc_objs(struct mfd_cell, ACP_DEVS);
 
                if (!adev->acp.acp_cell) {
                        r = -ENOMEM;
@@ -339,8 +336,7 @@ static int acp_hw_init(struct amdgpu_ip_block *ip_block)
                        goto failure;
                }
 
-               i2s_pdata = kzalloc_objs(struct i2s_platform_data, 3,
-                                        GFP_KERNEL);
+               i2s_pdata = kzalloc_objs(struct i2s_platform_data, 3);
                if (!i2s_pdata) {
                        r = -ENOMEM;
                        goto failure;
index c9c82fc..babd23e 100644 (file)
@@ -399,8 +399,7 @@ static const struct cgs_ops amdgpu_cgs_ops = {
 
 struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev)
 {
-       struct amdgpu_cgs_device *cgs_device = kmalloc_obj(*cgs_device,
-                                                          GFP_KERNEL);
+       struct amdgpu_cgs_device *cgs_device = kmalloc_obj(*cgs_device);
 
        if (!cgs_device) {
                drm_err(adev_to_drm(adev), "Couldn't allocate CGS device structure\n");
index fa008b8..d1bf2e1 100644 (file)
@@ -1673,8 +1673,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
        }
 
        if (is_dp_bridge) {
-               amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                  GFP_KERNEL);
+               amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                if (!amdgpu_dig_connector)
                        goto failed;
                amdgpu_connector->con_priv = amdgpu_dig_connector;
@@ -1829,8 +1828,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                        break;
                case DRM_MODE_CONNECTOR_DVII:
                case DRM_MODE_CONNECTOR_DVID:
-                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                        if (!amdgpu_dig_connector)
                                goto failed;
                        amdgpu_connector->con_priv = amdgpu_dig_connector;
@@ -1887,8 +1885,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                        break;
                case DRM_MODE_CONNECTOR_HDMIA:
                case DRM_MODE_CONNECTOR_HDMIB:
-                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                        if (!amdgpu_dig_connector)
                                goto failed;
                        amdgpu_connector->con_priv = amdgpu_dig_connector;
@@ -1937,8 +1934,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                                connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_DisplayPort:
-                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                        if (!amdgpu_dig_connector)
                                goto failed;
                        amdgpu_connector->con_priv = amdgpu_dig_connector;
@@ -1987,8 +1983,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                        connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_eDP:
-                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                        if (!amdgpu_dig_connector)
                                goto failed;
                        amdgpu_connector->con_priv = amdgpu_dig_connector;
@@ -2015,8 +2010,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                        connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_LVDS:
-                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       amdgpu_dig_connector = kzalloc_obj(struct amdgpu_connector_atom_dig);
                        if (!amdgpu_dig_connector)
                                goto failed;
                        amdgpu_connector->con_priv = amdgpu_dig_connector;
index 2b2636e..24e4b4f 100644 (file)
@@ -192,8 +192,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
                return PTR_ERR(chunk_array);
 
        p->nchunks = cs->in.num_chunks;
-       p->chunks = kvmalloc_objs(struct amdgpu_cs_chunk, p->nchunks,
-                                 GFP_KERNEL);
+       p->chunks = kvmalloc_objs(struct amdgpu_cs_chunk, p->nchunks);
        if (!p->chunks) {
                ret = -ENOMEM;
                goto free_chunk;
index 6d1f5ca..04b4524 100644 (file)
@@ -1931,8 +1931,7 @@ int amdgpu_discovery_get_nps_info(struct amdgpu_device *adev,
 
        switch (le16_to_cpu(nps_info->v1.header.version_major)) {
        case 1:
-               mem_ranges = kvzalloc_objs(*mem_ranges, nps_info->v1.count,
-                                          GFP_KERNEL);
+               mem_ranges = kvzalloc_objs(*mem_ranges, nps_info->v1.count);
                if (!mem_ranges)
                        return -ENOMEM;
                *nps_type = nps_info->v1.nps_type;
index 7ab8c2f..6e64a96 100644 (file)
@@ -153,8 +153,7 @@ int amdgpu_ring_mux_init(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring,
        mux->real_ring = ring;
        mux->num_ring_entries = 0;
 
-       mux->ring_entry = kzalloc_objs(struct amdgpu_mux_entry, entry_size,
-                                      GFP_KERNEL);
+       mux->ring_entry = kzalloc_objs(struct amdgpu_mux_entry, entry_size);
        if (!mux->ring_entry)
                return -ENOMEM;
 
index 522d5bd..275745a 100644 (file)
@@ -966,8 +966,7 @@ int amdgpu_virt_init_critical_region(struct amdgpu_device *adev)
        }
 
        /* Allocate for init_data_hdr */
-       init_data_hdr = kzalloc_obj(struct amd_sriov_msg_init_data_header,
-                                   GFP_KERNEL);
+       init_data_hdr = kzalloc_obj(struct amd_sriov_msg_init_data_header);
        if (!init_data_hdr)
                return -ENOMEM;
 
index afb788d..a1d05df 100644 (file)
@@ -2107,8 +2107,7 @@ struct amdgpu_encoder_atom_dig *
 amdgpu_atombios_encoder_get_dig_info(struct amdgpu_encoder *amdgpu_encoder)
 {
        int encoder_enum = (amdgpu_encoder->encoder_enum & ENUM_ID_MASK) >> ENUM_ID_SHIFT;
-       struct amdgpu_encoder_atom_dig *dig = kzalloc_obj(struct amdgpu_encoder_atom_dig,
-                                                         GFP_KERNEL);
+       struct amdgpu_encoder_atom_dig *dig = kzalloc_obj(struct amdgpu_encoder_atom_dig);
 
        if (!dig)
                return NULL;
index 0bbc29e..a7ffe10 100644 (file)
@@ -1775,8 +1775,7 @@ static int dce_v10_0_afmt_init(struct amdgpu_device *adev)
 
        /* DCE10 has audio blocks tied to DIG encoders */
        for (i = 0; i < adev->mode_info.num_dig; i++) {
-               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt,
-                                                     GFP_KERNEL);
+               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt);
                if (adev->mode_info.afmt[i]) {
                        adev->mode_info.afmt[i]->offset = dig_offsets[i];
                        adev->mode_info.afmt[i]->id = i;
index 103642f..a72e20d 100644 (file)
@@ -1818,8 +1818,7 @@ static int dce_v6_0_afmt_init(struct amdgpu_device *adev)
 
        /* DCE6 has audio blocks tied to DIG encoders */
        for (i = 0; i < adev->mode_info.num_dig; i++) {
-               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt,
-                                                     GFP_KERNEL);
+               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt);
                if (adev->mode_info.afmt[i]) {
                        adev->mode_info.afmt[i]->offset = dig_offsets[i];
                        adev->mode_info.afmt[i]->id = i;
index e016cbd..4221c7b 100644 (file)
@@ -1722,8 +1722,7 @@ static int dce_v8_0_afmt_init(struct amdgpu_device *adev)
 
        /* DCE8 has audio blocks tied to DIG encoders */
        for (i = 0; i < adev->mode_info.num_dig; i++) {
-               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt,
-                                                     GFP_KERNEL);
+               adev->mode_info.afmt[i] = kzalloc_obj(struct amdgpu_afmt);
                if (adev->mode_info.afmt[i]) {
                        adev->mode_info.afmt[i]->offset = dig_offsets[i];
                        adev->mode_info.afmt[i]->id = i;
index f4f2929..d25fded 100644 (file)
@@ -1064,8 +1064,7 @@ static int gmc_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
                adev->vm_manager.vram_base_offset = 0;
        }
 
-       adev->gmc.vm_fault_info = kmalloc_obj(struct kfd_vm_fault_info,
-                                             GFP_KERNEL);
+       adev->gmc.vm_fault_info = kmalloc_obj(struct kfd_vm_fault_info);
        if (!adev->gmc.vm_fault_info)
                return -ENOMEM;
        atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
index fe61f05..4910e55 100644 (file)
@@ -1179,8 +1179,7 @@ static int gmc_v8_0_sw_init(struct amdgpu_ip_block *ip_block)
                adev->vm_manager.vram_base_offset = 0;
        }
 
-       adev->gmc.vm_fault_info = kmalloc_obj(struct kfd_vm_fault_info,
-                                             GFP_KERNEL);
+       adev->gmc.vm_fault_info = kmalloc_obj(struct kfd_vm_fault_info);
        if (!adev->gmc.vm_fault_info)
                return -ENOMEM;
        atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
index b188f09..d0f7bd2 100644 (file)
@@ -2224,8 +2224,7 @@ static int criu_restore_devices(struct kfd_process *p,
        if (*priv_offset + (args->num_devices * sizeof(*device_privs)) > max_priv_data_size)
                return -EINVAL;
 
-       device_buckets = kmalloc_objs(*device_buckets, args->num_devices,
-                                     GFP_KERNEL);
+       device_buckets = kmalloc_objs(*device_buckets, args->num_devices);
        if (!device_buckets)
                return -ENOMEM;
 
index a2fdf0d..bafc7b6 100644 (file)
@@ -791,8 +791,7 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
        struct kfd_event_waiter *event_waiters;
        uint32_t i;
 
-       event_waiters = kzalloc_objs(struct kfd_event_waiter, num_events,
-                                    GFP_KERNEL);
+       event_waiters = kzalloc_objs(struct kfd_event_waiter, num_events);
        if (!event_waiters)
                return NULL;
 
index 8283098..12e24fb 100644 (file)
@@ -291,8 +291,7 @@ static int kfd_get_cu_occupancy(struct attribute *attr, char *buffer)
        wave_cnt = 0;
        max_waves_per_cu = 0;
 
-       cu_occupancy = kzalloc_objs(*cu_occupancy, AMDGPU_MAX_QUEUES,
-                                   GFP_KERNEL);
+       cu_occupancy = kzalloc_objs(*cu_occupancy, AMDGPU_MAX_QUEUES);
        if (!cu_occupancy)
                return -ENOMEM;
 
index 988f429..b3d6f2c 100644 (file)
@@ -1650,8 +1650,7 @@ static struct hpd_rx_irq_offload_work_queue *hpd_rx_irq_create_workqueue(struct
        int i = 0;
        struct hpd_rx_irq_offload_work_queue *hpd_rx_offload_wq = NULL;
 
-       hpd_rx_offload_wq = kzalloc_objs(*hpd_rx_offload_wq, max_caps,
-                                        GFP_KERNEL);
+       hpd_rx_offload_wq = kzalloc_objs(*hpd_rx_offload_wq, max_caps);
 
        if (!hpd_rx_offload_wq)
                return NULL;
@@ -2130,8 +2129,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
        }
        if (dc_is_dmub_outbox_supported(adev->dm.dc)) {
                init_completion(&adev->dm.dmub_aux_transfer_done);
-               adev->dm.dmub_notify = kzalloc_obj(struct dmub_notification,
-                                                  GFP_KERNEL);
+               adev->dm.dmub_notify = kzalloc_obj(struct dmub_notification);
                if (!adev->dm.dmub_notify) {
                        drm_info(adev_to_drm(adev), "fail to allocate adev->dm.dmub_notify");
                        goto error;
@@ -4160,8 +4158,7 @@ static void handle_hpd_irq(void *param)
 static void schedule_hpd_rx_offload_work(struct amdgpu_device *adev, struct hpd_rx_irq_offload_work_queue *offload_wq,
                                                        union hpd_irq_data hpd_irq_data)
 {
-       struct hpd_rx_irq_offload_work *offload_work = kzalloc_obj(*offload_work,
-                                                                  GFP_KERNEL);
+       struct hpd_rx_irq_offload_work *offload_work = kzalloc_obj(*offload_work);
 
        if (!offload_work) {
                drm_err(adev_to_drm(adev), "Failed to allocate hpd_rx_irq_offload_work.\n");
@@ -5606,8 +5603,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
                link = dc_get_link_at_index(dm->dc, i);
 
                if (link->connector_signal == SIGNAL_TYPE_VIRTUAL) {
-                       struct amdgpu_dm_wb_connector *wbcon = kzalloc_obj(*wbcon,
-                                                                          GFP_KERNEL);
+                       struct amdgpu_dm_wb_connector *wbcon = kzalloc_obj(*wbcon);
 
                        if (!wbcon) {
                                drm_err(adev_to_drm(adev), "KMS: Failed to allocate writeback connector\n");
index 9ae1399..8c54c02 100644 (file)
@@ -128,13 +128,11 @@ static void calculate_bandwidth(
        if (!sclk)
                goto free_yclk;
 
-       tiling_mode = kzalloc_objs(*tiling_mode, maximum_number_of_surfaces,
-                                  GFP_KERNEL);
+       tiling_mode = kzalloc_objs(*tiling_mode, maximum_number_of_surfaces);
        if (!tiling_mode)
                goto free_sclk;
 
-       surface_type = kzalloc_objs(*surface_type, maximum_number_of_surfaces,
-                                   GFP_KERNEL);
+       surface_type = kzalloc_objs(*surface_type, maximum_number_of_surfaces);
        if (!surface_type)
                goto free_tiling_mode;
 
@@ -3047,8 +3045,7 @@ bool bw_calcs(struct dc_context *ctx,
        int pipe_count,
        struct dce_bw_output *calcs_output)
 {
-       struct bw_calcs_data *data = kzalloc_obj(struct bw_calcs_data,
-                                                GFP_KERNEL);
+       struct bw_calcs_data *data = kzalloc_obj(struct bw_calcs_data);
        if (!data)
                return false;
 
index 451d596..08d0e05 100644 (file)
@@ -151,8 +151,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        switch (asic_id.chip_family) {
 #if defined(CONFIG_DRM_AMD_DC_SI)
        case FAMILY_SI: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -164,8 +163,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
 #endif
        case FAMILY_CI:
        case FAMILY_KV: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -175,8 +173,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                return &clk_mgr->base;
        }
        case FAMILY_CZ: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -186,8 +183,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                return &clk_mgr->base;
        }
        case FAMILY_VI: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -211,8 +207,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                return &clk_mgr->base;
        }
        case FAMILY_AI: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -226,8 +221,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
 #if defined(CONFIG_DRM_AMD_DC_FP)
        case FAMILY_RV: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -255,8 +249,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                return &clk_mgr->base;
        }
        case FAMILY_NV: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -283,8 +276,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
        case FAMILY_VGH:
                if (ASICREV_IS_VANGOGH(asic_id.hw_internal_rev)) {
-                       struct clk_mgr_vgh *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                                 GFP_KERNEL);
+                       struct clk_mgr_vgh *clk_mgr = kzalloc_obj(*clk_mgr);
 
                        if (clk_mgr == NULL) {
                                BREAK_TO_DEBUGGER();
@@ -296,8 +288,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                break;
 
        case FAMILY_YELLOW_CARP: {
-               struct clk_mgr_dcn31 *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                           GFP_KERNEL);
+               struct clk_mgr_dcn31 *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -309,8 +300,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
                break;
        case AMDGPU_FAMILY_GC_10_3_6: {
-               struct clk_mgr_dcn315 *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                            GFP_KERNEL);
+               struct clk_mgr_dcn315 *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -322,8 +312,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
                break;
        case AMDGPU_FAMILY_GC_10_3_7: {
-               struct clk_mgr_dcn316 *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                            GFP_KERNEL);
+               struct clk_mgr_dcn316 *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -335,8 +324,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
                break;
        case AMDGPU_FAMILY_GC_11_0_0: {
-               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                              GFP_KERNEL);
+               struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -347,8 +335,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
 
        case AMDGPU_FAMILY_GC_11_0_1: {
-               struct clk_mgr_dcn314 *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                            GFP_KERNEL);
+               struct clk_mgr_dcn314 *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
@@ -361,8 +348,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        break;
 
        case AMDGPU_FAMILY_GC_11_5_0: {
-               struct clk_mgr_dcn35 *clk_mgr = kzalloc_obj(*clk_mgr,
-                                                           GFP_KERNEL);
+               struct clk_mgr_dcn35 *clk_mgr = kzalloc_obj(*clk_mgr);
 
                if (clk_mgr == NULL) {
                        BREAK_TO_DEBUGGER();
index 0684d2e..b0aba3a 100644 (file)
@@ -561,8 +561,7 @@ void dcn3_clk_mgr_construct(
 
        dce_clock_read_ss_info(clk_mgr);
 
-       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params,
-                                             GFP_KERNEL);
+       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params);
        if (!clk_mgr->base.bw_params) {
                BREAK_TO_DEBUGGER();
                return;
index 820656a..2856b03 100644 (file)
@@ -1206,8 +1206,7 @@ void dcn32_clk_mgr_construct(
 
        clk_mgr->smu_present = false;
 
-       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params,
-                                             GFP_KERNEL);
+       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params);
        if (!clk_mgr->base.bw_params) {
                BREAK_TO_DEBUGGER();
                return;
index 01c8e2d..03464f2 100644 (file)
@@ -1549,8 +1549,7 @@ struct clk_mgr_internal *dcn401_clk_mgr_construct(
                struct dccg *dccg)
 {
        struct clk_log_info log_info = {0};
-       struct dcn401_clk_mgr *clk_mgr401 = kzalloc_obj(struct dcn401_clk_mgr,
-                                                       GFP_KERNEL);
+       struct dcn401_clk_mgr *clk_mgr401 = kzalloc_obj(struct dcn401_clk_mgr);
        struct clk_mgr_internal *clk_mgr;
 
        if (!clk_mgr401)
@@ -1600,8 +1599,7 @@ struct clk_mgr_internal *dcn401_clk_mgr_construct(
 
        clk_mgr->smu_present = false;
 
-       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params,
-                                             GFP_KERNEL);
+       clk_mgr->base.bw_params = kzalloc_obj(*clk_mgr->base.bw_params);
        if (!clk_mgr->base.bw_params) {
                BREAK_TO_DEBUGGER();
                kfree(clk_mgr401);
index 1481915..3e87b6a 100644 (file)
@@ -2613,8 +2613,7 @@ bool dc_set_generic_gpio_for_stereo(bool enable,
        enum gpio_result gpio_result = GPIO_RESULT_NON_SPECIFIC_ERROR;
        struct gpio_pin_info pin_info;
        struct gpio *generic;
-       struct gpio_generic_mux_config *config = kzalloc_obj(struct gpio_generic_mux_config,
-                                                            GFP_KERNEL);
+       struct gpio_generic_mux_config *config = kzalloc_obj(struct gpio_generic_mux_config);
 
        if (!config)
                return false;
index 2b242df..5722be9 100644 (file)
@@ -1476,14 +1476,12 @@ static void get_ss_info_from_atombios(
        if (*ss_entries_num == 0)
                return;
 
-       ss_info = kzalloc_objs(struct spread_spectrum_info, *ss_entries_num,
-                              GFP_KERNEL);
+       ss_info = kzalloc_objs(struct spread_spectrum_info, *ss_entries_num);
        ss_info_cur = ss_info;
        if (ss_info == NULL)
                return;
 
-       ss_data = kzalloc_objs(struct spread_spectrum_data, *ss_entries_num,
-                              GFP_KERNEL);
+       ss_data = kzalloc_objs(struct spread_spectrum_data, *ss_entries_num);
        if (ss_data == NULL)
                goto out_free_info;
 
index 8e0b387..92c123a 100644 (file)
@@ -573,8 +573,7 @@ static struct mem_input *dce100_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
index 0a28d35..95852d2 100644 (file)
@@ -608,8 +608,7 @@ static struct mem_input *dce110_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
@@ -1250,10 +1249,8 @@ static const struct resource_funcs dce110_res_pool_funcs = {
 
 static bool underlay_create(struct dc_context *ctx, struct resource_pool *pool)
 {
-       struct dce110_timing_generator *dce110_tgv = kzalloc_obj(*dce110_tgv,
-                                                                GFP_KERNEL);
-       struct dce_transform *dce110_xfmv = kzalloc_obj(*dce110_xfmv,
-                                                       GFP_KERNEL);
+       struct dce110_timing_generator *dce110_tgv = kzalloc_obj(*dce110_tgv);
+       struct dce_transform *dce110_xfmv = kzalloc_obj(*dce110_xfmv);
        struct dce_mem_input *dce110_miv = kzalloc_obj(*dce110_miv);
        struct dce110_opp *dce110_oppv = kzalloc_obj(*dce110_oppv);
 
index 678ee1a..58c6a00 100644 (file)
@@ -580,8 +580,7 @@ static struct mem_input *dce112_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
index c0c2f4d..71d76b0 100644 (file)
@@ -874,8 +874,7 @@ static struct mem_input *dce120_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
index 31aa809..c276457 100644 (file)
@@ -683,8 +683,7 @@ static struct mem_input *dce60_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
index d1f781e..d66d8ac 100644 (file)
@@ -689,8 +689,7 @@ static struct mem_input *dce80_mem_input_create(
        struct dc_context *ctx,
        uint32_t inst)
 {
-       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input,
-                                                  GFP_KERNEL);
+       struct dce_mem_input *dce_mi = kzalloc_obj(struct dce_mem_input);
 
        if (!dce_mi) {
                BREAK_TO_DEBUGGER();
index 3d1c834..bbe185e 100644 (file)
@@ -686,8 +686,7 @@ static struct mpc *dcn10_mpc_create(struct dc_context *ctx)
 
 static struct hubbub *dcn10_hubbub_create(struct dc_context *ctx)
 {
-       struct dcn10_hubbub *dcn10_hubbub = kzalloc_obj(struct dcn10_hubbub,
-                                                       GFP_KERNEL);
+       struct dcn10_hubbub *dcn10_hubbub = kzalloc_obj(struct dcn10_hubbub);
 
        if (!dcn10_hubbub)
                return NULL;
index 9906ecd..13ac198 100644 (file)
@@ -855,8 +855,7 @@ struct mpc *dcn20_mpc_create(struct dc_context *ctx)
 struct hubbub *dcn20_hubbub_create(struct dc_context *ctx)
 {
        int i;
-       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub,
-                                                 GFP_KERNEL);
+       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub)
                return NULL;
@@ -2242,8 +2241,7 @@ bool dcn20_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn20_dwbc *dwbc20 = kzalloc_obj(struct dcn20_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn20_dwbc *dwbc20 = kzalloc_obj(struct dcn20_dwbc);
 
                if (!dwbc20) {
                        dm_error("DC: failed to create dwbc20!\n");
@@ -2267,8 +2265,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
        ASSERT(pipe_count > 0);
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn20_mmhubbub *mcif_wb20 = kzalloc_obj(struct dcn20_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn20_mmhubbub *mcif_wb20 = kzalloc_obj(struct dcn20_mmhubbub);
 
                if (!mcif_wb20) {
                        dm_error("DC: failed to create mcif_wb20!\n");
index 86281ee..4ea76e4 100644 (file)
@@ -742,8 +742,7 @@ static struct mpc *dcn201_mpc_create(struct dc_context *ctx, uint32_t num_mpcc)
 
 static struct hubbub *dcn201_hubbub_create(struct dc_context *ctx)
 {
-       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub,
-                                                 GFP_KERNEL);
+       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub)
                return NULL;
index a1bee22..e83b8ce 100644 (file)
@@ -999,8 +999,7 @@ static struct hubbub *dcn21_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub,
-                                                 GFP_KERNEL);
+       struct dcn20_hubbub *hubbub = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub)
                return NULL;
index 465a31e..df0ff15 100644 (file)
@@ -862,8 +862,7 @@ static struct hubbub *dcn30_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1220,8 +1219,7 @@ static bool dcn30_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1245,8 +1243,7 @@ static bool dcn30_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index b08f5d3..7842bee 100644 (file)
@@ -817,8 +817,7 @@ static struct hubbub *dcn301_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1180,8 +1179,7 @@ static bool dcn301_dwbc_create(struct dc_context *ctx, struct resource_pool *poo
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1205,8 +1203,7 @@ static bool dcn301_mmhubbub_create(struct dc_context *ctx, struct resource_pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index c69a7f9..1874d5d 100644 (file)
@@ -257,8 +257,7 @@ static struct hubbub *dcn302_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -446,8 +445,7 @@ static const struct dce110_clk_src_mask cs_mask = {
 static struct clock_source *dcn302_clock_source_create(struct dc_context *ctx, struct dc_bios *bios,
                enum clock_source_id id, const struct dce110_clk_src_regs *regs, bool dp_clk_src)
 {
-       struct dce110_clk_src *clk_src = kzalloc_obj(struct dce110_clk_src,
-                                                    GFP_KERNEL);
+       struct dce110_clk_src *clk_src = kzalloc_obj(struct dce110_clk_src);
 
        if (!clk_src)
                return NULL;
@@ -716,8 +714,7 @@ static bool dcn302_dwbc_create(struct dc_context *ctx, struct resource_pool *poo
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -752,8 +749,7 @@ static bool dcn302_mmhubbub_create(struct dc_context *ctx, struct resource_pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
@@ -793,8 +789,7 @@ static const struct dce110_aux_registers_mask aux_mask = {
 
 static struct dce_aux *dcn302_aux_engine_create(struct dc_context *ctx, uint32_t inst)
 {
-       struct aux_engine_dce110 *aux_engine = kzalloc_obj(struct aux_engine_dce110,
-                                                          GFP_KERNEL);
+       struct aux_engine_dce110 *aux_engine = kzalloc_obj(struct aux_engine_dce110);
 
        if (!aux_engine)
                return NULL;
@@ -825,8 +820,7 @@ static const struct dce_i2c_mask i2c_masks = {
 
 static struct dce_i2c_hw *dcn302_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);
+       struct dce_i2c_hw *dce_i2c_hw = kzalloc_obj(struct dce_i2c_hw);
 
        if (!dce_i2c_hw)
                return NULL;
@@ -900,8 +894,7 @@ static struct link_encoder *dcn302_link_encoder_create(
        struct dc_context *ctx,
        const struct encoder_init_data *enc_init_data)
 {
-       struct dcn20_link_encoder *enc20 = kzalloc_obj(struct dcn20_link_encoder,
-                                                      GFP_KERNEL);
+       struct dcn20_link_encoder *enc20 = kzalloc_obj(struct dcn20_link_encoder);
 
        if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
                return NULL;
@@ -927,8 +920,7 @@ static const struct dce_panel_cntl_mask panel_cntl_mask = {
 
 static struct panel_cntl *dcn302_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);
+       struct dce_panel_cntl *panel_cntl = kzalloc_obj(struct dce_panel_cntl);
 
        if (!panel_cntl)
                return NULL;
@@ -1520,8 +1512,7 @@ create_fail:
 
 struct resource_pool *dcn302_create_resource_pool(const struct dc_init_data *init_data, struct dc *dc)
 {
-       struct resource_pool *pool = kzalloc_obj(struct resource_pool,
-                                                GFP_KERNEL);
+       struct resource_pool *pool = kzalloc_obj(struct resource_pool);
 
        if (!pool)
                return NULL;
index e4e1792..d52201c 100644 (file)
@@ -253,8 +253,7 @@ static struct hubbub *dcn303_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -430,8 +429,7 @@ static const struct dce110_clk_src_mask cs_mask = {
 static struct clock_source *dcn303_clock_source_create(struct dc_context *ctx, struct dc_bios *bios,
                enum clock_source_id id, const struct dce110_clk_src_regs *regs, bool dp_clk_src)
 {
-       struct dce110_clk_src *clk_src = kzalloc_obj(struct dce110_clk_src,
-                                                    GFP_KERNEL);
+       struct dce110_clk_src *clk_src = kzalloc_obj(struct dce110_clk_src);
 
        if (!clk_src)
                return NULL;
@@ -677,8 +675,7 @@ static bool dcn303_dwbc_create(struct dc_context *ctx, struct resource_pool *poo
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -713,8 +710,7 @@ static bool dcn303_mmhubbub_create(struct dc_context *ctx, struct resource_pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
@@ -751,8 +747,7 @@ static const struct dce110_aux_registers_mask aux_mask = {
 
 static struct dce_aux *dcn303_aux_engine_create(struct dc_context *ctx, uint32_t inst)
 {
-       struct aux_engine_dce110 *aux_engine = kzalloc_obj(struct aux_engine_dce110,
-                                                          GFP_KERNEL);
+       struct aux_engine_dce110 *aux_engine = kzalloc_obj(struct aux_engine_dce110);
 
        if (!aux_engine)
                return NULL;
@@ -780,8 +775,7 @@ static const struct dce_i2c_mask i2c_masks = {
 
 static struct dce_i2c_hw *dcn303_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);
+       struct dce_i2c_hw *dce_i2c_hw = kzalloc_obj(struct dce_i2c_hw);
 
        if (!dce_i2c_hw)
                return NULL;
@@ -845,8 +839,7 @@ static struct link_encoder *dcn303_link_encoder_create(
        struct dc_context *ctx,
        const struct encoder_init_data *enc_init_data)
 {
-       struct dcn20_link_encoder *enc20 = kzalloc_obj(struct dcn20_link_encoder,
-                                                      GFP_KERNEL);
+       struct dcn20_link_encoder *enc20 = kzalloc_obj(struct dcn20_link_encoder);
 
        if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
                return NULL;
@@ -872,8 +865,7 @@ static const struct dce_panel_cntl_mask panel_cntl_mask = {
 
 static struct panel_cntl *dcn303_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);
+       struct dce_panel_cntl *panel_cntl = kzalloc_obj(struct dce_panel_cntl);
 
        if (!panel_cntl)
                return NULL;
@@ -1452,8 +1444,7 @@ create_fail:
 
 struct resource_pool *dcn303_create_resource_pool(const struct dc_init_data *init_data, struct dc *dc)
 {
-       struct resource_pool *pool = kzalloc_obj(struct resource_pool,
-                                                GFP_KERNEL);
+       struct resource_pool *pool = kzalloc_obj(struct resource_pool);
 
        if (!pool)
                return NULL;
index b1b598d..4187710 100644 (file)
@@ -1025,8 +1025,7 @@ static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1284,8 +1283,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1519,8 +1517,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1544,8 +1541,7 @@ static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index d3b8de5..2ddc1c1 100644 (file)
@@ -1083,8 +1083,7 @@ static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1343,8 +1342,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1577,8 +1575,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1602,8 +1599,7 @@ static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index 4398b5d..e8377c1 100644 (file)
@@ -1024,8 +1024,7 @@ static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1285,8 +1284,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1520,8 +1518,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1545,8 +1542,7 @@ static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index 68845cb..045ce01 100644 (file)
@@ -1017,8 +1017,7 @@ static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1279,8 +1278,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1512,8 +1510,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1537,8 +1534,7 @@ static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index debf6a0..f23b733 100644 (file)
@@ -837,8 +837,7 @@ static struct hubbub *dcn32_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub2)
                return NULL;
@@ -1274,8 +1273,7 @@ static struct hpo_dp_stream_encoder *dcn32_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn32_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1510,8 +1508,7 @@ static bool dcn32_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1539,8 +1536,7 @@ static bool dcn32_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index d936192..c1582c2 100644 (file)
@@ -831,8 +831,7 @@ static struct hubbub *dcn321_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub2)
                return NULL;
@@ -1255,8 +1254,7 @@ static struct hpo_dp_stream_encoder *dcn321_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn321_vpg_create(ctx, vpg_inst);
        apg = dcn321_apg_create(ctx, apg_inst);
 
@@ -1490,8 +1488,7 @@ static bool dcn321_dwbc_create(struct dc_context *ctx, struct resource_pool *poo
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1519,8 +1516,7 @@ static bool dcn321_mmhubbub_create(struct dc_context *ctx, struct resource_pool
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index 2be765f..3494a40 100644 (file)
@@ -977,8 +977,7 @@ static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1338,8 +1337,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1605,8 +1603,7 @@ static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1644,8 +1641,7 @@ static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index bc41df9..080bc7f 100644 (file)
@@ -957,8 +957,7 @@ static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1318,8 +1317,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1585,8 +1583,7 @@ static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1624,8 +1621,7 @@ static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index ae95b14..af51ac4 100644 (file)
@@ -964,8 +964,7 @@ static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub3)
                return NULL;
@@ -1325,8 +1324,7 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn31_vpg_create(ctx, vpg_inst);
        apg = dcn31_apg_create(ctx, apg_inst);
 
@@ -1592,8 +1590,7 @@ static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
-                                                       GFP_KERNEL);
+               struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc30) {
                        dm_error("DC: failed to create dwbc30!\n");
@@ -1631,8 +1628,7 @@ static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
        uint32_t pipe_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < pipe_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index ce272e2..e37aab9 100644 (file)
@@ -847,8 +847,7 @@ static struct hubbub *dcn401_hubbub_create(struct dc_context *ctx)
 {
        int i;
 
-       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub,
-                                                  GFP_KERNEL);
+       struct dcn20_hubbub *hubbub2 = kzalloc_obj(struct dcn20_hubbub);
 
        if (!hubbub2)
                return NULL;
@@ -1278,8 +1277,7 @@ static struct hpo_dp_stream_encoder *dcn401_hpo_dp_stream_encoder_create(
        apg_inst = hpo_dp_inst;
 
        /* allocate HPO stream encoder and create VPG sub-block */
-       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
-                                  GFP_KERNEL);
+       hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder);
        vpg = dcn401_vpg_create(ctx, vpg_inst);
        apg = dcn401_apg_create(ctx, apg_inst);
 
@@ -1551,8 +1549,7 @@ static bool dcn401_dwbc_create(struct dc_context *ctx, struct resource_pool *poo
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_dwbc *dwbc401 = kzalloc_obj(struct dcn30_dwbc,
-                                                        GFP_KERNEL);
+               struct dcn30_dwbc *dwbc401 = kzalloc_obj(struct dcn30_dwbc);
 
                if (!dwbc401) {
                        dm_error("DC: failed to create dwbc401!\n");
@@ -1582,8 +1579,7 @@ static bool dcn401_mmhubbub_create(struct dc_context *ctx, struct resource_pool
        uint32_t dwb_count = pool->res_cap->num_dwb;
 
        for (i = 0; i < dwb_count; i++) {
-               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
-                                                              GFP_KERNEL);
+               struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub);
 
                if (!mcif_wb30) {
                        dm_error("DC: failed to create mcif_wb30!\n");
index a62ff18..31271fe 100644 (file)
@@ -1945,8 +1945,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
                if (!rgb_user)
                        goto rgb_user_alloc_fail;
 
-               axis_x = kvzalloc_objs(*axis_x, ramp->num_entries + 3,
-                                      GFP_KERNEL);
+               axis_x = kvzalloc_objs(*axis_x, ramp->num_entries + 3);
                if (!axis_x)
                        goto axis_x_alloc_fail;
 
@@ -1965,8 +1964,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
                        scale_gamma_dx(rgb_user, ramp, dividers);
        }
 
-       rgb_regamma = kvzalloc_objs(*rgb_regamma, MAX_HW_POINTS + _EXTRA_POINTS,
-                                   GFP_KERNEL);
+       rgb_regamma = kvzalloc_objs(*rgb_regamma, MAX_HW_POINTS + _EXTRA_POINTS);
        if (!rgb_regamma)
                goto rgb_regamma_alloc_fail;
 
index 37d704a..72752dd 100644 (file)
@@ -556,8 +556,7 @@ int amdgpu_parse_extended_power_table(struct amdgpu_device *adev)
                                         le16_to_cpu(ext_hdr->usPowerTuneTableOffset));
                        ATOM_PowerTune_Table *pt;
                        adev->pm.dpm.dyn_state.cac_tdp_table =
-                               kzalloc_obj(struct amdgpu_cac_tdp_table,
-                                           GFP_KERNEL);
+                               kzalloc_obj(struct amdgpu_cac_tdp_table);
                        if (!adev->pm.dpm.dyn_state.cac_tdp_table)
                                return -ENOMEM;
                        if (rev > 0) {
index c81327d..6edefa6 100644 (file)
@@ -7442,8 +7442,7 @@ static int si_dpm_init(struct amdgpu_device *adev)
                return ret;
 
        adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
-               kzalloc_objs(struct amdgpu_clock_voltage_dependency_entry, 4,
-                            GFP_KERNEL);
+               kzalloc_objs(struct amdgpu_clock_voltage_dependency_entry, 4);
        if (!adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries)
                return -ENOMEM;
 
index 34de209..5de17e3 100644 (file)
@@ -321,8 +321,7 @@ static int get_valid_clk(
        PP_ASSERT_WITH_CODE((0 != clk_volt_pp_table->count),
                "Invalid PowerPlay Table!", return -1);
 
-       table = kzalloc_flex(*table, values, clk_volt_pp_table->count,
-                            GFP_KERNEL);
+       table = kzalloc_flex(*table, values, clk_volt_pp_table->count);
        if (!table)
                return -ENOMEM;
 
index b194098..a5fb0e8 100644 (file)
@@ -382,8 +382,7 @@ static int get_clock_voltage_dependency_table(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_clock_voltage_dependency_table *dep_table;
 
-       dep_table = kzalloc_flex(*dep_table, entries, table->ucNumEntries,
-                                GFP_KERNEL);
+       dep_table = kzalloc_flex(*dep_table, entries, table->ucNumEntries);
        if (NULL == dep_table)
                return -ENOMEM;
 
@@ -409,8 +408,7 @@ static int get_valid_clk(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_clock_array *clock_table;
 
-       clock_table = kzalloc_flex(*clock_table, values, table->count,
-                                  GFP_KERNEL);
+       clock_table = kzalloc_flex(*clock_table, values, table->count);
        if (!clock_table)
                return -ENOMEM;
 
@@ -1210,8 +1208,7 @@ static int get_uvd_clock_voltage_limit_table(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_uvd_clock_voltage_dependency_table *uvd_table;
 
-       uvd_table = kzalloc_flex(*uvd_table, entries, table->numEntries,
-                                GFP_KERNEL);
+       uvd_table = kzalloc_flex(*uvd_table, entries, table->numEntries);
        if (!uvd_table)
                return -ENOMEM;
 
@@ -1240,8 +1237,7 @@ static int get_vce_clock_voltage_limit_table(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_vce_clock_voltage_dependency_table *vce_table;
 
-       vce_table = kzalloc_flex(*vce_table, entries, table->numEntries,
-                                GFP_KERNEL);
+       vce_table = kzalloc_flex(*vce_table, entries, table->numEntries);
        if (!vce_table)
                return -ENOMEM;
 
@@ -1268,8 +1264,7 @@ static int get_samu_clock_voltage_limit_table(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_samu_clock_voltage_dependency_table *samu_table;
 
-       samu_table = kzalloc_flex(*samu_table, entries, table->numEntries,
-                                 GFP_KERNEL);
+       samu_table = kzalloc_flex(*samu_table, entries, table->numEntries);
        if (!samu_table)
                return -ENOMEM;
 
@@ -1293,8 +1288,7 @@ static int get_acp_clock_voltage_limit_table(struct pp_hwmgr *hwmgr,
        unsigned long i;
        struct phm_acp_clock_voltage_dependency_table *acp_table;
 
-       acp_table = kzalloc_flex(*acp_table, entries, table->numEntries,
-                                GFP_KERNEL);
+       acp_table = kzalloc_flex(*acp_table, entries, table->numEntries);
        if (!acp_table)
                return -ENOMEM;
 
@@ -1515,8 +1509,7 @@ static int get_cac_leakage_table(struct pp_hwmgr *hwmgr,
 static int get_platform_power_management_table(struct pp_hwmgr *hwmgr,
                        ATOM_PPLIB_PPM_Table *atom_ppm_table)
 {
-       struct phm_ppm_table *ptr = kzalloc_obj(struct phm_ppm_table,
-                                               GFP_KERNEL);
+       struct phm_ppm_table *ptr = kzalloc_obj(struct phm_ppm_table);
 
        if (NULL == ptr)
                return -ENOMEM;
index d3d3ebe..77067e1 100644 (file)
@@ -852,8 +852,7 @@ static int get_valid_clk(
        PP_ASSERT_WITH_CODE(clk_volt_pp_table->count,
                        "Invalid PowerPlay Table!", return -1);
 
-       table = kzalloc_flex(*table, values, clk_volt_pp_table->count,
-                            GFP_KERNEL);
+       table = kzalloc_flex(*table, values, clk_volt_pp_table->count);
        if (!table)
                return -ENOMEM;
 
index ff3776e..74c818e 100644 (file)
@@ -307,8 +307,7 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
        struct smu_dpm_policy *policy;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
        smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);
index 4f12543..163e09c 100644 (file)
@@ -934,8 +934,7 @@ static int navi10_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index 317cc26..cf030af 100644 (file)
@@ -921,8 +921,7 @@ static int sienna_cichlid_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index 16eb73b..5eabaf5 100644 (file)
@@ -433,8 +433,7 @@ static int vangogh_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_11_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index 35495da..2b4faab 100644 (file)
@@ -294,8 +294,7 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
        struct smu_dpm_policy *policy;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_13_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = 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);
index f06608d..447a9c2 100644 (file)
@@ -553,8 +553,7 @@ int smu_v13_0_init_power(struct smu_context *smu)
        if (smu_power->power_context || smu_power->power_context_size != 0)
                return -EINVAL;
 
-       smu_power->power_context = kzalloc_obj(struct smu_13_0_power_context,
-                                              GFP_KERNEL);
+       smu_power->power_context = kzalloc_obj(struct smu_13_0_power_context);
        if (!smu_power->power_context)
                return -ENOMEM;
        smu_power->power_context_size = sizeof(struct smu_13_0_power_context);
index a0d146a..e030f1e 100644 (file)
@@ -530,8 +530,7 @@ static int smu_v13_0_0_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_13_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_13_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index b82034f..f4f8b21 100644 (file)
@@ -559,8 +559,7 @@ static int smu_v13_0_7_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_13_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_13_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index 1334776..cec2df1 100644 (file)
@@ -538,8 +538,7 @@ int smu_v14_0_init_power(struct smu_context *smu)
        if (smu_power->power_context || smu_power->power_context_size != 0)
                return -EINVAL;
 
-       smu_power->power_context = kzalloc_obj(struct smu_14_0_dpm_context,
-                                              GFP_KERNEL);
+       smu_power->power_context = kzalloc_obj(struct smu_14_0_dpm_context);
        if (!smu_power->power_context)
                return -ENOMEM;
        smu_power->power_context_size = sizeof(struct smu_14_0_dpm_context);
index fc50552..9994d43 100644 (file)
@@ -428,8 +428,7 @@ static int smu_v14_0_2_allocate_dpm_context(struct smu_context *smu)
 {
        struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
 
-       smu_dpm->dpm_context = kzalloc_obj(struct smu_14_0_dpm_context,
-                                          GFP_KERNEL);
+       smu_dpm->dpm_context = kzalloc_obj(struct smu_14_0_dpm_context);
        if (!smu_dpm->dpm_context)
                return -ENOMEM;
 
index 1fbc104..3fd84dd 100644 (file)
@@ -507,8 +507,7 @@ int smu_v15_0_init_power(struct smu_context *smu)
        if (smu_power->power_context || smu_power->power_context_size != 0)
                return -EINVAL;
 
-       smu_power->power_context = kzalloc_obj(struct smu_15_0_dpm_context,
-                                              GFP_KERNEL);
+       smu_power->power_context = kzalloc_obj(struct smu_15_0_dpm_context);
        if (!smu_power->power_context)
                return -ENOMEM;
        smu_power->power_context_size = sizeof(struct smu_15_0_dpm_context);
index 087a893..de197ae 100644 (file)
@@ -365,8 +365,7 @@ int amdgpu_virt_ras_sw_init(struct amdgpu_device *adev)
 {
        struct amdgpu_ras_mgr *ras_mgr = amdgpu_ras_mgr_get_context(adev);
 
-       ras_mgr->virt_ras_cmd = kzalloc_obj(struct amdgpu_virt_ras_cmd,
-                                           GFP_KERNEL);
+       ras_mgr->virt_ras_cmd = kzalloc_obj(struct amdgpu_virt_ras_cmd);
        if (!ras_mgr->virt_ras_cmd)
                return -ENOMEM;
 
index 0af7eaf..fad3438 100644 (file)
@@ -66,8 +66,7 @@ static const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs
 
 static void malidp_mw_connector_reset(struct drm_connector *connector)
 {
-       struct malidp_mw_connector_state *mw_state = kzalloc_obj(*mw_state,
-                                                                GFP_KERNEL);
+       struct malidp_mw_connector_state *mw_state = kzalloc_obj(*mw_state);
 
        if (connector->state)
                __drm_atomic_helper_connector_destroy_state(connector->state);
index 19acd1e..9d07dad 100644 (file)
@@ -479,8 +479,7 @@ static const struct drm_connector_helper_funcs ast_astdp_connector_helper_funcs
 
 static void ast_astdp_connector_reset(struct drm_connector *connector)
 {
-       struct ast_astdp_connector_state *astdp_state = kzalloc_obj(*astdp_state,
-                                                                   GFP_KERNEL);
+       struct ast_astdp_connector_state *astdp_state = kzalloc_obj(*astdp_state);
 
        if (connector->state)
                connector->funcs->atomic_destroy_state(connector, connector->state);
index 565c47f..664c720 100644 (file)
@@ -132,8 +132,7 @@ drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state)
         */
        state->allow_modeset = true;
 
-       state->crtcs = kzalloc_objs(*state->crtcs, dev->mode_config.num_crtc,
-                                   GFP_KERNEL);
+       state->crtcs = kzalloc_objs(*state->crtcs, dev->mode_config.num_crtc);
        if (!state->crtcs)
                goto fail;
        state->planes = kzalloc_objs(*state->planes,
index 3bdf322..af02c40 100644 (file)
@@ -2453,8 +2453,7 @@ crtc_or_fake_commit(struct drm_atomic_state *state, struct drm_crtc *crtc)
        }
 
        if (!state->fake_commit) {
-               state->fake_commit = kzalloc_obj(*state->fake_commit,
-                                                GFP_KERNEL);
+               state->fake_commit = kzalloc_obj(*state->fake_commit);
                if (!state->fake_commit)
                        return NULL;
 
index 2a101fd..41f916f 100644 (file)
@@ -473,8 +473,7 @@ EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
  */
 void drm_atomic_helper_connector_reset(struct drm_connector *connector)
 {
-       struct drm_connector_state *conn_state = kzalloc_obj(*conn_state,
-                                                            GFP_KERNEL);
+       struct drm_connector_state *conn_state = kzalloc_obj(*conn_state);
 
        if (connector->state)
                __drm_atomic_helper_connector_destroy_state(connector->state);
index 0562e72..2d14660 100644 (file)
@@ -320,8 +320,7 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
 
        BUG_ON(mm->max_order > DRM_BUDDY_MAX_ORDER);
 
-       mm->free_trees = kmalloc_objs(*mm->free_trees, DRM_BUDDY_MAX_FREE_TREES,
-                                     GFP_KERNEL);
+       mm->free_trees = kmalloc_objs(*mm->free_trees, DRM_BUDDY_MAX_FREE_TREES);
        if (!mm->free_trees)
                return -ENOMEM;
 
@@ -337,8 +336,7 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
 
        mm->n_roots = hweight64(size);
 
-       mm->roots = kmalloc_objs(struct drm_buddy_block *, mm->n_roots,
-                                GFP_KERNEL);
+       mm->roots = kmalloc_objs(struct drm_buddy_block *, mm->n_roots);
        if (!mm->roots)
                goto out_free_tree;
 
index 8e41cb8..65fbdf3 100644 (file)
@@ -44,8 +44,7 @@ int drm_client_modeset_create(struct drm_client_dev *client)
        int i = 0;
 
        /* Add terminating zero entry to enable index less iteration */
-       client->modesets = kzalloc_objs(*client->modesets, num_crtc + 1,
-                                       GFP_KERNEL);
+       client->modesets = kzalloc_objs(*client->modesets, num_crtc + 1);
        if (!client->modesets)
                return -ENOMEM;
 
index b2e3778..421c460 100644 (file)
@@ -256,8 +256,7 @@ drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane)
        if (!plane_state)
                return NULL;
 
-       new_shadow_plane_state = kzalloc_obj(*new_shadow_plane_state,
-                                            GFP_KERNEL);
+       new_shadow_plane_state = kzalloc_obj(*new_shadow_plane_state);
        if (!new_shadow_plane_state)
                return NULL;
        __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state);
index f0a5cef..5d2cf72 100644 (file)
@@ -386,8 +386,7 @@ static int fill_object_idr(struct drm_device *dev,
        int ret;
        bool universal_planes = READ_ONCE(lessor_priv->universal_planes);
 
-       objects = kzalloc_objs(struct drm_mode_object *, object_count,
-                              GFP_KERNEL);
+       objects = kzalloc_objs(struct drm_mode_object *, object_count);
        if (!objects)
                return -ENOMEM;
 
index 3e8c364..46adef2 100644 (file)
@@ -1844,8 +1844,7 @@ int drm_plane_create_color_pipeline_property(struct drm_plane *plane,
        int len = 0;
        int i;
 
-       all_pipelines = kzalloc_objs(*all_pipelines, num_pipelines + 1,
-                                    GFP_KERNEL);
+       all_pipelines = kzalloc_objs(*all_pipelines, num_pipelines + 1);
 
        if (!all_pipelines) {
                drm_err(plane->dev, "failed to allocate color pipeline\n");
index 802ddbb..9ffcd9e 100644 (file)
@@ -217,8 +217,7 @@ int drm_plane_helper_update_primary(struct drm_plane *plane, struct drm_crtc *cr
        /* Find current connectors for CRTC */
        num_connectors = get_connectors_for_crtc(crtc, NULL, 0);
        BUG_ON(num_connectors == 0);
-       connector_list = kzalloc_objs(*connector_list, num_connectors,
-                                     GFP_KERNEL);
+       connector_list = kzalloc_objs(*connector_list, num_connectors);
        if (!connector_list)
                return -ENOMEM;
        get_connectors_for_crtc(crtc, connector_list, num_connectors);
index a4805d4..09362cf 100644 (file)
@@ -422,8 +422,7 @@ int drm_writeback_set_fb(struct drm_connector_state *conn_state,
        WARN_ON(conn_state->connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK);
 
        if (!conn_state->writeback_job) {
-               conn_state->writeback_job = kzalloc_obj(*conn_state->writeback_job,
-                                                       GFP_KERNEL);
+               conn_state->writeback_job = kzalloc_obj(*conn_state->writeback_job);
                if (!conn_state->writeback_job)
                        return -ENOMEM;
 
index 59ea7b9..eb4b253 100644 (file)
@@ -182,8 +182,7 @@ int etnaviv_flop_reset_ppu_init(struct etnaviv_drm_private *priv)
         * (input and output image, and shader), we keep this buffer
         * for the whole life time the driver is bound
         */
-       priv->flop_reset_data_ppu = kzalloc_obj(*priv->flop_reset_data_ppu,
-                                               GFP_KERNEL);
+       priv->flop_reset_data_ppu = kzalloc_obj(*priv->flop_reset_data_ppu);
 
        if (!priv->flop_reset_data_ppu)
                return -ENOMEM;
index c35a3f7..fbf693a 100644 (file)
@@ -38,8 +38,7 @@ static struct etnaviv_gem_submit *submit_create(struct drm_device *dev,
        if (!submit)
                return NULL;
 
-       submit->pmrs = kzalloc_objs(struct etnaviv_perfmon_request, nr_pmrs,
-                                   GFP_KERNEL);
+       submit->pmrs = kzalloc_objs(struct etnaviv_perfmon_request, nr_pmrs);
        if (!submit->pmrs) {
                kfree(submit);
                return NULL;
index a63087c..3486032 100644 (file)
@@ -470,8 +470,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
        offset = userptr & ~PAGE_MASK;
        end = PAGE_ALIGN(userptr + size);
        npages = (end - start) >> PAGE_SHIFT;
-       g2d_userptr->pages = kvmalloc_objs(*g2d_userptr->pages, npages,
-                                          GFP_KERNEL);
+       g2d_userptr->pages = kvmalloc_objs(*g2d_userptr->pages, npages);
        if (!g2d_userptr->pages) {
                ret = -ENOMEM;
                goto err_free;
index 71782c3..5933ae0 100644 (file)
@@ -399,8 +399,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
        struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
        int ret, i;
 
-       dev_priv->gmbus = kzalloc_objs(struct intel_gmbus, GMBUS_NUM_PORTS,
-                                      GFP_KERNEL);
+       dev_priv->gmbus = kzalloc_objs(struct intel_gmbus, GMBUS_NUM_PORTS);
        if (dev_priv->gmbus == NULL)
                return -ENOMEM;
 
index e814319..3ca11aa 100644 (file)
@@ -1977,8 +1977,7 @@ psb_intel_sdvo_dvi_init(struct psb_intel_sdvo *psb_intel_sdvo, int device)
        struct gma_connector *intel_connector;
        struct psb_intel_sdvo_connector *psb_intel_sdvo_connector;
 
-       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector,
-                                              GFP_KERNEL);
+       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector);
        if (!psb_intel_sdvo_connector)
                return false;
 
@@ -2018,8 +2017,7 @@ psb_intel_sdvo_tv_init(struct psb_intel_sdvo *psb_intel_sdvo, int type)
        struct gma_connector *intel_connector;
        struct psb_intel_sdvo_connector *psb_intel_sdvo_connector;
 
-       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector,
-                                              GFP_KERNEL);
+       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector);
        if (!psb_intel_sdvo_connector)
                return false;
 
@@ -2058,8 +2056,7 @@ psb_intel_sdvo_analog_init(struct psb_intel_sdvo *psb_intel_sdvo, int device)
        struct gma_connector *intel_connector;
        struct psb_intel_sdvo_connector *psb_intel_sdvo_connector;
 
-       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector,
-                                              GFP_KERNEL);
+       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector);
        if (!psb_intel_sdvo_connector)
                return false;
 
@@ -2093,8 +2090,7 @@ psb_intel_sdvo_lvds_init(struct psb_intel_sdvo *psb_intel_sdvo, int device)
        struct gma_connector *intel_connector;
        struct psb_intel_sdvo_connector *psb_intel_sdvo_connector;
 
-       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector,
-                                              GFP_KERNEL);
+       psb_intel_sdvo_connector = kzalloc_obj(struct psb_intel_sdvo_connector);
        if (!psb_intel_sdvo_connector)
                return false;
 
index 78be370..a91a7e9 100644 (file)
@@ -246,8 +246,7 @@ static int gud_connector_get_modes(struct drm_connector *connector)
        if (drm_edid && edid_ctx.edid_override)
                goto out;
 
-       reqmodes = kmalloc_objs(*reqmodes, GUD_CONNECTOR_MAX_NUM_MODES,
-                               GFP_KERNEL);
+       reqmodes = kmalloc_objs(*reqmodes, GUD_CONNECTOR_MAX_NUM_MODES);
        if (!reqmodes)
                goto out;
 
@@ -480,8 +479,7 @@ static int gud_connector_add_properties(struct gud_device *gdrm, struct gud_conn
        unsigned int i, num_properties;
        int ret;
 
-       properties = kzalloc_objs(*properties, GUD_CONNECTOR_PROPERTIES_MAX_NUM,
-                                 GFP_KERNEL);
+       properties = kzalloc_objs(*properties, GUD_CONNECTOR_PROPERTIES_MAX_NUM);
        if (!properties)
                return -ENOMEM;
 
index a301e15..d0122d4 100644 (file)
@@ -255,8 +255,7 @@ static int gud_plane_add_properties(struct gud_device *gdrm)
        unsigned int i, num_properties;
        int ret;
 
-       properties = kzalloc_objs(*properties, GUD_PROPERTIES_MAX_NUM,
-                                 GFP_KERNEL);
+       properties = kzalloc_objs(*properties, GUD_PROPERTIES_MAX_NUM);
        if (!properties)
                return -ENOMEM;
 
index 85f5f9b..a1fa357 100644 (file)
@@ -486,8 +486,7 @@ init_bdb_block(struct intel_display *display,
        if (section_id == BDB_MIPI_SEQUENCE && *(const u8 *)block >= 3)
                block_size += 5;
 
-       entry = kzalloc_flex(*entry, data, max(min_size, block_size) + 3,
-                            GFP_KERNEL);
+       entry = kzalloc_flex(*entry, data, max(min_size, block_size) + 3);
        if (!entry) {
                kfree(temp_block);
                return;
index 62f9bf3..83865c0 100644 (file)
@@ -381,8 +381,7 @@ add_inherited_tunnel(struct intel_atomic_state *state,
        }
 
        if (!state->inherited_dp_tunnels) {
-               state->inherited_dp_tunnels = kzalloc_obj(*state->inherited_dp_tunnels,
-                                                         GFP_KERNEL);
+               state->inherited_dp_tunnels = kzalloc_obj(*state->inherited_dp_tunnels);
                if (!state->inherited_dp_tunnels)
                        return -ENOMEM;
        }
index 478f4b9..e12ec59 100644 (file)
@@ -54,8 +54,7 @@ static int object_set_placements(struct drm_i915_gem_object *obj,
                obj->mm.placements = &i915->mm.regions[mr->id];
                obj->mm.n_placements = 1;
        } else {
-               arr = kmalloc_objs(struct intel_memory_region *, n_placements,
-                                  GFP_KERNEL);
+               arr = kmalloc_objs(struct intel_memory_region *, n_placements);
                if (!arr)
                        return -ENOMEM;
 
index c1904e0..db995dc 100644 (file)
@@ -865,8 +865,7 @@ void intel_ggtt_init_fences(struct i915_ggtt *ggtt)
        if (intel_vgpu_active(i915))
                num_fences = intel_uncore_read(uncore,
                                               vgtif_reg(avail_rs.fence_num));
-       ggtt->fence_regs = kzalloc_objs(*ggtt->fence_regs, num_fences,
-                                       GFP_KERNEL);
+       ggtt->fence_regs = kzalloc_objs(*ggtt->fence_regs, num_fences);
        if (!ggtt->fence_regs)
                num_fences = 0;
 
index d47a78a..b0ee3d0 100644 (file)
@@ -157,8 +157,7 @@ static void _wa_add(struct i915_wa_list *wal, const struct i915_wa *wa)
        if (IS_ALIGNED(wal->count, grow)) { /* Either uninitialized or full. */
                struct i915_wa *list;
 
-               list = kmalloc_objs(*list, ALIGN(wal->count + 1, grow),
-                                   GFP_KERNEL);
+               list = kmalloc_objs(*list, ALIGN(wal->count + 1, grow));
                if (!list) {
                        drm_err(&i915->drm, "No space for workaround init!\n");
                        return;
index 8c3b76e..21e5ed9 100644 (file)
@@ -3648,8 +3648,7 @@ static int live_preempt_smoke(void *arg)
        u32 *cs;
        int n;
 
-       smoke.contexts = kmalloc_objs(*smoke.contexts, smoke.ncontext,
-                                     GFP_KERNEL);
+       smoke.contexts = kmalloc_objs(*smoke.contexts, smoke.ncontext);
        if (!smoke.contexts)
                return -ENOMEM;
 
index 3512710..29d860a 100644 (file)
@@ -536,8 +536,7 @@ static int live_hwsp_engine(void *arg)
         * independently to each of their breadcrumb slots.
         */
 
-       timelines = kvmalloc_objs(*timelines, NUM_TIMELINES * I915_NUM_ENGINES,
-                                 GFP_KERNEL);
+       timelines = kvmalloc_objs(*timelines, NUM_TIMELINES * I915_NUM_ENGINES);
        if (!timelines)
                return -ENOMEM;
 
@@ -610,8 +609,7 @@ static int live_hwsp_alternate(void *arg)
         * engines.
         */
 
-       timelines = kvmalloc_objs(*timelines, NUM_TIMELINES * I915_NUM_ENGINES,
-                                 GFP_KERNEL);
+       timelines = kvmalloc_objs(*timelines, NUM_TIMELINES * I915_NUM_ENGINES);
        if (!timelines)
                return -ENOMEM;
 
index 73b9959..77bd415 100644 (file)
@@ -320,8 +320,7 @@ guc_capture_alloc_steered_lists(struct intel_guc *guc,
                return;
 
        /* allocate an extra for an end marker */
-       extlists = kzalloc_objs(struct __guc_mmio_reg_descr_group, 2,
-                               GFP_KERNEL);
+       extlists = kzalloc_objs(struct __guc_mmio_reg_descr_group, 2);
        if (!extlists)
                return;
 
index 539119d..41fef2d 100644 (file)
@@ -918,8 +918,7 @@ static int init_hash_table(struct intel_engine_cs *engine,
                for (j = 0; j < table->count; j++) {
                        const struct drm_i915_cmd_descriptor *desc =
                                &table->table[j];
-                       struct cmd_node *desc_node = kmalloc_obj(*desc_node,
-                                                                GFP_KERNEL);
+                       struct cmd_node *desc_node = kmalloc_obj(*desc_node);
 
                        if (!desc_node)
                                return -ENOMEM;
index ec973ae..e1a7c45 100644 (file)
@@ -1768,8 +1768,7 @@ static int live_breadcrumbs_smoketest(void *arg)
 
        smoke[0].request_alloc = __live_request_alloc;
        smoke[0].ncontexts = 64;
-       smoke[0].contexts = kzalloc_objs(*smoke[0].contexts, smoke[0].ncontexts,
-                                        GFP_KERNEL);
+       smoke[0].contexts = kzalloc_objs(*smoke[0].contexts, smoke[0].ncontexts);
        if (!smoke[0].contexts) {
                ret = -ENOMEM;
                goto out_threads;
index 4387d5f..8894a06 100644 (file)
@@ -713,8 +713,7 @@ struct drm_crtc_state *mgag200_crtc_atomic_duplicate_state(struct drm_crtc *crtc
        if (!crtc_state)
                return NULL;
 
-       new_mgag200_crtc_state = kzalloc_obj(*new_mgag200_crtc_state,
-                                            GFP_KERNEL);
+       new_mgag200_crtc_state = kzalloc_obj(*new_mgag200_crtc_state);
        if (!new_mgag200_crtc_state)
                return NULL;
        __drm_atomic_helper_crtc_duplicate_state(crtc, &new_mgag200_crtc_state->base);
index 671f985..b29541b 100644 (file)
@@ -1130,8 +1130,7 @@ static void mdp5_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state
 
 static void mdp5_crtc_reset(struct drm_crtc *crtc)
 {
-       struct mdp5_crtc_state *mdp5_cstate = kzalloc_obj(*mdp5_cstate,
-                                                         GFP_KERNEL);
+       struct mdp5_crtc_state *mdp5_cstate = kzalloc_obj(*mdp5_cstate);
 
        if (crtc->state)
                mdp5_crtc_destroy_state(crtc, crtc->state);
index 6d6a69d..214d511 100644 (file)
@@ -279,8 +279,7 @@ static void
 nv10_overlay_init(struct drm_device *device)
 {
        struct nouveau_drm *drm = nouveau_drm(device);
-       struct nouveau_plane *plane = kzalloc_obj(struct nouveau_plane,
-                                                 GFP_KERNEL);
+       struct nouveau_plane *plane = kzalloc_obj(struct nouveau_plane);
        unsigned int num_formats = ARRAY_SIZE(formats);
        int ret;
 
@@ -471,8 +470,7 @@ static void
 nv04_overlay_init(struct drm_device *device)
 {
        struct nouveau_drm *drm = nouveau_drm(device);
-       struct nouveau_plane *plane = kzalloc_obj(struct nouveau_plane,
-                                                 GFP_KERNEL);
+       struct nouveau_plane *plane = kzalloc_obj(struct nouveau_plane);
        int ret;
 
        if (!plane)
index aa59446..dcc9213 100644 (file)
@@ -1010,8 +1010,7 @@ nouveau_svm_fault_buffer_ctor(struct nouveau_svm *svm, s32 oclass, int id)
        if (ret)
                return ret;
 
-       buffer->fault = kvzalloc_objs(*buffer->fault, buffer->entries,
-                                     GFP_KERNEL);
+       buffer->fault = kvzalloc_objs(*buffer->fault, buffer->entries);
        if (!buffer->fault)
                return -ENOMEM;
 
index 59b3ba3..155223f 100644 (file)
@@ -51,8 +51,7 @@ nvif_fifo_runlists(struct nvif_device *device)
                goto done;
 
        device->runlists = fls64(a->v.runlists.data);
-       device->runlist = kzalloc_objs(*device->runlist, device->runlists,
-                                      GFP_KERNEL);
+       device->runlist = kzalloc_objs(*device->runlist, device->runlists);
        if (!device->runlist) {
                ret = -ENOMEM;
                goto done;
index 839b8d0..1805495 100644 (file)
@@ -904,8 +904,7 @@ static int omap_dmm_probe(struct platform_device *dev)
                list_add(&omap_dmm->engines[i].idle_node, &omap_dmm->idle_head);
        }
 
-       omap_dmm->tcm = kzalloc_objs(*omap_dmm->tcm, omap_dmm->num_lut,
-                                    GFP_KERNEL);
+       omap_dmm->tcm = kzalloc_objs(*omap_dmm->tcm, omap_dmm->num_lut);
        if (!omap_dmm->tcm) {
                ret = -ENOMEM;
                goto fail;
index f5bd6e9..8b2b6c5 100644 (file)
@@ -1241,8 +1241,7 @@ int qxl_create_monitors_object(struct qxl_device *qdev)
                qxl_bo_physical_address(qdev, qdev->monitors_config_bo, 0);
 
        memset(qdev->monitors_config, 0, monitors_config_size);
-       qdev->dumb_heads = kzalloc_objs(qdev->dumb_heads[0], qxl_num_crtc,
-                                       GFP_KERNEL);
+       qdev->dumb_heads = kzalloc_objs(qdev->dumb_heads[0], qxl_num_crtc);
        if (!qdev->dumb_heads) {
                qxl_destroy_monitors_object(qdev);
                return -ENOMEM;
index 7370fb7..4ee2b5a 100644 (file)
@@ -168,8 +168,7 @@ static int qxl_process_single_command(struct qxl_device *qdev,
                       cmd->command_size))
                return -EFAULT;
 
-       reloc_info = kmalloc_objs(struct qxl_reloc_info, cmd->relocs_num,
-                                 GFP_KERNEL);
+       reloc_info = kmalloc_objs(struct qxl_reloc_info, cmd->relocs_num);
        if (!reloc_info)
                return -ENOMEM;
 
index eba8618..5cfd8fc 100644 (file)
@@ -2625,8 +2625,7 @@ radeon_atombios_set_dac_info(struct radeon_encoder *radeon_encoder)
 {
        struct drm_device *dev = radeon_encoder->base.dev;
        struct radeon_device *rdev = dev->dev_private;
-       struct radeon_encoder_atom_dac *dac = kzalloc_obj(struct radeon_encoder_atom_dac,
-                                                         GFP_KERNEL);
+       struct radeon_encoder_atom_dac *dac = kzalloc_obj(struct radeon_encoder_atom_dac);
 
        if (!dac)
                return NULL;
@@ -2639,8 +2638,7 @@ static struct radeon_encoder_atom_dig *
 radeon_atombios_set_dig_info(struct radeon_encoder *radeon_encoder)
 {
        int encoder_enum = (radeon_encoder->encoder_enum & ENUM_ID_MASK) >> ENUM_ID_SHIFT;
-       struct radeon_encoder_atom_dig *dig = kzalloc_obj(struct radeon_encoder_atom_dig,
-                                                         GFP_KERNEL);
+       struct radeon_encoder_atom_dig *dig = kzalloc_obj(struct radeon_encoder_atom_dig);
 
        if (!dig)
                return NULL;
index 670cb06..c868649 100644 (file)
@@ -2552,8 +2552,7 @@ int btc_dpm_init(struct radeon_device *rdev)
                return ret;
 
        rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
-               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4,
-                            GFP_KERNEL);
+               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4);
        if (!rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries) {
                r600_free_extended_power_table(rdev);
                return -ENOMEM;
index 6814262..0041623 100644 (file)
@@ -5740,8 +5740,7 @@ int ci_dpm_init(struct radeon_device *rdev)
        ci_set_private_data_variables_based_on_pptable(rdev);
 
        rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
-               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4,
-                            GFP_KERNEL);
+               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4);
        if (!rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries) {
                ci_dpm_fini(rdev);
                return -ENOMEM;
index 05bc213..1bcf92f 100644 (file)
@@ -4078,8 +4078,7 @@ int ni_dpm_init(struct radeon_device *rdev)
                return ret;
 
        rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
-               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4,
-                            GFP_KERNEL);
+               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4);
        if (!rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries) {
                r600_free_extended_power_table(rdev);
                return -ENOMEM;
index c407db0..b432479 100644 (file)
@@ -1255,8 +1255,7 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
                                         le16_to_cpu(ext_hdr->usPowerTuneTableOffset));
                        ATOM_PowerTune_Table *pt;
                        rdev->pm.dpm.dyn_state.cac_tdp_table =
-                               kzalloc_obj(struct radeon_cac_tdp_table,
-                                           GFP_KERNEL);
+                               kzalloc_obj(struct radeon_cac_tdp_table);
                        if (!rdev->pm.dpm.dyn_state.cac_tdp_table) {
                                r600_free_extended_power_table(rdev);
                                return -ENOMEM;
index c4c11d2..2f2b3b7 100644 (file)
@@ -1773,8 +1773,7 @@ radeon_atombios_get_primary_dac_info(struct radeon_encoder *encoder)
                dac_info = (struct _COMPASSIONATE_DATA *)
                        (mode_info->atom_context->bios + data_offset);
 
-               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;
@@ -2127,8 +2126,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
                /* avoid memory leaks from invalid modes or unknown frev. */
                if (!rdev->pm.power_state[state_index].clock_info) {
                        rdev->pm.power_state[state_index].clock_info =
-                               kzalloc_obj(struct radeon_pm_clock_info,
-                                           GFP_KERNEL);
+                               kzalloc_obj(struct radeon_pm_clock_info);
                }
                if (!rdev->pm.power_state[state_index].clock_info)
                        goto out;
@@ -2785,12 +2783,10 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
        }
 
        if (state_index == 0) {
-               rdev->pm.power_state = kzalloc_obj(struct radeon_power_state,
-                                                  GFP_KERNEL);
+               rdev->pm.power_state = kzalloc_obj(struct radeon_power_state);
                if (rdev->pm.power_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);
                        if (rdev->pm.power_state[0].clock_info) {
                                /* add the default mode */
                                rdev->pm.power_state[state_index].type =
index b96b556..6a4e268 100644 (file)
@@ -2629,8 +2629,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
        rdev->pm.default_power_state_index = -1;
 
        /* allocate 2 power states */
-       rdev->pm.power_state = kzalloc_objs(struct radeon_power_state, 2,
-                                           GFP_KERNEL);
+       rdev->pm.power_state = kzalloc_objs(struct radeon_power_state, 2);
        if (rdev->pm.power_state) {
                /* allocate 1 clock mode per state */
                rdev->pm.power_state[0].clock_info =
index b4377db..373f08a 100644 (file)
@@ -1907,8 +1907,7 @@ radeon_add_atom_connector(struct drm_device *dev,
        }
 
        if (is_dp_bridge) {
-               radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                  GFP_KERNEL);
+               radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                if (!radeon_dig_connector)
                        goto failed;
                radeon_dig_connector->igp_lane_info = igp_lane_info;
@@ -2079,8 +2078,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        break;
                case DRM_MODE_CONNECTOR_DVII:
                case DRM_MODE_CONNECTOR_DVID:
-                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                        if (!radeon_dig_connector)
                                goto failed;
                        radeon_dig_connector->igp_lane_info = igp_lane_info;
@@ -2142,8 +2140,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        break;
                case DRM_MODE_CONNECTOR_HDMIA:
                case DRM_MODE_CONNECTOR_HDMIB:
-                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                        if (!radeon_dig_connector)
                                goto failed;
                        radeon_dig_connector->igp_lane_info = igp_lane_info;
@@ -2198,8 +2195,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                                connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_DisplayPort:
-                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                        if (!radeon_dig_connector)
                                goto failed;
                        radeon_dig_connector->igp_lane_info = igp_lane_info;
@@ -2254,8 +2250,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_eDP:
-                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                        if (!radeon_dig_connector)
                                goto failed;
                        radeon_dig_connector->igp_lane_info = igp_lane_info;
@@ -2302,8 +2297,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        connector->doublescan_allowed = false;
                        break;
                case DRM_MODE_CONNECTOR_LVDS:
-                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig,
-                                                          GFP_KERNEL);
+                       radeon_dig_connector = kzalloc_obj(struct radeon_connector_atom_dig);
                        if (!radeon_dig_connector)
                                goto failed;
                        radeon_dig_connector->igp_lane_info = igp_lane_info;
index f021e58..2db819a 100644 (file)
@@ -296,8 +296,7 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
        }
        p->cs_flags = 0;
        p->nchunks = cs->num_chunks;
-       p->chunks = kvzalloc_objs(struct radeon_cs_chunk, p->nchunks,
-                                 GFP_KERNEL);
+       p->chunks = kvzalloc_objs(struct radeon_cs_chunk, p->nchunks);
        if (p->chunks == NULL) {
                return -ENOMEM;
        }
index 589dc9d..5c72aad 100644 (file)
@@ -1539,8 +1539,7 @@ static void radeon_afmt_init(struct radeon_device *rdev)
 
                BUG_ON(num_afmt > ARRAY_SIZE(eg_offsets));
                for (i = 0; i < num_afmt; i++) {
-                       rdev->mode_info.afmt[i] = kzalloc_obj(struct radeon_afmt,
-                                                             GFP_KERNEL);
+                       rdev->mode_info.afmt[i] = kzalloc_obj(struct radeon_afmt);
                        if (rdev->mode_info.afmt[i]) {
                                rdev->mode_info.afmt[i]->offset = eg_offsets[i];
                                rdev->mode_info.afmt[i]->id = i;
@@ -1548,30 +1547,26 @@ static void radeon_afmt_init(struct radeon_device *rdev)
                }
        } else if (ASIC_IS_DCE3(rdev)) {
                /* DCE3.x has 2 audio blocks tied to DIG encoders */
-               rdev->mode_info.afmt[0] = kzalloc_obj(struct radeon_afmt,
-                                                     GFP_KERNEL);
+               rdev->mode_info.afmt[0] = kzalloc_obj(struct radeon_afmt);
                if (rdev->mode_info.afmt[0]) {
                        rdev->mode_info.afmt[0]->offset = DCE3_HDMI_OFFSET0;
                        rdev->mode_info.afmt[0]->id = 0;
                }
-               rdev->mode_info.afmt[1] = kzalloc_obj(struct radeon_afmt,
-                                                     GFP_KERNEL);
+               rdev->mode_info.afmt[1] = kzalloc_obj(struct radeon_afmt);
                if (rdev->mode_info.afmt[1]) {
                        rdev->mode_info.afmt[1]->offset = DCE3_HDMI_OFFSET1;
                        rdev->mode_info.afmt[1]->id = 1;
                }
        } else if (ASIC_IS_DCE2(rdev)) {
                /* DCE2 has at least 1 routable audio block */
-               rdev->mode_info.afmt[0] = kzalloc_obj(struct radeon_afmt,
-                                                     GFP_KERNEL);
+               rdev->mode_info.afmt[0] = kzalloc_obj(struct radeon_afmt);
                if (rdev->mode_info.afmt[0]) {
                        rdev->mode_info.afmt[0]->offset = DCE2_HDMI_OFFSET0;
                        rdev->mode_info.afmt[0]->id = 0;
                }
                /* r6xx has 2 routable audio blocks */
                if (rdev->family >= CHIP_R600) {
-                       rdev->mode_info.afmt[1] = kzalloc_obj(struct radeon_afmt,
-                                                             GFP_KERNEL);
+                       rdev->mode_info.afmt[1] = kzalloc_obj(struct radeon_afmt);
                        if (rdev->mode_info.afmt[1]) {
                                rdev->mode_info.afmt[1]->offset = DCE2_HDMI_OFFSET1;
                                rdev->mode_info.afmt[1]->id = 1;
index 170f168..4520731 100644 (file)
@@ -133,8 +133,7 @@ struct radeon_bo_list *radeon_vm_get_bos(struct radeon_device *rdev,
        struct radeon_bo_list *list;
        unsigned i, idx;
 
-       list = kvmalloc_objs(struct radeon_bo_list, vm->max_pde_used + 2,
-                            GFP_KERNEL);
+       list = kvmalloc_objs(struct radeon_bo_list, vm->max_pde_used + 2);
        if (!list)
                return NULL;
 
index e4e725e..6613957 100644 (file)
@@ -6898,8 +6898,7 @@ int si_dpm_init(struct radeon_device *rdev)
                return ret;
 
        rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
-               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4,
-                            GFP_KERNEL);
+               kzalloc_objs(struct radeon_clock_voltage_dependency_entry, 4);
        if (!rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries) {
                r600_free_extended_power_table(rdev);
                return -ENOMEM;
index ab16765..572f4ad 100644 (file)
@@ -1658,8 +1658,7 @@ static void vop_crtc_destroy_state(struct drm_crtc *crtc,
 
 static void vop_crtc_reset(struct drm_crtc *crtc)
 {
-       struct rockchip_crtc_state *crtc_state = kzalloc_obj(*crtc_state,
-                                                            GFP_KERNEL);
+       struct rockchip_crtc_state *crtc_state = kzalloc_obj(*crtc_state);
 
        if (crtc->state)
                vop_crtc_destroy_state(crtc, crtc->state);
index d0b3a10..e6ee354 100644 (file)
@@ -1358,8 +1358,7 @@ int drm_sched_init(struct drm_gpu_scheduler *sched, const struct drm_sched_init_
                goto Out_check_own;
        sched->num_rqs = args->num_rqs;
        for (i = DRM_SCHED_PRIORITY_KERNEL; i < sched->num_rqs; i++) {
-               sched->sched_rq[i] = kzalloc_obj(*sched->sched_rq[i],
-                                                GFP_KERNEL);
+               sched->sched_rq[i] = kzalloc_obj(*sched->sched_rq[i]);
                if (!sched->sched_rq[i])
                        goto Out_unroll;
                drm_sched_rq_init(sched, sched->sched_rq[i]);
index 0b0c058..3bae91d 100644 (file)
@@ -358,8 +358,7 @@ static int appletbdrm_primary_plane_helper_atomic_check(struct drm_plane *plane,
        if (!appletbdrm_state->request)
                return -ENOMEM;
 
-       appletbdrm_state->response = kzalloc_obj(*appletbdrm_state->response,
-                                                GFP_KERNEL);
+       appletbdrm_state->response = kzalloc_obj(*appletbdrm_state->response);
 
        if (!appletbdrm_state->response)
                return -ENOMEM;
index 3497011..b645a18 100644 (file)
@@ -137,8 +137,7 @@ static int ttm_dma_tt_alloc_page_directory(struct ttm_tt *ttm)
 
 static int ttm_sg_tt_alloc_page_directory(struct ttm_tt *ttm)
 {
-       ttm->dma_address = kvzalloc_objs(*ttm->dma_address, ttm->num_pages,
-                                        GFP_KERNEL);
+       ttm->dma_address = kvzalloc_objs(*ttm->dma_address, ttm->num_pages);
        if (!ttm->dma_address)
                return -ENOMEM;
 
index d172cab..091f5c7 100644 (file)
@@ -335,8 +335,7 @@ v3d_get_multisync_post_deps(struct drm_file *file_priv,
                return 0;
 
        se->out_syncs = (struct v3d_submit_outsync *)
-                       kvmalloc_objs(struct v3d_submit_outsync, count,
-                                     GFP_KERNEL);
+                       kvmalloc_objs(struct v3d_submit_outsync, count);
        if (!se->out_syncs)
                return -ENOMEM;
 
@@ -725,8 +724,7 @@ v3d_get_cpu_reset_performance_params(struct drm_file *file_priv,
        job->job_type = V3D_CPU_JOB_TYPE_RESET_PERFORMANCE_QUERY;
 
        query_info->queries =
-               kvmalloc_objs(struct v3d_performance_query, reset.count,
-                             GFP_KERNEL);
+               kvmalloc_objs(struct v3d_performance_query, reset.count);
        if (!query_info->queries)
                return -ENOMEM;
 
@@ -766,8 +764,7 @@ v3d_get_cpu_copy_performance_query_params(struct drm_file *file_priv,
        job->job_type = V3D_CPU_JOB_TYPE_COPY_PERFORMANCE_QUERY;
 
        query_info->queries =
-               kvmalloc_objs(struct v3d_performance_query, copy.count,
-                             GFP_KERNEL);
+               kvmalloc_objs(struct v3d_performance_query, copy.count);
        if (!query_info->queries)
                return -ENOMEM;
 
@@ -1076,8 +1073,7 @@ v3d_submit_tfu_ioctl(struct drm_device *dev, void *data,
                goto fail;
        }
 
-       job->base.bo = kzalloc_objs(*job->base.bo, ARRAY_SIZE(args->bo_handles),
-                                   GFP_KERNEL);
+       job->base.bo = kzalloc_objs(*job->base.bo, ARRAY_SIZE(args->bo_handles));
        if (!job->base.bo) {
                ret = -ENOMEM;
                goto fail;
index 7e86e89..1f93bc5 100644 (file)
@@ -1014,8 +1014,7 @@ int vc4_bo_cache_init(struct drm_device *dev)
         * use.  This lets us avoid a bunch of string reallocation in
         * the kernel's draw and BO allocation paths.
         */
-       vc4->bo_labels = kzalloc_objs(*vc4->bo_labels, VC4_BO_TYPE_COUNT,
-                                     GFP_KERNEL);
+       vc4->bo_labels = kzalloc_objs(*vc4->bo_labels, VC4_BO_TYPE_COUNT);
        if (!vc4->bo_labels)
                return -ENOMEM;
        vc4->num_labels = VC4_BO_TYPE_COUNT;
index 7ee31fd..c3e66ef 100644 (file)
@@ -61,8 +61,7 @@ struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev,
 {
        uint64_t fence_context = base_fence_ctx + ring_idx;
        struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv;
-       struct virtio_gpu_fence *fence = kzalloc_obj(struct virtio_gpu_fence,
-                                                    GFP_KERNEL);
+       struct virtio_gpu_fence *fence = kzalloc_obj(struct virtio_gpu_fence);
 
        if (!fence)
                return fence;
index 94ad448..8adcf5c 100644 (file)
@@ -164,8 +164,7 @@ int virtgpu_dma_buf_import_sgt(struct virtio_gpu_mem_entry **ents,
        if (IS_ERR(sgt))
                return PTR_ERR(sgt);
 
-       *ents = kvmalloc_objs(struct virtio_gpu_mem_entry, sgt->nents,
-                             GFP_KERNEL);
+       *ents = kvmalloc_objs(struct virtio_gpu_mem_entry, sgt->nents);
        if (!(*ents)) {
                dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
                return -ENOMEM;
index 92e54c2..ba2ff35 100644 (file)
@@ -87,8 +87,7 @@ static void vkms_atomic_crtc_destroy_state(struct drm_crtc *crtc,
 
 static void vkms_atomic_crtc_reset(struct drm_crtc *crtc)
 {
-       struct vkms_crtc_state *vkms_state = kzalloc_obj(*vkms_state,
-                                                        GFP_KERNEL);
+       struct vkms_crtc_state *vkms_state = kzalloc_obj(*vkms_state);
 
        if (crtc->state)
                vkms_atomic_crtc_destroy_state(crtc, crtc->state);
@@ -137,8 +136,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
                i++;
        }
 
-       vkms_state->active_planes = kzalloc_objs(*vkms_state->active_planes, i,
-                                                GFP_KERNEL);
+       vkms_state->active_planes = kzalloc_objs(*vkms_state->active_planes, i);
        if (!vkms_state->active_planes)
                return -ENOMEM;
        vkms_state->num_active_planes = i;
index 60ebcfe..135b75a 100644 (file)
@@ -586,8 +586,7 @@ int vmw_bo_cpu_blit(struct vmw_bo *vmw_dst,
                                            w, h, diff);
 
        if (!src->ttm->pages && src->ttm->sg) {
-               src_pages = kvmalloc_objs(struct page *, src->ttm->num_pages,
-                                         GFP_KERNEL);
+               src_pages = kvmalloc_objs(struct page *, src->ttm->num_pages);
                if (!src_pages)
                        return -ENOMEM;
                ret = drm_prime_sg_to_page_array(src->ttm->sg, src_pages,
@@ -596,8 +595,7 @@ int vmw_bo_cpu_blit(struct vmw_bo *vmw_dst,
                        goto out;
        }
        if (!dst->ttm->pages && dst->ttm->sg) {
-               dst_pages = kvmalloc_objs(struct page *, dst->ttm->num_pages,
-                                         GFP_KERNEL);
+               dst_pages = kvmalloc_objs(struct page *, dst->ttm->num_pages);
                if (!dst_pages) {
                        ret = -ENOMEM;
                        goto out;
index 60306d0..55730e2 100644 (file)
@@ -948,8 +948,7 @@ static int vmw_kms_check_topology(struct drm_device *dev,
        uint32_t i;
        int ret = 0;
 
-       rects = kzalloc_objs(struct drm_rect, dev->mode_config.num_crtc,
-                            GFP_KERNEL);
+       rects = kzalloc_objs(struct drm_rect, dev->mode_config.num_crtc);
        if (!rects)
                return -ENOMEM;
 
index 8656218..b2d3927 100644 (file)
@@ -767,8 +767,7 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
                ret = PTR_ERR(metadata->sizes);
                goto out_no_sizes;
        }
-       srf->offsets = kmalloc_objs(*srf->offsets, metadata->num_sizes,
-                                   GFP_KERNEL);
+       srf->offsets = kmalloc_objs(*srf->offsets, metadata->num_sizes);
        if (unlikely(!srf->offsets)) {
                ret = -ENOMEM;
                goto out_no_offsets;
index 36ad47c..3972392 100644 (file)
@@ -636,8 +636,7 @@ static int xe_eu_stall_data_buf_alloc(struct xe_eu_stall_data_stream *stream,
        struct xe_bo *bo;
        u32 size;
 
-       stream->xecore_buf = kzalloc_objs(*stream->xecore_buf, last_xecore,
-                                         GFP_KERNEL);
+       stream->xecore_buf = kzalloc_objs(*stream->xecore_buf, last_xecore);
        if (!stream->xecore_buf)
                return -ENOMEM;
 
index e40cfeb..4dd3f29 100644 (file)
@@ -1408,8 +1408,7 @@ static int xe_oa_parse_syncs(struct xe_oa *oa,
        }
 
        if (param->num_syncs) {
-               param->syncs = kzalloc_objs(*param->syncs, param->num_syncs,
-                                           GFP_KERNEL);
+               param->syncs = kzalloc_objs(*param->syncs, param->num_syncs);
                if (!param->syncs) {
                        ret = -ENOMEM;
                        goto exit;
index c6ccef0..13b355f 100644 (file)
@@ -368,8 +368,7 @@ xe_pt_new_shared(struct xe_walk_update *wupd, struct xe_pt *parent,
        entry->pt_bo->update_index = -1;
 
        if (alloc_entries) {
-               entry->pt_entries = kmalloc_objs(*entry->pt_entries, XE_PDES,
-                                                GFP_KERNEL);
+               entry->pt_entries = kmalloc_objs(*entry->pt_entries, XE_PDES);
                if (!entry->pt_entries)
                        return -ENOMEM;
        }
index c5605e9..95bf53c 100644 (file)
@@ -47,8 +47,7 @@ static int get_vmas(struct xe_vm *vm, struct xe_vmas_in_madvise_range *madvise_r
        lockdep_assert_held(&vm->lock);
 
        madvise_range->num_vmas = 0;
-       madvise_range->vmas = kmalloc_objs(*madvise_range->vmas, max_vmas,
-                                          GFP_KERNEL);
+       madvise_range->vmas = kmalloc_objs(*madvise_range->vmas, max_vmas);
        if (!madvise_range->vmas)
                return -ENOMEM;
 
index c80043a..eec4c1d 100644 (file)
@@ -47,8 +47,7 @@ static int gem_alloc_pages_array(struct xen_gem_object *xen_obj,
                                 size_t buf_size)
 {
        xen_obj->num_pages = DIV_ROUND_UP(buf_size, PAGE_SIZE);
-       xen_obj->pages = kvmalloc_objs(struct page *, xen_obj->num_pages,
-                                      GFP_KERNEL);
+       xen_obj->pages = kvmalloc_objs(struct page *, xen_obj->num_pages);
        return !xen_obj->pages ? -ENOMEM : 0;
 }
 
index b2d4347..ca5d0f5 100644 (file)
@@ -16,8 +16,7 @@
 int host1x_channel_list_init(struct host1x_channel_list *chlist,
                             unsigned int num_channels)
 {
-       chlist->channels = kzalloc_objs(struct host1x_channel, num_channels,
-                                       GFP_KERNEL);
+       chlist->channels = kzalloc_objs(struct host1x_channel, num_channels);
        if (!chlist->channels)
                return -ENOMEM;
 
index a1b2567..9be5d95 100644 (file)
@@ -275,8 +275,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
        if (!count)
                return 0;
 
-       bundle->cport_desc = kzalloc_objs(*bundle->cport_desc, count,
-                                         GFP_KERNEL);
+       bundle->cport_desc = kzalloc_objs(*bundle->cport_desc, count);
        if (!bundle->cport_desc)
                goto exit;
 
index ee79048..1b854f5 100644 (file)
@@ -782,8 +782,7 @@ static void gb_svc_pwrmon_debugfs_init(struct gb_svc *svc)
        if (!rail_names)
                goto err_pwrmon_debugfs;
 
-       svc->pwrmon_rails = kzalloc_objs(*svc->pwrmon_rails, rail_count,
-                                        GFP_KERNEL);
+       svc->pwrmon_rails = kzalloc_objs(*svc->pwrmon_rails, rail_count);
        if (!svc->pwrmon_rails)
                goto err_pwrmon_debugfs_free;
 
index 99b2e09..1af477e 100644 (file)
@@ -59,8 +59,7 @@ static int cbas_ec_query_base(struct cros_ec_device *ec_dev, bool get_state,
        struct cros_ec_command *msg;
        int ret;
 
-       msg = kzalloc_flex(*msg, data, max(sizeof(u32), sizeof(*params)),
-                          GFP_KERNEL);
+       msg = kzalloc_flex(*msg, data, max(sizeof(u32), sizeof(*params)));
        if (!msg)
                return -ENOMEM;
 
index 84f4b1e..deadab2 100644 (file)
@@ -474,8 +474,7 @@ int hid_haptic_init(struct hid_device *hdev,
                ret = -ENOMEM;
                goto duration_map;
        }
-       haptic->effect = kzalloc_objs(struct hid_haptic_effect, FF_MAX_EFFECTS,
-                                     GFP_KERNEL);
+       haptic->effect = kzalloc_objs(struct hid_haptic_effect, FF_MAX_EFFECTS);
        if (!haptic->effect) {
                ret = -ENOMEM;
                goto output_queue;
index 9834dbd..d4296db 100644 (file)
@@ -34,8 +34,7 @@ static void ishtp_hbm_fw_cl_allocate(struct ishtp_device *dev)
                return;
 
        /* allocate storage for fw clients representation */
-       clients = kzalloc_objs(struct ishtp_fw_client, dev->fw_clients_num,
-                              GFP_KERNEL);
+       clients = kzalloc_objs(struct ishtp_fw_client, dev->fw_clients_num);
        if (!clients) {
                dev->dev_state = ISHTP_DEV_RESETTING;
                ish_hw_reset(dev);
index 4a2348b..ae60fd5 100644 (file)
@@ -183,8 +183,7 @@ int hv_synic_alloc(void)
                memset(hv_cpu, 0, sizeof(*hv_cpu));
        }
 
-       hv_context.hv_numa_map = kzalloc_objs(struct cpumask, nr_node_ids,
-                                             GFP_KERNEL);
+       hv_context.hv_numa_map = kzalloc_objs(struct cpumask, nr_node_ids);
        if (!hv_context.hv_numa_map) {
                pr_err("Unable to allocate NUMA map\n");
                goto err;
index db3c253..592a960 100644 (file)
@@ -196,8 +196,7 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
         * First page holds struct hv_ring_buffer, do wraparound mapping for
         * the rest.
         */
-       pages_wraparound = kzalloc_objs(struct page *, page_cnt * 2 - 1,
-                                       GFP_KERNEL);
+       pages_wraparound = kzalloc_objs(struct page *, page_cnt * 2 - 1);
        if (!pages_wraparound)
                return -ENOMEM;
 
index ad9d5c5..55f54bd 100644 (file)
@@ -804,8 +804,7 @@ static int __init coretemp_init(void)
                return -ENODEV;
 
        max_zones = topology_max_packages() * topology_max_dies_per_package();
-       zone_devices = kzalloc_objs(struct platform_device *, max_zones,
-                                   GFP_KERNEL);
+       zone_devices = kzalloc_objs(struct platform_device *, max_zones);
        if (!zone_devices)
                return -ENOMEM;
 
index 949bc24..dec7307 100644 (file)
@@ -367,8 +367,7 @@ static int ibmpex_find_sensors(struct ibmpex_bmc_data *data)
                return -ENOENT;
        data->num_sensors = err;
 
-       data->sensors = kzalloc_objs(*data->sensors, data->num_sensors,
-                                    GFP_KERNEL);
+       data->sensors = kzalloc_objs(*data->sensors, data->num_sensors);
        if (!data->sensors)
                return -ENOMEM;
 
index 5ddd979..4dc1def 100644 (file)
@@ -204,8 +204,7 @@ static int tmc_pages_alloc(struct tmc_pages *tmc_pages,
        struct device *real_dev = dev->parent;
 
        nr_pages = tmc_pages->nr_pages;
-       tmc_pages->daddrs = kzalloc_objs(*tmc_pages->daddrs, nr_pages,
-                                        GFP_KERNEL);
+       tmc_pages->daddrs = kzalloc_objs(*tmc_pages->daddrs, nr_pages);
        if (!tmc_pages->daddrs)
                return -ENOMEM;
        tmc_pages->pages = kzalloc_objs(*tmc_pages->pages, nr_pages);
index 9958920..a4acb78 100644 (file)
@@ -799,8 +799,7 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
 
        if (gi2c->is_tx_multi_desc_xfer) {
                tx_multi_xfer->dma_buf = kcalloc(num, sizeof(void *), GFP_KERNEL);
-               tx_multi_xfer->dma_addr = kzalloc_objs(dma_addr_t, num,
-                                                      GFP_KERNEL);
+               tx_multi_xfer->dma_addr = kzalloc_objs(dma_addr_t, num);
                if (!tx_multi_xfer->dma_buf || !tx_multi_xfer->dma_addr) {
                        ret = -ENOMEM;
                        goto err;
index e0aec8e..7bbe026 100644 (file)
@@ -552,8 +552,7 @@ static long compat_i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned lo
                if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
                        return -EINVAL;
 
-               rdwr_pa = kmalloc_objs(struct i2c_msg, rdwr_arg.nmsgs,
-                                      GFP_KERNEL);
+               rdwr_pa = kmalloc_objs(struct i2c_msg, rdwr_arg.nmsgs);
                if (!rdwr_pa)
                        return -ENOMEM;
 
index 9446a56..9e6be49 100644 (file)
@@ -1852,8 +1852,7 @@ struct i3c_dma *i3c_master_dma_map_single(struct device *dev, void *buf,
        void *bounce __free(kfree) = NULL;
        void *dma_buf = buf;
 
-       struct i3c_dma *dma_xfer __free(kfree) = kzalloc_obj(*dma_xfer,
-                                                            GFP_KERNEL);
+       struct i3c_dma *dma_xfer __free(kfree) = kzalloc_obj(*dma_xfer);
        if (!dma_xfer)
                return NULL;
 
index d422983..b903a2d 100644 (file)
@@ -363,8 +363,7 @@ static int hci_dma_init(struct i3c_hci *hci)
                rh->resp = dma_alloc_coherent(rings->sysdev, resps_sz,
                                              &rh->resp_dma, GFP_KERNEL);
                rh->src_xfers =
-                       kmalloc_objs(*rh->src_xfers, rh->xfer_entries,
-                                    GFP_KERNEL);
+                       kmalloc_objs(*rh->src_xfers, rh->xfer_entries);
                ret = -ENOMEM;
                if (!rh->xfer || !rh->resp || !rh->src_xfers)
                        goto err_out;
index c066bef..21b7753 100644 (file)
@@ -302,8 +302,7 @@ alloc_gid_entry(const struct ib_gid_attr *attr)
 
        ndev = rcu_dereference_protected(attr->ndev, 1);
        if (ndev) {
-               entry->ndev_storage = kzalloc_obj(*entry->ndev_storage,
-                                                 GFP_KERNEL);
+               entry->ndev_storage = kzalloc_obj(*entry->ndev_storage);
                if (!entry->ndev_storage) {
                        kfree(entry);
                        return NULL;
index e65acf9..6ab9a0a 100644 (file)
@@ -4348,8 +4348,7 @@ static int cm_add_one(struct ib_device *ib_device)
        int count = 0;
        u32 i;
 
-       cm_dev = kzalloc_flex(*cm_dev, port, ib_device->phys_port_cnt,
-                             GFP_KERNEL);
+       cm_dev = kzalloc_flex(*cm_dev, port, ib_device->phys_port_cnt);
        if (!cm_dev)
                return -ENOMEM;
 
index df6f34d..d892a59 100644 (file)
@@ -2300,8 +2300,7 @@ cma_ib_new_conn_id(const struct rdma_cm_id *listen_id,
 
        rt = &id->route;
        rt->num_pri_alt_paths = ib_event->param.req_rcvd.alternate_path ? 2 : 1;
-       rt->path_rec = kmalloc_objs(*rt->path_rec, rt->num_pri_alt_paths,
-                                   GFP_KERNEL);
+       rt->path_rec = kmalloc_objs(*rt->path_rec, rt->num_pri_alt_paths);
        if (!rt->path_rec)
                goto err;
 
@@ -2880,8 +2879,7 @@ static int route_set_path_rec_inbound(struct cma_work *work,
        struct rdma_route *route = &work->id->id.route;
 
        if (!route->path_rec_inbound) {
-               route->path_rec_inbound = kzalloc_obj(*route->path_rec_inbound,
-                                                     GFP_KERNEL);
+               route->path_rec_inbound = kzalloc_obj(*route->path_rec_inbound);
                if (!route->path_rec_inbound)
                        return -ENOMEM;
        }
@@ -2896,8 +2894,7 @@ static int route_set_path_rec_outbound(struct cma_work *work,
        struct rdma_route *route = &work->id->id.route;
 
        if (!route->path_rec_outbound) {
-               route->path_rec_outbound = kzalloc_obj(*route->path_rec_outbound,
-                                                      GFP_KERNEL);
+               route->path_rec_outbound = kzalloc_obj(*route->path_rec_outbound);
                if (!route->path_rec_outbound)
                        return -ENOMEM;
        }
index 22c83e4..4a2a463 100644 (file)
@@ -660,8 +660,7 @@ static int netdevice_queue_work(struct netdev_event_work_cmd *cmds,
                                struct net_device *ndev)
 {
        unsigned int i;
-       struct netdev_event_work *ndev_work = kmalloc_obj(*ndev_work,
-                                                         GFP_KERNEL);
+       struct netdev_event_work *ndev_work = kmalloc_obj(*ndev_work);
 
        if (!ndev_work)
                return NOTIFY_DONE;
index 5a3092a..fc45c38 100644 (file)
@@ -213,8 +213,7 @@ static int rdma_rw_init_mr_wrs_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
        int i, ret, count = 0;
        u32 nents = 0;
 
-       ctx->reg = kzalloc_objs(*ctx->reg, DIV_ROUND_UP(nr_bvec, pages_per_mr),
-                               GFP_KERNEL);
+       ctx->reg = kzalloc_objs(*ctx->reg, DIV_ROUND_UP(nr_bvec, pages_per_mr));
        if (!ctx->reg)
                return -ENOMEM;
 
@@ -222,8 +221,7 @@ static int rdma_rw_init_mr_wrs_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
         * Build scatterlist from bvecs using the iterator. This follows
         * the pattern from __blk_rq_map_sg.
         */
-       ctx->reg[0].sgt.sgl = kmalloc_objs(*ctx->reg[0].sgt.sgl, nr_bvec,
-                                          GFP_KERNEL);
+       ctx->reg[0].sgt.sgl = kmalloc_objs(*ctx->reg[0].sgt.sgl, nr_bvec);
        if (!ctx->reg[0].sgt.sgl) {
                ret = -ENOMEM;
                goto out_free_reg;
index dbd452e..c6c295f 100644 (file)
@@ -2414,8 +2414,7 @@ static int ib_sa_add_one(struct ib_device *device)
        s = rdma_start_port(device);
        e = rdma_end_port(device);
 
-       sa_dev = kzalloc_flex(*sa_dev, port, size_add(size_sub(e, s), 1),
-                             GFP_KERNEL);
+       sa_dev = kzalloc_flex(*sa_dev, port, size_add(size_sub(e, s), 1));
        if (!sa_dev)
                return -ENOMEM;
 
index d55f6a9..7f56561 100644 (file)
@@ -855,8 +855,7 @@ alloc_hw_stats_device(struct ib_device *ibdev)
         * Two extra attribue elements here, one for the lifespan entry and
         * one to NULL terminate the list for the sysfs core code
         */
-       data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1),
-                           GFP_KERNEL);
+       data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1));
        if (!data)
                goto err_free_stats;
        data->group.attrs = kzalloc_objs(*data->group.attrs,
@@ -962,12 +961,10 @@ alloc_hw_stats_port(struct ib_port *port, struct attribute_group *group)
         * Two extra attribue elements here, one for the lifespan entry and
         * one to NULL terminate the list for the sysfs core code
         */
-       data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1),
-                           GFP_KERNEL);
+       data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1));
        if (!data)
                goto err_free_stats;
-       group->attrs = kzalloc_objs(*group->attrs, stats->num_counters + 2,
-                                   GFP_KERNEL);
+       group->attrs = kzalloc_objs(*group->attrs, stats->num_counters + 2);
        if (!group->attrs)
                goto err_free_data;
 
index d9991d1..c3ef9f8 100644 (file)
@@ -1396,8 +1396,7 @@ static int ib_umad_add_one(struct ib_device *device)
        s = rdma_start_port(device);
        e = rdma_end_port(device);
 
-       umad_dev = kzalloc_flex(*umad_dev, ports, size_add(size_sub(e, s), 1),
-                               GFP_KERNEL);
+       umad_dev = kzalloc_flex(*umad_dev, ports, size_add(size_sub(e, s), 1));
        if (!umad_dev)
                return -ENOMEM;
 
index 02abeed..758ed4a 100644 (file)
@@ -3292,8 +3292,7 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
                goto err_put;
        }
 
-       flow_attr = kzalloc_flex(*flow_attr, flows, cmd.flow_attr.num_of_specs,
-                                GFP_KERNEL);
+       flow_attr = kzalloc_flex(*flow_attr, flows, cmd.flow_attr.num_of_specs);
        if (!flow_attr) {
                err = -ENOMEM;
                goto err_put;
index cd2d267..17d7cc3 100644 (file)
@@ -98,8 +98,7 @@ int bng_re_alloc_fw_channel(struct bng_re_res *res,
                goto fail;
        }
 
-       rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements,
-                                      GFP_KERNEL);
+       rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements);
        if (!rcfw->crsqe_tbl)
                goto fail;
 
index 312d885..5c5ecfa 100644 (file)
@@ -1547,8 +1547,7 @@ static int bnxt_re_create_shadow_gsi(struct bnxt_re_qp *qp,
 
        rdev = qp->rdev;
        /* Create a shadow QP to handle the QP1 traffic */
-       sqp_tbl = kzalloc_objs(*sqp_tbl, BNXT_RE_MAX_GSI_SQP_ENTRIES,
-                              GFP_KERNEL);
+       sqp_tbl = kzalloc_objs(*sqp_tbl, BNXT_RE_MAX_GSI_SQP_ENTRIES);
        if (!sqp_tbl)
                return -ENOMEM;
        rdev->gsi_ctx.sqp_tbl = sqp_tbl;
@@ -3194,8 +3193,7 @@ int bnxt_re_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
                cq->qplib_cq.dpi = &uctx->dpi;
        } else {
                cq->max_cql = min_t(u32, entries, MAX_CQL_PER_POLL);
-               cq->cql = kzalloc_objs(struct bnxt_qplib_cqe, cq->max_cql,
-                                      GFP_KERNEL);
+               cq->cql = kzalloc_objs(struct bnxt_qplib_cqe, cq->max_cql);
                if (!cq->cql) {
                        rc = -ENOMEM;
                        goto fail;
index 5a7cc3b..2d7932b 100644 (file)
@@ -688,8 +688,7 @@ int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
        srq->start_idx = 0;
        srq->last_idx = srq->hwq.max_elements - 1;
        if (!srq->hwq.is_user) {
-               srq->swq = kzalloc_objs(*srq->swq, srq->hwq.max_elements,
-                                       GFP_KERNEL);
+               srq->swq = kzalloc_objs(*srq->swq, srq->hwq.max_elements);
                if (!srq->swq) {
                        rc = -ENOMEM;
                        goto fail;
index 4ba87b0..9ee0d50 100644 (file)
@@ -968,8 +968,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res,
                goto fail;
        }
 
-       rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements,
-                                      GFP_KERNEL);
+       rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements);
        if (!rcfw->crsqe_tbl)
                goto fail;
 
index 1b9104d..0a2d9eb 100644 (file)
@@ -223,16 +223,14 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
        }
 
        if (!user) {
-               wq->sq.sw_sq = kzalloc_objs(*wq->sq.sw_sq, wq->sq.size,
-                                           GFP_KERNEL);
+               wq->sq.sw_sq = kzalloc_objs(*wq->sq.sw_sq, wq->sq.size);
                if (!wq->sq.sw_sq) {
                        ret = -ENOMEM;
                        goto free_rq_qid;//FIXME
                }
 
                if (need_rq) {
-                       wq->rq.sw_rq = kzalloc_objs(*wq->rq.sw_rq, wq->rq.size,
-                                                   GFP_KERNEL);
+                       wq->rq.sw_rq = kzalloc_objs(*wq->rq.sw_rq, wq->rq.size);
                        if (!wq->rq.sw_rq) {
                                ret = -ENOMEM;
                                goto free_sw_sq;
@@ -2246,8 +2244,7 @@ int c4iw_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *attrs,
                }
                memset(&uresp, 0, sizeof(uresp));
                if (t4_sq_onchip(&qhp->wq.sq)) {
-                       ma_sync_key_mm = kmalloc_obj(*ma_sync_key_mm,
-                                                    GFP_KERNEL);
+                       ma_sync_key_mm = kmalloc_obj(*ma_sync_key_mm);
                        if (!ma_sync_key_mm) {
                                ret = -ENOMEM;
                                goto err_free_rq_db_key;
index 51130ba..b5b93b4 100644 (file)
@@ -1374,8 +1374,7 @@ static int pbl_chunk_list_create(struct efa_dev *dev, struct pbl_context *pbl)
        chunk_list_size = DIV_ROUND_UP(page_cnt, EFA_PTRS_PER_CHUNK);
 
        chunk_list->size = chunk_list_size;
-       chunk_list->chunks = kzalloc_objs(*chunk_list->chunks, chunk_list_size,
-                                         GFP_KERNEL);
+       chunk_list->chunks = kzalloc_objs(*chunk_list->chunks, chunk_list_size);
        if (!chunk_list->chunks)
                return -ENOMEM;
 
index fdf7cec..bc61a13 100644 (file)
@@ -1882,8 +1882,7 @@ int pio_map_init(struct hfi1_devdata *dd, u8 port, u8 num_vls, u8 *vl_scontexts)
                        vl_scontexts[i] = sc_per_vl + (extra > 0 ? 1 : 0);
        }
        /* build new map */
-       newmap = kzalloc_flex(*newmap, map, roundup_pow_of_two(num_vls),
-                             GFP_KERNEL);
+       newmap = kzalloc_flex(*newmap, map, roundup_pow_of_two(num_vls));
        if (!newmap)
                goto bail;
        newmap->actual_vls = num_vls;
@@ -1897,8 +1896,7 @@ int pio_map_init(struct hfi1_devdata *dd, u8 port, u8 num_vls, u8 *vl_scontexts)
                        int sz = roundup_pow_of_two(vl_scontexts[i]);
 
                        /* only allocate once */
-                       newmap->map[i] = kzalloc_flex(*newmap->map[i], ksc, sz,
-                                                     GFP_KERNEL);
+                       newmap->map[i] = kzalloc_flex(*newmap->map[i], ksc, sz);
                        if (!newmap->map[i])
                                goto bail;
                        newmap->map[i]->mask = (1 << ilog2(sz)) - 1;
index 67ed154..a092c92 100644 (file)
@@ -52,8 +52,7 @@ int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd,
 {
        int ret = 0;
 
-       fd->entry_to_rb = kzalloc_objs(*fd->entry_to_rb, uctxt->expected_count,
-                                      GFP_KERNEL);
+       fd->entry_to_rb = kzalloc_objs(*fd->entry_to_rb, uctxt->expected_count);
        if (!fd->entry_to_rb)
                return -ENOMEM;
 
index 1d2d0d8..1148d73 100644 (file)
@@ -1153,8 +1153,7 @@ void hns_roce_handle_device_err(struct hns_roce_dev *hr_dev)
 
 static int hns_roce_alloc_dfx_cnt(struct hns_roce_dev *hr_dev)
 {
-       hr_dev->dfx_cnt = kvzalloc_objs(atomic64_t, HNS_ROCE_DFX_CNT_TOTAL,
-                                       GFP_KERNEL);
+       hr_dev->dfx_cnt = kvzalloc_objs(atomic64_t, HNS_ROCE_DFX_CNT_TOTAL);
        if (!hr_dev->dfx_cnt)
                return -ENOMEM;
 
index 59f22e8..37e2445 100644 (file)
@@ -1095,8 +1095,7 @@ int ionic_create_rdma_admin(struct ionic_ibdev *dev)
                goto out;
        }
 
-       dev->eq_vec = kmalloc_objs(*dev->eq_vec, dev->lif_cfg.eq_count,
-                                  GFP_KERNEL);
+       dev->eq_vec = kmalloc_objs(*dev->eq_vec, dev->lif_cfg.eq_count);
        if (!dev->eq_vec) {
                rc = -ENOMEM;
                goto out;
@@ -1126,8 +1125,7 @@ int ionic_create_rdma_admin(struct ionic_ibdev *dev)
 
        dev->lif_cfg.eq_count = eq_i;
 
-       dev->aq_vec = kmalloc_objs(*dev->aq_vec, dev->lif_cfg.aq_count,
-                                  GFP_KERNEL);
+       dev->aq_vec = kmalloc_objs(*dev->aq_vec, dev->lif_cfg.aq_count);
        if (!dev->aq_vec) {
                rc = -ENOMEM;
                goto out;
index 7889d76..5b3f40b 100644 (file)
@@ -1868,8 +1868,7 @@ static int ionic_qp_sq_init(struct ionic_ibdev *dev, struct ionic_ctx *ctx,
 
                ionic_queue_dbell_init(&qp->sq, qp->qpid);
 
-               qp->sq_meta = kmalloc_objs(*qp->sq_meta, (u32)qp->sq.mask + 1,
-                                          GFP_KERNEL);
+               qp->sq_meta = kmalloc_objs(*qp->sq_meta, (u32)qp->sq.mask + 1);
                if (!qp->sq_meta) {
                        rc = -ENOMEM;
                        goto err_sq_meta;
@@ -2082,8 +2081,7 @@ static int ionic_qp_rq_init(struct ionic_ibdev *dev, struct ionic_ctx *ctx,
 
                ionic_queue_dbell_init(&qp->rq, qp->qpid);
 
-               qp->rq_meta = kmalloc_objs(*qp->rq_meta, (u32)qp->rq.mask + 1,
-                                          GFP_KERNEL);
+               qp->rq_meta = kmalloc_objs(*qp->rq_meta, (u32)qp->rq.mask + 1);
                if (!qp->rq_meta) {
                        rc = -ENOMEM;
                        goto err_rq_meta;
index 03fdd2b..f72c983 100644 (file)
@@ -155,8 +155,7 @@ static int ionic_init_hw_stats(struct ionic_ibdev *dev)
        dev->hw_stats_count = hw_stats_count;
 
        /* alloc and init array of names, for alloc_hw_stats */
-       dev->hw_stats_hdrs = kzalloc_objs(*dev->hw_stats_hdrs, hw_stats_count,
-                                         GFP_KERNEL);
+       dev->hw_stats_hdrs = kzalloc_objs(*dev->hw_stats_hdrs, hw_stats_count);
        if (!dev->hw_stats_hdrs) {
                rc = -ENOMEM;
                goto err_dma;
@@ -401,8 +400,7 @@ static int ionic_alloc_counters(struct ionic_ibdev *dev)
        cs->queue_stats_count = hw_stats_count;
 
        /* alloc and init array of names */
-       cs->stats_hdrs = kzalloc_objs(*cs->stats_hdrs, hw_stats_count,
-                                     GFP_KERNEL);
+       cs->stats_hdrs = kzalloc_objs(*cs->stats_hdrs, hw_stats_count);
        if (!cs->stats_hdrs) {
                rc = -ENOMEM;
                goto err_dma;
@@ -448,8 +446,7 @@ void ionic_stats_init(struct ionic_ibdev *dev)
        }
 
        if (stats_type & IONIC_LIF_RDMA_STAT_QP) {
-               dev->counter_stats = kzalloc_obj(*dev->counter_stats,
-                                                GFP_KERNEL);
+               dev->counter_stats = kzalloc_obj(*dev->counter_stats);
                if (!dev->counter_stats)
                        return;
 
index 3627797..3d084d4 100644 (file)
@@ -1683,8 +1683,7 @@ static int irdma_add_mqh_6(struct irdma_device *iwdev,
                        ibdev_dbg(&iwdev->ibdev, "CM: IP=%pI6, vlan_id=%d, MAC=%pM\n",
                                  &ifp->addr, rdma_vlan_dev_vlan_id(ip_dev),
                                  ip_dev->dev_addr);
-                       child_listen_node = kzalloc_obj(*child_listen_node,
-                                                       GFP_KERNEL);
+                       child_listen_node = kzalloc_obj(*child_listen_node);
                        ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n",
                                  child_listen_node);
                        if (!child_listen_node) {
@@ -1772,8 +1771,7 @@ static int irdma_add_mqh_4(struct irdma_device *iwdev,
                                  "CM: Allocating child CM Listener forIP=%pI4, vlan_id=%d, MAC=%pM\n",
                                  &ifa->ifa_address, rdma_vlan_dev_vlan_id(ip_dev),
                                  ip_dev->dev_addr);
-                       child_listen_node = kzalloc_obj(*child_listen_node,
-                                                       GFP_KERNEL);
+                       child_listen_node = kzalloc_obj(*child_listen_node);
                        cm_parent_listen_node->cm_core->stats_listen_nodes_created++;
                        ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n",
                                  child_listen_node);
index 53c6054..2172a20 100644 (file)
@@ -167,8 +167,7 @@ static int icrdma_init_interrupts(struct irdma_pci_f *rf, struct iidc_rdma_core_
        int i;
 
        rf->msix_count = num_online_cpus() + IRDMA_NUM_AEQ_MSIX;
-       rf->msix_entries = kzalloc_objs(*rf->msix_entries, rf->msix_count,
-                                       GFP_KERNEL);
+       rf->msix_entries = kzalloc_objs(*rf->msix_entries, rf->msix_count);
        if (!rf->msix_entries)
                return -ENOMEM;
 
index 4035f58..b3e49e5 100644 (file)
@@ -101,8 +101,7 @@ static int ig3rdma_cfg_regions(struct irdma_hw *hw,
                return -ENOMEM;
 
        hw->num_io_regions = le16_to_cpu(idc_priv->num_memory_regions);
-       hw->io_regs = kzalloc_objs(struct irdma_mmio_region, hw->num_io_regions,
-                                  GFP_KERNEL);
+       hw->io_regs = kzalloc_objs(struct irdma_mmio_region, hw->num_io_regions);
 
        if (!hw->io_regs) {
                iounmap(hw->rdma_reg.addr);
index 2702825..15af532 100644 (file)
@@ -709,14 +709,12 @@ static int irdma_setup_kmode_qp(struct irdma_device *iwdev,
                return status;
 
        iwqp->kqp.sq_wrid_mem =
-               kzalloc_objs(*iwqp->kqp.sq_wrid_mem, ukinfo->sq_depth,
-                            GFP_KERNEL);
+               kzalloc_objs(*iwqp->kqp.sq_wrid_mem, ukinfo->sq_depth);
        if (!iwqp->kqp.sq_wrid_mem)
                return -ENOMEM;
 
        iwqp->kqp.rq_wrid_mem =
-               kzalloc_objs(*iwqp->kqp.rq_wrid_mem, ukinfo->rq_depth,
-                            GFP_KERNEL);
+               kzalloc_objs(*iwqp->kqp.rq_wrid_mem, ukinfo->rq_depth);
 
        if (!iwqp->kqp.rq_wrid_mem) {
                kfree(iwqp->kqp.sq_wrid_mem);
index e4c539d..c6e1b9e 100644 (file)
@@ -835,8 +835,7 @@ int mlx4_ib_init_alias_guid_service(struct mlx4_ib_dev *dev)
 
        if (!mlx4_is_master(dev->dev))
                return 0;
-       dev->sriov.alias_guid.sa_client = kzalloc_obj(*dev->sriov.alias_guid.sa_client,
-                                                     GFP_KERNEL);
+       dev->sriov.alias_guid.sa_client = kzalloc_obj(*dev->sriov.alias_guid.sa_client);
        if (!dev->sriov.alias_guid.sa_client)
                return -ENOMEM;
 
index 7233893..e5e7ecd 100644 (file)
@@ -1616,8 +1616,7 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx,
        if (!tun_qp->ring)
                return -ENOMEM;
 
-       tun_qp->tx_ring = kzalloc_objs(struct mlx4_ib_tun_tx_buf, nmbr_bufs,
-                                      GFP_KERNEL);
+       tun_qp->tx_ring = kzalloc_objs(struct mlx4_ib_tun_tx_buf, nmbr_bufs);
        if (!tun_qp->tx_ring) {
                kfree(tun_qp->ring);
                tun_qp->ring = NULL;
index 1109eac..6ee12aa 100644 (file)
@@ -2748,8 +2748,7 @@ static int mlx4_ib_probe(struct auxiliary_device *adev,
        if (mlx4_is_bonded(dev))
                for (i = 1; i < ibdev->num_ports ; ++i) {
                        new_counter_index =
-                                       kmalloc_obj(struct counter_index,
-                                                   GFP_KERNEL);
+                                       kmalloc_obj(struct counter_index);
                        if (!new_counter_index) {
                                err = -ENOMEM;
                                goto err_counter;
index cd9163c..b8fa4ec 100644 (file)
@@ -244,8 +244,7 @@ static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
         *      gids (operational)
         *      mcg_table
         */
-       port->dentr_ar = kzalloc_obj(struct mlx4_ib_iov_sysfs_attr_ar,
-                                    GFP_KERNEL);
+       port->dentr_ar = kzalloc_obj(struct mlx4_ib_iov_sysfs_attr_ar);
        if (!port->dentr_ar) {
                ret = -ENOMEM;
                goto err;
index d1ad889..5b4482d 100644 (file)
@@ -858,8 +858,7 @@ static int __mlx5_ib_alloc_counters(struct mlx5_ib_dev *dev,
 skip_non_qcounters:
        cnts->num_op_counters = num_op_counters;
        num_counters += num_op_counters;
-       cnts->descs = kzalloc_objs(struct rdma_stat_desc, num_counters,
-                                  GFP_KERNEL);
+       cnts->descs = kzalloc_objs(struct rdma_stat_desc, num_counters);
        if (!cnts->descs)
                return -ENOMEM;
 
@@ -1073,8 +1072,7 @@ int mlx5_ib_flow_counters_set_data(struct ib_counters *ibcounters,
                if (cntrs_data->ncounters > MAX_COUNTERS_NUM)
                        return -EINVAL;
 
-               desc_data = kzalloc_objs(*desc_data, cntrs_data->ncounters,
-                                        GFP_KERNEL);
+               desc_data = kzalloc_objs(*desc_data, cntrs_data->ncounters);
                if (!desc_data)
                        return  -ENOMEM;
 
index 2b4de32..cbccb0b 100644 (file)
@@ -3486,16 +3486,14 @@ int mlx5_ib_fs_init(struct mlx5_ib_dev *dev)
 
        for (i = 0; i < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; i++) {
                dev->flow_db->rdma_transport_rx[i] =
-                       kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports,
-                                    GFP_KERNEL);
+                       kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports);
                if (!dev->flow_db->rdma_transport_rx[i])
                        goto free_rdma_transport_rx;
        }
 
        for (j = 0; j < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; j++) {
                dev->flow_db->rdma_transport_tx[j] =
-                       kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports,
-                                    GFP_KERNEL);
+                       kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports);
                if (!dev->flow_db->rdma_transport_tx[j])
                        goto free_rdma_transport_tx;
        }
index ee74638..b2e2a21 100644 (file)
@@ -109,8 +109,7 @@ int mlx5_ib_create_gsi(struct ib_pd *pd, struct mlx5_ib_qp *mqp,
                return -ENOMEM;
 
        gsi->outstanding_wrs =
-               kzalloc_objs(*gsi->outstanding_wrs, attr->cap.max_send_wr,
-                            GFP_KERNEL);
+               kzalloc_objs(*gsi->outstanding_wrs, attr->cap.max_send_wr);
        if (!gsi->outstanding_wrs) {
                ret = -ENOMEM;
                goto err_free_tx;
index 16b4837..665323b 100644 (file)
@@ -276,8 +276,7 @@ static int add_keys(struct mlx5_cache_ent *ent, unsigned int num)
        int i;
 
        for (i = 0; i < num; i++) {
-               async_create = kzalloc_obj(struct mlx5r_async_create_mkey,
-                                          GFP_KERNEL);
+               async_create = kzalloc_obj(struct mlx5r_async_create_mkey);
                if (!async_create)
                        return -ENOMEM;
                mkc = MLX5_ADDR_OF(create_mkey_in, async_create->in,
index ccb59ac..47de8cc 100644 (file)
@@ -1185,8 +1185,7 @@ static int _create_kernel_qp(struct mlx5_ib_dev *dev,
                                        sizeof(*qp->sq.wr_data), GFP_KERNEL);
        qp->rq.wrid = kvmalloc_array(qp->rq.wqe_cnt,
                                     sizeof(*qp->rq.wrid), GFP_KERNEL);
-       qp->sq.w_list = kvmalloc_objs(*qp->sq.w_list, qp->sq.wqe_cnt,
-                                     GFP_KERNEL);
+       qp->sq.w_list = kvmalloc_objs(*qp->sq.w_list, qp->sq.wqe_cnt);
        qp->sq.wqe_head = kvmalloc_array(qp->sq.wqe_cnt,
                                         sizeof(*qp->sq.wqe_head), GFP_KERNEL);
 
index 005902d..dedc301 100644 (file)
@@ -230,8 +230,7 @@ int mthca_buf_alloc(struct mthca_dev *dev, int size, int max_direct,
                if (!dma_list)
                        return -ENOMEM;
 
-               buf->page_list = kmalloc_objs(*buf->page_list, npages,
-                                             GFP_KERNEL);
+               buf->page_list = kmalloc_objs(*buf->page_list, npages);
                if (!buf->page_list)
                        goto err_out;
 
index 38a2fec..bca9080 100644 (file)
@@ -146,8 +146,7 @@ static int mthca_buddy_init(struct mthca_buddy *buddy, int max_order)
 
        buddy->bits = kcalloc(buddy->max_order + 1, sizeof(*buddy->bits),
                              GFP_KERNEL);
-       buddy->num_free = kzalloc_objs(*buddy->num_free, (buddy->max_order + 1),
-                                      GFP_KERNEL);
+       buddy->num_free = kzalloc_objs(*buddy->num_free, (buddy->max_order + 1));
        if (!buddy->bits || !buddy->num_free)
                goto err_out;
 
index 3a88103..b62a9bf 100644 (file)
@@ -219,14 +219,12 @@ static int ocrdma_register_device(struct ocrdma_dev *dev)
 static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
 {
        mutex_init(&dev->dev_lock);
-       dev->cq_tbl = kzalloc_objs(struct ocrdma_cq *, OCRDMA_MAX_CQ,
-                                  GFP_KERNEL);
+       dev->cq_tbl = kzalloc_objs(struct ocrdma_cq *, OCRDMA_MAX_CQ);
        if (!dev->cq_tbl)
                goto alloc_err;
 
        if (dev->attr.max_qp) {
-               dev->qp_tbl = kzalloc_objs(struct ocrdma_qp *, OCRDMA_MAX_QP,
-                                          GFP_KERNEL);
+               dev->qp_tbl = kzalloc_objs(struct ocrdma_qp *, OCRDMA_MAX_QP);
                if (!dev->qp_tbl)
                        goto alloc_err;
        }
index 4498ef7..e89be2f 100644 (file)
@@ -794,8 +794,7 @@ static int ocrdma_build_pbl_tbl(struct ocrdma_dev *dev, struct ocrdma_hw_mr *mr)
        void *va;
        dma_addr_t pa;
 
-       mr->pbl_table = kzalloc_objs(struct ocrdma_pbl, mr->num_pbls,
-                                    GFP_KERNEL);
+       mr->pbl_table = kzalloc_objs(struct ocrdma_pbl, mr->num_pbls);
 
        if (!mr->pbl_table)
                return -ENOMEM;
index 81970a5..f27c28d 100644 (file)
@@ -257,14 +257,12 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
        mutex_init(&dev->port_mutex);
        spin_lock_init(&dev->desc_lock);
 
-       dev->cq_tbl = kzalloc_objs(struct pvrdma_cq *, dev->dsr->caps.max_cq,
-                                  GFP_KERNEL);
+       dev->cq_tbl = kzalloc_objs(struct pvrdma_cq *, dev->dsr->caps.max_cq);
        if (!dev->cq_tbl)
                return ret;
        spin_lock_init(&dev->cq_tbl_lock);
 
-       dev->qp_tbl = kzalloc_objs(struct pvrdma_qp *, dev->dsr->caps.max_qp,
-                                  GFP_KERNEL);
+       dev->qp_tbl = kzalloc_objs(struct pvrdma_qp *, dev->dsr->caps.max_qp);
        if (!dev->qp_tbl)
                goto err_cq_free;
        spin_lock_init(&dev->qp_tbl_lock);
@@ -984,8 +982,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
        }
 
        /* Allocate GID table */
-       dev->sgid_tbl = kzalloc_objs(union ib_gid, dev->dsr->caps.gid_tbl_len,
-                                    GFP_KERNEL);
+       dev->sgid_tbl = kzalloc_objs(union ib_gid, dev->dsr->caps.gid_tbl_len);
        if (!dev->sgid_tbl) {
                ret = -ENOMEM;
                goto err_free_uar_table;
index fb8e70e..4026715 100644 (file)
@@ -1773,8 +1773,7 @@ static int ipoib_dev_init_default(struct net_device *dev)
        ipoib_napi_add(dev);
 
        /* Allocate RX/TX "rings" to hold queued skbs */
-       priv->rx_ring = kzalloc_objs(*priv->rx_ring, ipoib_recvq_size,
-                                           GFP_KERNEL);
+       priv->rx_ring = kzalloc_objs(*priv->rx_ring, ipoib_recvq_size);
        if (!priv->rx_ring)
                goto out;
 
index 84de723..233adb1 100644 (file)
@@ -332,8 +332,7 @@ isert_alloc_login_buf(struct isert_conn *isert_conn,
 {
        int ret;
 
-       isert_conn->login_desc = kzalloc_obj(*isert_conn->login_desc,
-                                            GFP_KERNEL);
+       isert_conn->login_desc = kzalloc_obj(*isert_conn->login_desc);
        if (!isert_conn->login_desc)
                return -ENOMEM;
 
index c0cd259..f1c3b4d 100644 (file)
@@ -1364,8 +1364,7 @@ static int alloc_path_reqs(struct rtrs_clt_path *clt_path)
        enum ib_mr_type mr_type;
        int i, err = -ENOMEM;
 
-       clt_path->reqs = kzalloc_objs(*clt_path->reqs, clt_path->queue_depth,
-                                     GFP_KERNEL);
+       clt_path->reqs = kzalloc_objs(*clt_path->reqs, clt_path->queue_depth);
        if (!clt_path->reqs)
                return -ENOMEM;
 
index 59c8f72..0140bfa 100644 (file)
@@ -138,8 +138,7 @@ static int rtrs_srv_alloc_ops_ids(struct rtrs_srv_path *srv_path)
        struct rtrs_srv_op *id;
        int i, ret;
 
-       srv_path->ops_ids = kzalloc_objs(*srv_path->ops_ids, srv->queue_depth,
-                                        GFP_KERNEL);
+       srv_path->ops_ids = kzalloc_objs(*srv_path->ops_ids, srv->queue_depth);
        if (!srv_path->ops_ids)
                goto err;
 
@@ -1820,8 +1819,7 @@ static struct rtrs_srv_path *__alloc_path(struct rtrs_srv_sess *srv,
 
        srv_path->stats->srv_path = srv_path;
 
-       srv_path->dma_addr = kzalloc_objs(*srv_path->dma_addr, srv->queue_depth,
-                                         GFP_KERNEL);
+       srv_path->dma_addr = kzalloc_objs(*srv_path->dma_addr, srv->queue_depth);
        if (!srv_path->dma_addr)
                goto err_free_percpu;
 
index d90d288..e00b87a 100644 (file)
@@ -965,8 +965,7 @@ static int srpt_alloc_rw_ctxs(struct srpt_send_ioctx *ioctx,
        if (nbufs == 1) {
                ioctx->rw_ctxs = &ioctx->s_rw_ctx;
        } else {
-               ioctx->rw_ctxs = kmalloc_objs(*ioctx->rw_ctxs, nbufs,
-                                             GFP_KERNEL);
+               ioctx->rw_ctxs = kmalloc_objs(*ioctx->rw_ctxs, nbufs);
                if (!ioctx->rw_ctxs)
                        return -ENOMEM;
        }
index e1c4bf0..d60ba62 100644 (file)
@@ -3517,8 +3517,7 @@ static int arm_smmu_insert_master(struct arm_smmu_device *smmu,
        int ret = 0;
        struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(master->dev);
 
-       master->streams = kzalloc_objs(*master->streams, fwspec->num_ids,
-                                      GFP_KERNEL);
+       master->streams = kzalloc_objs(*master->streams, fwspec->num_ids);
        if (!master->streams)
                return -ENOMEM;
        master->num_streams = fwspec->num_ids;
index 341fde7..05dcb66 100644 (file)
@@ -461,8 +461,7 @@ static int tpci200_install(struct tpci200_board *tpci200)
 {
        int res;
 
-       tpci200->slots = kzalloc_objs(struct tpci200_slot, TPCI200_NB_SLOT,
-                                     GFP_KERNEL);
+       tpci200->slots = kzalloc_objs(struct tpci200_slot, TPCI200_NB_SLOT);
        if (tpci200->slots == NULL)
                return -ENOMEM;
 
index 0fb09dd..6764d64 100644 (file)
@@ -192,8 +192,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv, struct device
 
 static int alpine_msix_init(struct device_node *node, struct device_node *parent)
 {
-       struct alpine_msix_data *priv __free(kfree) = kzalloc_obj(*priv,
-                                                                 GFP_KERNEL);
+       struct alpine_msix_data *priv __free(kfree) = kzalloc_obj(*priv);
        struct resource res;
        int ret;
 
index 35aab94..d446d81 100644 (file)
@@ -238,8 +238,7 @@ static int __init bcm6345_l1_init_one(struct device_node *dn,
        else if (intc->n_words != n_words)
                return -EINVAL;
 
-       cpu = intc->cpus[idx] = kzalloc_flex(*cpu, enable_cache, n_words,
-                                            GFP_KERNEL);
+       cpu = intc->cpus[idx] = kzalloc_flex(*cpu, enable_cache, n_words);
        if (!cpu)
                return -ENOMEM;
 
index fe56c7b..54a8557 100644 (file)
@@ -242,8 +242,7 @@ static int bcm7038_l1_init_one(struct device_node *dn, unsigned int idx,
                return -EINVAL;
        }
 
-       cpu = intc->cpus[idx] = kzalloc_flex(*cpu, mask_cache, n_words,
-                                            GFP_KERNEL);
+       cpu = intc->cpus[idx] = kzalloc_flex(*cpu, mask_cache, n_words);
        if (!cpu)
                return -ENOMEM;
 
index dd6df90..a98f0ee 100644 (file)
@@ -231,8 +231,7 @@ static int bcm7120_l2_intc_probe(struct platform_device *pdev, struct device_nod
                goto out_unmap;
        }
 
-       data->l1_data = kzalloc_objs(*data->l1_data, data->num_parent_irqs,
-                                    GFP_KERNEL);
+       data->l1_data = kzalloc_objs(*data->l1_data, data->num_parent_irqs);
        if (!data->l1_data) {
                ret = -ENOMEM;
                goto out_free_l1_data;
index 9ac431a..3078381 100644 (file)
@@ -3025,8 +3025,7 @@ static int its_alloc_collections(struct its_node *its)
 {
        int i;
 
-       its->collections = kzalloc_objs(*its->collections, nr_cpu_ids,
-                                       GFP_KERNEL);
+       its->collections = kzalloc_objs(*its->collections, nr_cpu_ids);
        if (!its->collections)
                return -ENOMEM;
 
index 562d3f0..9103feb 100644 (file)
@@ -219,8 +219,7 @@ gicv5_iwb_init_bases(void __iomem *iwb_base, struct platform_device *pdev)
        unsigned int n;
        int ret;
 
-       struct gicv5_iwb_chip_data *iwb_node __free(kfree) = kzalloc_obj(*iwb_node,
-                                                                        GFP_KERNEL);
+       struct gicv5_iwb_chip_data *iwb_node __free(kfree) = kzalloc_obj(*iwb_node);
        if (!iwb_node)
                return ERR_PTR(-ENOMEM);
 
index 85fbe72..84418db 100644 (file)
@@ -349,8 +349,7 @@ static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header,
                if (count <= 0)
                        return -EINVAL;
 
-               rintc_acpi_data = kzalloc_objs(*rintc_acpi_data, count,
-                                              GFP_KERNEL);
+               rintc_acpi_data = kzalloc_objs(*rintc_acpi_data, count);
                if (!rintc_acpi_data)
                        return -ENOMEM;
        }
index b7c0403..aa28b1d 100644 (file)
@@ -1259,8 +1259,7 @@ static int __init capinc_tty_init(void)
        if (capi_ttyminors <= 0)
                capi_ttyminors = CAPINC_NR_PORTS;
 
-       capiminors = kzalloc_objs(struct capiminor *, capi_ttyminors,
-                                 GFP_KERNEL);
+       capiminors = kzalloc_objs(struct capiminor *, capi_ttyminors);
        if (!capiminors)
                return -ENOMEM;
 
index 5e29670..ccdacb6 100644 (file)
@@ -531,8 +531,7 @@ static void pm121_create_sys_fans(int loop_id)
        control = controls[param->control_id];
 
        /* Alloc & initialize state */
-       pm121_sys_state[loop_id] = kmalloc_obj(struct pm121_sys_state,
-                                              GFP_KERNEL);
+       pm121_sys_state[loop_id] = kmalloc_obj(struct pm121_sys_state);
        if (pm121_sys_state[loop_id] == NULL) {
                printk(KERN_WARNING "pm121: Memory allocation error\n");
                goto fail;
index 229be06..14089d5 100644 (file)
@@ -299,8 +299,7 @@ static void wf_smu_create_drive_fans(void)
        };
 
        /* Alloc & initialize state */
-       wf_smu_drive_fans = kmalloc_obj(struct wf_smu_drive_fans_state,
-                                       GFP_KERNEL);
+       wf_smu_drive_fans = kmalloc_obj(struct wf_smu_drive_fans_state);
        if (wf_smu_drive_fans == NULL) {
                printk(KERN_WARNING "windfarm: Memory allocation error"
                       " max fan speed\n");
@@ -380,8 +379,7 @@ static void wf_smu_create_slots_fans(void)
        };
 
        /* Alloc & initialize state */
-       wf_smu_slots_fans = kmalloc_obj(struct wf_smu_slots_fans_state,
-                                       GFP_KERNEL);
+       wf_smu_slots_fans = kmalloc_obj(struct wf_smu_slots_fans_state);
        if (wf_smu_slots_fans == NULL) {
                printk(KERN_WARNING "windfarm: Memory allocation error"
                       " max fan speed\n");
index 2f429ca..aa239cc 100644 (file)
@@ -626,8 +626,7 @@ static int persistent_read_metadata(struct dm_exception_store *store,
         */
        ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) /
                                  sizeof(struct disk_exception);
-       ps->callbacks = kvzalloc_objs(*ps->callbacks, ps->exceptions_per_area,
-                                     GFP_KERNEL);
+       ps->callbacks = kvzalloc_objs(*ps->callbacks, ps->exceptions_per_area);
        if (!ps->callbacks)
                return -ENOMEM;
 
index f31e4b8..1489fda 100644 (file)
@@ -362,8 +362,7 @@ static int init_origin_hash(void)
        for (i = 0; i < ORIGIN_HASH_SIZE; i++)
                INIT_LIST_HEAD(_origins + i);
 
-       _dm_origins = kmalloc_objs(struct list_head, ORIGIN_HASH_SIZE,
-                                  GFP_KERNEL);
+       _dm_origins = kmalloc_objs(struct list_head, ORIGIN_HASH_SIZE);
        if (!_dm_origins) {
                DMERR("unable to allocate memory for _dm_origins");
                kfree(_origins);
index 8d7edd1..ec605ac 100644 (file)
@@ -1686,8 +1686,7 @@ static int dmz_load_mapping(struct dmz_metadata *zmd)
        unsigned int bzone_id;
 
        /* Metadata block array for the chunk mapping table */
-       zmd->map_mblk = kzalloc_objs(struct dmz_mblock *, zmd->nr_map_blocks,
-                                    GFP_KERNEL);
+       zmd->map_mblk = kzalloc_objs(struct dmz_mblock *, zmd->nr_map_blocks);
        if (!zmd->map_mblk)
                return -ENOMEM;
 
index b79d1a0..ef0045d 100644 (file)
@@ -143,8 +143,7 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
        }
 
        err = -ENOMEM;
-       conf->strip_zone = kzalloc_objs(struct strip_zone, conf->nr_strip_zones,
-                                       GFP_KERNEL);
+       conf->strip_zone = kzalloc_objs(struct strip_zone, conf->nr_strip_zones);
        if (!conf->strip_zone)
                goto abort;
        conf->devlist = kzalloc(array3_size(sizeof(struct md_rdev *),
index cef705c..181400e 100644 (file)
@@ -3073,13 +3073,11 @@ static struct r1conf *setup_conf(struct mddev *mddev)
        if (!conf)
                goto abort;
 
-       conf->nr_pending = kzalloc_objs(atomic_t, BARRIER_BUCKETS_NR,
-                                       GFP_KERNEL);
+       conf->nr_pending = kzalloc_objs(atomic_t, BARRIER_BUCKETS_NR);
        if (!conf->nr_pending)
                goto abort;
 
-       conf->nr_waiting = kzalloc_objs(atomic_t, BARRIER_BUCKETS_NR,
-                                       GFP_KERNEL);
+       conf->nr_waiting = kzalloc_objs(atomic_t, BARRIER_BUCKETS_NR);
        if (!conf->nr_waiting)
                goto abort;
 
index b0c524e..7be1648 100644 (file)
@@ -1378,8 +1378,7 @@ int ppl_init_log(struct r5conf *conf)
                goto err;
 
        ppl_conf->count = conf->raid_disks;
-       ppl_conf->child_logs = kzalloc_objs(struct ppl_log, ppl_conf->count,
-                                           GFP_KERNEL);
+       ppl_conf->child_logs = kzalloc_objs(struct ppl_log, ppl_conf->count);
        if (!ppl_conf->child_logs) {
                ret = -ENOMEM;
                goto err;
index b785d12..a8e8d43 100644 (file)
@@ -7508,8 +7508,7 @@ static struct r5conf *setup_conf(struct mddev *mddev)
 #endif
        INIT_LIST_HEAD(&conf->free_list);
        INIT_LIST_HEAD(&conf->pending_list);
-       conf->pending_data = kzalloc_objs(struct r5pending_data, PENDING_IO_MAX,
-                                         GFP_KERNEL);
+       conf->pending_data = kzalloc_objs(struct r5pending_data, PENDING_IO_MAX);
        if (!conf->pending_data)
                goto abort;
        for (i = 0; i < PENDING_IO_MAX; i++)
index 8866806..abd3d21 100644 (file)
@@ -214,8 +214,7 @@ void flexcop_reset_block_300(struct flexcop_device *fc)
 struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len)
 {
        void *bus;
-       struct flexcop_device *fc = kzalloc_obj(struct flexcop_device,
-                                               GFP_KERNEL);
+       struct flexcop_device *fc = kzalloc_obj(struct flexcop_device);
        if (!fc) {
                err("no memory");
                return NULL;
index 14f7018..d753d32 100644 (file)
@@ -251,13 +251,11 @@ static int dvb_create_tsout_entity(struct dvb_device *dvbdev,
 {
        int i;
 
-       dvbdev->tsout_pads = kzalloc_objs(*dvbdev->tsout_pads, npads,
-                                         GFP_KERNEL);
+       dvbdev->tsout_pads = kzalloc_objs(*dvbdev->tsout_pads, npads);
        if (!dvbdev->tsout_pads)
                return -ENOMEM;
 
-       dvbdev->tsout_entity = kzalloc_objs(*dvbdev->tsout_entity, npads,
-                                           GFP_KERNEL);
+       dvbdev->tsout_entity = kzalloc_objs(*dvbdev->tsout_entity, npads);
        if (!dvbdev->tsout_entity)
                return -ENOMEM;
 
index de91a6e..ebb0c4b 100644 (file)
@@ -738,8 +738,7 @@ static const struct dvb_tuner_ops dib0070_ops = {
 
 struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg)
 {
-       struct dib0070_state *state = kzalloc_obj(struct dib0070_state,
-                                                 GFP_KERNEL);
+       struct dib0070_state *state = kzalloc_obj(struct dib0070_state);
        if (state == NULL)
                return NULL;
 
index f77ff44..e2a4805 100644 (file)
@@ -2638,8 +2638,7 @@ EXPORT_SYMBOL_GPL(dib0090_register);
 
 struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config)
 {
-       struct dib0090_fw_state *st = kzalloc_obj(struct dib0090_fw_state,
-                                                 GFP_KERNEL);
+       struct dib0090_fw_state *st = kzalloc_obj(struct dib0090_fw_state);
        if (st == NULL)
                return NULL;
 
index 623900e..99fb5c0 100644 (file)
@@ -872,8 +872,7 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
                                    struct i2c_adapter *i2c)
 {
        /* allocate memory for the internal state */
-       struct s5h1420_state *state = kzalloc_obj(struct s5h1420_state,
-                                                 GFP_KERNEL);
+       struct s5h1420_state *state = kzalloc_obj(struct s5h1420_state);
        u8 i;
 
        if (state == NULL)
index 21899b6..d15c55d 100644 (file)
@@ -91,8 +91,7 @@ static struct stv0900_inode *append_internal(struct stv0900_internal *internal)
                while (new_node->next_inode != NULL)
                        new_node = new_node->next_inode;
 
-               new_node->next_inode = kmalloc_obj(struct stv0900_inode,
-                                                  GFP_KERNEL);
+               new_node->next_inode = kmalloc_obj(struct stv0900_inode);
                if (new_node->next_inode != NULL)
                        new_node = new_node->next_inode;
                else
@@ -1348,8 +1347,7 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe,
                dprintk("%s: Find Internal Structure!\n", __func__);
                return STV0900_NO_ERROR;
        } else {
-               state->internal = kmalloc_obj(struct stv0900_internal,
-                                             GFP_KERNEL);
+               state->internal = kmalloc_obj(struct stv0900_internal);
                if (state->internal == NULL)
                        return STV0900_INVALID_HANDLE;
                temp_int = append_internal(state->internal);
index 8734697..1639242 100644 (file)
@@ -474,8 +474,7 @@ static int mxc_isi_probe(struct platform_device *pdev)
 
        isi->pdata = of_device_get_match_data(dev);
 
-       isi->pipes = kzalloc_objs(isi->pipes[0], isi->pdata->num_channels,
-                                 GFP_KERNEL);
+       isi->pipes = kzalloc_objs(isi->pipes[0], isi->pdata->num_channels);
        if (!isi->pipes)
                return -ENOMEM;
 
index 706684f..fe1dac1 100644 (file)
@@ -720,8 +720,7 @@ static int vsp1_video_pipeline_setup_partitions(struct vsp1_pipeline *pipe)
        }
 
        pipe->partitions = DIV_ROUND_UP(format->width, div_size);
-       pipe->part_table = kzalloc_objs(*pipe->part_table, pipe->partitions,
-                                       GFP_KERNEL);
+       pipe->part_table = kzalloc_objs(*pipe->part_table, pipe->partitions);
        if (!pipe->part_table)
                return -ENOMEM;
 
index 62efe93..685a1f7 100644 (file)
@@ -1523,8 +1523,7 @@ vidtv_psi_pmt_create_sec_for_each_pat_entry(struct vidtv_psi_table_pat *pat,
                program = program->next;
        }
 
-       pmt_secs = kzalloc_objs(struct vidtv_psi_table_pmt *, num_pmt,
-                               GFP_KERNEL);
+       pmt_secs = kzalloc_objs(struct vidtv_psi_table_pmt *, num_pmt);
        if (!pmt_secs)
                return NULL;
 
index c2078ea..15167e1 100644 (file)
@@ -287,8 +287,7 @@ static int vimc_register_devices(struct vimc_device *vimc)
                return ret;
        }
        /* allocate ent_devs */
-       vimc->ent_devs = kzalloc_objs(*vimc->ent_devs, vimc->pipe_cfg->num_ents,
-                                     GFP_KERNEL);
+       vimc->ent_devs = kzalloc_objs(*vimc->ent_devs, vimc->pipe_cfg->num_ents);
        if (!vimc->ent_devs) {
                ret = -ENOMEM;
                goto err_v4l2_unregister;
index 84f167a..803e433 100644 (file)
@@ -268,8 +268,7 @@ static const struct dvb_frontend_ops cinergyt2_fe_ops;
 
 struct dvb_frontend *cinergyt2_fe_attach(struct dvb_usb_device *d)
 {
-       struct cinergyt2_fe_state *s = kzalloc_obj(struct cinergyt2_fe_state,
-                                                  GFP_KERNEL);
+       struct cinergyt2_fe_state *s = kzalloc_obj(struct cinergyt2_fe_state);
        if (s == NULL)
                return NULL;
 
index 0f9bd7a..0d600a5 100644 (file)
@@ -323,8 +323,7 @@ static const struct dvb_frontend_ops vp702x_fe_ops;
 
 struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d)
 {
-       struct vp702x_fe_state *s = kzalloc_obj(struct vp702x_fe_state,
-                                               GFP_KERNEL);
+       struct vp702x_fe_state *s = kzalloc_obj(struct vp702x_fe_state);
        if (s == NULL)
                goto error;
 
index a6555fc..88c6786 100644 (file)
@@ -140,8 +140,7 @@ static const struct dvb_frontend_ops vp7045_fe_ops;
 
 struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
 {
-       struct vp7045_fe_state *s = kzalloc_obj(struct vp7045_fe_state,
-                                               GFP_KERNEL);
+       struct vp7045_fe_state *s = kzalloc_obj(struct vp7045_fe_state);
        if (s == NULL)
                goto error;
 
index 6b7d1fd..4d3f5f8 100644 (file)
@@ -2424,8 +2424,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
 
        hdw->control_cnt = CTRLDEF_COUNT;
        hdw->control_cnt += MPEGDEF_COUNT;
-       hdw->controls = kzalloc_objs(struct pvr2_ctrl, hdw->control_cnt,
-                                    GFP_KERNEL);
+       hdw->controls = kzalloc_objs(struct pvr2_ctrl, hdw->control_cnt);
        if (!hdw->controls) goto fail;
        hdw->hdw_desc = hdw_desc;
        hdw->ir_scheme_active = hdw->hdw_desc->ir_scheme;
index 3e8b4a3..6b37572 100644 (file)
@@ -1725,8 +1725,7 @@ int v4l2_ctrl_handler_init_class(struct v4l2_ctrl_handler *hdl,
        INIT_LIST_HEAD(&hdl->ctrls);
        INIT_LIST_HEAD(&hdl->ctrl_refs);
        hdl->nr_of_buckets = 1 + nr_of_controls_hint / 8;
-       hdl->buckets = kvzalloc_objs(hdl->buckets[0], hdl->nr_of_buckets,
-                                    GFP_KERNEL);
+       hdl->buckets = kvzalloc_objs(hdl->buckets[0], hdl->nr_of_buckets);
        hdl->error = hdl->buckets ? 0 : -ENOMEM;
        v4l2_ctrl_handler_init_request(hdl);
        return hdl->error;
index 735434d..163bade 100644 (file)
@@ -443,8 +443,7 @@ static int v4l2_flash_init_controls(struct v4l2_flash *v4l2_flash,
                return -ENOMEM;
 
        /* allocate memory dynamically so as not to exceed stack frame size */
-       ctrl_init_data = kzalloc_objs(*ctrl_init_data, NUM_FLASH_CTRLS,
-                                     GFP_KERNEL);
+       ctrl_init_data = kzalloc_objs(*ctrl_init_data, NUM_FLASH_CTRLS);
        if (!ctrl_init_data)
                return -ENOMEM;
 
index 10007cd..1beb9d3 100644 (file)
@@ -1620,8 +1620,7 @@ __v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name,
 
        /* Drivers that support streams do not need the legacy pad config */
        if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS) && sd->entity.num_pads) {
-               state->pads = kvzalloc_objs(*state->pads, sd->entity.num_pads,
-                                           GFP_KERNEL);
+               state->pads = kvzalloc_objs(*state->pads, sd->entity.num_pads);
                if (!state->pads) {
                        ret = -ENOMEM;
                        goto err;
index a4d0184..f7fc5cc 100644 (file)
@@ -396,8 +396,7 @@ mpt_lan_open(struct net_device *dev)
                goto out;
        priv->mpt_txfidx_tail = -1;
 
-       priv->SendCtl = kzalloc_objs(struct BufferControl, priv->tx_max_out,
-                                    GFP_KERNEL);
+       priv->SendCtl = kzalloc_objs(struct BufferControl, priv->tx_max_out);
        if (priv->SendCtl == NULL)
                goto out_mpt_txfidx;
        for (i = 0; i < priv->tx_max_out; i++)
@@ -410,8 +409,7 @@ mpt_lan_open(struct net_device *dev)
                goto out_SendCtl;
        priv->mpt_rxfidx_tail = -1;
 
-       priv->RcvCtl = kzalloc_objs(struct BufferControl, priv->max_buckets_out,
-                                   GFP_KERNEL);
+       priv->RcvCtl = kzalloc_objs(struct BufferControl, priv->max_buckets_out);
        if (priv->RcvCtl == NULL)
                goto out_mpt_rxfidx;
        for (i = 0; i < priv->max_buckets_out; i++)
index 8271924..d25f3ec 100644 (file)
@@ -907,8 +907,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
                 * Forming a port
                 */
                if (!port_details) {
-                       port_details = kzalloc_obj(struct mptsas_portinfo_details,
-                                                  GFP_KERNEL);
+                       port_details = kzalloc_obj(struct mptsas_portinfo_details);
                        if (!port_details)
                                goto out;
                        port_details->num_phys = 1;
index c0a3bc9..a4d9c07 100644 (file)
@@ -698,8 +698,7 @@ static int timb_probe(struct pci_dev *dev,
                goto err_config;
        }
 
-       msix_entries = kzalloc_objs(*msix_entries, TIMBERDALE_NR_IRQS,
-                                   GFP_KERNEL);
+       msix_entries = kzalloc_objs(*msix_entries, TIMBERDALE_NR_IRQS);
        if (!msix_entries)
                goto err_config;
 
index cf71f8e..4fa6c90 100644 (file)
@@ -1098,8 +1098,7 @@ exit_done:
                                /* Allocate a writable buffer for this array */
                                count = var_size[variable_id];
                                long_tmp = vars[variable_id];
-                               longptr_tmp = kzalloc_objs(long, count,
-                                                          GFP_KERNEL);
+                               longptr_tmp = kzalloc_objs(long, count);
                                vars[variable_id] = (long)longptr_tmp;
 
                                if (vars[variable_id] == 0) {
index fcf3a70..47356a5 100644 (file)
@@ -616,8 +616,7 @@ static struct fastrpc_invoke_ctx *fastrpc_context_alloc(
                        kfree(ctx);
                        return ERR_PTR(-ENOMEM);
                }
-               ctx->olaps = kzalloc_objs(*ctx->olaps, ctx->nscalars,
-                                         GFP_KERNEL);
+               ctx->olaps = kzalloc_objs(*ctx->olaps, ctx->nscalars);
                if (!ctx->olaps) {
                        kfree(ctx->maps);
                        kfree(ctx);
@@ -1306,8 +1305,7 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl,
        } inbuf;
        u32 sc;
 
-       args = kzalloc_objs(*args, FASTRPC_CREATE_STATIC_PROCESS_NARGS,
-                           GFP_KERNEL);
+       args = kzalloc_objs(*args, FASTRPC_CREATE_STATIC_PROCESS_NARGS);
        if (!args)
                return -ENOMEM;
 
index 63c7a25..9691785 100644 (file)
@@ -1046,15 +1046,13 @@ static int setup_ddcb_queue(struct genwqe_dev *cd, struct ddcb_queue *queue)
                        "[%s] **err: could not allocate DDCB **\n", __func__);
                return -ENOMEM;
        }
-       queue->ddcb_req = kzalloc_objs(struct ddcb_requ *, queue->ddcb_max,
-                                      GFP_KERNEL);
+       queue->ddcb_req = kzalloc_objs(struct ddcb_requ *, queue->ddcb_max);
        if (!queue->ddcb_req) {
                rc = -ENOMEM;
                goto free_ddcbs;
        }
 
-       queue->ddcb_waitqs = kzalloc_objs(wait_queue_head_t, queue->ddcb_max,
-                                         GFP_KERNEL);
+       queue->ddcb_waitqs = kzalloc_objs(wait_queue_head_t, queue->ddcb_max);
        if (!queue->ddcb_waitqs) {
                rc = -ENOMEM;
                goto free_requs;
index 30c24a3..48bea11 100644 (file)
@@ -42,8 +42,7 @@ static int gp_aux_bus_probe(struct pci_dev *pdev, const struct pci_device_id *id
        if (!aux_bus)
                return -ENOMEM;
 
-       aux_bus->aux_device_wrapper[0] = kzalloc_obj(*aux_bus->aux_device_wrapper[0],
-                                                    GFP_KERNEL);
+       aux_bus->aux_device_wrapper[0] = kzalloc_obj(*aux_bus->aux_device_wrapper[0]);
        if (!aux_bus->aux_device_wrapper[0])
                return -ENOMEM;
 
@@ -67,8 +66,7 @@ static int gp_aux_bus_probe(struct pci_dev *pdev, const struct pci_device_id *id
        if (retval)
                goto err_aux_dev_add_0;
 
-       aux_bus->aux_device_wrapper[1] = kzalloc_obj(*aux_bus->aux_device_wrapper[1],
-                                                    GFP_KERNEL);
+       aux_bus->aux_device_wrapper[1] = kzalloc_obj(*aux_bus->aux_device_wrapper[1]);
        if (!aux_bus->aux_device_wrapper[1]) {
                retval =  -ENOMEM;
                goto err_aux_dev_add_0;
index d11d19e..4262965 100644 (file)
@@ -133,8 +133,7 @@ static int mei_cl_irq_read_msg(struct mei_cl *cl,
                                break;
                        case MEI_EXT_HDR_GSC:
                                gsc_f2h = (struct mei_ext_hdr_gsc_f2h *)ext;
-                               cb->ext_hdr = (struct mei_ext_hdr *) kzalloc_obj(*gsc_f2h,
-                                                                                GFP_KERNEL);
+                               cb->ext_hdr = (struct mei_ext_hdr *) kzalloc_obj(*gsc_f2h);
                                if (!cb->ext_hdr) {
                                        cb->status = -ENOMEM;
                                        goto discard;
index 4e60837..15b6a8e 100644 (file)
@@ -400,8 +400,7 @@ xpc_setup_ch_structures(struct xpc_partition *part)
         * memory.
         */
        DBUG_ON(part->channels != NULL);
-       part->channels = kzalloc_objs(struct xpc_channel, XPC_MAX_NCHANNELS,
-                                     GFP_KERNEL);
+       part->channels = kzalloc_objs(struct xpc_channel, XPC_MAX_NCHANNELS);
        if (part->channels == NULL) {
                dev_err(xpc_chan, "can't get memory for channels\n");
                return xpNoMemory;
@@ -889,8 +888,7 @@ xpc_setup_partitions(void)
        short partid;
        struct xpc_partition *part;
 
-       xpc_partitions = kzalloc_objs(struct xpc_partition, xp_max_npartitions,
-                                     GFP_KERNEL);
+       xpc_partitions = kzalloc_objs(struct xpc_partition, xp_max_npartitions);
        if (xpc_partitions == NULL) {
                dev_err(xpc_part, "can't get memory for partition structure\n");
                return -ENOMEM;
index f23ec2b..772c787 100644 (file)
@@ -1073,8 +1073,7 @@ xpc_setup_msg_structures_uv(struct xpc_channel *ch)
 
        DBUG_ON(ch->flags & XPC_C_SETUP);
 
-       ch_uv->cached_notify_gru_mq_desc = kmalloc_obj(struct gru_message_queue_desc,
-                                                      GFP_KERNEL);
+       ch_uv->cached_notify_gru_mq_desc = kmalloc_obj(struct gru_message_queue_desc);
        if (ch_uv->cached_notify_gru_mq_desc == NULL)
                return xpNoMemory;
 
index e2e21d6..7e0e7b4 100644 (file)
@@ -779,8 +779,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
                newcfi = kmalloc_flex(*newcfi, chips, numvirtchips);
                if (!newcfi)
                        return -ENOMEM;
-               shared = kmalloc_objs(struct flchip_shared, cfi->numchips,
-                                     GFP_KERNEL);
+               shared = kmalloc_objs(struct flchip_shared, cfi->numchips);
                if (!shared) {
                        kfree(newcfi);
                        return -ENOMEM;
index 926bf7b..bdc04a6 100644 (file)
@@ -208,8 +208,7 @@ static int __xipram cfi_chip_setup(struct map_info *map,
        if (!num_erase_regions)
                return 0;
 
-       cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions,
-                                GFP_KERNEL);
+       cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions);
        if (!cfi->cfiq)
                return 0;
 
index d7acf04..a49ef68 100644 (file)
@@ -1985,8 +1985,7 @@ static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int in
 
        num_erase_regions = jedec_table[index].nr_regions;
 
-       cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions,
-                                GFP_KERNEL);
+       cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions);
        if (!cfi->cfiq) {
                //xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
                return 0;
index 9b8d40d..fc9185d 100644 (file)
@@ -207,8 +207,7 @@ static int build_maps(partition_t *part)
     for (i = 0; i < part->DataUnits; i++)
        part->EUNInfo[i].Offset = 0xffffffff;
     part->XferInfo =
-       kmalloc_objs(struct xfer_info_t, part->header.NumTransferUnits,
-                     GFP_KERNEL);
+       kmalloc_objs(struct xfer_info_t, part->header.NumTransferUnits);
     if (!part->XferInfo)
            goto out_EUNInfo;
 
index 4ea98e3..9eb5d91 100644 (file)
@@ -823,8 +823,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],       /* subdevices to c
                concat->mtd.erasesize = max_erasesize;
                concat->mtd.numeraseregions = num_erase_region;
                concat->mtd.eraseregions = erase_region_p =
-                   kmalloc_objs(struct mtd_erase_region_info, num_erase_region,
-                                GFP_KERNEL);
+                   kmalloc_objs(struct mtd_erase_region_info, num_erase_region);
                if (!erase_region_p) {
                        kfree(concat);
                        printk
index b8ba7d2..a412c0e 100644 (file)
@@ -106,8 +106,7 @@ static int bcm47xxpart_parse(struct mtd_info *master,
                blocksize = 0x1000;
 
        /* Alloc */
-       parts = kzalloc_objs(struct mtd_partition, BCM47XXPART_MAX_PARTS,
-                            GFP_KERNEL);
+       parts = kzalloc_objs(struct mtd_partition, BCM47XXPART_MAX_PARTS);
        if (!parts)
                return -ENOMEM;
 
index cfd9ab8..cf3bc97 100644 (file)
@@ -65,8 +65,7 @@ static int parser_trx_parse(struct mtd_info *mtd,
        if (err != 0 && err != -EINVAL)
                pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err);
 
-       parts = kzalloc_objs(struct mtd_partition, TRX_PARSER_MAX_PARTS,
-                            GFP_KERNEL);
+       parts = kzalloc_objs(struct mtd_partition, TRX_PARSER_MAX_PARTS);
        if (!parts)
                return -ENOMEM;
 
index 87432dc..ad6e9d5 100644 (file)
@@ -171,8 +171,7 @@ static int scpart_parse(struct mtd_info *master,
                goto free;
        }
 
-       parts = kzalloc_objs(*parts, of_get_child_count(ofpart_node),
-                            GFP_KERNEL);
+       parts = kzalloc_objs(*parts, of_get_child_count(ofpart_node));
        if (!parts) {
                res = -ENOMEM;
                goto free;
index 3199453..9f7efda 100644 (file)
@@ -185,8 +185,7 @@ static int scan_header(struct partition *part)
        if (!part->header_cache)
                goto err;
 
-       part->blocks = kzalloc_objs(struct block, part->total_blocks,
-                                   GFP_KERNEL);
+       part->blocks = kzalloc_objs(struct block, part->total_blocks);
        if (!part->blocks)
                goto err;
 
index 512012f..c803275 100644 (file)
@@ -78,8 +78,7 @@ static struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl)
 
 
        /* Create array of pointers to the attributes */
-       attributes = kzalloc_objs(struct attribute *, NUM_ATTRIBUTES + 1,
-                                 GFP_KERNEL);
+       attributes = kzalloc_objs(struct attribute *, NUM_ATTRIBUTES + 1);
        if (!attributes)
                goto error3;
        attributes[0] = &vendor_attribute->dev_attr.attr;
index 35e0473..f0c549e 100644 (file)
@@ -1550,15 +1550,13 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap,
                if (!vol)
                        continue;
 
-               scan_eba[i] = kmalloc_objs(**scan_eba, vol->reserved_pebs,
-                                          GFP_KERNEL);
+               scan_eba[i] = kmalloc_objs(**scan_eba, vol->reserved_pebs);
                if (!scan_eba[i]) {
                        ret = -ENOMEM;
                        goto out_free;
                }
 
-               fm_eba[i] = kmalloc_objs(**fm_eba, vol->reserved_pebs,
-                                        GFP_KERNEL);
+               fm_eba[i] = kmalloc_objs(**fm_eba, vol->reserved_pebs);
                if (!fm_eba[i]) {
                        ret = -ENOMEM;
                        kfree(scan_eba[i]);
index 93b7f38..a1de08e 100644 (file)
@@ -1723,8 +1723,7 @@ static struct slave *bond_alloc_slave(struct bonding *bond,
                return NULL;
 
        if (BOND_MODE(bond) == BOND_MODE_8023AD) {
-               SLAVE_AD_INFO(slave) = kzalloc_obj(struct ad_slave_info,
-                                                  GFP_KERNEL);
+               SLAVE_AD_INFO(slave) = kzalloc_obj(struct ad_slave_info);
                if (!SLAVE_AD_INFO(slave)) {
                        kobject_put(&slave->kobj);
                        return NULL;
@@ -5097,8 +5096,7 @@ int bond_update_slave_arr(struct bonding *bond, struct slave *skipslave)
 
        might_sleep();
 
-       usable_slaves = kzalloc_flex(*usable_slaves, arr, bond->slave_cnt,
-                                    GFP_KERNEL);
+       usable_slaves = kzalloc_flex(*usable_slaves, arr, bond->slave_cnt);
        all_slaves = kzalloc_flex(*all_slaves, arr, bond->slave_cnt);
        if (!usable_slaves || !all_slaves) {
                ret = -ENOMEM;
index 0904323..84cf8e7 100644 (file)
@@ -1539,8 +1539,7 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
        ocelot->npi_xtr_prefix  = OCELOT_TAG_PREFIX_SHORT;
        ocelot->devlink         = felix->ds->devlink;
 
-       port_phy_modes = kzalloc_objs(phy_interface_t, num_phys_ports,
-                                     GFP_KERNEL);
+       port_phy_modes = kzalloc_objs(phy_interface_t, num_phys_ports);
        if (!port_phy_modes)
                return -ENOMEM;
 
index c1dd9cc..f858050 100644 (file)
@@ -82,8 +82,7 @@ static int sja1105_setup_devlink_regions(struct dsa_switch *ds)
        struct devlink_region *region;
        u64 size;
 
-       priv->regions = kzalloc_objs(struct devlink_region *, num_regions,
-                                    GFP_KERNEL);
+       priv->regions = kzalloc_objs(struct devlink_region *, num_regions);
        if (!priv->regions)
                return -ENOMEM;
 
index 58dc566..911808a 100644 (file)
@@ -2043,13 +2043,11 @@ static int pcnet32_alloc_ring(struct net_device *dev, const char *name)
        if (!lp->rx_dma_addr)
                return -ENOMEM;
 
-       lp->tx_skbuff = kzalloc_objs(struct sk_buff *, lp->tx_ring_size,
-                                    GFP_KERNEL);
+       lp->tx_skbuff = kzalloc_objs(struct sk_buff *, lp->tx_ring_size);
        if (!lp->tx_skbuff)
                return -ENOMEM;
 
-       lp->rx_skbuff = kzalloc_objs(struct sk_buff *, lp->rx_ring_size,
-                                    GFP_KERNEL);
+       lp->rx_skbuff = kzalloc_objs(struct sk_buff *, lp->rx_ring_size);
        if (!lp->rx_skbuff)
                return -ENOMEM;
 
index 2b2de6e..b51f320 100644 (file)
@@ -417,8 +417,7 @@ static struct xge_desc_ring *xge_create_desc_ring(struct net_device *ndev)
        if (!ring->desc_addr)
                goto err;
 
-       ring->pkt_info = kzalloc_objs(*ring->pkt_info, XGENE_ENET_NUM_DESC,
-                                     GFP_KERNEL);
+       ring->pkt_info = kzalloc_objs(*ring->pkt_info, XGENE_ENET_NUM_DESC);
        if (!ring->pkt_info)
                goto err;
 
index 05af577..9df8918 100644 (file)
@@ -1130,8 +1130,7 @@ static void aq_ptp_gpio_init(struct ptp_clock_info *info,
        if (!info->n_pins)
                return;
 
-       info->pin_config = kzalloc_objs(struct ptp_pin_desc, info->n_pins,
-                                       GFP_KERNEL);
+       info->pin_config = kzalloc_objs(struct ptp_pin_desc, info->n_pins);
 
        if (!info->pin_config)
                return;
index 612abed..b368ec2 100644 (file)
@@ -689,8 +689,7 @@ static int bcmasp_alloc_buffers(struct bcmasp_intf *intf)
        if (!intf->tx_spb_cpu)
                goto free_rx_edpkt_dma;
 
-       intf->tx_cbs = kzalloc_objs(struct bcmasp_tx_cb, DESC_RING_COUNT,
-                                   GFP_KERNEL);
+       intf->tx_cbs = kzalloc_objs(struct bcmasp_tx_cb, DESC_RING_COUNT);
        if (!intf->tx_cbs)
                goto free_tx_spb_dma;
 
index 00408af..7ef1bab 100644 (file)
@@ -981,8 +981,7 @@ static int bcm_enet_open(struct net_device *dev)
        priv->tx_desc_alloc_size = size;
        priv->tx_desc_cpu = p;
 
-       priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size,
-                                   GFP_KERNEL);
+       priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size);
        if (!priv->tx_skb) {
                ret = -ENOMEM;
                goto out_free_tx_ring;
@@ -2149,8 +2148,7 @@ static int bcm_enetsw_open(struct net_device *dev)
        priv->tx_desc_alloc_size = size;
        priv->tx_desc_cpu = p;
 
-       priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size,
-                                   GFP_KERNEL);
+       priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size);
        if (!priv->tx_skb) {
                dev_err(kdev, "cannot allocate tx skb queue\n");
                ret = -ENOMEM;
index 3594496..4d06c6b 100644 (file)
@@ -1665,8 +1665,7 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
        priv->rx_bds = priv->base + SYS_PORT_RDMA_OFFSET;
        priv->rx_c_index = 0;
        priv->rx_read_ptr = 0;
-       priv->rx_cbs = kzalloc_objs(struct bcm_sysport_cb, priv->num_rx_bds,
-                                   GFP_KERNEL);
+       priv->rx_cbs = kzalloc_objs(struct bcm_sysport_cb, priv->num_rx_bds);
        if (!priv->rx_cbs) {
                netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
                return -ENOMEM;
index 8c09968..a20dc3c 100644 (file)
@@ -509,8 +509,7 @@ static int bnge_alloc_tpa_info(struct bnge_net *bn)
        for (i = 0; i < bd->rx_nr_rings; i++) {
                struct bnge_rx_ring_info *rxr = &bn->rx_ring[i];
 
-               rxr->rx_tpa = kzalloc_objs(struct bnge_tpa_info, bn->max_tpa,
-                                          GFP_KERNEL);
+               rxr->rx_tpa = kzalloc_objs(struct bnge_tpa_info, bn->max_tpa);
                if (!rxr->rx_tpa)
                        goto err_free_tpa_info;
 
@@ -522,8 +521,7 @@ static int bnge_alloc_tpa_info(struct bnge_net *bn)
                                goto err_free_tpa_info;
                        rxr->rx_tpa[j].agg_arr = agg;
                }
-               rxr->rx_tpa_idx_map = kzalloc_obj(*rxr->rx_tpa_idx_map,
-                                                 GFP_KERNEL);
+               rxr->rx_tpa_idx_map = kzalloc_obj(*rxr->rx_tpa_idx_map);
                if (!rxr->rx_tpa_idx_map)
                        goto err_free_tpa_info;
        }
@@ -812,8 +810,7 @@ static int bnge_alloc_vnics(struct bnge_net *bn)
         */
        num_vnics = 1;
 
-       bn->vnic_info = kzalloc_objs(struct bnge_vnic_info, num_vnics,
-                                    GFP_KERNEL);
+       bn->vnic_info = kzalloc_objs(struct bnge_vnic_info, num_vnics);
        if (!bn->vnic_info)
                return -ENOMEM;
 
@@ -840,8 +837,7 @@ static int bnge_init_ring_grps(struct bnge_net *bn)
        struct bnge_dev *bd = bn->bd;
        int i;
 
-       bn->grp_info = kzalloc_objs(struct bnge_ring_grp_info, bd->nq_nr_rings,
-                                   GFP_KERNEL);
+       bn->grp_info = kzalloc_objs(struct bnge_ring_grp_info, bd->nq_nr_rings);
        if (!bn->grp_info)
                return -ENOMEM;
        for (i = 0; i < bd->nq_nr_rings; i++) {
@@ -901,8 +897,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
                nqr->ring_struct.ring_mem.flags = BNGE_RMEM_RING_PTE_FLAG;
        }
 
-       bn->rx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd->rx_nr_rings,
-                                  GFP_KERNEL);
+       bn->rx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd->rx_nr_rings);
        if (!bn->rx_ring)
                goto err_free_core;
 
@@ -917,8 +912,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
                bn->bnapi[i]->rx_ring = &bn->rx_ring[i];
        }
 
-       bn->tx_ring = kzalloc_objs(struct bnge_tx_ring_info, bd->tx_nr_rings,
-                                  GFP_KERNEL);
+       bn->tx_ring = kzalloc_objs(struct bnge_tx_ring_info, bd->tx_nr_rings);
        if (!bn->tx_ring)
                goto err_free_core;
 
index 2950a80..94f15e0 100644 (file)
@@ -158,8 +158,7 @@ static int bnge_alloc_ctx_pg_tbls(struct bnge_dev *bd,
                int nr_tbls, i;
 
                rmem->depth = 2;
-               ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES,
-                                                 GFP_KERNEL);
+               ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES);
                if (!ctx_pg->ctx_pg_tbl)
                        return -ENOMEM;
                nr_tbls = DIV_ROUND_UP(ctx_pg->nr_pages, MAX_CTX_PAGES);
index 942a33a..8c3dd73 100644 (file)
@@ -4761,14 +4761,12 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp)
        bp->fp = fp;
 
        /* allocate sp objs */
-       bp->sp_objs = kzalloc_objs(struct bnx2x_sp_objs, bp->fp_array_size,
-                                  GFP_KERNEL);
+       bp->sp_objs = kzalloc_objs(struct bnx2x_sp_objs, bp->fp_array_size);
        if (!bp->sp_objs)
                goto alloc_err;
 
        /* allocate fp_stats */
-       bp->fp_stats = kzalloc_objs(struct bnx2x_fp_stats, bp->fp_array_size,
-                                   GFP_KERNEL);
+       bp->fp_stats = kzalloc_objs(struct bnx2x_fp_stats, bp->fp_array_size);
        if (!bp->fp_stats)
                goto alloc_err;
 
@@ -4777,8 +4775,7 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp)
                BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS + CNIC_SUPPORT(bp);
        BNX2X_DEV_INFO("txq_array_size %d", txq_array_size);
 
-       bp->bnx2x_txq = kzalloc_objs(struct bnx2x_fp_txdata, txq_array_size,
-                                    GFP_KERNEL);
+       bp->bnx2x_txq = kzalloc_objs(struct bnx2x_fp_txdata, txq_array_size);
        if (!bp->bnx2x_txq)
                goto alloc_err;
 
index 8120caf..da0f8c3 100644 (file)
@@ -8396,8 +8396,7 @@ int bnx2x_alloc_mem(struct bnx2x *bp)
                        goto alloc_mem_err;
                allocated += bp->context[i].size;
        }
-       bp->ilt->lines = kzalloc_objs(struct ilt_line, ILT_MAX_LINES,
-                                     GFP_KERNEL);
+       bp->ilt->lines = kzalloc_objs(struct ilt_line, ILT_MAX_LINES);
        if (!bp->ilt->lines)
                goto alloc_mem_err;
 
index 605a785..b638f94 100644 (file)
@@ -551,8 +551,7 @@ int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf,
        else
                set_bit(RAMROD_COMP_WAIT, &mcast.ramrod_flags);
        if (mc_num) {
-               mc = kzalloc_objs(struct bnx2x_mcast_list_elem, mc_num,
-                                 GFP_KERNEL);
+               mc = kzalloc_objs(struct bnx2x_mcast_list_elem, mc_num);
                if (!mc) {
                        BNX2X_ERR("Cannot Configure multicasts due to lack of memory\n");
                        return -ENOMEM;
@@ -1247,8 +1246,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
           num_vfs_param, iov->nr_virtfn);
 
        /* allocate the vf array */
-       bp->vfdb->vfs = kzalloc_objs(struct bnx2x_virtf, BNX2X_NR_VIRTFN(bp),
-                                    GFP_KERNEL);
+       bp->vfdb->vfs = kzalloc_objs(struct bnx2x_virtf, BNX2X_NR_VIRTFN(bp));
        if (!bp->vfdb->vfs) {
                BNX2X_ERR("failed to allocate vf array\n");
                err = -ENOMEM;
index 37c02ed..c2f05a9 100644 (file)
@@ -3752,8 +3752,7 @@ static int bnxt_alloc_one_tpa_info(struct bnxt *bp,
        struct rx_agg_cmp *agg;
        int i;
 
-       rxr->rx_tpa = kzalloc_objs(struct bnxt_tpa_info, bp->max_tpa,
-                                  GFP_KERNEL);
+       rxr->rx_tpa = kzalloc_objs(struct bnxt_tpa_info, bp->max_tpa);
        if (!rxr->rx_tpa)
                return -ENOMEM;
 
@@ -4083,8 +4082,7 @@ static int bnxt_alloc_cp_arrays(struct bnxt_cp_ring_info *cpr, int n)
        cpr->cp_desc_ring = kzalloc_objs(*cpr->cp_desc_ring, n);
        if (!cpr->cp_desc_ring)
                return -ENOMEM;
-       cpr->cp_desc_mapping = kzalloc_objs(*cpr->cp_desc_mapping, n,
-                                           GFP_KERNEL);
+       cpr->cp_desc_mapping = kzalloc_objs(*cpr->cp_desc_mapping, n);
        if (!cpr->cp_desc_mapping)
                return -ENOMEM;
        return 0;
@@ -4664,8 +4662,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)
        if (BNXT_CHIP_TYPE_NITRO_A0(bp))
                num_vnics++;
 
-       bp->vnic_info = kzalloc_objs(struct bnxt_vnic_info, num_vnics,
-                                    GFP_KERNEL);
+       bp->vnic_info = kzalloc_objs(struct bnxt_vnic_info, num_vnics);
        if (!bp->vnic_info)
                return -ENOMEM;
 
@@ -9043,8 +9040,7 @@ static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp,
                int nr_tbls, i;
 
                rmem->depth = 2;
-               ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES,
-                                                 GFP_KERNEL);
+               ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES);
                if (!ctx_pg->ctx_pg_tbl)
                        return -ENOMEM;
                nr_tbls = DIV_ROUND_UP(ctx_pg->nr_pages, MAX_CTX_PAGES);
index e0b9b55..e1e82a7 100644 (file)
@@ -333,8 +333,7 @@ void bnxt_ulp_irq_restart(struct bnxt *bp, int err)
                        return;
 
                if (!err) {
-                       ent = kzalloc_objs(*ent, ulp->msix_requested,
-                                          GFP_KERNEL);
+                       ent = kzalloc_objs(*ent, ulp->msix_requested);
                        if (!ent)
                                return;
                        bnxt_fill_msix_vecs(bp, ent);
index 7fb78df..51addf8 100644 (file)
@@ -1261,13 +1261,11 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
                        cp->fcoe_init_cid = 0x10;
        }
 
-       cp->iscsi_tbl = kzalloc_objs(struct cnic_iscsi, MAX_ISCSI_TBL_SZ,
-                                    GFP_KERNEL);
+       cp->iscsi_tbl = kzalloc_objs(struct cnic_iscsi, MAX_ISCSI_TBL_SZ);
        if (!cp->iscsi_tbl)
                goto error;
 
-       cp->ctx_tbl = kzalloc_objs(struct cnic_context, cp->max_cid_space,
-                                  GFP_KERNEL);
+       cp->ctx_tbl = kzalloc_objs(struct cnic_context, cp->max_cid_space);
        if (!cp->ctx_tbl)
                goto error;
 
@@ -4105,8 +4103,7 @@ static int cnic_cm_alloc_mem(struct cnic_dev *dev)
        u32 port_id;
        int i;
 
-       cp->csk_tbl = kvzalloc_objs(struct cnic_sock, MAX_CM_SK_TBL_SZ,
-                                   GFP_KERNEL);
+       cp->csk_tbl = kvzalloc_objs(struct cnic_sock, MAX_CM_SK_TBL_SZ);
        if (!cp->csk_tbl)
                return -ENOMEM;
 
index a6f8805..a71cd72 100644 (file)
@@ -3083,8 +3083,7 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv, bool flush_rx)
        /* Initialize common Rx ring structures */
        priv->rx_bds = priv->base + priv->hw_params->rdma_offset;
        priv->num_rx_bds = TOTAL_DESC;
-       priv->rx_cbs = kzalloc_objs(struct enet_cb, priv->num_rx_bds,
-                                   GFP_KERNEL);
+       priv->rx_cbs = kzalloc_objs(struct enet_cb, priv->num_rx_bds);
        if (!priv->rx_cbs)
                return -ENOMEM;
 
@@ -3096,8 +3095,7 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv, bool flush_rx)
        /* Initialize common TX ring structures */
        priv->tx_bds = priv->base + priv->hw_params->tdma_offset;
        priv->num_tx_bds = TOTAL_DESC;
-       priv->tx_cbs = kzalloc_objs(struct enet_cb, priv->num_tx_bds,
-                                   GFP_KERNEL);
+       priv->tx_cbs = kzalloc_objs(struct enet_cb, priv->num_tx_bds);
        if (!priv->tx_cbs) {
                kfree(priv->rx_cbs);
                return -ENOMEM;
index 4787ea6..a8dca32 100644 (file)
@@ -642,8 +642,7 @@ static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
         * And context table
         */
 
-       d->sbdma_ctxtable = kzalloc_objs(*d->sbdma_ctxtable, d->sbdma_maxdescr,
-                                        GFP_KERNEL);
+       d->sbdma_ctxtable = kzalloc_objs(*d->sbdma_ctxtable, d->sbdma_maxdescr);
 
 #ifdef CONFIG_SBMAC_COALESCE
        /*
index 5018cc5..5743c9a 100644 (file)
@@ -1345,8 +1345,7 @@ bnad_mem_alloc(struct bnad *bnad,
                return 0;
        }
 
-       mem_info->mdl = kzalloc_objs(struct bna_mem_descr, mem_info->num,
-                                    GFP_KERNEL);
+       mem_info->mdl = kzalloc_objs(struct bna_mem_descr, mem_info->num);
        if (mem_info->mdl == NULL)
                return -ENOMEM;
 
index 283948d..ef5174e 100644 (file)
@@ -729,8 +729,7 @@ static int xgmac_dma_desc_rings_init(struct net_device *dev)
 
        netdev_dbg(priv->dev, "mtu [%d] bfsize [%d]\n", dev->mtu, bfsize);
 
-       priv->rx_skbuff = kzalloc_objs(struct sk_buff *, DMA_RX_RING_SZ,
-                                      GFP_KERNEL);
+       priv->rx_skbuff = kzalloc_objs(struct sk_buff *, DMA_RX_RING_SZ);
        if (!priv->rx_skbuff)
                return -ENOMEM;
 
@@ -742,8 +741,7 @@ static int xgmac_dma_desc_rings_init(struct net_device *dev)
        if (!priv->dma_rx)
                goto err_dma_rx;
 
-       priv->tx_skbuff = kzalloc_objs(struct sk_buff *, DMA_TX_RING_SZ,
-                                      GFP_KERNEL);
+       priv->tx_skbuff = kzalloc_objs(struct sk_buff *, DMA_TX_RING_SZ);
        if (!priv->tx_skbuff)
                goto err_tx_skb;
 
index a74d020..6062497 100644 (file)
@@ -107,10 +107,8 @@ int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_iqs)
        /* allocate memory to store virtual and dma base address of
         * per glist consistent memory
         */
-       lio->glists_virt_base = kzalloc_objs(*lio->glists_virt_base, num_iqs,
-                                            GFP_KERNEL);
-       lio->glists_dma_base = kzalloc_objs(*lio->glists_dma_base, num_iqs,
-                                           GFP_KERNEL);
+       lio->glists_virt_base = kzalloc_objs(*lio->glists_virt_base, num_iqs);
+       lio->glists_dma_base = kzalloc_objs(*lio->glists_dma_base, num_iqs);
 
        if (!lio->glists_virt_base || !lio->glists_dma_base) {
                lio_delete_glists(lio);
index 7db3dbc..0092bc1 100644 (file)
@@ -2254,8 +2254,7 @@ int cxgb4_init_ethtool_filters(struct adapter *adap)
        if (!eth_filter)
                return -ENOMEM;
 
-       eth_filter_info = kzalloc_objs(*eth_filter_info, adap->params.nports,
-                                      GFP_KERNEL);
+       eth_filter_info = kzalloc_objs(*eth_filter_info, adap->params.nports);
        if (!eth_filter_info) {
                ret = -ENOMEM;
                goto free_eth_filter;
index 701936b..0055ca7 100644 (file)
@@ -5021,8 +5021,7 @@ static int adap_init0(struct adapter *adap, int vpd_skip)
        adap->sge.egr_sz = val[0] - adap->sge.egr_start + 1;
        adap->sge.ingr_sz = val[1] - adap->sge.ingr_start + 1;
 
-       adap->sge.egr_map = kzalloc_objs(*adap->sge.egr_map, adap->sge.egr_sz,
-                                        GFP_KERNEL);
+       adap->sge.egr_map = kzalloc_objs(*adap->sge.egr_map, adap->sge.egr_sz);
        if (!adap->sge.egr_map) {
                ret = -ENOMEM;
                goto bye;
index 104d92a..bc29043 100644 (file)
@@ -535,8 +535,7 @@ int cxgb4_init_tc_matchall(struct adapter *adap)
        if (!tc_matchall)
                return -ENOMEM;
 
-       tc_port_matchall = kzalloc_objs(*tc_port_matchall, adap->params.nports,
-                                       GFP_KERNEL);
+       tc_port_matchall = kzalloc_objs(*tc_port_matchall, adap->params.nports);
        if (!tc_port_matchall) {
                ret = -ENOMEM;
                goto out_free_matchall;
index 724cd8b..b826eb2 100644 (file)
@@ -658,8 +658,7 @@ int cxgb4_init_tc_mqprio(struct adapter *adap)
        if (!tc_mqprio)
                return -ENOMEM;
 
-       tc_port_mqprio = kzalloc_objs(*tc_port_mqprio, adap->params.nports,
-                                     GFP_KERNEL);
+       tc_port_mqprio = kzalloc_objs(*tc_port_mqprio, adap->params.nports);
        if (!tc_port_mqprio) {
                ret = -ENOMEM;
                goto out_free_mqprio;
@@ -670,8 +669,7 @@ int cxgb4_init_tc_mqprio(struct adapter *adap)
        tc_mqprio->port_mqprio = tc_port_mqprio;
        for (i = 0; i < adap->params.nports; i++) {
                port_mqprio = &tc_mqprio->port_mqprio[i];
-               eosw_txq = kzalloc_objs(*eosw_txq, adap->tids.neotids,
-                                       GFP_KERNEL);
+               eosw_txq = kzalloc_objs(*eosw_txq, adap->tids.neotids);
                if (!eosw_txq) {
                        ret = -ENOMEM;
                        goto out_free_ports;
index 1b91c34..23244cd 100644 (file)
@@ -488,8 +488,7 @@ setup_sge_txq_uld(struct adapter *adap, unsigned int uld_type,
                i = min_t(int, uld_info->ntxq, num_online_cpus());
                txq_info->ntxq = roundup(i, adap->params.nports);
        }
-       txq_info->uldtxq = kzalloc_objs(struct sge_uld_txq, txq_info->ntxq,
-                                       GFP_KERNEL);
+       txq_info->uldtxq = kzalloc_objs(struct sge_uld_txq, txq_info->ntxq);
        if (!txq_info->uldtxq) {
                kfree(txq_info);
                return -ENOMEM;
@@ -528,13 +527,11 @@ int t4_uld_mem_alloc(struct adapter *adap)
        if (!adap->uld)
                return -ENOMEM;
 
-       s->uld_rxq_info = kzalloc_objs(struct sge_uld_rxq_info *, CXGB4_ULD_MAX,
-                                      GFP_KERNEL);
+       s->uld_rxq_info = kzalloc_objs(struct sge_uld_rxq_info *, CXGB4_ULD_MAX);
        if (!s->uld_rxq_info)
                goto err_uld;
 
-       s->uld_txq_info = kzalloc_objs(struct sge_uld_txq_info *, CXGB4_TX_MAX,
-                                      GFP_KERNEL);
+       s->uld_txq_info = kzalloc_objs(struct sge_uld_txq_info *, CXGB4_TX_MAX);
        if (!s->uld_txq_info)
                goto err_uld_rx;
        return 0;
index 2b812dd..bfc76b5 100644 (file)
@@ -2473,18 +2473,15 @@ static int enic_alloc_enic_resources(struct enic *enic)
        if (!enic->napi)
                goto free_queues;
 
-       enic->msix_entry = kzalloc_objs(struct msix_entry, enic->intr_avail,
-                                       GFP_KERNEL);
+       enic->msix_entry = kzalloc_objs(struct msix_entry, enic->intr_avail);
        if (!enic->msix_entry)
                goto free_queues;
 
-       enic->msix = kzalloc_objs(struct enic_msix_entry, enic->intr_avail,
-                                 GFP_KERNEL);
+       enic->msix = kzalloc_objs(struct enic_msix_entry, enic->intr_avail);
        if (!enic->msix)
                goto free_queues;
 
-       enic->intr = kzalloc_objs(struct vnic_intr, enic->intr_avail,
-                                 GFP_KERNEL);
+       enic->intr = kzalloc_objs(struct vnic_intr, enic->intr_avail);
        if (!enic->intr)
                goto free_queues;
 
index 4940b40..ed302f5 100644 (file)
@@ -4685,13 +4685,11 @@ static int be_if_create(struct be_adapter *adapter)
        if (!adapter->pmac_id)
                return -ENOMEM;
 
-       adapter->mc_list = kzalloc_objs(*adapter->mc_list, be_max_mc(adapter),
-                                       GFP_KERNEL);
+       adapter->mc_list = kzalloc_objs(*adapter->mc_list, be_max_mc(adapter));
        if (!adapter->mc_list)
                return -ENOMEM;
 
-       adapter->uc_list = kzalloc_objs(*adapter->uc_list, be_max_uc(adapter),
-                                       GFP_KERNEL);
+       adapter->uc_list = kzalloc_objs(*adapter->uc_list, be_max_uc(adapter));
        if (!adapter->uc_list)
                return -ENOMEM;
 
index b91687c..91adbb5 100644 (file)
@@ -3408,15 +3408,13 @@ static int dpaa2_switch_probe(struct fsl_mc_device *sw_dev)
        if (err)
                goto err_free_cmdport;
 
-       ethsw->ports = kzalloc_objs(*ethsw->ports, ethsw->sw_attr.num_ifs,
-                                   GFP_KERNEL);
+       ethsw->ports = kzalloc_objs(*ethsw->ports, ethsw->sw_attr.num_ifs);
        if (!(ethsw->ports)) {
                err = -ENOMEM;
                goto err_teardown;
        }
 
-       ethsw->fdbs = kzalloc_objs(*ethsw->fdbs, ethsw->sw_attr.num_ifs,
-                                  GFP_KERNEL);
+       ethsw->fdbs = kzalloc_objs(*ethsw->fdbs, ethsw->sw_attr.num_ifs);
        if (!ethsw->fdbs) {
                err = -ENOMEM;
                goto err_free_ports;
index 7cad3da..7076839 100644 (file)
@@ -2562,8 +2562,7 @@ int enetc_alloc_si_resources(struct enetc_ndev_priv *priv)
 {
        struct enetc_si *si = priv->si;
 
-       priv->cls_rules = kzalloc_objs(*priv->cls_rules, si->num_fs_entries,
-                                      GFP_KERNEL);
+       priv->cls_rules = kzalloc_objs(*priv->cls_rules, si->num_fs_entries);
        if (!priv->cls_rules)
                return -ENOMEM;
 
index a363817..c0a495e 100644 (file)
@@ -413,8 +413,7 @@ static int gfar_alloc_tx_queues(struct gfar_private *priv)
        int i;
 
        for (i = 0; i < priv->num_tx_queues; i++) {
-               priv->tx_queue[i] = kzalloc_obj(struct gfar_priv_tx_q,
-                                               GFP_KERNEL);
+               priv->tx_queue[i] = kzalloc_obj(struct gfar_priv_tx_q);
                if (!priv->tx_queue[i])
                        return -ENOMEM;
 
@@ -431,8 +430,7 @@ static int gfar_alloc_rx_queues(struct gfar_private *priv)
        int i;
 
        for (i = 0; i < priv->num_rx_queues; i++) {
-               priv->rx_queue[i] = kzalloc_obj(struct gfar_priv_rx_q,
-                                               GFP_KERNEL);
+               priv->rx_queue[i] = kzalloc_obj(struct gfar_priv_rx_q);
                if (!priv->rx_queue[i])
                        return -ENOMEM;
 
index 08f55f4..dc2213b 100644 (file)
@@ -176,8 +176,7 @@ gve_get_ethtool_stats(struct net_device *netdev,
        priv = netdev_priv(netdev);
        num_tx_queues = gve_num_tx_queues(priv);
        report_stats = priv->stats_report->stats;
-       rx_qid_to_stats_idx = kmalloc_objs(int, priv->rx_cfg.num_queues,
-                                          GFP_KERNEL);
+       rx_qid_to_stats_idx = kmalloc_objs(int, priv->rx_cfg.num_queues);
        if (!rx_qid_to_stats_idx)
                return;
        for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
index 4eebbeb..9d4ef4d 100644 (file)
@@ -666,8 +666,7 @@ static int gve_setup_device_resources(struct gve_priv *priv)
        }
 
        if (!gve_is_gqi(priv)) {
-               priv->ptype_lut_dqo = kvzalloc_obj(*priv->ptype_lut_dqo,
-                                                  GFP_KERNEL);
+               priv->ptype_lut_dqo = kvzalloc_obj(*priv->ptype_lut_dqo);
                if (!priv->ptype_lut_dqo) {
                        err = -ENOMEM;
                        goto abort_with_stats_report;
index 197513d..4eb6ed2 100644 (file)
@@ -390,8 +390,7 @@ int gve_rx_alloc_rings_gqi(struct gve_priv *priv,
        int err = 0;
        int i, j;
 
-       rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues,
-                          GFP_KERNEL);
+       rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues);
        if (!rx)
                return -ENOMEM;
 
index 282c10e..c706c79 100644 (file)
@@ -320,8 +320,7 @@ int gve_rx_alloc_rings_dqo(struct gve_priv *priv,
        int err;
        int i;
 
-       rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues,
-                          GFP_KERNEL);
+       rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues);
        if (!rx)
                return -ENOMEM;
 
index d2023ce..0b856e2 100644 (file)
@@ -345,8 +345,7 @@ int gve_tx_alloc_rings_gqi(struct gve_priv *priv,
                return -EINVAL;
        }
 
-       tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues,
-                          GFP_KERNEL);
+       tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues);
        if (!tx)
                return -ENOMEM;
 
index 44980f6..529ab21 100644 (file)
@@ -416,8 +416,7 @@ int gve_tx_alloc_rings_dqo(struct gve_priv *priv,
                return -EINVAL;
        }
 
-       tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues,
-                          GFP_KERNEL);
+       tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues);
        if (!tx)
                return -ENOMEM;
 
index 5c3b4ea..f7653aa 100644 (file)
@@ -208,8 +208,7 @@ hnae_init_ring(struct hnae_queue *q, struct hnae_ring *ring, int flags)
        assert(ring->next_to_use == 0);
        assert(ring->next_to_clean == 0);
 
-       ring->desc_cb = kzalloc_objs(ring->desc_cb[0], ring->desc_num,
-                                    GFP_KERNEL);
+       ring->desc_cb = kzalloc_objs(ring->desc_cb[0], ring->desc_num);
        if (!ring->desc_cb) {
                ret = -ENOMEM;
                goto out;
index 11b1679..bc5b80c 100644 (file)
@@ -614,8 +614,7 @@ static int init_cmdq(struct hinic3_cmdq *cmdq, struct hinic3_hwdev *hwdev,
 
        spin_lock_init(&cmdq->cmdq_lock);
 
-       cmdq->cmd_infos = kzalloc_objs(*cmdq->cmd_infos, cmdq->wq.q_depth,
-                                      GFP_KERNEL);
+       cmdq->cmd_infos = kzalloc_objs(*cmdq->cmd_infos, cmdq->wq.q_depth);
        if (!cmdq->cmd_infos) {
                err = -ENOMEM;
                return err;
index 7830bff..8a1ad3e 100644 (file)
@@ -138,8 +138,7 @@ static int hinic3_alloc_txrxq_resources(struct net_device *netdev,
                goto err_free_txqs_res_arr;
        }
 
-       q_params->irq_cfg = kzalloc_objs(*q_params->irq_cfg, q_params->num_qps,
-                                        GFP_KERNEL);
+       q_params->irq_cfg = kzalloc_objs(*q_params->irq_cfg, q_params->num_qps);
        if (!q_params->irq_cfg) {
                err = -ENOMEM;
                goto err_free_rxqs_res_arr;
index 9c00d1e..4ac3ad6 100644 (file)
@@ -44,8 +44,7 @@ int hinic3_queue_pages_alloc(struct hinic3_hwdev *hwdev,
        u32 pg_idx;
        int err;
 
-       qpages->pages = kzalloc_objs(qpages->pages[0], qpages->num_pages,
-                                    GFP_KERNEL);
+       qpages->pages = kzalloc_objs(qpages->pages[0], qpages->num_pages);
        if (!qpages->pages)
                return -ENOMEM;
 
index fa3e6b3..1236ec2 100644 (file)
@@ -419,8 +419,7 @@ int hinic3_alloc_rxqs_res(struct net_device *netdev, u16 num_rq,
 
        for (idx = 0; idx < num_rq; idx++) {
                rqres = &rxqs_res[idx];
-               rqres->rx_info = kzalloc_objs(*rqres->rx_info, rq_depth,
-                                             GFP_KERNEL);
+               rqres->rx_info = kzalloc_objs(*rqres->rx_info, rq_depth);
                if (!rqres->rx_info)
                        goto err_free_rqres;
 
index 3bef50c..a25fd87 100644 (file)
@@ -681,8 +681,7 @@ int hinic3_alloc_txqs_res(struct net_device *netdev, u16 num_sq,
        for (idx = 0; idx < num_sq; idx++) {
                tqres = &txqs_res[idx];
 
-               tqres->tx_info = kzalloc_objs(*tqres->tx_info, sq_depth,
-                                             GFP_KERNEL);
+               tqres->tx_info = kzalloc_objs(*tqres->tx_info, sq_depth);
                if (!tqres->tx_info)
                        goto err_free_tqres;
 
index 2aeea25..37d8523 100644 (file)
@@ -1094,8 +1094,7 @@ static int init_rx_pools(struct net_device *netdev)
        /* Allocate/populate the pools. */
        release_rx_pools(adapter);
 
-       adapter->rx_pool = kzalloc_objs(struct ibmvnic_rx_pool, num_pools,
-                                       GFP_KERNEL);
+       adapter->rx_pool = kzalloc_objs(struct ibmvnic_rx_pool, num_pools);
        if (!adapter->rx_pool) {
                dev_err(dev, "Failed to allocate rx pools\n");
                return -ENOMEM;
@@ -1238,8 +1237,7 @@ static int init_one_tx_pool(struct net_device *netdev,
 {
        int i;
 
-       tx_pool->tx_buff = kzalloc_objs(struct ibmvnic_tx_buff, pool_size,
-                                       GFP_KERNEL);
+       tx_pool->tx_buff = kzalloc_objs(struct ibmvnic_tx_buff, pool_size);
        if (!tx_pool->tx_buff)
                return -ENOMEM;
 
@@ -1335,13 +1333,11 @@ static int init_tx_pools(struct net_device *netdev)
        pool_size = adapter->req_tx_entries_per_subcrq;
        num_pools = adapter->num_active_tx_scrqs;
 
-       adapter->tx_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools,
-                                       GFP_KERNEL);
+       adapter->tx_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools);
        if (!adapter->tx_pool)
                return -ENOMEM;
 
-       adapter->tso_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools,
-                                        GFP_KERNEL);
+       adapter->tso_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools);
        /* To simplify release_tx_pools() ensure that ->tx_pool and
         * ->tso_pool are either both NULL or both non-NULL.
         */
@@ -1465,8 +1461,7 @@ static int init_napi(struct ibmvnic_adapter *adapter)
 {
        int i;
 
-       adapter->napi = kzalloc_objs(struct napi_struct, adapter->req_rx_queues,
-                                    GFP_KERNEL);
+       adapter->napi = kzalloc_objs(struct napi_struct, adapter->req_rx_queues);
        if (!adapter->napi)
                return -ENOMEM;
 
index 132644a..ab232b3 100644 (file)
@@ -582,13 +582,11 @@ static int e1000_set_ringparam(struct net_device *netdev,
        rx_old = adapter->rx_ring;
 
        err = -ENOMEM;
-       txdr = kzalloc_objs(struct e1000_tx_ring, adapter->num_tx_queues,
-                           GFP_KERNEL);
+       txdr = kzalloc_objs(struct e1000_tx_ring, adapter->num_tx_queues);
        if (!txdr)
                goto err_alloc_tx;
 
-       rxdr = kzalloc_objs(struct e1000_rx_ring, adapter->num_rx_queues,
-                           GFP_KERNEL);
+       rxdr = kzalloc_objs(struct e1000_rx_ring, adapter->num_rx_queues);
        if (!rxdr)
                goto err_alloc_rx;
 
@@ -984,8 +982,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
        if (!txdr->count)
                txdr->count = E1000_DEFAULT_TXD;
 
-       txdr->buffer_info = kzalloc_objs(struct e1000_tx_buffer, txdr->count,
-                                        GFP_KERNEL);
+       txdr->buffer_info = kzalloc_objs(struct e1000_tx_buffer, txdr->count);
        if (!txdr->buffer_info) {
                ret_val = 1;
                goto err_nomem;
@@ -1043,8 +1040,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
        if (!rxdr->count)
                rxdr->count = E1000_DEFAULT_RXD;
 
-       rxdr->buffer_info = kzalloc_objs(struct e1000_rx_buffer, rxdr->count,
-                                        GFP_KERNEL);
+       rxdr->buffer_info = kzalloc_objs(struct e1000_rx_buffer, rxdr->count);
        if (!rxdr->buffer_info) {
                ret_val = 5;
                goto err_nomem;
index 21094a0..dbed309 100644 (file)
@@ -1173,8 +1173,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
        if (!tx_ring->count)
                tx_ring->count = E1000_DEFAULT_TXD;
 
-       tx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, tx_ring->count,
-                                           GFP_KERNEL);
+       tx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, tx_ring->count);
        if (!tx_ring->buffer_info) {
                ret_val = 1;
                goto err_nomem;
@@ -1234,8 +1233,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
        if (!rx_ring->count)
                rx_ring->count = E1000_DEFAULT_RXD;
 
-       rx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, rx_ring->count,
-                                           GFP_KERNEL);
+       rx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, rx_ring->count);
        if (!rx_ring->buffer_info) {
                ret_val = 5;
                goto err_nomem;
index 9fee3a5..898deb3 100644 (file)
@@ -1825,8 +1825,7 @@ static int fm10k_init_msix_capability(struct fm10k_intfc *interface)
        v_budget = min_t(int, v_budget, hw->mac.max_msix_vectors);
 
        /* A failure in MSI-X entry allocation is fatal. */
-       interface->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
-                                              GFP_KERNEL);
+       interface->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
        if (!interface->msix_entries)
                return -ENOMEM;
 
index 7b9aa33..0b52509 100644 (file)
@@ -983,8 +983,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
                        int i, ret;
                        u16 switch_id;
 
-                       bw_data = kzalloc_obj(struct i40e_aqc_query_port_ets_config_resp,
-                                             GFP_KERNEL);
+                       bw_data = kzalloc_obj(struct i40e_aqc_query_port_ets_config_resp);
                        if (!bw_data) {
                                ret = -ENOMEM;
                                goto command_write_done;
index 4b29914..21c666d 100644 (file)
@@ -2120,8 +2120,7 @@ static int i40e_set_ringparam(struct net_device *netdev,
                netdev_info(netdev,
                            "Changing Tx descriptor count from %d to %d.\n",
                            vsi->tx_rings[0]->count, new_tx_count);
-               tx_rings = kzalloc_objs(struct i40e_ring, tx_alloc_queue_pairs,
-                                       GFP_KERNEL);
+               tx_rings = kzalloc_objs(struct i40e_ring, tx_alloc_queue_pairs);
                if (!tx_rings) {
                        err = -ENOMEM;
                        goto done;
index 9841c65..bceaf4b 100644 (file)
@@ -1585,12 +1585,10 @@ static int iavf_alloc_queues(struct iavf_adapter *adapter)
                                          (int)(num_online_cpus()));
 
 
-       adapter->tx_rings = kzalloc_objs(struct iavf_ring, num_active_queues,
-                                        GFP_KERNEL);
+       adapter->tx_rings = kzalloc_objs(struct iavf_ring, num_active_queues);
        if (!adapter->tx_rings)
                goto err_out;
-       adapter->rx_rings = kzalloc_objs(struct iavf_ring, num_active_queues,
-                                        GFP_KERNEL);
+       adapter->rx_rings = kzalloc_objs(struct iavf_ring, num_active_queues);
        if (!adapter->rx_rings)
                goto err_out;
 
@@ -1653,8 +1651,7 @@ static int iavf_set_interrupt_capability(struct iavf_adapter *adapter)
        v_budget = min_t(int, pairs + NONQ_VECS,
                         (int)adapter->vf_res->max_vectors);
 
-       adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
-                                            GFP_KERNEL);
+       adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
        if (!adapter->msix_entries) {
                err = -ENOMEM;
                goto out;
index 7f2bef0..53b6e2b 100644 (file)
@@ -538,8 +538,7 @@ static int ice_init_arfs_cntrs(struct ice_vsi *vsi)
        if (!vsi->arfs_fltr_cntrs)
                return -ENOMEM;
 
-       vsi->arfs_last_fltr_id = kzalloc_obj(*vsi->arfs_last_fltr_id,
-                                            GFP_KERNEL);
+       vsi->arfs_last_fltr_id = kzalloc_obj(*vsi->arfs_last_fltr_id);
        if (!vsi->arfs_last_fltr_id) {
                kfree(vsi->arfs_fltr_cntrs);
                vsi->arfs_fltr_cntrs = NULL;
@@ -561,8 +560,7 @@ void ice_init_arfs(struct ice_vsi *vsi)
        if (!vsi || vsi->type != ICE_VSI_PF || ice_is_arfs_active(vsi))
                return;
 
-       arfs_fltr_list = kzalloc_objs(*arfs_fltr_list, ICE_MAX_ARFS_LIST,
-                                     GFP_KERNEL);
+       arfs_fltr_list = kzalloc_objs(*arfs_fltr_list, ICE_MAX_ARFS_LIST);
        if (!arfs_fltr_list)
                return;
 
index 9bb0735..6cd6319 100644 (file)
@@ -1103,8 +1103,7 @@ int ice_init_hw(struct ice_hw *hw)
 
        /* Get MAC information */
        /* A single port can report up to two (LAN and WoL) addresses */
-       mac_buf = kzalloc_objs(struct ice_aqc_manage_mac_read_resp, 2,
-                              GFP_KERNEL);
+       mac_buf = kzalloc_objs(struct ice_aqc_manage_mac_read_resp, 2);
        if (!mac_buf) {
                status = -ENOMEM;
                goto err_unroll_fltr_mgmt_struct;
index bd0134b..f91f8b6 100644 (file)
@@ -538,14 +538,12 @@ static int ice_vsi_alloc_stat_arrays(struct ice_vsi *vsi)
                return -ENOMEM;
 
        vsi_stat->tx_ring_stats =
-               kzalloc_objs(*vsi_stat->tx_ring_stats, vsi->alloc_txq,
-                            GFP_KERNEL);
+               kzalloc_objs(*vsi_stat->tx_ring_stats, vsi->alloc_txq);
        if (!vsi_stat->tx_ring_stats)
                goto err_alloc_tx;
 
        vsi_stat->rx_ring_stats =
-               kzalloc_objs(*vsi_stat->rx_ring_stats, vsi->alloc_rxq,
-                            GFP_KERNEL);
+               kzalloc_objs(*vsi_stat->rx_ring_stats, vsi->alloc_rxq);
        if (!vsi_stat->rx_ring_stats)
                goto err_alloc_rx;
 
@@ -3104,8 +3102,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, u32 vsi_flags)
        if (ret)
                goto unlock;
 
-       coalesce = kzalloc_objs(struct ice_coalesce_stored, vsi->num_q_vectors,
-                               GFP_KERNEL);
+       coalesce = kzalloc_objs(struct ice_coalesce_stored, vsi->num_q_vectors);
        if (!coalesce) {
                ret = -ENOMEM;
                goto decfg;
index a964828..d2dde43 100644 (file)
@@ -159,8 +159,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,
                idpf_ctlq_init_rxq_bufs(cq);
        } else {
                /* Allocate the array of msg pointers for TX queues */
-               cq->bi.tx_msg = kzalloc_objs(struct idpf_ctlq_msg *, qinfo->len,
-                                            GFP_KERNEL);
+               cq->bi.tx_msg = kzalloc_objs(struct idpf_ctlq_msg *, qinfo->len);
                if (!cq->bi.tx_msg) {
                        err = -ENOMEM;
                        goto init_dealloc_q_mem;
index dfdbfb8..d4d488c 100644 (file)
@@ -40,8 +40,7 @@ static int idpf_ctlq_alloc_bufs(struct idpf_hw *hw,
        /* We'll be allocating the buffer info memory first, then we can
         * allocate the mapped buffers for the event processing
         */
-       cq->bi.rx_buff = kzalloc_objs(struct idpf_dma_mem *, cq->ring_size,
-                                     GFP_KERNEL);
+       cq->bi.rx_buff = kzalloc_objs(struct idpf_dma_mem *, cq->ring_size);
        if (!cq->bi.rx_buff)
                return -ENOMEM;
 
@@ -50,8 +49,7 @@ static int idpf_ctlq_alloc_bufs(struct idpf_hw *hw,
                struct idpf_dma_mem *bi;
                int num = 1; /* number of idpf_dma_mem to be allocated */
 
-               cq->bi.rx_buff[i] = kzalloc_objs(struct idpf_dma_mem, num,
-                                                GFP_KERNEL);
+               cq->bi.rx_buff[i] = kzalloc_objs(struct idpf_dma_mem, num);
                if (!cq->bi.rx_buff[i])
                        goto unwind_alloc_cq_bufs;
 
index e17de31..04fc8d3 100644 (file)
@@ -369,8 +369,7 @@ int idpf_intr_req(struct idpf_adapter *adapter)
        }
 
        num_lan_vecs = actual_vecs - num_rdma_vecs;
-       adapter->msix_entries = kzalloc_objs(struct msix_entry, num_lan_vecs,
-                                            GFP_KERNEL);
+       adapter->msix_entries = kzalloc_objs(struct msix_entry, num_lan_vecs);
        if (!adapter->msix_entries) {
                err = -ENOMEM;
                goto free_rdma_msix;
index 3eeac3f..b3c0ae2 100644 (file)
@@ -183,8 +183,7 @@ static int idpf_tx_buf_alloc_all(struct idpf_tx_queue *tx_q)
                tx_q->buf_pool_size = U16_MAX;
        else
                tx_q->buf_pool_size = tx_q->desc_count;
-       tx_q->tx_buf = kzalloc_objs(*tx_q->tx_buf, tx_q->buf_pool_size,
-                                   GFP_KERNEL);
+       tx_q->tx_buf = kzalloc_objs(*tx_q->tx_buf, tx_q->buf_pool_size);
        if (!tx_q->tx_buf)
                return -ENOMEM;
 
@@ -1710,8 +1709,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vport,
 {
        bool split, flow_sch_en;
 
-       rsrc->txq_grps = kzalloc_objs(*rsrc->txq_grps, rsrc->num_txq_grp,
-                                     GFP_KERNEL);
+       rsrc->txq_grps = kzalloc_objs(*rsrc->txq_grps, rsrc->num_txq_grp);
        if (!rsrc->txq_grps)
                return -ENOMEM;
 
@@ -1727,8 +1725,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vport,
                tx_qgrp->num_txq = num_txq;
 
                for (unsigned int j = 0; j < tx_qgrp->num_txq; j++) {
-                       tx_qgrp->txqs[j] = kzalloc_obj(*tx_qgrp->txqs[j],
-                                                      GFP_KERNEL);
+                       tx_qgrp->txqs[j] = kzalloc_obj(*tx_qgrp->txqs[j]);
                        if (!tx_qgrp->txqs[j])
                                goto err_alloc;
                }
@@ -1805,8 +1802,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
        bool hs, rsc;
        int err = 0;
 
-       rsrc->rxq_grps = kzalloc_objs(struct idpf_rxq_group, rsrc->num_rxq_grp,
-                                     GFP_KERNEL);
+       rsrc->rxq_grps = kzalloc_objs(struct idpf_rxq_group, rsrc->num_rxq_grp);
        if (!rsrc->rxq_grps)
                return -ENOMEM;
 
@@ -1820,8 +1816,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
                if (!idpf_is_queue_model_split(rsrc->rxq_model)) {
                        rx_qgrp->singleq.num_rxq = num_rxq;
                        for (unsigned int j = 0; j < num_rxq; j++) {
-                               rx_qgrp->singleq.rxqs[j] = kzalloc_obj(*rx_qgrp->singleq.rxqs[j],
-                                                                      GFP_KERNEL);
+                               rx_qgrp->singleq.rxqs[j] = kzalloc_obj(*rx_qgrp->singleq.rxqs[j]);
                                if (!rx_qgrp->singleq.rxqs[j]) {
                                        err = -ENOMEM;
                                        goto err_alloc;
@@ -4592,21 +4587,18 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport,
                q_vector->rx_intr_mode = q_coal->rx_intr_mode;
                q_vector->rx_itr_idx = VIRTCHNL2_ITR_IDX_0;
 
-               q_vector->tx = kzalloc_objs(*q_vector->tx, txqs_per_vector,
-                                           GFP_KERNEL);
+               q_vector->tx = kzalloc_objs(*q_vector->tx, txqs_per_vector);
                if (!q_vector->tx)
                        goto error;
 
-               q_vector->rx = kzalloc_objs(*q_vector->rx, rxqs_per_vector,
-                                           GFP_KERNEL);
+               q_vector->rx = kzalloc_objs(*q_vector->rx, rxqs_per_vector);
                if (!q_vector->rx)
                        goto error;
 
                if (!idpf_is_queue_model_split(rsrc->rxq_model))
                        continue;
 
-               q_vector->bufq = kzalloc_objs(*q_vector->bufq, bufqs_per_vector,
-                                             GFP_KERNEL);
+               q_vector->bufq = kzalloc_objs(*q_vector->bufq, bufqs_per_vector);
                if (!q_vector->bufq)
                        goto error;
 
index cf655af..412f713 100644 (file)
@@ -1290,8 +1290,7 @@ idpf_vport_init_queue_reg_chunks(struct idpf_vport_config *vport_config,
 
        kfree(q_info->queue_chunks);
 
-       q_info->queue_chunks = kzalloc_objs(*q_info->queue_chunks, num_chunks,
-                                           GFP_KERNEL);
+       q_info->queue_chunks = kzalloc_objs(*q_info->queue_chunks, num_chunks);
        if (!q_info->queue_chunks) {
                q_info->num_chunks = 0;
                return -ENOMEM;
@@ -3197,8 +3196,7 @@ static int idpf_send_get_rx_ptype_msg(struct idpf_adapter *adapter)
        u16 next_ptype_id = 0;
        ssize_t reply_sz;
 
-       singleq_pt_lkup = kzalloc_objs(*singleq_pt_lkup, IDPF_RX_MAX_BASE_PTYPE,
-                                      GFP_KERNEL);
+       singleq_pt_lkup = kzalloc_objs(*singleq_pt_lkup, IDPF_RX_MAX_BASE_PTYPE);
        if (!singleq_pt_lkup)
                return -ENOMEM;
 
@@ -3484,8 +3482,7 @@ int idpf_vc_core_init(struct idpf_adapter *adapter)
        int err = 0;
 
        if (!adapter->vcxn_mngr) {
-               adapter->vcxn_mngr = kzalloc_obj(*adapter->vcxn_mngr,
-                                                GFP_KERNEL);
+               adapter->vcxn_mngr = kzalloc_obj(*adapter->vcxn_mngr);
                if (!adapter->vcxn_mngr) {
                        err = -ENOMEM;
                        goto init_failed;
@@ -3557,8 +3554,7 @@ restart:
        pci_sriov_set_totalvfs(adapter->pdev, idpf_get_max_vfs(adapter));
        num_max_vports = idpf_get_max_vports(adapter);
        adapter->max_vports = num_max_vports;
-       adapter->vports = kzalloc_objs(*adapter->vports, num_max_vports,
-                                      GFP_KERNEL);
+       adapter->vports = kzalloc_objs(*adapter->vports, num_max_vports);
        if (!adapter->vports)
                return -ENOMEM;
 
index 1c4ce3a..d9bcc3f 100644 (file)
@@ -39,8 +39,7 @@ int idpf_ptp_get_caps(struct idpf_adapter *adapter)
        u32 temp_offset;
        int reply_sz;
 
-       recv_ptp_caps_msg = kzalloc_obj(struct virtchnl2_ptp_get_caps,
-                                       GFP_KERNEL);
+       recv_ptp_caps_msg = kzalloc_obj(struct virtchnl2_ptp_get_caps);
        if (!recv_ptp_caps_msg)
                return -ENOMEM;
 
index e31072d..27e5c21 100644 (file)
@@ -4633,8 +4633,7 @@ static void igc_set_interrupt_capability(struct igc_adapter *adapter,
        /* add 1 vector for link status interrupts */
        numvecs++;
 
-       adapter->msix_entries = kzalloc_objs(struct msix_entry, numvecs,
-                                            GFP_KERNEL);
+       adapter->msix_entries = kzalloc_objs(struct msix_entry, numvecs);
 
        if (!adapter->msix_entries)
                return;
index 0ecc4f7..382d097 100644 (file)
@@ -516,8 +516,7 @@ static int ixgbe_dcbnl_ieee_setets(struct net_device *dev,
                return -EINVAL;
 
        if (!adapter->ixgbe_ieee_ets) {
-               adapter->ixgbe_ieee_ets = kmalloc_obj(struct ieee_ets,
-                                                     GFP_KERNEL);
+               adapter->ixgbe_ieee_ets = kmalloc_obj(struct ieee_ets);
                if (!adapter->ixgbe_ieee_ets)
                        return -ENOMEM;
 
@@ -593,8 +592,7 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
                return -EINVAL;
 
        if (!adapter->ixgbe_ieee_pfc) {
-               adapter->ixgbe_ieee_pfc = kmalloc_obj(struct ieee_pfc,
-                                                     GFP_KERNEL);
+               adapter->ixgbe_ieee_pfc = kmalloc_obj(struct ieee_pfc);
                if (!adapter->ixgbe_ieee_pfc)
                        return -ENOMEM;
        }
index 030085d..87abb36 100644 (file)
@@ -768,8 +768,7 @@ static int ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter)
         */
        vector_threshold = MIN_MSIX_COUNT;
 
-       adapter->msix_entries = kzalloc_objs(struct msix_entry, vectors,
-                                            GFP_KERNEL);
+       adapter->msix_entries = kzalloc_objs(struct msix_entry, vectors);
        if (!adapter->msix_entries)
                return -ENOMEM;
 
index e0e6234..1e3ad27 100644 (file)
@@ -6895,8 +6895,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
 #endif /* IXGBE_FCOE */
 
        /* initialize static ixgbe jump table entries */
-       adapter->jump_tables[0] = kzalloc_obj(*adapter->jump_tables[0],
-                                             GFP_KERNEL);
+       adapter->jump_tables[0] = kzalloc_obj(*adapter->jump_tables[0]);
        if (!adapter->jump_tables[0])
                return -ENOMEM;
        adapter->jump_tables[0]->mat = ixgbe_ipv4_fields;
index e222627..431d77d 100644 (file)
@@ -64,8 +64,7 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
                          IXGBE_FLAG_VMDQ_ENABLED;
 
        /* Allocate memory for per VF control structures */
-       adapter->vfinfo = kzalloc_objs(struct vf_data_storage, num_vfs,
-                                      GFP_KERNEL);
+       adapter->vfinfo = kzalloc_objs(struct vf_data_storage, num_vfs);
        if (!adapter->vfinfo)
                return -ENOMEM;
 
index 38af1f3..42f89a1 100644 (file)
@@ -2716,8 +2716,7 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
        v_budget = min_t(int, v_budget, num_online_cpus());
        v_budget += NON_Q_VECTORS;
 
-       adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
-                                            GFP_KERNEL);
+       adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
        if (!adapter->msix_entries)
                return -ENOMEM;
 
index 5df25e5..fb61f98 100644 (file)
@@ -838,8 +838,7 @@ static void libie_debugfs_fwlog_init(struct libie_fwlog *fwlog,
        /* allocate space for this first because if it fails then we don't
         * need to unwind
         */
-       fw_modules = kzalloc_objs(*fw_modules, LIBIE_NR_FW_LOG_MODULES,
-                                 GFP_KERNEL);
+       fw_modules = kzalloc_objs(*fw_modules, LIBIE_NR_FW_LOG_MODULES);
        if (!fw_modules)
                return;
 
index 58f7797..d1b8650 100644 (file)
@@ -3151,8 +3151,7 @@ static int mvpp2_txq_init(struct mvpp2_port *port,
        for (thread = 0; thread < port->priv->nthreads; thread++) {
                txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
                txq_pcpu->size = txq->size;
-               txq_pcpu->buffs = kmalloc_objs(*txq_pcpu->buffs, txq_pcpu->size,
-                                              GFP_KERNEL);
+               txq_pcpu->buffs = kmalloc_objs(*txq_pcpu->buffs, txq_pcpu->size);
                if (!txq_pcpu->buffs)
                        return -ENOMEM;
 
index 3dab841..ec55eb2 100644 (file)
@@ -115,8 +115,7 @@ static int octep_enable_msix_range(struct octep_device *oct)
 
        /* Generic interrupts apart from input/output queues */
        num_msix = oct->num_oqs + CFG_GET_NON_IOQ_MSIX(oct->conf);
-       oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix,
-                                        GFP_KERNEL);
+       oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix);
        if (!oct->msix_entries)
                goto msix_alloc_err;
 
index 4bf13cc..562fe94 100644 (file)
@@ -113,8 +113,7 @@ static int octep_vf_enable_msix_range(struct octep_vf_device *oct)
        /* Generic interrupts apart from input/output queues */
        //num_msix = oct->num_oqs + CFG_GET_NON_IOQ_MSIX(oct->conf);
        num_msix = oct->num_oqs;
-       oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix,
-                                        GFP_KERNEL);
+       oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix);
        if (!oct->msix_entries)
                goto msix_alloc_err;
 
index e8334a3..29e7786 100644 (file)
@@ -1945,8 +1945,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
        /* CQ size of SQ */
        qset->sqe_cnt = qset->sqe_cnt ? qset->sqe_cnt : Q_COUNT(Q_SIZE_4K);
 
-       qset->cq = kzalloc_objs(struct otx2_cq_queue, pf->qset.cq_cnt,
-                               GFP_KERNEL);
+       qset->cq = kzalloc_objs(struct otx2_cq_queue, pf->qset.cq_cnt);
        if (!qset->cq)
                goto err_free_mem;
 
@@ -1955,8 +1954,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
        if (!qset->sq)
                goto err_free_mem;
 
-       qset->rq = kzalloc_objs(struct otx2_rcv_queue, pf->hw.rx_queues,
-                               GFP_KERNEL);
+       qset->rq = kzalloc_objs(struct otx2_rcv_queue, pf->hw.rx_queues);
        if (!qset->rq)
                goto err_free_mem;
 
index 89f0ac5..3a762d1 100644 (file)
@@ -157,8 +157,7 @@ prestera_counter_block_get(struct prestera_counter *counter, u32 client)
        if (err)
                goto err_block;
 
-       block->stats = kzalloc_objs(*block->stats, block->num_counters,
-                                   GFP_KERNEL);
+       block->stats = kzalloc_objs(*block->stats, block->num_counters);
        if (!block->stats) {
                err = -ENOMEM;
                goto err_stats;
index 27af962..30facde 100644 (file)
@@ -1601,8 +1601,7 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
        if (!sky2->tx_le)
                goto nomem;
 
-       sky2->tx_ring = kzalloc_objs(struct tx_ring_info, sky2->tx_ring_size,
-                                    GFP_KERNEL);
+       sky2->tx_ring = kzalloc_objs(struct tx_ring_info, sky2->tx_ring_size);
        if (!sky2->tx_ring)
                goto nomem;
 
@@ -1611,8 +1610,7 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
        if (!sky2->rx_le)
                goto nomem;
 
-       sky2->rx_ring = kzalloc_objs(struct rx_ring_info, sky2->rx_pending,
-                                    GFP_KERNEL);
+       sky2->rx_ring = kzalloc_objs(struct rx_ring_info, sky2->rx_pending);
        if (!sky2->rx_ring)
                goto nomem;
 
index 4ed6395..7ed4452 100644 (file)
@@ -594,8 +594,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
                buf->nbufs      = DIV_ROUND_UP(size, PAGE_SIZE);
                buf->npages     = buf->nbufs;
                buf->page_shift  = PAGE_SHIFT;
-               buf->page_list   = kzalloc_objs(*buf->page_list, buf->nbufs,
-                                               GFP_KERNEL);
+               buf->page_list   = kzalloc_objs(*buf->page_list, buf->nbufs);
                if (!buf->page_list)
                        return -ENOMEM;
 
index 4872931..3aa5765 100644 (file)
@@ -2368,8 +2368,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
                struct mlx4_vf_admin_state *vf_admin;
 
                priv->mfunc.master.slave_state =
-                       kzalloc_objs(struct mlx4_slave_state, dev->num_slaves,
-                                    GFP_KERNEL);
+                       kzalloc_objs(struct mlx4_slave_state, dev->num_slaves);
                if (!priv->mfunc.master.slave_state)
                        goto err_comm;
 
@@ -2380,8 +2379,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
                        goto err_comm_admin;
 
                priv->mfunc.master.vf_oper =
-                       kzalloc_objs(struct mlx4_vf_oper_state, dev->num_slaves,
-                                    GFP_KERNEL);
+                       kzalloc_objs(struct mlx4_vf_oper_state, dev->num_slaves);
                if (!priv->mfunc.master.vf_oper)
                        goto err_comm_oper;
 
@@ -2405,8 +2403,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
                                struct mlx4_vport_state *oper_vport;
 
                                s_state->vlan_filter[port] =
-                                       kzalloc_obj(struct mlx4_vlan_fltr,
-                                                   GFP_KERNEL);
+                                       kzalloc_obj(struct mlx4_vlan_fltr);
                                if (!s_state->vlan_filter[port]) {
                                        if (--port)
                                                kfree(s_state->vlan_filter[port]);
index 4e15186..b9b8142 100644 (file)
@@ -2245,8 +2245,7 @@ static int mlx4_en_copy_priv(struct mlx4_en_priv *dst,
                if (!dst->tx_ring[t])
                        goto err_free_tx;
 
-               dst->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS,
-                                            GFP_KERNEL);
+               dst->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS);
                if (!dst->tx_cq[t]) {
                        kfree(dst->tx_ring[t]);
                        goto err_free_tx;
@@ -3221,8 +3220,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
                        err = -ENOMEM;
                        goto out;
                }
-               priv->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS,
-                                             GFP_KERNEL);
+               priv->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS);
                if (!priv->tx_cq[t]) {
                        err = -ENOMEM;
                        goto out;
index 982e986..e6b7e75 100644 (file)
@@ -868,8 +868,7 @@ static int mlx4_slave_special_qp_cap(struct mlx4_dev *dev)
        int i, err = 0;
 
        func_cap = kzalloc_obj(*func_cap);
-       caps->spec_qps = kzalloc_objs(*caps->spec_qps, caps->num_ports,
-                                     GFP_KERNEL);
+       caps->spec_qps = kzalloc_objs(*caps->spec_qps, caps->num_ports);
 
        if (!func_cap || !caps->spec_qps) {
                mlx4_err(dev, "Failed to allocate memory for special qps cap\n");
@@ -3279,8 +3278,7 @@ static u64 mlx4_enable_sriov(struct mlx4_dev *dev, struct pci_dev *pdev,
                                        MLX4_MAX_NUM_VF);
 
        if (reset_flow) {
-               dev->dev_vfs = kzalloc_objs(*dev->dev_vfs, total_vfs,
-                                           GFP_KERNEL);
+               dev->dev_vfs = kzalloc_objs(*dev->dev_vfs, total_vfs);
                if (!dev->dev_vfs)
                        goto free_mem;
                return dev_flags;
index 870f97c..cdd9023 100644 (file)
@@ -524,8 +524,7 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
        for (i = 0; i < MLX4_NUM_OF_RESOURCE_TYPE; i++) {
                struct resource_allocator *res_alloc =
                        &priv->mfunc.master.res_tracker.res_alloc[i];
-               res_alloc->quota = kmalloc_objs(int, dev->persist->num_vfs + 1,
-                                               GFP_KERNEL);
+               res_alloc->quota = kmalloc_objs(int, dev->persist->num_vfs + 1);
                res_alloc->guaranteed = kmalloc_objs(int,
                                                     dev->persist->num_vfs + 1,
                                                     GFP_KERNEL);
@@ -536,8 +535,7 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
                                             GFP_KERNEL);
                else
                        res_alloc->allocated =
-                               kzalloc_objs(int, dev->persist->num_vfs + 1,
-                                            GFP_KERNEL);
+                               kzalloc_objs(int, dev->persist->num_vfs + 1);
                /* Reduce the sink counter */
                if (i == RES_COUNTER)
                        res_alloc->res_free = dev->caps.max_counters - 1;
@@ -1238,8 +1236,7 @@ int mlx4_calc_vf_counters(struct mlx4_dev *dev, int slave, int port,
 
        memset(data, 0, sizeof(*data));
 
-       counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters,
-                                   GFP_KERNEL);
+       counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters);
        if (!counters_arr)
                return -ENOMEM;
 
@@ -5185,8 +5182,7 @@ static void rem_slave_counters(struct mlx4_dev *dev, int slave)
                mlx4_warn(dev, "rem_slave_counters: Could not move all counters - too busy for slave %d\n",
                          slave);
 
-       counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters,
-                                   GFP_KERNEL);
+       counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters);
        if (!counters_arr)
                return;
 
index d720bcd..1b27421 100644 (file)
@@ -277,8 +277,7 @@ int mlx5e_qos_alloc_queues(struct mlx5e_priv *priv, struct mlx5e_channels *chs)
        for (i = 0; i < chs->num; i++) {
                struct mlx5e_txqsq **sqs;
 
-               sqs = kvzalloc_objs(struct mlx5e_txqsq *, qos_sqs_size,
-                                   GFP_KERNEL);
+               sqs = kvzalloc_objs(struct mlx5e_txqsq *, qos_sqs_size);
                if (!sqs)
                        goto err_free;
 
index 52de57d..c5ba22e 100644 (file)
@@ -23,8 +23,7 @@ static void mlx5e_xsk_unmap_pool(struct mlx5e_priv *priv,
 static int mlx5e_xsk_get_pools(struct mlx5e_xsk *xsk)
 {
        if (!xsk->pools) {
-               xsk->pools = kzalloc_objs(*xsk->pools, MLX5E_MAX_NUM_CHANNELS,
-                                         GFP_KERNEL);
+               xsk->pools = kzalloc_objs(*xsk->pools, MLX5E_MAX_NUM_CHANNELS);
                if (unlikely(!xsk->pools))
                        return -ENOMEM;
        }
index e844ffa..b6c1246 100644 (file)
@@ -6258,8 +6258,7 @@ int mlx5e_priv_init(struct mlx5e_priv *priv,
        if (!priv->channel_stats)
                goto err_free_tx_rates;
 
-       priv->fec_ranges = kzalloc_objs(*priv->fec_ranges, ETHTOOL_FEC_HIST_MAX,
-                                       GFP_KERNEL);
+       priv->fec_ranges = kzalloc_objs(*priv->fec_ranges, ETHTOOL_FEC_HIST_MAX);
        if (!priv->fec_ranges)
                goto err_free_channel_stats;
 
index 3f5d168..1f6bde5 100644 (file)
@@ -531,15 +531,13 @@ static int mlx5_fpga_conn_create_qp(struct mlx5_fpga_conn *conn,
        if (err)
                goto out;
 
-       conn->qp.rq.bufs = kvzalloc_objs(conn->qp.rq.bufs[0], conn->qp.rq.size,
-                                        GFP_KERNEL);
+       conn->qp.rq.bufs = kvzalloc_objs(conn->qp.rq.bufs[0], conn->qp.rq.size);
        if (!conn->qp.rq.bufs) {
                err = -ENOMEM;
                goto err_wq;
        }
 
-       conn->qp.sq.bufs = kvzalloc_objs(conn->qp.sq.bufs[0], conn->qp.sq.size,
-                                        GFP_KERNEL);
+       conn->qp.sq.bufs = kvzalloc_objs(conn->qp.sq.bufs[0], conn->qp.sq.size);
        if (!conn->qp.sq.bufs) {
                err = -ENOMEM;
                goto err_rq_bufs;
index 477526f..f2a96d5 100644 (file)
@@ -247,8 +247,7 @@ static int mlx5_rl_table_get(struct mlx5_rl_table *table)
                return 0;
        }
 
-       table->rl_entry = kzalloc_objs(struct mlx5_rl_entry, table->max_size,
-                                      GFP_KERNEL);
+       table->rl_entry = kzalloc_objs(struct mlx5_rl_entry, table->max_size);
        if (!table->rl_entry)
                return -ENOMEM;
 
index f1b117e..23e86f2 100644 (file)
@@ -2629,8 +2629,7 @@ mlx5hws_action_template_create(enum mlx5hws_action_type action_type[])
                ;
 
        at->num_actions = num_actions - 1;
-       at->action_type_arr = kzalloc_objs(*action_type, num_actions,
-                                          GFP_KERNEL);
+       at->action_type_arr = kzalloc_objs(*action_type, num_actions);
        if (!at->action_type_arr)
                goto free_at;
 
index 8f0dd30..dea21c1 100644 (file)
@@ -236,8 +236,7 @@ int mlx5hws_bwc_matcher_create_simple(struct mlx5hws_bwc_matcher *bwc_matcher,
        struct mlx5hws_matcher_attr attr = {0};
        int i;
 
-       bwc_matcher->rules = kzalloc_objs(*bwc_matcher->rules, bwc_queues,
-                                         GFP_KERNEL);
+       bwc_matcher->rules = kzalloc_objs(*bwc_matcher->rules, bwc_queues);
        if (!bwc_matcher->rules)
                goto err;
 
index 11ceaa9..aca7785 100644 (file)
@@ -759,22 +759,19 @@ static int mlx5_fs_fte_get_hws_actions(struct mlx5_flow_root_namespace *ns,
        int num_actions = 0;
        int err;
 
-       *ractions = kzalloc_objs(**ractions, MLX5_FLOW_CONTEXT_ACTION_MAX,
-                                GFP_KERNEL);
+       *ractions = kzalloc_objs(**ractions, MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!*ractions) {
                err = -ENOMEM;
                goto out_err;
        }
 
-       fs_actions = kzalloc_objs(*fs_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
-                                 GFP_KERNEL);
+       fs_actions = kzalloc_objs(*fs_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!fs_actions) {
                err = -ENOMEM;
                goto free_actions_alloc;
        }
 
-       dest_actions = kzalloc_objs(*dest_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
-                                   GFP_KERNEL);
+       dest_actions = kzalloc_objs(*dest_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!dest_actions) {
                err = -ENOMEM;
                goto free_fs_actions_alloc;
index 6632244..51aae5a 100644 (file)
@@ -1090,8 +1090,7 @@ hws_matcher_set_templates(struct mlx5hws_matcher *matcher,
 
        matcher->size_of_at_array =
                num_of_at + matcher->attr.max_num_of_at_attach;
-       matcher->at = kvzalloc_objs(*matcher->at, matcher->size_of_at_array,
-                                   GFP_KERNEL);
+       matcher->at = kvzalloc_objs(*matcher->at, matcher->size_of_at_array);
        if (!matcher->at) {
                mlx5hws_err(ctx, "Failed to allocate action template array\n");
                ret = -ENOMEM;
index 2d34fe4..367fb62 100644 (file)
@@ -1132,8 +1132,7 @@ int mlx5hws_send_queues_open(struct mlx5hws_context *ctx,
        if (err)
                return err;
 
-       ctx->send_queue = kzalloc_objs(*ctx->send_queue, ctx->queues,
-                                      GFP_KERNEL);
+       ctx->send_queue = kzalloc_objs(*ctx->send_queue, ctx->queues);
        if (!ctx->send_queue) {
                err = -ENOMEM;
                goto free_bwc_locks;
index 3af4218..bd3cf1a 100644 (file)
@@ -16,10 +16,8 @@ int mlx5dr_buddy_init(struct mlx5dr_icm_buddy_mem *buddy,
 
        INIT_LIST_HEAD(&buddy->list_node);
 
-       buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1,
-                                    GFP_KERNEL);
-       buddy->num_free = kzalloc_objs(*buddy->num_free, buddy->max_order + 1,
-                                      GFP_KERNEL);
+       buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1);
+       buddy->num_free = kzalloc_objs(*buddy->num_free, buddy->max_order + 1);
 
        if (!buddy->bitmap || !buddy->num_free)
                goto err_free_all;
index 1c314df..d7c2074 100644 (file)
@@ -227,8 +227,7 @@ static int dr_icm_buddy_init_ste_cache(struct mlx5dr_icm_buddy_mem *buddy)
        int num_of_entries =
                mlx5dr_icm_pool_chunk_size_to_entries(buddy->pool->max_log_chunk_sz);
 
-       buddy->ste_arr = kvzalloc_objs(struct mlx5dr_ste, num_of_entries,
-                                      GFP_KERNEL);
+       buddy->ste_arr = kvzalloc_objs(struct mlx5dr_ste, num_of_entries);
        if (!buddy->ste_arr)
                return -ENOMEM;
 
index 4d29c63..2782e95 100644 (file)
@@ -275,8 +275,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
        if (mlx5_fs_cmd_is_fw_term_table(ft))
                return mlx5_fs_cmd_get_fw_cmds()->create_fte(ns, ft, group, fte);
 
-       actions = kzalloc_objs(*actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
-                              GFP_KERNEL);
+       actions = kzalloc_objs(*actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!actions) {
                err = -ENOMEM;
                goto out_err;
@@ -289,8 +288,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
                goto free_actions_alloc;
        }
 
-       term_actions = kzalloc_objs(*term_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
-                                   GFP_KERNEL);
+       term_actions = kzalloc_objs(*term_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!term_actions) {
                err = -ENOMEM;
                goto free_fs_dr_actions_alloc;
index bbd8b61..6722de0 100644 (file)
@@ -327,8 +327,7 @@ mlxsw_afk_key_info_create(struct mlxsw_afk *mlxsw_afk,
        struct mlxsw_afk_key_info *key_info;
        int err;
 
-       key_info = kzalloc_flex(*key_info, blocks, mlxsw_afk->max_blocks,
-                               GFP_KERNEL);
+       key_info = kzalloc_flex(*key_info, blocks, mlxsw_afk->max_blocks);
        if (!key_info)
                return ERR_PTR(-ENOMEM);
        err = mlxsw_afk_picker(mlxsw_afk, key_info, elusage);
index e708161..30f172c 100644 (file)
@@ -871,8 +871,7 @@ int mlxsw_hwmon_init(struct mlxsw_core *mlxsw_core,
        mlxsw_reg_mgpir_unpack(mgpir_pl, NULL, NULL, NULL, NULL,
                               &num_of_slots);
 
-       mlxsw_hwmon = kzalloc_flex(*mlxsw_hwmon, line_cards, num_of_slots + 1,
-                                  GFP_KERNEL);
+       mlxsw_hwmon = kzalloc_flex(*mlxsw_hwmon, line_cards, num_of_slots + 1);
        if (!mlxsw_hwmon)
                return -ENOMEM;
 
index 4c9b04c..3900a73 100644 (file)
@@ -642,8 +642,7 @@ int mlxsw_thermal_init(struct mlxsw_core *core,
        mlxsw_reg_mgpir_unpack(mgpir_pl, NULL, NULL, NULL, NULL,
                               &num_of_slots);
 
-       thermal = kzalloc_flex(*thermal, line_cards, num_of_slots + 1,
-                              GFP_KERNEL);
+       thermal = kzalloc_flex(*thermal, line_cards, num_of_slots + 1);
        if (!thermal)
                return -ENOMEM;
 
index be6b7f9..0da85d3 100644 (file)
@@ -1667,8 +1667,7 @@ static int mlxsw_pci_fw_area_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
        int i;
        int err;
 
-       mlxsw_pci->fw_area.items = kzalloc_objs(*mem_item, num_pages,
-                                               GFP_KERNEL);
+       mlxsw_pci->fw_area.items = kzalloc_objs(*mem_item, num_pages);
        if (!mlxsw_pci->fw_area.items)
                return -ENOMEM;
        mlxsw_pci->fw_area.count = num_pages;
index b405584..560f5ee 100644 (file)
@@ -2489,8 +2489,7 @@ static int mlxsw_sp_traps_init(struct mlxsw_sp *mlxsw_sp)
        if (!MLXSW_CORE_RES_VALID(mlxsw_sp->core, MAX_CPU_POLICERS))
                return -EIO;
        max_policers = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_CPU_POLICERS);
-       trap = kzalloc_flex(*trap, policers_usage, BITS_TO_LONGS(max_policers),
-                           GFP_KERNEL);
+       trap = kzalloc_flex(*trap, policers_usage, BITS_TO_LONGS(max_policers));
        if (!trap)
                return -ENOMEM;
        trap->max_policers = max_policers;
@@ -2623,8 +2622,7 @@ static int mlxsw_sp_lag_init(struct mlxsw_sp *mlxsw_sp)
        if (err)
                return err;
 
-       mlxsw_sp->lags = kzalloc_objs(struct mlxsw_sp_lag, mlxsw_sp->max_lag,
-                                     GFP_KERNEL);
+       mlxsw_sp->lags = kzalloc_objs(struct mlxsw_sp_lag, mlxsw_sp->max_lag);
        if (!mlxsw_sp->lags) {
                err = -ENOMEM;
                goto err_kcalloc;
index d6c55a8..2757636 100644 (file)
@@ -513,8 +513,7 @@ mlxsw_sp_acl_bf_init(struct mlxsw_sp *mlxsw_sp, unsigned int num_erp_banks)
         * is 2^ACL_MAX_BF_LOG
         */
        bf_bank_size = 1 << MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_BF_LOG);
-       bf = kzalloc_flex(*bf, refcnt, size_mul(bf_bank_size, num_erp_banks),
-                         GFP_KERNEL);
+       bf = kzalloc_flex(*bf, refcnt, size_mul(bf_bank_size, num_erp_banks));
        if (!bf)
                return ERR_PTR(-ENOMEM);
 
index d1358c7..e2ba919 100644 (file)
@@ -647,8 +647,7 @@ static int mlxsw_sp_sb_ports_init(struct mlxsw_sp *mlxsw_sp)
        int i;
        int err;
 
-       mlxsw_sp->sb->ports = kzalloc_objs(struct mlxsw_sp_sb_port, max_ports,
-                                          GFP_KERNEL);
+       mlxsw_sp->sb->ports = kzalloc_objs(struct mlxsw_sp_sb_port, max_ports);
        if (!mlxsw_sp->sb->ports)
                return -ENOMEM;
 
index 69ab4f8..f1ad937 100644 (file)
@@ -654,8 +654,7 @@ static const struct dcbnl_rtnl_ops mlxsw_sp_dcbnl_ops = {
 
 static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
 {
-       mlxsw_sp_port->dcb.ets = kzalloc_obj(*mlxsw_sp_port->dcb.ets,
-                                            GFP_KERNEL);
+       mlxsw_sp_port->dcb.ets = kzalloc_obj(*mlxsw_sp_port->dcb.ets);
        if (!mlxsw_sp_port->dcb.ets)
                return -ENOMEM;
 
@@ -673,8 +672,7 @@ static int mlxsw_sp_port_maxrate_init(struct mlxsw_sp_port *mlxsw_sp_port)
 {
        int i;
 
-       mlxsw_sp_port->dcb.maxrate = kmalloc_obj(*mlxsw_sp_port->dcb.maxrate,
-                                                GFP_KERNEL);
+       mlxsw_sp_port->dcb.maxrate = kmalloc_obj(*mlxsw_sp_port->dcb.maxrate);
        if (!mlxsw_sp_port->dcb.maxrate)
                return -ENOMEM;
 
@@ -691,8 +689,7 @@ static void mlxsw_sp_port_maxrate_fini(struct mlxsw_sp_port *mlxsw_sp_port)
 
 static int mlxsw_sp_port_pfc_init(struct mlxsw_sp_port *mlxsw_sp_port)
 {
-       mlxsw_sp_port->dcb.pfc = kzalloc_obj(*mlxsw_sp_port->dcb.pfc,
-                                            GFP_KERNEL);
+       mlxsw_sp_port->dcb.pfc = kzalloc_obj(*mlxsw_sp_port->dcb.pfc);
        if (!mlxsw_sp_port->dcb.pfc)
                return -ENOMEM;
 
index 874659d..84942c1 100644 (file)
@@ -277,8 +277,7 @@ mlxsw_sp_nve_mc_record_create(struct mlxsw_sp *mlxsw_sp,
        struct mlxsw_sp_nve_mc_record *mc_record;
        int err;
 
-       mc_record = kzalloc_flex(*mc_record, entries, num_max_entries,
-                                GFP_KERNEL);
+       mc_record = kzalloc_flex(*mc_record, entries, num_max_entries);
        if (!mc_record)
                return ERR_PTR(-ENOMEM);
 
index a7ed770..143fdd8 100644 (file)
@@ -1038,8 +1038,7 @@ static int mlxsw_sp_vrs_init(struct mlxsw_sp *mlxsw_sp)
                return -EIO;
 
        max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
-       mlxsw_sp->router->vrs = kzalloc_objs(struct mlxsw_sp_vr, max_vrs,
-                                            GFP_KERNEL);
+       mlxsw_sp->router->vrs = kzalloc_objs(struct mlxsw_sp_vr, max_vrs);
        if (!mlxsw_sp->router->vrs)
                return -ENOMEM;
 
@@ -11068,8 +11067,7 @@ static int mlxsw_sp_rifs_init(struct mlxsw_sp *mlxsw_sp)
        mlxsw_sp->router->max_rif_mac_profile =
                MLXSW_CORE_RES_GET(core, MAX_RIF_MAC_PROFILES);
 
-       mlxsw_sp->router->rifs = kzalloc_objs(struct mlxsw_sp_rif *, max_rifs,
-                                             GFP_KERNEL);
+       mlxsw_sp->router->rifs = kzalloc_objs(struct mlxsw_sp_rif *, max_rifs);
        if (!mlxsw_sp->router->rifs)
                return -ENOMEM;
 
index 4b15fe4..26557cd 100644 (file)
@@ -3991,8 +3991,7 @@ static void ksz_update_timer(struct ksz_timer_info *info)
  */
 static int ksz_alloc_soft_desc(struct ksz_desc_info *desc_info, int transmit)
 {
-       desc_info->ring = kzalloc_objs(struct ksz_desc, desc_info->alloc,
-                                      GFP_KERNEL);
+       desc_info->ring = kzalloc_objs(struct ksz_desc, desc_info->alloc);
        if (!desc_info->ring)
                return 1;
        hw_init_desc(desc_info, transmit);
index 13e2217..7b6369e 100644 (file)
@@ -200,8 +200,7 @@ static int lan966x_fdma_tx_alloc(struct lan966x_tx *tx)
        struct fdma *fdma = &tx->fdma;
        int err;
 
-       tx->dcbs_buf = kzalloc_objs(struct lan966x_tx_dcb_buf, fdma->n_dcbs,
-                                   GFP_KERNEL);
+       tx->dcbs_buf = kzalloc_objs(struct lan966x_tx_dcb_buf, fdma->n_dcbs);
        if (!tx->dcbs_buf)
                return -ENOMEM;
 
index 8c7894a..9befd07 100644 (file)
@@ -889,8 +889,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
        }
        sparx5->port_count = of_get_child_count(ports);
 
-       configs = kzalloc_objs(struct initial_port_config, sparx5->port_count,
-                              GFP_KERNEL);
+       configs = kzalloc_objs(struct initial_port_config, sparx5->port_count);
        if (!configs) {
                err = -ENOMEM;
                goto cleanup_pnode;
index 0422a1c..9919183 100644 (file)
@@ -2326,8 +2326,7 @@ static int mana_create_txq(struct mana_port_context *apc,
        int err;
        int i;
 
-       apc->tx_qp = kzalloc_objs(struct mana_tx_qp, apc->num_queues,
-                                 GFP_KERNEL);
+       apc->tx_qp = kzalloc_objs(struct mana_tx_qp, apc->num_queues);
        if (!apc->tx_qp)
                return -ENOMEM;
 
@@ -2852,8 +2851,7 @@ static int mana_rss_table_alloc(struct mana_port_context *apc)
        if (!apc->indir_table)
                return -ENOMEM;
 
-       apc->rxobj_table = kzalloc_objs(mana_handle_t, apc->indir_table_sz,
-                                       GFP_KERNEL);
+       apc->rxobj_table = kzalloc_objs(mana_handle_t, apc->indir_table_sz);
        if (!apc->rxobj_table) {
                kfree(apc->indir_table);
                return -ENOMEM;
index 75ee095..e5e51d0 100644 (file)
@@ -3703,8 +3703,7 @@ static void myri10ge_probe_slices(struct myri10ge_priv *mgp)
         * slices. We give up on MSI-X if we can only get a single
         * vector. */
 
-       mgp->msix_vectors = kzalloc_objs(*mgp->msix_vectors, mgp->num_slices,
-                                        GFP_KERNEL);
+       mgp->msix_vectors = kzalloc_objs(*mgp->msix_vectors, mgp->num_slices);
        if (mgp->msix_vectors == NULL)
                goto no_msix;
        for (i = 0; i < mgp->num_slices; i++) {
index 1fcd53a..8a1773d 100644 (file)
@@ -123,8 +123,7 @@ nfp_map_ptrs_record(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog,
        if (!cnt)
                goto out;
 
-       nfp_prog->map_records = kmalloc_objs(nfp_prog->map_records[0], cnt,
-                                            GFP_KERNEL);
+       nfp_prog->map_records = kmalloc_objs(nfp_prog->map_records[0], cnt);
        if (!nfp_prog->map_records) {
                err = -ENOMEM;
                goto out;
index 1c61d4a..eb43636 100644 (file)
@@ -335,8 +335,7 @@ static void nfp_fl_lag_do_work(struct work_struct *work)
                        continue;
                }
 
-               acti_netdevs = kmalloc_objs(*acti_netdevs, entry->slave_cnt,
-                                           GFP_KERNEL);
+               acti_netdevs = kmalloc_objs(*acti_netdevs, entry->slave_cnt);
                if (!acti_netdevs) {
                        schedule_delayed_work(&lag->work,
                                              NFP_FL_LAG_DELAY);
index 480b644..2560c4e 100644 (file)
@@ -140,8 +140,7 @@ nfp_nfd3_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring)
                goto err_alloc;
        }
 
-       tx_ring->txbufs = kvzalloc_objs(*tx_ring->txbufs, tx_ring->cnt,
-                                       GFP_KERNEL);
+       tx_ring->txbufs = kvzalloc_objs(*tx_ring->txbufs, tx_ring->cnt);
        if (!tx_ring->txbufs)
                goto err_alloc;
 
index c090546..10d162e 100644 (file)
@@ -105,8 +105,7 @@ nfp_nfdk_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring)
                goto err_alloc;
        }
 
-       tx_ring->ktxbufs = kvzalloc_objs(*tx_ring->ktxbufs, tx_ring->cnt,
-                                        GFP_KERNEL);
+       tx_ring->ktxbufs = kvzalloc_objs(*tx_ring->ktxbufs, tx_ring->cnt);
        if (!tx_ring->ktxbufs)
                goto err_alloc;
 
index a9c7bab..7928e76 100644 (file)
@@ -2537,8 +2537,7 @@ nfp_net_alloc(struct pci_dev *pdev, const struct nfp_dev_info *dev_info,
                                  nn->dp.num_r_vecs, num_online_cpus());
        nn->max_r_vecs = nn->dp.num_r_vecs;
 
-       nn->dp.xsk_pools = kzalloc_objs(*nn->dp.xsk_pools, nn->max_r_vecs,
-                                       GFP_KERNEL);
+       nn->dp.xsk_pools = kzalloc_objs(*nn->dp.xsk_pools, nn->max_r_vecs);
        if (!nn->dp.xsk_pools) {
                err = -ENOMEM;
                goto err_free_nn;
index aeaa998..06cfabf 100644 (file)
@@ -229,8 +229,7 @@ static int nfp_net_pf_alloc_irqs(struct nfp_pf *pf)
        wanted_irqs = 0;
        list_for_each_entry(nn, &pf->vnics, vnic_list)
                wanted_irqs += NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs;
-       pf->irq_entries = kzalloc_objs(*pf->irq_entries, wanted_irqs,
-                                      GFP_KERNEL);
+       pf->irq_entries = kzalloc_objs(*pf->irq_entries, wanted_irqs);
        if (!pf->irq_entries)
                return -ENOMEM;
 
index eb5f9c2..4ca6927 100644 (file)
@@ -99,8 +99,7 @@ int nfp_shared_buf_register(struct nfp_pf *pf)
 
        entry_sz = nfp_cpp_area_size(sb_desc_area) / num_entries;
 
-       pf->shared_bufs = kmalloc_objs(pf->shared_bufs[0], num_entries,
-                                      GFP_KERNEL);
+       pf->shared_bufs = kmalloc_objs(pf->shared_bufs[0], num_entries);
        if (!pf->shared_bufs) {
                err = -ENOMEM;
                goto err_release_area;
index bff27b2..5b0435d 100644 (file)
@@ -5854,10 +5854,8 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
                        goto out_unmap;
                np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size];
        }
-       np->rx_skb = kzalloc_objs(struct nv_skb_map, np->rx_ring_size,
-                                 GFP_KERNEL);
-       np->tx_skb = kzalloc_objs(struct nv_skb_map, np->tx_ring_size,
-                                 GFP_KERNEL);
+       np->rx_skb = kzalloc_objs(struct nv_skb_map, np->rx_ring_size);
+       np->tx_skb = kzalloc_objs(struct nv_skb_map, np->tx_ring_size);
        if (!np->rx_skb || !np->tx_skb)
                goto out_freering;
 
index f9a6471..3c798e5 100644 (file)
@@ -381,8 +381,7 @@ static int pasemi_mac_setup_rx_resources(const struct net_device *dev)
        spin_lock_init(&ring->lock);
 
        ring->size = RX_RING_SIZE;
-       ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, RX_RING_SIZE,
-                                      GFP_KERNEL);
+       ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, RX_RING_SIZE);
 
        if (!ring->ring_info)
                goto out_ring_info;
@@ -464,8 +463,7 @@ pasemi_mac_setup_tx_resources(const struct net_device *dev)
        spin_lock_init(&ring->lock);
 
        ring->size = TX_RING_SIZE;
-       ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, TX_RING_SIZE,
-                                      GFP_KERNEL);
+       ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, TX_RING_SIZE);
        if (!ring->ring_info)
                goto out_ring_info;
 
index 163eabd..8bc4e2b 100644 (file)
@@ -202,8 +202,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
 
        recv_ctx = &adapter->recv_ctx;
 
-       rds_ring = kzalloc_objs(struct nx_host_rds_ring, adapter->max_rds_rings,
-                               GFP_KERNEL);
+       rds_ring = kzalloc_objs(struct nx_host_rds_ring, adapter->max_rds_rings);
        if (rds_ring == NULL)
                goto err_out;
 
index 4826f44..9861daa 100644 (file)
@@ -845,8 +845,7 @@ static int qed_cxt_src_t2_alloc(struct qed_hwfn *p_hwfn)
        p_t2->num_pages = DIV_ROUND_UP(total_size, psz);
 
        /* allocate t2 */
-       p_t2->dma_mem = kzalloc_objs(struct phys_mem_desc, p_t2->num_pages,
-                                    GFP_KERNEL);
+       p_t2->dma_mem = kzalloc_objs(struct phys_mem_desc, p_t2->num_pages);
        if (!p_t2->dma_mem) {
                DP_NOTICE(p_hwfn, "Failed to allocate t2 table\n");
                rc = -ENOMEM;
@@ -994,8 +993,7 @@ static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn)
        int rc;
 
        size = qed_cxt_ilt_shadow_size(clients);
-       p_mngr->ilt_shadow = kzalloc_objs(struct phys_mem_desc, size,
-                                         GFP_KERNEL);
+       p_mngr->ilt_shadow = kzalloc_objs(struct phys_mem_desc, size);
        if (!p_mngr->ilt_shadow) {
                rc = -ENOMEM;
                goto ilt_shadow_fail;
index 83d043d..4fb38e4 100644 (file)
@@ -6821,8 +6821,7 @@ qed_mcp_trace_alloc_meta_data(struct qed_hwfn *p_hwfn,
 
        /* Read number of formats and allocate memory for all formats */
        meta->formats_num = qed_read_dword_from_buf(meta_buf_bytes, &offset);
-       meta->formats = kzalloc_objs(struct mcp_trace_format, meta->formats_num,
-                                    GFP_KERNEL);
+       meta->formats = kzalloc_objs(struct mcp_trace_format, meta->formats_num);
        if (!meta->formats)
                return DBG_STATUS_VIRT_MEM_ALLOC_FAILED;
 
index 9b7b053..79ea53b 100644 (file)
@@ -1692,8 +1692,7 @@ struct phys_mem_desc *qed_fw_overlay_mem_alloc(struct qed_hwfn *p_hwfn,
        if (!buf_size)
                return NULL;
 
-       allocated_mem = kzalloc_objs(struct phys_mem_desc, NUM_STORMS,
-                                    GFP_KERNEL);
+       allocated_mem = kzalloc_objs(struct phys_mem_desc, NUM_STORMS);
        if (!allocated_mem)
                return NULL;
 
index 1931995..e71eed7 100644 (file)
@@ -963,8 +963,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
        struct qede_fastpath *fp;
        int i;
 
-       edev->fp_array = kzalloc_objs(*edev->fp_array, QEDE_QUEUE_CNT(edev),
-                                     GFP_KERNEL);
+       edev->fp_array = kzalloc_objs(*edev->fp_array, QEDE_QUEUE_CNT(edev));
        if (!edev->fp_array) {
                DP_NOTICE(edev, "fp array allocation failed\n");
                goto err;
@@ -1007,8 +1006,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
                }
 
                if (fp->type & QEDE_FASTPATH_TX) {
-                       fp->txq = kzalloc_objs(*fp->txq, edev->dev_info.num_tc,
-                                              GFP_KERNEL);
+                       fp->txq = kzalloc_objs(*fp->txq, edev->dev_info.num_tc);
                        if (!fp->txq)
                                goto err;
                }
@@ -1019,8 +1017,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
                                goto err;
 
                        if (edev->xdp_prog) {
-                               fp->xdp_tx = kzalloc_obj(*fp->xdp_tx,
-                                                        GFP_KERNEL);
+                               fp->xdp_tx = kzalloc_obj(*fp->xdp_tx);
                                if (!fp->xdp_tx)
                                        goto err;
                                fp->type |= QEDE_FASTPATH_XDP;
index 106cbe1..688cb57 100644 (file)
@@ -994,8 +994,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
 
        act_pci_func = ahw->total_nic_func;
 
-       adapter->npars = kzalloc_objs(struct qlcnic_npar_info, act_pci_func,
-                                     GFP_KERNEL);
+       adapter->npars = kzalloc_objs(struct qlcnic_npar_info, act_pci_func);
        if (!adapter->npars) {
                ret = -ENOMEM;
                goto err_pci_info;
index e2f1169..0704dbc 100644 (file)
@@ -156,8 +156,7 @@ int qlcnic_sriov_init(struct qlcnic_adapter *adapter, int num_vfs)
        adapter->ahw->sriov = sriov;
        sriov->num_vfs = num_vfs;
        bc = &sriov->bc;
-       sriov->vf_info = kzalloc_objs(struct qlcnic_vf_info, num_vfs,
-                                     GFP_KERNEL);
+       sriov->vf_info = kzalloc_objs(struct qlcnic_vf_info, num_vfs);
        if (!sriov->vf_info) {
                err = -ENOMEM;
                goto qlcnic_free_sriov;
index 85f2e23..fb689bd 100644 (file)
@@ -442,8 +442,7 @@ static int ravb_ring_init(struct net_device *ndev, int q)
                goto error;
 
        /* Allocate TX skb rings */
-       priv->tx_skb[q] = kzalloc_objs(*priv->tx_skb[q], priv->num_tx_ring[q],
-                                      GFP_KERNEL);
+       priv->tx_skb[q] = kzalloc_objs(*priv->tx_skb[q], priv->num_tx_ring[q]);
        if (!priv->tx_skb[q])
                goto error;
 
index 65b84ea..6fe9648 100644 (file)
@@ -346,8 +346,7 @@ static int rswitch_gwca_queue_alloc(struct net_device *ndev,
        gq->ndev = ndev;
 
        if (!dir_tx) {
-               gq->rx_bufs = kzalloc_objs(*gq->rx_bufs, gq->ring_size,
-                                          GFP_KERNEL);
+               gq->rx_bufs = kzalloc_objs(*gq->rx_bufs, gq->ring_size);
                if (!gq->rx_bufs)
                        return -ENOMEM;
                if (rswitch_gwca_queue_alloc_rx_buf(gq, 0, gq->ring_size) < 0)
@@ -360,8 +359,7 @@ static int rswitch_gwca_queue_alloc(struct net_device *ndev,
                gq->skbs = kzalloc_objs(*gq->skbs, gq->ring_size);
                if (!gq->skbs)
                        return -ENOMEM;
-               gq->unmap_addrs = kzalloc_objs(*gq->unmap_addrs, gq->ring_size,
-                                              GFP_KERNEL);
+               gq->unmap_addrs = kzalloc_objs(*gq->unmap_addrs, gq->ring_size);
                if (!gq->unmap_addrs)
                        goto out;
                gq->tx_ring = dma_alloc_coherent(ndev->dev.parent,
index 019828d..bfaa9aa 100644 (file)
@@ -1410,13 +1410,11 @@ static int sh_eth_ring_init(struct net_device *ndev)
                mdp->rx_buf_sz += NET_IP_ALIGN;
 
        /* Allocate RX and TX skb rings */
-       mdp->rx_skbuff = kzalloc_objs(*mdp->rx_skbuff, mdp->num_rx_ring,
-                                     GFP_KERNEL);
+       mdp->rx_skbuff = kzalloc_objs(*mdp->rx_skbuff, mdp->num_rx_ring);
        if (!mdp->rx_skbuff)
                return -ENOMEM;
 
-       mdp->tx_skbuff = kzalloc_objs(*mdp->tx_skbuff, mdp->num_tx_ring,
-                                     GFP_KERNEL);
+       mdp->tx_skbuff = kzalloc_objs(*mdp->tx_skbuff, mdp->num_tx_ring);
        if (!mdp->tx_skbuff)
                goto ring_free;
 
index 32eb563..ff6ca7b 100644 (file)
@@ -2647,8 +2647,7 @@ static int rocker_msix_init(struct rocker *rocker)
        if (msix_entries != ROCKER_MSIX_VEC_COUNT(rocker->port_count))
                return -EINVAL;
 
-       rocker->msix_entries = kmalloc_objs(struct msix_entry, msix_entries,
-                                           GFP_KERNEL);
+       rocker->msix_entries = kmalloc_objs(struct msix_entry, msix_entries);
        if (!rocker->msix_entries)
                return -ENOMEM;
 
index 4f16779..5051ada 100644 (file)
@@ -495,8 +495,7 @@ static int init_rx_ring(struct net_device *dev, u8 queue_no,
                goto err_free_dma_rx;
        }
 
-       rx_ring->rx_skbuff = kmalloc_objs(struct sk_buff *, rx_rsize,
-                                         GFP_KERNEL);
+       rx_ring->rx_skbuff = kmalloc_objs(struct sk_buff *, rx_rsize);
        if (!rx_ring->rx_skbuff) {
                ret = -ENOMEM;
                goto err_free_skbuff_dma;
index f7cc47b..e7e955b 100644 (file)
@@ -733,8 +733,7 @@ static void ef4_init_rx_recycle_ring(struct ef4_nic *efx,
 
        page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
                                            efx->rx_bufs_per_page);
-       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
-                                          GFP_KERNEL);
+       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
        if (!rx_queue->page_ring)
                rx_queue->page_ptr_mask = 0;
        else
index ddea1e7..db4dd7f 100644 (file)
@@ -545,8 +545,7 @@ ef4_test_loopback(struct ef4_tx_queue *tx_queue,
                /* Determine how many packets to send */
                state->packet_count = efx->txq_entries / 3;
                state->packet_count = min(1 << (i << 2), state->packet_count);
-               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
-                                          GFP_KERNEL);
+               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
                if (!state->skbs)
                        return -ENOMEM;
                state->flush = false;
index 68eb111..e574f91 100644 (file)
@@ -355,8 +355,7 @@ int efx_mcdi_mon_probe(struct efx_nic *efx)
                rc = -ENOMEM;
                goto fail;
        }
-       hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1,
-                                         GFP_KERNEL);
+       hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1);
        if (!hwmon->group.attrs) {
                rc = -ENOMEM;
                goto fail;
index aa36474..fd0a1a8 100644 (file)
@@ -138,8 +138,7 @@ static void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue)
        bufs_in_recycle_ring = efx_rx_recycle_ring_size(efx);
        page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
                                            efx->rx_bufs_per_page);
-       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
-                                          GFP_KERNEL);
+       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
        if (!rx_queue->page_ring)
                rx_queue->page_ptr_mask = 0;
        else
index 26bff77..8ec7632 100644 (file)
@@ -542,8 +542,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
                /* Determine how many packets to send */
                state->packet_count = efx->txq_entries / 3;
                state->packet_count = min(1 << (i << 2), state->packet_count);
-               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
-                                          GFP_KERNEL);
+               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
                if (!state->skbs)
                        return -ENOMEM;
                state->flush = false;
index 9d3df88..0216a2a 100644 (file)
@@ -355,8 +355,7 @@ int efx_siena_mcdi_mon_probe(struct efx_nic *efx)
                rc = -ENOMEM;
                goto fail;
        }
-       hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1,
-                                         GFP_KERNEL);
+       hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1);
        if (!hwmon->group.attrs) {
                rc = -ENOMEM;
                goto fail;
index 83dfd6a..4ceb108 100644 (file)
@@ -141,8 +141,7 @@ static void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue)
        bufs_in_recycle_ring = efx_rx_recycle_ring_size(efx);
        page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
                                            efx->rx_bufs_per_page);
-       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
-                                          GFP_KERNEL);
+       rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
        if (!rx_queue->page_ring)
                rx_queue->page_ptr_mask = 0;
        else
index 864632a..9306436 100644 (file)
@@ -543,8 +543,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
                /* Determine how many packets to send */
                state->packet_count = efx->txq_entries / 3;
                state->packet_count = min(1 << (i << 2), state->packet_count);
-               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
-                                          GFP_KERNEL);
+               state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
                if (!state->skbs)
                        return -ENOMEM;
                state->flush = false;
index 02482de..0c97211 100644 (file)
@@ -1179,8 +1179,7 @@ static int smsc9420_alloc_tx_ring(struct smsc9420_pdata *pd)
 
        BUG_ON(!pd->tx_ring);
 
-       pd->tx_buffers = kmalloc_objs(struct smsc9420_ring_info, TX_RING_SIZE,
-                                     GFP_KERNEL);
+       pd->tx_buffers = kmalloc_objs(struct smsc9420_ring_info, TX_RING_SIZE);
        if (!pd->tx_buffers)
                return -ENOMEM;
 
@@ -1211,8 +1210,7 @@ static int smsc9420_alloc_rx_ring(struct smsc9420_pdata *pd)
 
        BUG_ON(!pd->rx_ring);
 
-       pd->rx_buffers = kmalloc_objs(struct smsc9420_ring_info, RX_RING_SIZE,
-                                     GFP_KERNEL);
+       pd->rx_buffers = kmalloc_objs(struct smsc9420_ring_info, RX_RING_SIZE);
        if (pd->rx_buffers == NULL)
                goto out;
 
index 3dc05df..3b3532c 100644 (file)
@@ -2212,8 +2212,7 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
                return ret;
        }
 
-       rx_q->buf_pool = kzalloc_objs(*rx_q->buf_pool, dma_conf->dma_rx_size,
-                                     GFP_KERNEL);
+       rx_q->buf_pool = kzalloc_objs(*rx_q->buf_pool, dma_conf->dma_rx_size);
        if (!rx_q->buf_pool)
                return -ENOMEM;
 
@@ -2301,8 +2300,7 @@ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv,
        if (!tx_q->tx_skbuff_dma)
                return -ENOMEM;
 
-       tx_q->tx_skbuff = kzalloc_objs(struct sk_buff *, dma_conf->dma_tx_size,
-                                      GFP_KERNEL);
+       tx_q->tx_skbuff = kzalloc_objs(struct sk_buff *, dma_conf->dma_tx_size);
        if (!tx_q->tx_skbuff)
                return -ENOMEM;
 
index cda6ee4..aa7c90d 100644 (file)
@@ -233,21 +233,18 @@ static int xlgmac_alloc_channels(struct xlgmac_pdata *pdata)
        int ret = -ENOMEM;
        unsigned int i;
 
-       channel_head = kzalloc_objs(struct xlgmac_channel, pdata->channel_count,
-                                   GFP_KERNEL);
+       channel_head = kzalloc_objs(struct xlgmac_channel, pdata->channel_count);
        if (!channel_head)
                return ret;
 
        netif_dbg(pdata, drv, pdata->netdev,
                  "channel_head=%p\n", channel_head);
 
-       tx_ring = kzalloc_objs(struct xlgmac_ring, pdata->tx_ring_count,
-                              GFP_KERNEL);
+       tx_ring = kzalloc_objs(struct xlgmac_ring, pdata->tx_ring_count);
        if (!tx_ring)
                goto err_tx_ring;
 
-       rx_ring = kzalloc_objs(struct xlgmac_ring, pdata->rx_ring_count,
-                              GFP_KERNEL);
+       rx_ring = kzalloc_objs(struct xlgmac_ring, pdata->rx_ring_count);
        if (!rx_ring)
                goto err_rx_ring;
 
index 36d8244..71de14a 100644 (file)
@@ -77,8 +77,7 @@ k3_cppi_desc_pool_create_name(struct device *dev, size_t size,
 
        pool->gen_pool->name = pool_name;
 
-       pool->desc_infos = kzalloc_objs(*pool->desc_infos, pool->num_desc,
-                                       GFP_KERNEL);
+       pool->desc_infos = kzalloc_objs(*pool->desc_infos, pool->num_desc);
        if (!pool->desc_infos)
                goto gen_pool_desc_infos_alloc_fail;
 
index cb286ba..b06e4c3 100644 (file)
@@ -1542,8 +1542,7 @@ static int axienet_init_dmaengine(struct net_device *ndev)
        lp->tx_ring_head = 0;
        lp->rx_ring_tail = 0;
        lp->rx_ring_head = 0;
-       lp->tx_skb_ring = kzalloc_objs(*lp->tx_skb_ring, TX_BD_NUM_MAX,
-                                      GFP_KERNEL);
+       lp->tx_skb_ring = kzalloc_objs(*lp->tx_skb_ring, TX_BD_NUM_MAX);
        if (!lp->tx_skb_ring) {
                ret = -ENOMEM;
                goto err_dma_release_rx;
@@ -1557,8 +1556,7 @@ static int axienet_init_dmaengine(struct net_device *ndev)
                lp->tx_skb_ring[i] = skbuf_dma;
        }
 
-       lp->rx_skb_ring = kzalloc_objs(*lp->rx_skb_ring, RX_BUF_NUM_DEFAULT,
-                                      GFP_KERNEL);
+       lp->rx_skb_ring = kzalloc_objs(*lp->rx_skb_ring, RX_BUF_NUM_DEFAULT);
        if (!lp->rx_skb_ring) {
                ret = -ENOMEM;
                goto err_free_tx_skb_ring;
index 1a3f2a3..ee5ab5c 100644 (file)
@@ -1524,8 +1524,7 @@ static void netvsc_get_ethtool_stats(struct net_device *dev,
                data[i++] = xdp_tx;
        }
 
-       pcpu_sum = kvmalloc_objs(struct netvsc_ethtool_pcpu_stats, nr_cpu_ids,
-                                GFP_KERNEL);
+       pcpu_sum = kvmalloc_objs(struct netvsc_ethtool_pcpu_stats, nr_cpu_ids);
        if (!pcpu_sum)
                return;
 
index 97c69f5..ed41781 100644 (file)
@@ -720,8 +720,7 @@ static void ca8210_rx_done(struct cas_control *cas_ctl)
                                &priv->spi->dev,
                                "Resetting MAC...\n");
 
-                       mlme_reset_wpc = kmalloc_obj(*mlme_reset_wpc,
-                                                    GFP_KERNEL);
+                       mlme_reset_wpc = kmalloc_obj(*mlme_reset_wpc);
                        if (!mlme_reset_wpc)
                                goto finish;
                        INIT_WORK(
index d0b10a2..ecd9a3b 100644 (file)
@@ -730,8 +730,7 @@ int gsi_channel_trans_init(struct gsi *gsi, u32 channel_id)
         * modulo that number to determine the next one that's free.
         * Transactions are allocated one at a time.
         */
-       trans_info->trans = kzalloc_objs(*trans_info->trans, tre_count,
-                                        GFP_KERNEL);
+       trans_info->trans = kzalloc_objs(*trans_info->trans, tre_count);
        if (!trans_info->trans)
                return -ENOMEM;
        trans_info->free_id = 0;        /* all modulo channel->tre_count */
index 4652dc7..2b72fa9 100644 (file)
@@ -679,8 +679,7 @@ static int miic_parse_dt(struct miic *miic, u32 *mode_cfg)
        s8 *dt_val;
        u32 conf;
 
-       dt_val = kmalloc_objs(*dt_val, miic->of_data->conf_conv_count,
-                             GFP_KERNEL);
+       dt_val = kmalloc_objs(*dt_val, miic->of_data->conf_conv_count);
        if (!dt_val)
                return -ENOMEM;
 
index e7f66e4..1825f7c 100644 (file)
@@ -2630,8 +2630,7 @@ static struct hso_device *hso_create_bulk_serial_device(
                if (!serial->tiocmget)
                        goto exit;
                serial->tiocmget->serial_state_notification
-                       = kzalloc_obj(struct hso_serial_state_notification,
-                                     GFP_KERNEL);
+                       = kzalloc_obj(struct hso_serial_state_notification);
                if (!serial->tiocmget->serial_state_notification)
                        goto exit;
                tiocmget = serial->tiocmget;
index 8fb6bb5..6f72a3f 100644 (file)
@@ -1450,8 +1450,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf)
                return ret;
        }
 
-       dev->data[0] = (unsigned long) kzalloc_obj(struct smsc75xx_priv,
-                                                  GFP_KERNEL);
+       dev->data[0] = (unsigned long) kzalloc_obj(struct smsc75xx_priv);
 
        pdata = (struct smsc75xx_priv *)(dev->data[0]);
        if (!pdata)
index f26233d..b72ab99 100644 (file)
@@ -203,15 +203,13 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
                goto free_tx_bd;
        }
 
-       priv->rx_skbuff = kzalloc_objs(*priv->rx_skbuff, priv->rx_ring_size,
-                                      GFP_KERNEL);
+       priv->rx_skbuff = kzalloc_objs(*priv->rx_skbuff, priv->rx_ring_size);
        if (!priv->rx_skbuff) {
                ret = -ENOMEM;
                goto free_ucc_pram;
        }
 
-       priv->tx_skbuff = kzalloc_objs(*priv->tx_skbuff, priv->tx_ring_size,
-                                      GFP_KERNEL);
+       priv->tx_skbuff = kzalloc_objs(*priv->tx_skbuff, priv->tx_ring_size);
        if (!priv->tx_skbuff) {
                ret = -ENOMEM;
                goto free_rx_skbuff;
index 23e5163..a9cbe95 100644 (file)
@@ -1461,8 +1461,7 @@ ath10k_ce_alloc_src_ring(struct ath10k *ar, unsigned int ce_id,
 
        nentries = roundup_pow_of_two(nentries);
 
-       src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries,
-                               GFP_KERNEL);
+       src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
        if (src_ring == NULL)
                return ERR_PTR(-ENOMEM);
 
@@ -1519,8 +1518,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id,
 
        nentries = roundup_pow_of_two(nentries);
 
-       src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries,
-                               GFP_KERNEL);
+       src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
        if (!src_ring)
                return ERR_PTR(-ENOMEM);
 
@@ -1575,8 +1573,7 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id,
 
        nentries = roundup_pow_of_two(attr->dest_nentries);
 
-       dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries,
-                                GFP_KERNEL);
+       dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
        if (dest_ring == NULL)
                return ERR_PTR(-ENOMEM);
 
@@ -1619,8 +1616,7 @@ ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id,
 
        nentries = roundup_pow_of_two(attr->dest_nentries);
 
-       dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries,
-                                GFP_KERNEL);
+       dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
        if (!dest_ring)
                return ERR_PTR(-ENOMEM);
 
index cf7424b..8e60469 100644 (file)
@@ -7559,8 +7559,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
                }
 
                if (ath10k_debug_is_extd_tx_stats_enabled(ar)) {
-                       arsta->tx_stats = kzalloc_obj(*arsta->tx_stats,
-                                                     GFP_KERNEL);
+                       arsta->tx_stats = kzalloc_obj(*arsta->tx_stats);
                        if (!arsta->tx_stats) {
                                ath10k_mac_dec_num_stations(arvif, sta);
                                ret = -ENOMEM;
index 43f8ef0..715e561 100644 (file)
@@ -1362,8 +1362,7 @@ static int ath12k_dp_cc_init(struct ath12k_base *ab)
        if (dp->num_spt_pages > ATH12K_MAX_PPT_ENTRIES)
                dp->num_spt_pages = ATH12K_MAX_PPT_ENTRIES;
 
-       dp->spt_info = kzalloc_objs(struct ath12k_spt_info, dp->num_spt_pages,
-                                   GFP_KERNEL);
+       dp->spt_info = kzalloc_objs(struct ath12k_spt_info, dp->num_spt_pages);
 
        if (!dp->spt_info) {
                ath12k_warn(ab, "SPT page allocation failure");
index c6d64b4..c6b8890 100644 (file)
@@ -5024,8 +5024,7 @@ static struct ath12k_vif_cache *ath12k_ahvif_get_link_cache(struct ath12k_vif *a
                                                            u8 link_id)
 {
        if (!ahvif->cache[link_id]) {
-               ahvif->cache[link_id] = kzalloc_obj(*ahvif->cache[0],
-                                                   GFP_KERNEL);
+               ahvif->cache[link_id] = kzalloc_obj(*ahvif->cache[0]);
                if (ahvif->cache[link_id])
                        INIT_LIST_HEAD(&ahvif->cache[link_id]->key_conf.list);
        }
@@ -14250,8 +14249,7 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
                if (ar->ab->hw_params->single_pdev_only)
                        n_combinations = 2;
 
-               combinations = kzalloc_objs(*combinations, n_combinations,
-                                           GFP_KERNEL);
+               combinations = kzalloc_objs(*combinations, n_combinations);
                if (!combinations)
                        return -ENOMEM;
 
index a8b9c34..9e4983d 100644 (file)
@@ -760,8 +760,7 @@ ath5k_eeprom_convert_pcal_info_5111(struct ath5k_hw *ah, int mode,
                if (!pd->pd_step)
                        goto err_out;
 
-               pd->pd_pwr = kzalloc_objs(s16, AR5K_EEPROM_N_PWR_POINTS_5111,
-                                         GFP_KERNEL);
+               pd->pd_pwr = kzalloc_objs(s16, AR5K_EEPROM_N_PWR_POINTS_5111);
                if (!pd->pd_pwr)
                        goto err_out;
 
@@ -942,8 +941,7 @@ ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode,
                                if (!pd->pd_step)
                                        goto err_out;
 
-                               pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
-                                                         GFP_KERNEL);
+                               pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
 
                                if (!pd->pd_pwr)
                                        goto err_out;
@@ -980,8 +978,7 @@ ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode,
                                if (!pd->pd_step)
                                        goto err_out;
 
-                               pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
-                                                         GFP_KERNEL);
+                               pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
 
                                if (!pd->pd_pwr)
                                        goto err_out;
@@ -1236,8 +1233,7 @@ ath5k_eeprom_convert_pcal_info_2413(struct ath5k_hw *ah, int mode,
                        if (!pd->pd_step)
                                goto err_out;
 
-                       pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
-                                                 GFP_KERNEL);
+                       pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
 
                        if (!pd->pd_pwr)
                                goto err_out;
index bc172f5..e998627 100644 (file)
@@ -160,8 +160,7 @@ fw_handle_brd_file(struct wil6210_priv *wil, const void *data,
                return -EINVAL;
        }
 
-       wil->brd_info = kzalloc_objs(struct wil_brd_info, max_num_ent,
-                                    GFP_KERNEL);
+       wil->brd_info = kzalloc_objs(struct wil_brd_info, max_num_ent);
        if (!wil->brd_info)
                return -ENOMEM;
 
index 8d368c9..cdc38eb 100644 (file)
@@ -85,8 +85,7 @@ void wil_pmc_alloc(struct wil6210_priv *wil,
                     num_descriptors, descriptor_size);
 
        /* allocate descriptors info list in pmc context*/
-       pmc->descriptors = kzalloc_objs(struct desc_alloc_info, num_descriptors,
-                                       GFP_KERNEL);
+       pmc->descriptors = kzalloc_objs(struct desc_alloc_info, num_descriptors);
        if (!pmc->descriptors) {
                wil_err(wil, "ERROR allocating pmc skb list\n");
                goto no_release_err;
index c4c6b30..1c54f50 100644 (file)
@@ -314,8 +314,7 @@ static int wil_init_rx_buff_arr(struct wil6210_priv *wil,
        struct list_head *free = &wil->rx_buff_mgmt.free;
        int i;
 
-       wil->rx_buff_mgmt.buff_arr = kzalloc_objs(struct wil_rx_buff, size + 1,
-                                                 GFP_KERNEL);
+       wil->rx_buff_mgmt.buff_arr = kzalloc_objs(struct wil_rx_buff, size + 1);
        if (!wil->rx_buff_mgmt.buff_arr)
                return -ENOMEM;
 
index 3d1c94d..acddae6 100644 (file)
@@ -677,8 +677,7 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
        }
        e->dev = dev;
        log = &e->txstatlog;
-       log->log = kzalloc_objs(struct b43_txstatus, B43_NR_LOGGED_TXSTATUS,
-                               GFP_KERNEL);
+       log->log = kzalloc_objs(struct b43_txstatus, B43_NR_LOGGED_TXSTATUS);
        if (!log->log) {
                b43err(dev->wl, "debugfs: add device txstatus OOM\n");
                kfree(e);
index 6eabe78..3a8df7a 100644 (file)
@@ -846,8 +846,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
        if (for_tx)
                ring->nr_slots = B43_TXRING_SLOTS;
 
-       ring->meta = kzalloc_objs(struct b43_dmadesc_meta, ring->nr_slots,
-                                 GFP_KERNEL);
+       ring->meta = kzalloc_objs(struct b43_dmadesc_meta, ring->nr_slots);
        if (!ring->meta)
                goto err_kfree_ring;
        for (i = 0; i < ring->nr_slots; i++)
index 1608fd0..a955735 100644 (file)
@@ -620,8 +620,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
        if (for_tx)
                nr_slots = B43legacy_TXRING_SLOTS;
 
-       ring->meta = kzalloc_objs(struct b43legacy_dmadesc_meta, nr_slots,
-                                 GFP_KERNEL);
+       ring->meta = kzalloc_objs(struct b43legacy_dmadesc_meta, nr_slots);
        if (!ring->meta)
                goto err_kfree_ring;
        if (for_tx) {
index beb3300..45b342e 100644 (file)
@@ -2199,8 +2199,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
                bus->msgbuf->commonrings[i] =
                                &devinfo->shared.commonrings[i]->commonring;
 
-       flowrings = kzalloc_objs(*flowrings, devinfo->shared.max_flowrings,
-                                GFP_KERNEL);
+       flowrings = kzalloc_objs(*flowrings, devinfo->shared.max_flowrings);
        if (!flowrings)
                goto fail;
 
index 029459d..8837f44 100644 (file)
@@ -3412,8 +3412,7 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
        dma_addr_t p;
 
        priv->msg_buffers =
-           kmalloc_objs(struct ipw2100_tx_packet, IPW_COMMAND_POOL_SIZE,
-                        GFP_KERNEL);
+           kmalloc_objs(struct ipw2100_tx_packet, IPW_COMMAND_POOL_SIZE);
        if (!priv->msg_buffers)
                return -ENOMEM;
 
index cc771ee..22358b2 100644 (file)
@@ -57,8 +57,7 @@ static int libipw_networks_allocate(struct libipw_device *ieee)
        int i, j;
 
        for (i = 0; i < MAX_NETWORK_COUNT; i++) {
-               ieee->networks[i] = kzalloc_obj(struct libipw_network,
-                                               GFP_KERNEL);
+               ieee->networks[i] = kzalloc_obj(struct libipw_network);
                if (!ieee->networks[i]) {
                        LIBIPW_ERROR("Out of memory allocating beacons\n");
                        for (j = 0; j < i; j++)
index c9efb94..8d0ff33 100644 (file)
@@ -2968,8 +2968,7 @@ il_tx_queue_alloc(struct il_priv *il, struct il_tx_queue *txq, u32 id)
        /* Driver ilate data, only for Tx (not command) queues,
         * not shared with device. */
        if (id != il->cmd_queue) {
-               txq->skbs = kzalloc_objs(struct sk_buff *, TFD_QUEUE_SIZE_MAX,
-                                        GFP_KERNEL);
+               txq->skbs = kzalloc_objs(struct sk_buff *, TFD_QUEUE_SIZE_MAX);
                if (!txq->skbs) {
                        IL_ERR("Fail to alloc skbs\n");
                        goto error;
@@ -3442,8 +3441,7 @@ il_init_geos(struct il_priv *il)
        }
 
        channels =
-           kzalloc_objs(struct ieee80211_channel, il->channel_count,
-                        GFP_KERNEL);
+           kzalloc_objs(struct ieee80211_channel, il->channel_count);
        if (!channels)
                return -ENOMEM;
 
@@ -4609,8 +4607,7 @@ il_alloc_txq_mem(struct il_priv *il)
 {
        if (!il->txq)
                il->txq =
-                   kzalloc_objs(struct il_tx_queue, il->cfg->num_of_queues,
-                                GFP_KERNEL);
+                   kzalloc_objs(struct il_tx_queue, il->cfg->num_of_queues);
        if (!il->txq) {
                IL_ERR("Not enough memory for txq\n");
                return -ENOMEM;
index 402842e..1f26d89 100644 (file)
@@ -2958,8 +2958,7 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
                struct iwl_fw_dump_desc *iwl_dump_error_desc;
                int ret;
 
-               iwl_dump_error_desc = kmalloc_obj(*iwl_dump_error_desc,
-                                                 GFP_KERNEL);
+               iwl_dump_error_desc = kmalloc_obj(*iwl_dump_error_desc);
 
                if (!iwl_dump_error_desc)
                        return -ENOMEM;
index 9e8977f..6d235c4 100644 (file)
@@ -1377,11 +1377,9 @@ iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
        u8 tx_chains = fw->valid_rx_ant;
 
        if (cfg->uhb_supported)
-               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB,
-                                   GFP_KERNEL);
+               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB);
        else
-               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT,
-                                   GFP_KERNEL);
+               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT);
        if (!data)
                return NULL;
 
@@ -1444,14 +1442,11 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
        const __le16 *ch_section;
 
        if (cfg->uhb_supported)
-               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB,
-                                   GFP_KERNEL);
+               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB);
        else if (cfg->nvm_type != IWL_NVM_EXT)
-               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS,
-                                   GFP_KERNEL);
+               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS);
        else
-               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT,
-                                   GFP_KERNEL);
+               data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT);
        if (!data)
                return NULL;
 
index 4672110..ef98efc 100644 (file)
@@ -1249,8 +1249,7 @@ iwl_mld_process_netdetect_res(struct iwl_mld *mld,
                goto out;
        }
        n_matches = hweight_long(matched_profiles);
-       netdetect_info = kzalloc_flex(*netdetect_info, matches, n_matches,
-                                     GFP_KERNEL);
+       netdetect_info = kzalloc_flex(*netdetect_info, matches, n_matches);
        if (netdetect_info)
                iwl_mld_set_netdetect_info(mld, netdetect_cfg, netdetect_info,
                                           resume_data->netdetect_res,
@@ -2000,8 +1999,7 @@ int iwl_mld_wowlan_resume(struct iwl_mld *mld)
 
        iwl_fw_dbg_read_d3_debug_data(&mld->fwrt);
 
-       resume_data.wowlan_status = kzalloc_obj(*resume_data.wowlan_status,
-                                               GFP_KERNEL);
+       resume_data.wowlan_status = kzalloc_obj(*resume_data.wowlan_status);
        if (!resume_data.wowlan_status)
                return -ENOMEM;
 
index 3f0d093..3b8ff07 100644 (file)
@@ -660,8 +660,7 @@ iwl_mld_alloc_dup_data(struct iwl_mld *mld, struct iwl_mld_sta *mld_sta)
        if (mld->fw_status.in_hw_restart)
                return 0;
 
-       dup_data = kzalloc_objs(*dup_data, mld->trans->info.num_rxqs,
-                               GFP_KERNEL);
+       dup_data = kzalloc_objs(*dup_data, mld->trans->info.num_rxqs);
        if (!dup_data)
                return -ENOMEM;
 
index ad6f5c4..897ab65 100644 (file)
@@ -12,8 +12,7 @@
 static int iwl_mld_init_time_sync(struct iwl_mld *mld, u32 protocols,
                                  const u8 *addr)
 {
-       struct iwl_mld_time_sync_data *time_sync = kzalloc_obj(*time_sync,
-                                                              GFP_KERNEL);
+       struct iwl_mld_time_sync_data *time_sync = kzalloc_obj(*time_sync);
 
        if (!time_sync)
                return -ENOMEM;
index 5f37ee7..2d0811b 100644 (file)
@@ -1798,8 +1798,7 @@ int iwl_mvm_sta_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        if (iwl_mvm_has_new_rx_api(mvm)) {
                int q;
 
-               dup_data = kzalloc_objs(*dup_data, mvm->trans->info.num_rxqs,
-                                       GFP_KERNEL);
+               dup_data = kzalloc_objs(*dup_data, mvm->trans->info.num_rxqs);
                if (!dup_data)
                        return -ENOMEM;
                /*
index 4e23b29..7c662d5 100644 (file)
@@ -773,8 +773,7 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans)
        if (WARN_ON(trans_pcie->rxq))
                return -EINVAL;
 
-       trans_pcie->rxq = kzalloc_objs(struct iwl_rxq, trans->info.num_rxqs,
-                                      GFP_KERNEL);
+       trans_pcie->rxq = kzalloc_objs(struct iwl_rxq, trans->info.num_rxqs);
        trans_pcie->rx_pool = kzalloc_objs(trans_pcie->rx_pool[0],
                                           RX_POOL_SIZE(trans_pcie->num_rx_bufs),
                                           GFP_KERNEL);
index 0de3f5d..d7979d7 100644 (file)
@@ -741,8 +741,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
 
        txq->n_window = slots_num;
 
-       txq->entries = kzalloc_objs(struct iwl_pcie_txq_entry, slots_num,
-                                   GFP_KERNEL);
+       txq->entries = kzalloc_objs(struct iwl_pcie_txq_entry, slots_num);
 
        if (!txq->entries)
                goto error;
index 1c49aad..148c110 100644 (file)
@@ -341,16 +341,14 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
                goto free;
        }
        priv->chan_num = max_channel_num;
-       priv->survey = kzalloc_objs(struct survey_info, max_channel_num,
-                                   GFP_KERNEL);
+       priv->survey = kzalloc_objs(struct survey_info, max_channel_num);
        if (!priv->survey) {
                ret = -ENOMEM;
                goto free;
        }
 
        list->max_entries = max_channel_num;
-       list->channels = kzalloc_objs(struct p54_channel_entry, max_channel_num,
-                                     GFP_KERNEL);
+       list->channels = kzalloc_objs(struct p54_channel_entry, max_channel_num);
        if (!list->channels) {
                ret = -ENOMEM;
                goto free;
index ae9a63d..4e511f8 100644 (file)
@@ -1503,8 +1503,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
        adapter->scan_processing = true;
        spin_unlock_bh(&adapter->mwifiex_cmd_lock);
 
-       scan_cfg_out = kzalloc_obj(union mwifiex_scan_cmd_config_tlv,
-                                  GFP_KERNEL);
+       scan_cfg_out = kzalloc_obj(union mwifiex_scan_cmd_config_tlv);
        if (!scan_cfg_out) {
                ret = -ENOMEM;
                goto done;
index 0abf519..1561a60 100644 (file)
@@ -484,15 +484,13 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev,
 static int wilc_wfi_cfg_allocate_wpa_entry(struct wilc_priv *priv, u8 idx)
 {
        if (!priv->wilc_gtk[idx]) {
-               priv->wilc_gtk[idx] = kzalloc_obj(*priv->wilc_gtk[idx],
-                                                 GFP_KERNEL);
+               priv->wilc_gtk[idx] = kzalloc_obj(*priv->wilc_gtk[idx]);
                if (!priv->wilc_gtk[idx])
                        return -ENOMEM;
        }
 
        if (!priv->wilc_ptk[idx]) {
-               priv->wilc_ptk[idx] = kzalloc_obj(*priv->wilc_ptk[idx],
-                                                 GFP_KERNEL);
+               priv->wilc_ptk[idx] = kzalloc_obj(*priv->wilc_ptk[idx]);
                if (!priv->wilc_ptk[idx])
                        return -ENOMEM;
        }
@@ -504,8 +502,7 @@ static int wilc_wfi_cfg_allocate_wpa_igtk_entry(struct wilc_priv *priv, u8 idx)
 {
        idx -= 4;
        if (!priv->wilc_igtk[idx]) {
-               priv->wilc_igtk[idx] = kzalloc_obj(*priv->wilc_igtk[idx],
-                                                  GFP_KERNEL);
+               priv->wilc_igtk[idx] = kzalloc_obj(*priv->wilc_igtk[idx]);
                if (!priv->wilc_igtk[idx])
                        return -ENOMEM;
        }
index db2e2bb..1b3fcc2 100644 (file)
@@ -1031,8 +1031,7 @@ qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
        if (WARN_ON(resp->n_reg_rules > NL80211_MAX_SUPP_REG_RULES))
                return -E2BIG;
 
-       mac->rd = kzalloc_flex(*mac->rd, reg_rules, resp->n_reg_rules,
-                              GFP_KERNEL);
+       mac->rd = kzalloc_flex(*mac->rd, reg_rules, resp->n_reg_rules);
        if (!mac->rd)
                return -ENOMEM;
 
@@ -1084,8 +1083,7 @@ qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
                                return -EINVAL;
                        }
 
-                       limits = kzalloc_objs(*limits, rec->n_limits,
-                                             GFP_KERNEL);
+                       limits = kzalloc_objs(*limits, rec->n_limits);
                        if (!limits)
                                return -ENOMEM;
 
@@ -1340,8 +1338,7 @@ static int qtnf_cmd_band_fill_iftype(const u8 *data,
        if (band->n_iftype_data == 0)
                return 0;
 
-       iftype_data = kzalloc_objs(*iftype_data, band->n_iftype_data,
-                                  GFP_KERNEL);
+       iftype_data = kzalloc_objs(*iftype_data, band->n_iftype_data);
        if (!iftype_data) {
                band->n_iftype_data = 0;
                return -ENOMEM;
@@ -1388,8 +1385,7 @@ qtnf_cmd_resp_fill_band_info(struct ieee80211_supported_band *band,
                return 0;
 
        if (!band->channels)
-               band->channels = kzalloc_objs(*chan, band->n_channels,
-                                             GFP_KERNEL);
+               band->channels = kzalloc_objs(*chan, band->n_channels);
        if (!band->channels) {
                band->n_channels = 0;
                return -ENOMEM;
index bf2c30d..ca18a4c 100644 (file)
@@ -11912,8 +11912,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
                return -ENOMEM;
 
        rt2x00dev->chan_survey =
-               kzalloc_objs(struct rt2x00_chan_survey, spec->num_channels,
-                            GFP_KERNEL);
+               kzalloc_objs(struct rt2x00_chan_survey, spec->num_channels);
        if (!rt2x00dev->chan_survey) {
                kfree(info);
                return -ENOMEM;
index 1f927dd..7bafb05 100644 (file)
@@ -70,10 +70,8 @@ static int rtl92du_init_shared_data(struct ieee80211_hw *hw)
        rtlpriv->curveindex_5g = kcalloc(TARGET_CHNL_NUM_5G,
                                         sizeof(*rtlpriv->curveindex_5g),
                                         GFP_KERNEL);
-       rtlpriv->mutex_for_power_on_off = kzalloc_obj(*rtlpriv->mutex_for_power_on_off,
-                                                     GFP_KERNEL);
-       rtlpriv->mutex_for_hw_init = kzalloc_obj(*rtlpriv->mutex_for_hw_init,
-                                                GFP_KERNEL);
+       rtlpriv->mutex_for_power_on_off = kzalloc_obj(*rtlpriv->mutex_for_power_on_off);
+       rtlpriv->mutex_for_hw_init = kzalloc_obj(*rtlpriv->mutex_for_hw_init);
 
        if (!rtlpriv->curveindex_2g || !rtlpriv->curveindex_5g ||
            !rtlpriv->mutex_for_power_on_off || !rtlpriv->mutex_for_hw_init) {
index b428402..1318e94 100644 (file)
@@ -1290,8 +1290,7 @@ static int rtw_sdio_init_tx(struct rtw_dev *rtwdev)
 
        for (i = 0; i < RTK_MAX_TX_QUEUE_NUM; i++)
                skb_queue_head_init(&rtwsdio->tx_queue[i]);
-       rtwsdio->tx_handler_data = kmalloc_obj(*rtwsdio->tx_handler_data,
-                                              GFP_KERNEL);
+       rtwsdio->tx_handler_data = kmalloc_obj(*rtwsdio->tx_handler_data);
        if (!rtwsdio->tx_handler_data)
                goto err_destroy_wq;
 
index 95b5c1c..da1b7ce 100644 (file)
@@ -931,8 +931,7 @@ static int rtw89_usb_intf_init(struct rtw89_dev *rtwdev,
        if (ret)
                return ret;
 
-       rtwusb->vendor_req_buf = kmalloc_obj(*rtwusb->vendor_req_buf,
-                                            GFP_KERNEL);
+       rtwusb->vendor_req_buf = kmalloc_obj(*rtwusb->vendor_req_buf);
        if (!rtwusb->vendor_req_buf)
                return -ENOMEM;
 
index 6af080d..7dad6d3 100644 (file)
@@ -360,8 +360,7 @@ static const struct file_operations fops_wsm_dumps = {
 int cw1200_debug_init(struct cw1200_common *priv)
 {
        int ret = -ENOMEM;
-       struct cw1200_debug_priv *d = kzalloc_obj(struct cw1200_debug_priv,
-                                                 GFP_KERNEL);
+       struct cw1200_debug_priv *d = kzalloc_obj(struct cw1200_debug_priv);
        priv->debug = d;
        if (!d)
                return ret;
index dc557ed..c2f2c11 100644 (file)
@@ -179,13 +179,11 @@ int cw1200_queue_init(struct cw1200_queue *queue,
        spin_lock_init(&queue->lock);
        timer_setup(&queue->gc, cw1200_queue_gc, 0);
 
-       queue->pool = kzalloc_objs(struct cw1200_queue_item, capacity,
-                                  GFP_KERNEL);
+       queue->pool = kzalloc_objs(struct cw1200_queue_item, capacity);
        if (!queue->pool)
                return -ENOMEM;
 
-       queue->link_map_cache = kzalloc_objs(int, stats->map_capacity,
-                                            GFP_KERNEL);
+       queue->link_map_cache = kzalloc_objs(int, stats->map_capacity);
        if (!queue->link_map_cache) {
                kfree(queue->pool);
                queue->pool = NULL;
index f0b902d..dc7b617 100644 (file)
@@ -225,8 +225,7 @@ void cw1200_scan_work(struct work_struct *work)
                        scan.type = WSM_SCAN_TYPE_BACKGROUND;
                        scan.flags = WSM_SCAN_FLAG_FORCE_BACKGROUND;
                }
-               scan.ch = kzalloc_objs(struct wsm_scan_ch, it - priv->scan.curr,
-                                      GFP_KERNEL);
+               scan.ch = kzalloc_objs(struct wsm_scan_ch, it - priv->scan.curr);
                if (!scan.ch) {
                        priv->scan.status = -ENOMEM;
                        goto fail;
index 9134418..45c5724 100644 (file)
@@ -293,8 +293,7 @@ static int wl1251_hw_init_data_path_config(struct wl1251 *wl)
        int ret;
 
        /* asking for the data path parameters */
-       wl->data_path = kzalloc_obj(struct acx_data_path_params_resp,
-                                   GFP_KERNEL);
+       wl->data_path = kzalloc_obj(struct acx_data_path_params_resp);
        if (!wl->data_path)
                return -ENOMEM;
 
index 851a246..527355a 100644 (file)
@@ -222,8 +222,7 @@ bool ipc_protocol_resume(struct iosm_protocol *ipc_protocol)
 
 struct iosm_protocol *ipc_protocol_init(struct iosm_imem *ipc_imem)
 {
-       struct iosm_protocol *ipc_protocol = kzalloc_obj(*ipc_protocol,
-                                                        GFP_KERNEL);
+       struct iosm_protocol *ipc_protocol = kzalloc_obj(*ipc_protocol);
        struct ipc_protocol_context_info *p_ci;
        u64 addr;
 
index c4e75cc..d316b35 100644 (file)
@@ -2212,8 +2212,7 @@ static int xennet_create_queues(struct netfront_info *info,
        unsigned int i;
        int ret;
 
-       info->queues = kzalloc_objs(struct netfront_queue, *num_queues,
-                                   GFP_KERNEL);
+       info->queues = kzalloc_objs(struct netfront_queue, *num_queues);
        if (!info->queues)
                return -ENOMEM;
 
index afbefc5..b6bef09 100644 (file)
@@ -539,8 +539,7 @@ static int btt_freelist_init(struct arena_info *arena)
        struct log_entry log_new;
        u32 i, map_entry, log_oldmap, log_newmap;
 
-       arena->freelist = kzalloc_objs(struct free_entry, arena->nfree,
-                                      GFP_KERNEL);
+       arena->freelist = kzalloc_objs(struct free_entry, arena->nfree);
        if (!arena->freelist)
                return -ENOMEM;
 
@@ -733,8 +732,7 @@ static int btt_maplocks_init(struct arena_info *arena)
 {
        u32 i;
 
-       arena->map_locks = kzalloc_objs(struct aligned_lock, arena->nfree,
-                                       GFP_KERNEL);
+       arena->map_locks = kzalloc_objs(struct aligned_lock, arena->nfree);
        if (!arena->map_locks)
                return -ENOMEM;
 
index 9bd8dff..e0b5143 100644 (file)
@@ -195,8 +195,7 @@ static int create_cpumask_attr_group(struct nvdimm_pmu *nd_pmu)
        }
 
        /* Allocate memory for cpumask attribute group */
-       nvdimm_pmu_cpumask_group = kzalloc_obj(*nvdimm_pmu_cpumask_group,
-                                              GFP_KERNEL);
+       nvdimm_pmu_cpumask_group = kzalloc_obj(*nvdimm_pmu_cpumask_group);
        if (!nvdimm_pmu_cpumask_group) {
                kfree(pmu_events_attr);
                kfree(attrs_group);
index c1eebff..e35c2e1 100644 (file)
@@ -1005,8 +1005,7 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
        }
 
        nd_region =
-               kzalloc_flex(*nd_region, mapping, ndr_desc->num_mappings,
-                            GFP_KERNEL);
+               kzalloc_flex(*nd_region, mapping, ndr_desc->num_mappings);
 
        if (!nd_region)
                return NULL;
index 20a7347..405e7c0 100644 (file)
@@ -1083,8 +1083,7 @@ int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl)
        if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret)
                return 0;
 
-       ctrl->dhchap_ctxs = kvzalloc_objs(*chap, ctrl_max_dhchaps(ctrl),
-                                         GFP_KERNEL);
+       ctrl->dhchap_ctxs = kvzalloc_objs(*chap, ctrl_max_dhchaps(ctrl));
        if (!ctrl->dhchap_ctxs) {
                ret = -ENOMEM;
                goto err_free_dhchap_ctrl_secret;
index 1bf7307..5711113 100644 (file)
@@ -2290,8 +2290,7 @@ static struct nvme_rdma_ctrl *nvme_rdma_alloc_ctrl(struct device *dev,
        ctrl->ctrl.kato = opts->kato;
 
        ret = -ENOMEM;
-       ctrl->queues = kzalloc_objs(*ctrl->queues, ctrl->ctrl.queue_count,
-                                   GFP_KERNEL);
+       ctrl->queues = kzalloc_objs(*ctrl->queues, ctrl->ctrl.queue_count);
        if (!ctrl->queues)
                goto out_free_ctrl;
 
index 62fe19d..9ab3f61 100644 (file)
@@ -2949,8 +2949,7 @@ static struct nvme_tcp_ctrl *nvme_tcp_alloc_ctrl(struct device *dev,
                goto out_free_ctrl;
        }
 
-       ctrl->queues = kzalloc_objs(*ctrl->queues, ctrl->ctrl.queue_count,
-                                   GFP_KERNEL);
+       ctrl->queues = kzalloc_objs(*ctrl->queues, ctrl->ctrl.queue_count);
        if (!ctrl->queues) {
                ret = -ENOMEM;
                goto out_free_ctrl;
index 1cb21d7..3088e04 100644 (file)
@@ -2026,8 +2026,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group,
        if (!port)
                return ERR_PTR(-ENOMEM);
 
-       port->ana_state = kzalloc_objs(*port->ana_state, NVMET_MAX_ANAGRPS + 1,
-                                      GFP_KERNEL);
+       port->ana_state = kzalloc_objs(*port->ana_state, NVMET_MAX_ANAGRPS + 1);
        if (!port->ana_state) {
                kfree(port);
                return ERR_PTR(-ENOMEM);
index efc1ad2..5e43d0a 100644 (file)
@@ -1642,13 +1642,11 @@ struct nvmet_ctrl *nvmet_alloc_ctrl(struct nvmet_alloc_ctrl_args *args)
        if (!ctrl->changed_ns_list)
                goto out_free_ctrl;
 
-       ctrl->sqs = kzalloc_objs(struct nvmet_sq *, subsys->max_qid + 1,
-                                GFP_KERNEL);
+       ctrl->sqs = kzalloc_objs(struct nvmet_sq *, subsys->max_qid + 1);
        if (!ctrl->sqs)
                goto out_free_changed_ns_list;
 
-       ctrl->cqs = kzalloc_objs(struct nvmet_cq *, subsys->max_qid + 1,
-                                GFP_KERNEL);
+       ctrl->cqs = kzalloc_objs(struct nvmet_cq *, subsys->max_qid + 1);
        if (!ctrl->cqs)
                goto out_free_sqs;
 
index 7fca8d7..4eaadc7 100644 (file)
@@ -528,8 +528,7 @@ nvmet_fc_alloc_ls_iodlist(struct nvmet_fc_tgtport *tgtport)
        struct nvmet_fc_ls_iod *iod;
        int i;
 
-       iod = kzalloc_objs(struct nvmet_fc_ls_iod, NVMET_LS_CTX_COUNT,
-                          GFP_KERNEL);
+       iod = kzalloc_objs(struct nvmet_fc_ls_iod, NVMET_LS_CTX_COUNT);
        if (!iod)
                return -ENOMEM;
 
index db09382..4b3f4f1 100644 (file)
@@ -592,8 +592,7 @@ static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev,
        ctrl->ctrl.kato = opts->kato;
        ctrl->port = nvme_loop_find_port(&ctrl->ctrl);
 
-       ctrl->queues = kzalloc_objs(*ctrl->queues, opts->nr_io_queues + 1,
-                                   GFP_KERNEL);
+       ctrl->queues = kzalloc_objs(*ctrl->queues, opts->nr_io_queues + 1);
        if (!ctrl->queues)
                goto out_uninit_ctrl;
 
index f51a7de..31006ce 100644 (file)
@@ -1562,13 +1562,11 @@ static int nvmet_pci_epf_alloc_queues(struct nvmet_pci_epf_ctrl *ctrl)
 {
        unsigned int qid;
 
-       ctrl->sq = kzalloc_objs(struct nvmet_pci_epf_queue, ctrl->nr_queues,
-                               GFP_KERNEL);
+       ctrl->sq = kzalloc_objs(struct nvmet_pci_epf_queue, ctrl->nr_queues);
        if (!ctrl->sq)
                return -ENOMEM;
 
-       ctrl->cq = kzalloc_objs(struct nvmet_pci_epf_queue, ctrl->nr_queues,
-                               GFP_KERNEL);
+       ctrl->cq = kzalloc_objs(struct nvmet_pci_epf_queue, ctrl->nr_queues);
        if (!ctrl->cq) {
                kfree(ctrl->sq);
                ctrl->sq = NULL;
index 98893b2..8666416 100644 (file)
@@ -2260,8 +2260,7 @@ static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
        if (opp_table->regulators)
                return 0;
 
-       opp_table->regulators = kmalloc_objs(*opp_table->regulators, count,
-                                            GFP_KERNEL);
+       opp_table->regulators = kmalloc_objs(*opp_table->regulators, count);
        if (!opp_table->regulators)
                return -ENOMEM;
 
index 6ea3b1b..f96adfd 100644 (file)
@@ -303,8 +303,7 @@ static int _of_opp_alloc_required_opps(struct opp_table *opp_table,
        if (!count)
                return 0;
 
-       opp->required_opps = kzalloc_objs(*opp->required_opps, count,
-                                         GFP_KERNEL);
+       opp->required_opps = kzalloc_objs(*opp->required_opps, count);
        if (!opp->required_opps)
                return -ENOMEM;
 
index 692d3ca..a197fb9 100644 (file)
@@ -532,8 +532,7 @@ int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl)
                }
 
                while (numpmem--) {
-                       p_mem_node = kmalloc_obj(struct pci_resource,
-                                                GFP_KERNEL);
+                       p_mem_node = kmalloc_obj(struct pci_resource);
 
                        if (!p_mem_node)
                                break;
index 4ccd529..81c58b1 100644 (file)
@@ -768,8 +768,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                        pci_bus_read_config_word(pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, &w_length);
 
                        if ((w_base <= w_length) && (save_command & 0x02)) {
-                               p_mem_node = kmalloc_obj(*p_mem_node,
-                                                        GFP_KERNEL);
+                               p_mem_node = kmalloc_obj(*p_mem_node);
                                if (!p_mem_node)
                                        return -ENOMEM;
 
@@ -800,8 +799,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFFE;
                                                temp_register = (~temp_register) + 1;
 
-                                               io_node = kmalloc_obj(*io_node,
-                                                                     GFP_KERNEL);
+                                               io_node = kmalloc_obj(*io_node);
                                                if (!io_node)
                                                        return -ENOMEM;
 
@@ -818,8 +816,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFF0;
                                                temp_register = (~temp_register) + 1;
 
-                                               p_mem_node = kmalloc_obj(*p_mem_node,
-                                                                        GFP_KERNEL);
+                                               p_mem_node = kmalloc_obj(*p_mem_node);
                                                if (!p_mem_node)
                                                        return -ENOMEM;
 
@@ -835,8 +832,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFF0;
                                                temp_register = (~temp_register) + 1;
 
-                                               mem_node = kmalloc_obj(*mem_node,
-                                                                      GFP_KERNEL);
+                                               mem_node = kmalloc_obj(*mem_node);
                                                if (!mem_node)
                                                        return -ENOMEM;
 
@@ -872,8 +868,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFFE;
                                                temp_register = (~temp_register) + 1;
 
-                                               io_node = kmalloc_obj(*io_node,
-                                                                     GFP_KERNEL);
+                                               io_node = kmalloc_obj(*io_node);
                                                if (!io_node)
                                                        return -ENOMEM;
 
@@ -889,8 +884,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFF0;
                                                temp_register = (~temp_register) + 1;
 
-                                               p_mem_node = kmalloc_obj(*p_mem_node,
-                                                                        GFP_KERNEL);
+                                               p_mem_node = kmalloc_obj(*p_mem_node);
                                                if (!p_mem_node)
                                                        return -ENOMEM;
 
@@ -906,8 +900,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
                                                temp_register = base & 0xFFFFFFF0;
                                                temp_register = (~temp_register) + 1;
 
-                                               mem_node = kmalloc_obj(*mem_node,
-                                                                      GFP_KERNEL);
+                                               mem_node = kmalloc_obj(*mem_node);
                                                if (!mem_node)
                                                        return -ENOMEM;
 
index 49575cb..c1939b8 100644 (file)
@@ -352,8 +352,7 @@ int __init ibmphp_access_ebda(void)
                        debug("now enter io table ---\n");
                        debug("rio blk id: %x\n", blk_id);
 
-                       rio_table_ptr = kzalloc_obj(struct rio_table_hdr,
-                                                   GFP_KERNEL);
+                       rio_table_ptr = kzalloc_obj(struct rio_table_hdr);
                        if (!rio_table_ptr) {
                                rc = -ENOMEM;
                                goto out;
@@ -500,8 +499,7 @@ static int combine_wpg_for_expansion(void)
        list_for_each_entry(rio_detail_ptr, &rio_lo_head, rio_detail_list) {
                opt_rio_lo_ptr = search_opt_lo(rio_detail_ptr->chassis_num);
                if (!opt_rio_lo_ptr) {
-                       opt_rio_lo_ptr = kzalloc_obj(struct opt_rio_lo,
-                                                    GFP_KERNEL);
+                       opt_rio_lo_ptr = kzalloc_obj(struct opt_rio_lo);
                        if (!opt_rio_lo_ptr)
                                return -ENOMEM;
                        opt_rio_lo_ptr->rio_type = rio_detail_ptr->rio_type;
@@ -740,8 +738,7 @@ static int __init ebda_rsrc_controller(void)
 
                        bus_info_ptr2 = ibmphp_find_same_bus_num(slot_ptr->slot_bus_num);
                        if (!bus_info_ptr2) {
-                               bus_info_ptr1 = kzalloc_obj(struct bus_info,
-                                                           GFP_KERNEL);
+                               bus_info_ptr1 = kzalloc_obj(struct bus_info);
                                if (!bus_info_ptr1) {
                                        rc = -ENOMEM;
                                        goto error_no_slot;
index c4d2898..cffce14 100644 (file)
@@ -152,8 +152,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
                                                cleanup_count = 6;
                                                goto error;
                                        }
-                                       newfunc = kzalloc_obj(*newfunc,
-                                                             GFP_KERNEL);
+                                       newfunc = kzalloc_obj(*newfunc);
                                        if (!newfunc)
                                                return -ENOMEM;
 
@@ -190,8 +189,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
                                        flag = 0;
                                        for (i = 0; i < 32; i++) {
                                                if (func->devices[i]) {
-                                                       newfunc = kzalloc_obj(*newfunc,
-                                                                             GFP_KERNEL);
+                                                       newfunc = kzalloc_obj(*newfunc);
                                                        if (!newfunc)
                                                                return -ENOMEM;
 
@@ -218,8 +216,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
                                                }
                                        }
 
-                                       newfunc = kzalloc_obj(*newfunc,
-                                                             GFP_KERNEL);
+                                       newfunc = kzalloc_obj(*newfunc);
                                        if (!newfunc)
                                                return -ENOMEM;
 
@@ -264,8 +261,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
                                        for (i = 0; i < 32; i++) {
                                                if (func->devices[i]) {
                                                        debug("inside for loop, device is %x\n", i);
-                                                       newfunc = kzalloc_obj(*newfunc,
-                                                                             GFP_KERNEL);
+                                                       newfunc = kzalloc_obj(*newfunc);
                                                        if (!newfunc)
                                                                return -ENOMEM;
 
@@ -388,8 +384,7 @@ static int configure_device(struct pci_func *func)
 
                        debug("len[count] in IO %x, count %d\n", len[count], count);
 
-                       io[count] = kzalloc_obj(struct resource_node,
-                                               GFP_KERNEL);
+                       io[count] = kzalloc_obj(struct resource_node);
 
                        if (!io[count])
                                return -ENOMEM;
@@ -426,8 +421,7 @@ static int configure_device(struct pci_func *func)
 
                                debug("len[count] in PFMEM %x, count %d\n", len[count], count);
 
-                               pfmem[count] = kzalloc_obj(struct resource_node,
-                                                          GFP_KERNEL);
+                               pfmem[count] = kzalloc_obj(struct resource_node);
                                if (!pfmem[count])
                                        return -ENOMEM;
 
@@ -441,8 +435,7 @@ static int configure_device(struct pci_func *func)
                                        ibmphp_add_resource(pfmem[count]);
                                        func->pfmem[count] = pfmem[count];
                                } else {
-                                       mem_tmp = kzalloc_obj(*mem_tmp,
-                                                             GFP_KERNEL);
+                                       mem_tmp = kzalloc_obj(*mem_tmp);
                                        if (!mem_tmp) {
                                                kfree(pfmem[count]);
                                                return -ENOMEM;
@@ -492,8 +485,7 @@ static int configure_device(struct pci_func *func)
 
                                debug("len[count] in Mem %x, count %d\n", len[count], count);
 
-                               mem[count] = kzalloc_obj(struct resource_node,
-                                                        GFP_KERNEL);
+                               mem[count] = kzalloc_obj(struct resource_node);
                                if (!mem[count])
                                        return -ENOMEM;
 
@@ -656,8 +648,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
 
                        debug("len[count] in IO = %x\n", len[count]);
 
-                       bus_io[count] = kzalloc_obj(struct resource_node,
-                                                   GFP_KERNEL);
+                       bus_io[count] = kzalloc_obj(struct resource_node);
 
                        if (!bus_io[count]) {
                                retval = -ENOMEM;
@@ -689,8 +680,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
 
                                debug("len[count] in PFMEM = %x\n", len[count]);
 
-                               bus_pfmem[count] = kzalloc_obj(struct resource_node,
-                                                              GFP_KERNEL);
+                               bus_pfmem[count] = kzalloc_obj(struct resource_node);
                                if (!bus_pfmem[count]) {
                                        retval = -ENOMEM;
                                        goto error;
@@ -705,8 +695,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
                                        ibmphp_add_resource(bus_pfmem[count]);
                                        func->pfmem[count] = bus_pfmem[count];
                                } else {
-                                       mem_tmp = kzalloc_obj(*mem_tmp,
-                                                             GFP_KERNEL);
+                                       mem_tmp = kzalloc_obj(*mem_tmp);
                                        if (!mem_tmp) {
                                                retval = -ENOMEM;
                                                goto error;
@@ -746,8 +735,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
 
                                debug("len[count] in Memory is %x\n", len[count]);
 
-                               bus_mem[count] = kzalloc_obj(struct resource_node,
-                                                            GFP_KERNEL);
+                               bus_mem[count] = kzalloc_obj(struct resource_node);
                                if (!bus_mem[count]) {
                                        retval = -ENOMEM;
                                        goto error;
index e52d4ac..0294fd9 100644 (file)
@@ -1687,8 +1687,7 @@ static int __init once_over(void)
 
                                bus_cur->firstPFMemFromMem = pfmem_cur;
 
-                               mem = kzalloc_obj(struct resource_node,
-                                                 GFP_KERNEL);
+                               mem = kzalloc_obj(struct resource_node);
                                if (!mem)
                                        return -ENOMEM;
 
@@ -1970,8 +1969,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
                                                end_address |= (upper_io_end << 16);
 
                                                if ((start_address) && (start_address <= end_address)) {
-                                                       range = kzalloc_obj(struct range_node,
-                                                                           GFP_KERNEL);
+                                                       range = kzalloc_obj(struct range_node);
                                                        if (!range)
                                                                return -ENOMEM;
 
@@ -1995,8 +1993,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
                                                        fix_resources(bus_sec);
 
                                                        if (ibmphp_find_resource(bus_cur, start_address, &io, IO)) {
-                                                               io = kzalloc_obj(struct resource_node,
-                                                                                GFP_KERNEL);
+                                                               io = kzalloc_obj(struct resource_node);
                                                                if (!io) {
                                                                        kfree(range);
                                                                        return -ENOMEM;
@@ -2019,8 +2016,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
 
                                                if ((start_address) && (start_address <= end_address)) {
 
-                                                       range = kzalloc_obj(struct range_node,
-                                                                           GFP_KERNEL);
+                                                       range = kzalloc_obj(struct range_node);
                                                        if (!range)
                                                                return -ENOMEM;
 
@@ -2045,8 +2041,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
                                                        fix_resources(bus_sec);
 
                                                        if (ibmphp_find_resource(bus_cur, start_address, &mem, MEM)) {
-                                                               mem = kzalloc_obj(struct resource_node,
-                                                                                 GFP_KERNEL);
+                                                               mem = kzalloc_obj(struct resource_node);
                                                                if (!mem) {
                                                                        kfree(range);
                                                                        return -ENOMEM;
@@ -2073,8 +2068,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
 
                                                if ((start_address) && (start_address <= end_address)) {
 
-                                                       range = kzalloc_obj(struct range_node,
-                                                                           GFP_KERNEL);
+                                                       range = kzalloc_obj(struct range_node);
                                                        if (!range)
                                                                return -ENOMEM;
 
@@ -2098,8 +2092,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
 
                                                        fix_resources(bus_sec);
                                                        if (ibmphp_find_resource(bus_cur, start_address, &pfmem, PFMEM)) {
-                                                               pfmem = kzalloc_obj(struct resource_node,
-                                                                                   GFP_KERNEL);
+                                                               pfmem = kzalloc_obj(struct resource_node);
                                                                if (!pfmem) {
                                                                        kfree(range);
                                                                        return -ENOMEM;
index 87e6029..385af5e 100644 (file)
@@ -309,8 +309,7 @@ static int pmu_sbi_check_event_info(void)
        int i, j, k, result = 0, count = 0;
        struct sbiret ret;
 
-       event_info_shmem = kzalloc_objs(*event_info_shmem, num_events,
-                                       GFP_KERNEL);
+       event_info_shmem = kzalloc_objs(*event_info_shmem, num_events);
        if (!event_info_shmem)
                return -ENOMEM;
 
index 17d39c2..e7b3501 100644 (file)
@@ -873,8 +873,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
                maps_per_pin++;
        if (num_pulls)
                maps_per_pin++;
-       cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin,
-                                     GFP_KERNEL);
+       cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin);
        if (!maps)
                return -ENOMEM;
 
index f58cb04..7971339 100644 (file)
@@ -215,8 +215,7 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
        }
 
        /* we will reallocate later */
-       pctrl->functions = kzalloc_objs(*pctrl->functions, max_functions,
-                                       GFP_KERNEL);
+       pctrl->functions = kzalloc_objs(*pctrl->functions, max_functions);
        if (!pctrl->functions)
                return -ENOMEM;
 
index c0ae528..6305b96 100644 (file)
@@ -400,8 +400,7 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl)
                girq->parents = kmalloc_array(girq->num_parents,
                                              sizeof(*girq->parents),
                                              GFP_KERNEL);
-               irq_data = kmalloc_objs(*irq_data, girq->num_parents,
-                                       GFP_KERNEL);
+               irq_data = kmalloc_objs(*irq_data, girq->num_parents);
                if (!girq->parents || !irq_data) {
                        ret = -ENOMEM;
                        goto out_free_irq_data;
index fc9167e..4843429 100644 (file)
@@ -1328,8 +1328,7 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
         * special functions per pin, plus one entry for the sentinel.
         * We'll reallocate that later anyway.
         */
-       pctl->functions = kzalloc_objs(*pctl->functions, 7 * pctl->ngroups + 4,
-                                      GFP_KERNEL);
+       pctl->functions = kzalloc_objs(*pctl->functions, 7 * pctl->ngroups + 4);
        if (!pctl->functions)
                return -ENOMEM;
 
index 3da2f76..1c7624a 100644 (file)
@@ -344,8 +344,7 @@ static int wmt_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
        if (num_pulls)
                maps_per_pin++;
 
-       cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin,
-                                     GFP_KERNEL);
+       cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin);
        if (!maps)
                return -ENOMEM;
 
index 042f8ca..c3c4cb6 100644 (file)
@@ -807,8 +807,7 @@ chromeos_laptop_prepare_acpi_peripherals(struct chromeos_laptop *cros_laptop,
        if (!n_peripherals)
                return 0;
 
-       acpi_peripherals = kzalloc_objs(*src->acpi_peripherals, n_peripherals,
-                                       GFP_KERNEL);
+       acpi_peripherals = kzalloc_objs(*src->acpi_peripherals, n_peripherals);
        if (!acpi_peripherals)
                return -ENOMEM;
 
index 9222e64..5b0987c 100644 (file)
@@ -1005,8 +1005,7 @@ static void init_rog_tunables(void)
        /* Initialize AC power tunables */
        ac_limits = power_data->ac_data;
        if (ac_limits) {
-               ac_rog_tunables = kzalloc_obj(*asus_armoury.rog_tunables[ASUS_ROG_TUNABLE_AC],
-                                             GFP_KERNEL);
+               ac_rog_tunables = kzalloc_obj(*asus_armoury.rog_tunables[ASUS_ROG_TUNABLE_AC]);
                if (!ac_rog_tunables)
                        goto err_nomem;
 
@@ -1053,8 +1052,7 @@ static void init_rog_tunables(void)
        /* Initialize DC power tunables */
        dc_limits = power_data->dc_data;
        if (dc_limits) {
-               dc_rog_tunables = kzalloc_obj(*asus_armoury.rog_tunables[ASUS_ROG_TUNABLE_DC],
-                                             GFP_KERNEL);
+               dc_rog_tunables = kzalloc_obj(*asus_armoury.rog_tunables[ASUS_ROG_TUNABLE_DC]);
                if (!dc_rog_tunables) {
                        kfree(ac_rog_tunables);
                        goto err_nomem;
index 564ff52..4b7c54b 100644 (file)
@@ -500,8 +500,7 @@ static int build_tokens_sysfs(struct platform_device *dev)
                return -ENOMEM;
 
        /* need to store both location and value + terminator*/
-       token_attrs = kzalloc_objs(*token_attrs, (2 * da_num_tokens) + 1,
-                                  GFP_KERNEL);
+       token_attrs = kzalloc_objs(*token_attrs, (2 * da_num_tokens) + 1);
        if (!token_attrs)
                goto out_allocate_attrs;
 
index fdbb8b0..a496075 100644 (file)
@@ -180,8 +180,7 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
                if (!board_data)
                        return dev_err_probe(&client->dev, -ENODEV, "No board-data found for this model\n");
 
-               cells = kzalloc_objs(*cells, TPS68470_WIN_MFD_CELL_COUNT,
-                                    GFP_KERNEL);
+               cells = kzalloc_objs(*cells, TPS68470_WIN_MFD_CELL_COUNT);
                if (!cells)
                        return -ENOMEM;
 
index fa75eb7..1c48bf6 100644 (file)
@@ -425,13 +425,11 @@ static int isst_if_cpu_info_init(void)
 {
        int ret;
 
-       isst_cpu_info = kzalloc_objs(*isst_cpu_info, num_possible_cpus(),
-                                    GFP_KERNEL);
+       isst_cpu_info = kzalloc_objs(*isst_cpu_info, num_possible_cpus());
        if (!isst_cpu_info)
                return -ENOMEM;
 
-       isst_pkg_info = kzalloc_objs(*isst_pkg_info, topology_max_packages(),
-                                    GFP_KERNEL);
+       isst_pkg_info = kzalloc_objs(*isst_pkg_info, topology_max_packages());
        if (!isst_pkg_info) {
                kfree(isst_cpu_info);
                return -ENOMEM;
index 89a90bd..667f2c8 100644 (file)
@@ -278,8 +278,7 @@ static int __init intel_uncore_init(void)
 
        uncore_max_entries = topology_max_packages() *
                                        topology_max_dies_per_package();
-       uncore_instances = kzalloc_objs(*uncore_instances, uncore_max_entries,
-                                       GFP_KERNEL);
+       uncore_instances = kzalloc_objs(*uncore_instances, uncore_max_entries);
        if (!uncore_instances)
                return -ENOMEM;
 
index 477f563..d3e7a52 100644 (file)
@@ -4161,8 +4161,7 @@ sony_pic_read_possible_resource(struct acpi_resource *resource, void *context)
        case ACPI_RESOURCE_TYPE_START_DEPENDENT:
                {
                        /* start IO enumeration */
-                       struct sony_pic_ioport *ioport = kzalloc_obj(*ioport,
-                                                                    GFP_KERNEL);
+                       struct sony_pic_ioport *ioport = kzalloc_obj(*ioport);
                        if (!ioport)
                                return AE_ERROR;
 
index 353f9c6..b9adb34 100644 (file)
@@ -216,8 +216,7 @@ static int uv_hubs_init(void)
        u64 sz;
        int i, ret;
 
-       prev_obj_to_cnode = kmalloc_objs(*prev_obj_to_cnode, uv_bios_obj_cnt,
-                                        GFP_KERNEL);
+       prev_obj_to_cnode = kmalloc_objs(*prev_obj_to_cnode, uv_bios_obj_cnt);
        if (!prev_obj_to_cnode)
                return -ENOMEM;
 
@@ -398,8 +397,7 @@ static int uv_ports_init(void)
        }
        for (j = 0; j < uv_bios_obj_cnt; j++) {
                for (k = 0; k < hub_buf[j].ports; k++) {
-                       uv_hubs[j]->ports[k] = kzalloc_obj(*uv_hubs[j]->ports[k],
-                                                          GFP_KERNEL);
+                       uv_hubs[j]->ports[k] = kzalloc_obj(*uv_hubs[j]->ports[k]);
                        if (!uv_hubs[j]->ports[k]) {
                                ret = -ENOMEM;
                                k--;
@@ -675,8 +673,7 @@ static int pci_topology_init(void)
                        }
                        num_pci_lines = l;
 
-                       uv_pci_objs = kzalloc_objs(*uv_pci_objs, num_pci_lines,
-                                                  GFP_KERNEL);
+                       uv_pci_objs = kzalloc_objs(*uv_pci_objs, num_pci_lines);
                        if (!uv_pci_objs) {
                                kfree(pci_top_str);
                                ret = -ENOMEM;
@@ -684,8 +681,7 @@ static int pci_topology_init(void)
                        }
                        start = pci_top_str;
                        while ((found = strsep(&start, "\n")) != NULL) {
-                               uv_pci_objs[k] = kzalloc_obj(*uv_pci_objs[k],
-                                                            GFP_KERNEL);
+                               uv_pci_objs[k] = kzalloc_obj(*uv_pci_objs[k]);
                                if (!uv_pci_objs[k]) {
                                        ret = -ENOMEM;
                                        goto err_pci_obj;
index 9f2945d..021009e 100644 (file)
@@ -447,8 +447,7 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
                exit_handler = dev_info->exit;
        }
 
-       i2c_clients = kzalloc_objs(*i2c_clients, dev_info->i2c_client_count,
-                                  GFP_KERNEL);
+       i2c_clients = kzalloc_objs(*i2c_clients, dev_info->i2c_client_count);
        if (!i2c_clients) {
                x86_android_tablet_remove(pdev);
                return -ENOMEM;
index 4d5b12b..019a65a 100644 (file)
@@ -1520,8 +1520,7 @@ static int rapl_detect_domains(struct rapl_package *rp)
        }
        pr_debug("found %d domains on %s\n", rp->nr_domains, rp->name);
 
-       rp->domains = kzalloc_objs(struct rapl_domain, rp->nr_domains,
-                                  GFP_KERNEL);
+       rp->domains = kzalloc_objs(struct rapl_domain, rp->nr_domains);
        if (!rp->domains)
                return -ENOMEM;
 
index 93fab4f..c0cc6cc 100644 (file)
@@ -973,8 +973,7 @@ restart:
        }
        if (num_consumers == 0)
                return 0;
-       _consumers = kmalloc_objs(struct regulator_bulk_data, num_consumers,
-                                 GFP_KERNEL);
+       _consumers = kmalloc_objs(struct regulator_bulk_data, num_consumers);
        if (!_consumers)
                return -ENOMEM;
        goto restart;
index e840733..e5a02c2 100644 (file)
@@ -240,8 +240,7 @@ dcssblk_is_continuous(struct dcssblk_dev_info *dev_info)
        if (dev_info->num_of_segments <= 1)
                return 0;
 
-       sort_list = kzalloc_objs(struct segment_info, dev_info->num_of_segments,
-                                GFP_KERNEL);
+       sort_list = kzalloc_objs(struct segment_info, dev_info->num_of_segments);
        if (sort_list == NULL)
                return -ENOMEM;
        i = 0;
@@ -605,8 +604,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
                 * get a struct dcssblk_dev_info
                 */
                if (num_of_segments == 0) {
-                       dev_info = kzalloc_obj(struct dcssblk_dev_info,
-                                              GFP_KERNEL);
+                       dev_info = kzalloc_obj(struct dcssblk_dev_info);
                        if (dev_info == NULL) {
                                rc = -ENOMEM;
                                goto out;
index 2ffd47b..fa22394 100644 (file)
@@ -77,8 +77,7 @@ static int __scm_alloc_rq(void)
        if (!scmrq->aob)
                goto free;
 
-       scmrq->request = kzalloc_objs(scmrq->request[0], nr_requests_per_io,
-                                     GFP_KERNEL);
+       scmrq->request = kzalloc_objs(scmrq->request[0], nr_requests_per_io);
        if (!scmrq->request)
                goto free;
 
index 2fa8ac6..644d367 100644 (file)
@@ -899,8 +899,7 @@ static struct tty3270_line *tty3270_alloc_screen(struct tty3270 *tp, unsigned in
        if (!screen)
                goto out_err;
        for (lines = 0; lines < allocated; lines++) {
-               screen[lines].cells = kzalloc_objs(struct tty3270_cell, cols,
-                                                  GFP_KERNEL);
+               screen[lines].cells = kzalloc_objs(struct tty3270_cell, cols);
                if (!screen[lines].cells)
                        goto out_screen;
        }
index 174a8fa..5ab239f 100644 (file)
@@ -1005,8 +1005,7 @@ static int __init setup_css(int nr)
                goto out_err;
        }
 
-       css->pseudo_subchannel = kzalloc_obj(*css->pseudo_subchannel,
-                                            GFP_KERNEL);
+       css->pseudo_subchannel = kzalloc_obj(*css->pseudo_subchannel);
        if (!css->pseudo_subchannel) {
                device_unregister(&css->device);
                ret = -ENOMEM;
index d3e263f..85ca865 100644 (file)
@@ -204,8 +204,7 @@ int __init qdio_thinint_init(void)
 {
        int rc;
 
-       q_indicators = kzalloc_objs(struct indicator_t, TIQDIO_NR_INDICATORS,
-                                   GFP_KERNEL);
+       q_indicators = kzalloc_objs(struct indicator_t, TIQDIO_NR_INDICATORS);
        if (!q_indicators)
                return -ENOMEM;
 
index ef7becf..45ec722 100644 (file)
@@ -55,8 +55,7 @@ static int vfio_ccw_mdev_init_dev(struct vfio_device *vdev)
        INIT_WORK(&private->io_work, vfio_ccw_sch_io_todo);
        INIT_WORK(&private->crw_work, vfio_ccw_crw_todo);
 
-       private->cp.guest_cp = kzalloc_objs(struct ccw1, CCWCHAIN_LEN_MAX,
-                                           GFP_KERNEL);
+       private->cp.guest_cp = kzalloc_objs(struct ccw1, CCWCHAIN_LEN_MAX);
        if (!private->cp.guest_cp)
                goto out_free_private;
 
index 40d640d..c78f74b 100644 (file)
@@ -2020,8 +2020,7 @@ NCR_700_set_offset(struct scsi_target *STp, int offset)
 STATIC int
 NCR_700_sdev_init(struct scsi_device *SDp)
 {
-       SDp->hostdata = kzalloc_obj(struct NCR_700_Device_Parameters,
-                                   GFP_KERNEL);
+       SDp->hostdata = kzalloc_obj(struct NCR_700_Device_Parameters);
 
        if (!SDp->hostdata)
                return -ENOMEM;
index 6545ef8..da6599a 100644 (file)
@@ -2214,8 +2214,7 @@ static int __init blogic_init(void)
        if (blogic_probe_options.noprobe)
                return -ENODEV;
        blogic_probeinfo_list =
-           kzalloc_objs(struct blogic_probeinfo, BLOGIC_MAX_ADAPTERS,
-                        GFP_KERNEL);
+           kzalloc_objs(struct blogic_probeinfo, BLOGIC_MAX_ADAPTERS);
        if (blogic_probeinfo_list == NULL) {
                blogic_err("BusLogic: Unable to allocate Probe Info List\n",
                                NULL);
index fe1ab38..2fa8f7d 100644 (file)
@@ -1661,8 +1661,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
        if (aac_reset_devices || reset_devices)
                aac->init_reset = true;
 
-       aac->fibs = kzalloc_objs(struct fib, shost->can_queue + AAC_NUM_MGT_FIB,
-                                GFP_KERNEL);
+       aac->fibs = kzalloc_objs(struct fib, shost->can_queue + AAC_NUM_MGT_FIB);
        if (!aac->fibs) {
                error = -ENOMEM;
                goto out_free_host;
index 6c264de..faab6fd 100644 (file)
@@ -2491,8 +2491,7 @@ static int beiscsi_alloc_mem(struct beiscsi_hba *phba)
                return -ENOMEM;
        }
 
-       mem_arr_orig = kmalloc_objs(*mem_arr_orig, BEISCSI_MAX_FRAGS_INIT,
-                                   GFP_KERNEL);
+       mem_arr_orig = kmalloc_objs(*mem_arr_orig, BEISCSI_MAX_FRAGS_INIT);
        if (!mem_arr_orig) {
                kfree(phba->init_mem);
                kfree(phwi_ctrlr->wrb_context);
@@ -3360,8 +3359,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
        idx = 0;
        mem_descr = phba->init_mem;
        mem_descr += HWI_MEM_WRB;
-       pwrb_arr = kmalloc_objs(*pwrb_arr, phba->params.cxns_per_ctrl,
-                               GFP_KERNEL);
+       pwrb_arr = kmalloc_objs(*pwrb_arr, phba->params.cxns_per_ctrl);
        if (!pwrb_arr) {
                beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                            "BM_%d : Memory alloc failed in create wrb ring.\n");
@@ -4000,8 +3998,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
        for (ulp_num = 0; ulp_num < BEISCSI_ULP_COUNT; ulp_num++) {
                if (test_bit(ulp_num, (void *)&phba->fw_config.ulp_supported)) {
-                       ptr_cid_info = kzalloc_obj(struct ulp_cid_info,
-                                                  GFP_KERNEL);
+                       ptr_cid_info = kzalloc_obj(struct ulp_cid_info);
 
                        if (!ptr_cid_info) {
                                ret = -ENOMEM;
index c2f2c38..26e0ff3 100644 (file)
@@ -1381,8 +1381,7 @@ static struct bnx2fc_hba *bnx2fc_hba_create(struct cnic_dev *cnic)
        hba->next_conn_id = 0;
 
        hba->tgt_ofld_list =
-               kzalloc_objs(struct bnx2fc_rport *, BNX2FC_NUM_MAX_SESS,
-                            GFP_KERNEL);
+               kzalloc_objs(struct bnx2fc_rport *, BNX2FC_NUM_MAX_SESS);
        if (!hba->tgt_ofld_list) {
                printk(KERN_ERR PFX "Unable to allocate tgt offload list\n");
                goto tgtofld_err;
index d8d6afe..9c7a541 100644 (file)
@@ -247,8 +247,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba)
                goto mem_err;
        }
 
-       cmgr->free_list_lock = kzalloc_objs(*cmgr->free_list_lock, arr_sz,
-                                           GFP_KERNEL);
+       cmgr->free_list_lock = kzalloc_objs(*cmgr->free_list_lock, arr_sz);
        if (!cmgr->free_list_lock) {
                printk(KERN_ERR PFX "failed to alloc free_list_lock\n");
                kfree(cmgr->free_list);
index 3e201f2..78d5ecd 100644 (file)
@@ -2029,8 +2029,7 @@ csio_ln_init(struct csio_lnode *ln)
                        ln->fcfinfo = pln->fcfinfo;
                } else {
                        /* Another non-root physical lnode (FCF) */
-                       ln->fcfinfo = kzalloc_obj(struct csio_fcf_info,
-                                                 GFP_KERNEL);
+                       ln->fcfinfo = kzalloc_obj(struct csio_fcf_info);
                        if (!ln->fcfinfo) {
                                csio_ln_err(ln, "Failed to alloc FCF info\n");
                                CSIO_INC_STATS(hw, n_err_nomem);
index fd9a980..1838032 100644 (file)
@@ -1287,8 +1287,7 @@ efct_hw_rx_post(struct efct_hw *hw)
                for (i = 0; i < hw->hw_rq_count; i++)
                        count += hw->hw_rq[i]->entry_count;
 
-               hw->seq_pool = kmalloc_objs(struct efc_hw_sequence, count,
-                                           GFP_KERNEL);
+               hw->seq_pool = kmalloc_objs(struct efc_hw_sequence, count);
                if (!hw->seq_pool)
                        return -ENOMEM;
        }
index 290d29b..a895ff0 100644 (file)
@@ -103,8 +103,7 @@ static void esas2r_initmem_free(struct esas2r_adapter *a,
 static bool alloc_vda_req(struct esas2r_adapter *a,
                          struct esas2r_request *rq)
 {
-       struct esas2r_mem_desc *memdesc = kzalloc_obj(struct esas2r_mem_desc,
-                                                     GFP_KERNEL);
+       struct esas2r_mem_desc *memdesc = kzalloc_obj(struct esas2r_mem_desc);
 
        if (memdesc == NULL) {
                esas2r_hdebug("could not alloc mem for vda request memdesc\n");
@@ -792,8 +791,7 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
        }
 
        /* allocate the S/G list memory descriptors */
-       a->sg_list_mds = kzalloc_objs(struct esas2r_mem_desc, num_sg_lists,
-                                     GFP_KERNEL);
+       a->sg_list_mds = kzalloc_objs(struct esas2r_mem_desc, num_sg_lists);
 
        if (a->sg_list_mds == NULL) {
                esas2r_log(ESAS2R_LOG_CRIT,
index e47a954..5d5d9f9 100644 (file)
@@ -6057,8 +6057,7 @@ static int ibmvfc_alloc_channels(struct ibmvfc_host *vhost,
        int i, j;
        int rc = 0;
 
-       channels->scrqs = kzalloc_objs(*channels->scrqs, channels->max_queues,
-                                      GFP_KERNEL);
+       channels->scrqs = kzalloc_objs(*channels->scrqs, channels->max_queues);
        if (!channels->scrqs)
                return -ENOMEM;
 
index c93dc8b..03f78c0 100644 (file)
@@ -8861,8 +8861,7 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
 
        ioa_cfg->ipr_cmnd_list = kzalloc_objs(struct ipr_cmnd *,
                                              IPR_NUM_CMD_BLKS, GFP_KERNEL);
-       ioa_cfg->ipr_cmnd_list_dma = kzalloc_objs(dma_addr_t, IPR_NUM_CMD_BLKS,
-                                                 GFP_KERNEL);
+       ioa_cfg->ipr_cmnd_list_dma = kzalloc_objs(dma_addr_t, IPR_NUM_CMD_BLKS);
 
        if (!ioa_cfg->ipr_cmnd_list || !ioa_cfg->ipr_cmnd_list_dma) {
                ipr_free_cmd_blks(ioa_cfg);
index a6d9361..cee7096 100644 (file)
@@ -12324,8 +12324,7 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
 
        if (!vport->qfpa_res) {
                max_desc = FCELSSIZE / sizeof(*vport->qfpa_res);
-               vport->qfpa_res = kzalloc_objs(*vport->qfpa_res, max_desc,
-                                              GFP_KERNEL);
+               vport->qfpa_res = kzalloc_objs(*vport->qfpa_res, max_desc);
                if (!vport->qfpa_res)
                        goto out;
        }
@@ -12338,8 +12337,7 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
        desc = (struct priority_range_desc *)(pcmd + 8);
        vmid_range = vport->vmid_priority.vmid_range;
        if (!vmid_range) {
-               vmid_range = kzalloc_objs(*vmid_range, MAX_PRIORITY_DESC,
-                                         GFP_KERNEL);
+               vmid_range = kzalloc_objs(*vmid_range, MAX_PRIORITY_DESC);
                if (!vmid_range) {
                        kfree(vport->qfpa_res);
                        goto out;
index ab7e871..a25a78a 100644 (file)
@@ -4635,8 +4635,7 @@ lpfc_vmid_res_alloc(struct lpfc_hba *phba, struct lpfc_vport *vport)
 
        if (lpfc_is_vmid_enabled(phba)) {
                vport->vmid =
-                   kzalloc_objs(struct lpfc_vmid, phba->cfg_max_vmid,
-                                GFP_KERNEL);
+                   kzalloc_objs(struct lpfc_vmid, phba->cfg_max_vmid);
                if (!vport->vmid)
                        return -ENOMEM;
 
index e13abb6..d07c278 100644 (file)
@@ -1869,8 +1869,7 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox,
        pcount = (pcount > LPFC_SLI4_MBX_SGE_MAX_PAGES) ?
                                LPFC_SLI4_MBX_SGE_MAX_PAGES : pcount;
        /* Allocate record for keeping SGE virtual addresses */
-       mbox->sge_array = kzalloc_obj(struct lpfc_mbx_nembed_sge_virt,
-                                     GFP_KERNEL);
+       mbox->sge_array = kzalloc_obj(struct lpfc_mbx_nembed_sge_virt);
        if (!mbox->sge_array) {
                lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
                                "2527 Failed to allocate non-embedded SGE "
index 6f5e5d1..057a791 100644 (file)
@@ -118,8 +118,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
        if (!phba->lpfc_mbuf_pool)
                goto fail;
 
-       pool->elements = kmalloc_objs(struct lpfc_dmabuf, LPFC_MBUF_POOL_SIZE,
-                                     GFP_KERNEL);
+       pool->elements = kmalloc_objs(struct lpfc_dmabuf, LPFC_MBUF_POOL_SIZE);
        if (!pool->elements)
                goto fail_free_lpfc_mbuf_pool;
 
index dab6b28..1cbfbe4 100644 (file)
@@ -8046,8 +8046,7 @@ static void lpfc_sli4_dip(struct lpfc_hba *phba)
 int lpfc_rx_monitor_create_ring(struct lpfc_rx_info_monitor *rx_monitor,
                                u32 entries)
 {
-       rx_monitor->ring = kmalloc_objs(struct rx_info_entry, entries,
-                                       GFP_KERNEL);
+       rx_monitor->ring = kmalloc_objs(struct rx_info_entry, entries);
        if (!rx_monitor->ring)
                return -ENOMEM;
 
index 9572f92..f4eadc1 100644 (file)
@@ -787,8 +787,7 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba)
        struct lpfc_vport *port_iterator;
        struct lpfc_vport **vports;
        int index = 0;
-       vports = kzalloc_objs(struct lpfc_vport *, phba->max_vports + 1,
-                             GFP_KERNEL);
+       vports = kzalloc_objs(struct lpfc_vport *, phba->max_vports + 1);
        if (vports == NULL)
                return NULL;
        spin_lock_irq(&phba->port_list_lock);
index 1532183..538da0e 100644 (file)
@@ -932,10 +932,8 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp)
         * Allocate single blocks of memory for all required kiocs,
         * mailboxes and passthru structures.
         */
-       adapter->kioc_list      = kmalloc_objs(uioc_t, lld_adp->max_kioc,
-                                                GFP_KERNEL);
-       adapter->mbox_list      = kmalloc_objs(mbox64_t, lld_adp->max_kioc,
-                                                GFP_KERNEL);
+       adapter->kioc_list      = kmalloc_objs(uioc_t, lld_adp->max_kioc);
+       adapter->mbox_list      = kmalloc_objs(mbox64_t, lld_adp->max_kioc);
        adapter->pthru_dma_pool = dma_pool_create("megaraid mm pthru pool",
                                                &adapter->pdev->dev,
                                                sizeof(mraid_passthru_t),
index 5b18c7a..c980642 100644 (file)
@@ -4467,8 +4467,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
         * Allocate the dynamic array first and then allocate individual
         * commands.
         */
-       instance->cmd_list = kzalloc_objs(struct megasas_cmd *, max_cmd,
-                                         GFP_KERNEL);
+       instance->cmd_list = kzalloc_objs(struct megasas_cmd *, max_cmd);
 
        if (!instance->cmd_list) {
                dev_printk(KERN_DEBUG, &instance->pdev->dev, "out of memory\n");
@@ -4476,8 +4475,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
        }
 
        for (i = 0; i < max_cmd; i++) {
-               instance->cmd_list[i] = kmalloc_obj(struct megasas_cmd,
-                                                   GFP_KERNEL);
+               instance->cmd_list[i] = kmalloc_obj(struct megasas_cmd);
 
                if (!instance->cmd_list[i]) {
 
index f02c93d..2699e4e 100644 (file)
@@ -598,8 +598,7 @@ megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
         * commands.
         */
        fusion->cmd_list =
-               kzalloc_objs(struct megasas_cmd_fusion *, max_mpt_cmd,
-                            GFP_KERNEL);
+               kzalloc_objs(struct megasas_cmd_fusion *, max_mpt_cmd);
        if (!fusion->cmd_list) {
                dev_err(&instance->pdev->dev,
                        "Failed from %s %d\n",  __func__, __LINE__);
@@ -607,8 +606,7 @@ megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
        }
 
        for (i = 0; i < max_mpt_cmd; i++) {
-               fusion->cmd_list[i] = kzalloc_obj(struct megasas_cmd_fusion,
-                                                 GFP_KERNEL);
+               fusion->cmd_list[i] = kzalloc_obj(struct megasas_cmd_fusion);
                if (!fusion->cmd_list[i]) {
                        for (j = 0; j < i; j++)
                                kfree(fusion->cmd_list[j]);
index 1b93835..07bdb95 100644 (file)
@@ -2464,8 +2464,7 @@ static int mpi3mr_create_op_queues(struct mpi3mr_ioc *mrioc)
            num_queues);
 
        if (!mrioc->req_qinfo) {
-               mrioc->req_qinfo = kzalloc_objs(struct op_req_qinfo, num_queues,
-                                               GFP_KERNEL);
+               mrioc->req_qinfo = kzalloc_objs(struct op_req_qinfo, num_queues);
                if (!mrioc->req_qinfo) {
                        retval = -1;
                        goto out_failed;
index be4c140..dc23efc 100644 (file)
@@ -1220,8 +1220,7 @@ void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc)
        mrioc->sas_hba.host_node = 1;
        INIT_LIST_HEAD(&mrioc->sas_hba.sas_port_list);
        mrioc->sas_hba.parent_dev = &mrioc->shost->shost_gendev;
-       mrioc->sas_hba.phy = kzalloc_objs(struct mpi3mr_sas_phy, num_phys,
-                                         GFP_KERNEL);
+       mrioc->sas_hba.phy = kzalloc_objs(struct mpi3mr_sas_phy, num_phys);
        if (!mrioc->sas_hba.phy)
                return;
 
index 8d34d1c..06ad016 100644 (file)
@@ -6218,8 +6218,7 @@ base_alloc_rdpq_dma_pool(struct MPT3SAS_ADAPTER *ioc, int sz)
                sizeof(Mpi2DefaultReplyDescriptor_t);
        int count = ioc->rdpq_array_enable ? ioc->reply_queue_count : 1;
 
-       ioc->reply_post = kzalloc_objs(struct reply_post_struct, count,
-                                      GFP_KERNEL);
+       ioc->reply_post = kzalloc_objs(struct reply_post_struct, count);
        if (!ioc->reply_post)
                return -ENOMEM;
        /*
index 111b238..b2c9a3b 100644 (file)
@@ -3881,8 +3881,7 @@ diag_trigger_master_store(struct device *cdev,
        rc = min(sizeof(struct SL_WH_MASTER_TRIGGER_T), count);
 
        if (ioc->supports_trigger_pages) {
-               master_tg = kzalloc_obj(struct SL_WH_MASTER_TRIGGER_T,
-                                       GFP_KERNEL);
+               master_tg = kzalloc_obj(struct SL_WH_MASTER_TRIGGER_T);
                if (!master_tg)
                        return -ENOMEM;
 
@@ -3956,8 +3955,7 @@ diag_trigger_event_store(struct device *cdev,
 
        sz = min(sizeof(struct SL_WH_EVENT_TRIGGERS_T), count);
        if (ioc->supports_trigger_pages) {
-               event_tg = kzalloc_obj(struct SL_WH_EVENT_TRIGGERS_T,
-                                      GFP_KERNEL);
+               event_tg = kzalloc_obj(struct SL_WH_EVENT_TRIGGERS_T);
                if (!event_tg)
                        return -ENOMEM;
 
index 6407d65..3b6e17e 100644 (file)
@@ -6376,8 +6376,7 @@ _scsih_update_vphys_after_reset(struct MPT3SAS_ADAPTER *ioc)
                                port_id = sas_iounit_pg0->PhyData[i].Port;
                                mport = mpt3sas_get_port_by_id(ioc, port_id, 1);
                                if (!mport) {
-                                       mport = kzalloc_obj(struct hba_port,
-                                                           GFP_KERNEL);
+                                       mport = kzalloc_obj(struct hba_port);
                                        if (!mport)
                                                break;
                                        mport->port_id = port_id;
@@ -6747,8 +6746,7 @@ _scsih_sas_port_refresh(struct MPT3SAS_ADAPTER *ioc)
        }
        ioc->sas_hba.num_phys = num_phys;
 
-       port_table = kzalloc_objs(struct hba_port, ioc->sas_hba.num_phys,
-                                 GFP_KERNEL);
+       port_table = kzalloc_objs(struct hba_port, ioc->sas_hba.num_phys);
        if (!port_table)
                return;
 
index 5fe066a..e70d336 100644 (file)
@@ -1572,8 +1572,7 @@ static int mvumi_probe_devices(struct mvumi_hba *mhba)
                        found = mvumi_match_devices(mhba, id, wwid);
                        if (!found) {
                                mvumi_remove_devices(mhba, id);
-                               mv_dev = kzalloc_obj(struct mvumi_device,
-                                                    GFP_KERNEL);
+                               mv_dev = kzalloc_obj(struct mvumi_device);
                                if (!mv_dev) {
                                        dev_err(&mhba->pdev->dev,
                                                "%s alloc mv_dev failed\n",
index af1a34b..a120f0e 100644 (file)
@@ -230,8 +230,7 @@ struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf)
                }
 
                /* Allocate task parameters to pass to f/w init funcions */
-               io_req->task_params = kzalloc_obj(*io_req->task_params,
-                                                 GFP_KERNEL);
+               io_req->task_params = kzalloc_obj(*io_req->task_params);
                if (!io_req->task_params) {
                        QEDF_ERR(&(qedf->dbg_ctx),
                                 "Failed to allocate task_params for xid=0x%x\n",
@@ -243,8 +242,7 @@ struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf)
                 * Allocate scatter/gather list info to pass to f/w init
                 * functions.
                 */
-               io_req->sgl_task_params = kzalloc_obj(struct scsi_sgl_task_params,
-                                                     GFP_KERNEL);
+               io_req->sgl_task_params = kzalloc_obj(struct scsi_sgl_task_params);
                if (!io_req->sgl_task_params) {
                        QEDF_ERR(&(qedf->dbg_ctx),
                                 "Failed to allocate sgl_task_params for xid=0x%x\n",
index f1b6abb..da429b3 100644 (file)
@@ -3082,8 +3082,7 @@ static int qedf_alloc_global_queues(struct qedf_ctx *qedf)
 
        /* Allocate a CQ and an associated PBL for each MSI-X vector */
        for (i = 0; i < qedf->num_queues; i++) {
-               qedf->global_queues[i] = kzalloc_obj(struct global_queue,
-                                                    GFP_KERNEL);
+               qedf->global_queues[i] = kzalloc_obj(struct global_queue);
                if (!qedf->global_queues[i]) {
                        QEDF_WARN(&(qedf->dbg_ctx), "Unable to allocate "
                                   "global queue %d.\n", i);
index ddb061a..d5e0b3d 100644 (file)
@@ -1668,8 +1668,7 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
         */
        for (i = 0; i < qedi->num_queues; i++) {
                qedi->global_queues[i] =
-                                       kzalloc_obj(*qedi->global_queues[0],
-                                                   GFP_KERNEL);
+                                       kzalloc_obj(*qedi->global_queues[0]);
                if (!qedi->global_queues[i]) {
                        QEDI_ERR(&qedi->dbg_ctx,
                                 "Unable to allocation global queue %d.\n", i);
index 5badce1..2493b72 100644 (file)
@@ -4033,8 +4033,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
                        req->num_outstanding_cmds = ha->cur_fw_iocb_count;
        }
 
-       req->outstanding_cmds = kzalloc_objs(srb_t *, req->num_outstanding_cmds,
-                                            GFP_KERNEL);
+       req->outstanding_cmds = kzalloc_objs(srb_t *, req->num_outstanding_cmds);
 
        if (!req->outstanding_cmds) {
                /*
@@ -6493,8 +6492,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
 
        /* Try GID_PT to get device list, else GAN. */
        if (!ha->swl)
-               ha->swl = kzalloc_objs(sw_info_t, ha->max_fibre_devices,
-                                      GFP_KERNEL);
+               ha->swl = kzalloc_objs(sw_info_t, ha->max_fibre_devices);
        swl = ha->swl;
        if (!swl) {
                /*EMPTY*/
index bb34a3a..53eaff1 100644 (file)
@@ -621,8 +621,7 @@ static inline int qla_mapq_alloc_qp_cpu_map(struct qla_hw_data *ha)
        scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
 
        if (!ha->qp_cpu_map) {
-               ha->qp_cpu_map = kzalloc_objs(struct qla_qpair *, NR_CPUS,
-                                             GFP_KERNEL);
+               ha->qp_cpu_map = kzalloc_objs(struct qla_qpair *, NR_CPUS);
                if (!ha->qp_cpu_map) {
                        ql_log(ql_log_fatal, vha, 0x0180,
                               "Unable to allocate memory for qp_cpu_map ptrs.\n");
index 6117b51..3377633 100644 (file)
@@ -4562,8 +4562,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
                }
        }
        vha->irq_offset = desc.pre_vectors;
-       ha->msix_entries = kzalloc_objs(struct qla_msix_entry, ha->msix_count,
-                                       GFP_KERNEL);
+       ha->msix_entries = kzalloc_objs(struct qla_msix_entry, ha->msix_count);
        if (!ha->msix_entries) {
                ql_log(ql_log_fatal, vha, 0x00c8,
                    "Failed to allocate memory for ha->msix_entries.\n");
index 6dca934..c563133 100644 (file)
@@ -1102,8 +1102,7 @@ int qla_create_buf_pool(struct scsi_qla_host *vha, struct qla_qpair *qp)
                return -ENOMEM;
        }
        sz = qp->req->length * sizeof(dma_addr_t);
-       qp->buf_pool.dma_array = kzalloc_objs(dma_addr_t, qp->req->length,
-                                             GFP_KERNEL);
+       qp->buf_pool.dma_array = kzalloc_objs(dma_addr_t, qp->req->length);
        if (!qp->buf_pool.dma_array) {
                ql_log(ql_log_warn, vha, 0x0186,
                    "Failed to allocate dma_array(%d).\n", sz);
index 9761814..8dff710 100644 (file)
@@ -438,16 +438,14 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req,
 {
        scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
 
-       ha->req_q_map = kzalloc_objs(struct req_que *, ha->max_req_queues,
-                                    GFP_KERNEL);
+       ha->req_q_map = kzalloc_objs(struct req_que *, ha->max_req_queues);
        if (!ha->req_q_map) {
                ql_log(ql_log_fatal, vha, 0x003b,
                    "Unable to allocate memory for request queue ptrs.\n");
                goto fail_req_map;
        }
 
-       ha->rsp_q_map = kzalloc_objs(struct rsp_que *, ha->max_rsp_queues,
-                                    GFP_KERNEL);
+       ha->rsp_q_map = kzalloc_objs(struct rsp_que *, ha->max_rsp_queues);
        if (!ha->rsp_q_map) {
                ql_log(ql_log_fatal, vha, 0x003c,
                    "Unable to allocate memory for response queue ptrs.\n");
@@ -4422,8 +4420,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
        INIT_LIST_HEAD(&ha->vp_list);
 
        /* Allocate memory for our loop_id bitmap */
-       ha->loop_id_map = kzalloc_objs(long, BITS_TO_LONGS(LOOPID_MAP_SIZE),
-                                      GFP_KERNEL);
+       ha->loop_id_map = kzalloc_objs(long, BITS_TO_LONGS(LOOPID_MAP_SIZE));
        if (!ha->loop_id_map)
                goto fail_loop_id_map;
        else {
index 9c9cb5c..e47da45 100644 (file)
@@ -7465,8 +7465,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
                return -ENOMEM;
        }
 
-       tgt->qphints = kzalloc_objs(struct qla_qpair_hint, ha->max_qpairs + 1,
-                                   GFP_KERNEL);
+       tgt->qphints = kzalloc_objs(struct qla_qpair_hint, ha->max_qpairs + 1);
        if (!tgt->qphints) {
                kfree(tgt);
                ql_log(ql_log_warn, base_vha, 0x0197,
index 91933d2..1515495 100644 (file)
@@ -6504,8 +6504,7 @@ static int sdebug_device_create_zones(struct sdebug_dev_info *devip)
                        devip->max_open = sdeb_zbc_max_open;
        }
 
-       devip->zstate = kzalloc_objs(struct sdeb_zone_state, devip->nr_zones,
-                                    GFP_KERNEL);
+       devip->zstate = kzalloc_objs(struct sdeb_zone_state, devip->nr_zones);
        if (!devip->zstate)
                return -ENOMEM;
 
@@ -6649,8 +6648,7 @@ static int scsi_debug_sdev_configure(struct scsi_device *sdp,
        if (sdebug_ptype == TYPE_TAPE) {
                if (!devip->tape_blocks[0]) {
                        devip->tape_blocks[0] =
-                               kzalloc_objs(struct tape_block, TAPE_UNITS,
-                                            GFP_KERNEL);
+                               kzalloc_objs(struct tape_block, TAPE_UNITS);
                        if (!devip->tape_blocks[0])
                                return 1;
                }
index c096bbf..35101e9 100644 (file)
@@ -799,8 +799,7 @@ static int ses_intf_add(struct device *cdev)
        }
 page2_not_supported:
        if (components > 0) {
-               scomp = kzalloc_objs(struct ses_component, components,
-                                    GFP_KERNEL);
+               scomp = kzalloc_objs(struct ses_component, components);
                if (!scomp)
                        goto err_free;
        }
index 2fb9186..5c25381 100644 (file)
@@ -2472,8 +2472,7 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info)
 
        num_new_devices = num_physicals + num_logicals;
 
-       new_device_list = kmalloc_objs(*new_device_list, num_new_devices,
-                                      GFP_KERNEL);
+       new_device_list = kmalloc_objs(*new_device_list, num_new_devices);
        if (!new_device_list) {
                dev_warn(&ctrl_info->pci_dev->dev, "%s\n", out_of_memory_msg);
                rc = -ENOMEM;
index b6da5cf..151cac9 100644 (file)
@@ -1478,8 +1478,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
         */
        pvscsi_setup_all_rings(adapter);
 
-       adapter->cmd_map = kzalloc_objs(struct pvscsi_ctx, adapter->req_depth,
-                                       GFP_KERNEL);
+       adapter->cmd_map = kzalloc_objs(struct pvscsi_ctx, adapter->req_depth);
        if (!adapter->cmd_map) {
                printk(KERN_ERR "vmw_pvscsi: failed to allocate memory.\n");
                error = -ENOMEM;
index ba90356..72259f4 100644 (file)
@@ -396,8 +396,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)
        int domains_read = 0;
        int ret, i;
 
-       struct servreg_get_domain_list_resp *resp __free(kfree) = kzalloc_obj(*resp,
-                                                                             GFP_KERNEL);
+       struct servreg_get_domain_list_resp *resp __free(kfree) = kzalloc_obj(*resp);
        if (!resp)
                return -ENOMEM;
 
index a3982a8..7471dc8 100644 (file)
@@ -110,8 +110,7 @@ static int rz_sysc_probe(struct platform_device *pdev)
        struct rz_sysc *sysc;
        int ret;
 
-       struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg,
-                                                                    GFP_KERNEL);
+       struct regmap_config *regmap_cfg __free(kfree) = kzalloc_obj(*regmap_cfg);
        if (!regmap_cfg)
                return -ENOMEM;
 
index 7db37f0..8e419dd 100644 (file)
@@ -104,8 +104,7 @@ static struct sdw_amd_ctx *sdw_amd_probe_controller(struct sdw_amd_res *res)
 
        ctx->count = count;
        ctx->link_mask = res->link_mask;
-       struct resource *sdw_res __free(kfree) = kzalloc_obj(*sdw_res,
-                                                            GFP_KERNEL);
+       struct resource *sdw_res __free(kfree) = kzalloc_obj(*sdw_res);
        if (!sdw_res) {
                kfree(ctx);
                return NULL;
@@ -205,8 +204,7 @@ int sdw_amd_get_slave_info(struct sdw_amd_ctx *ctx)
                        num_slaves++;
        }
 
-       ctx->peripherals = kmalloc_flex(*ctx->peripherals, array, num_slaves,
-                                       GFP_KERNEL);
+       ctx->peripherals = kmalloc_flex(*ctx->peripherals, array, num_slaves);
        if (!ctx->peripherals)
                return -ENOMEM;
        ctx->peripherals->num_peripherals = num_slaves;
index c2f4057..b9ccb33 100644 (file)
@@ -718,8 +718,7 @@ static int amd_sdw_hw_params(struct snd_pcm_substream *substream,
        sconfig.bps = snd_pcm_format_width(params_format(params));
 
        /* Port configuration */
-       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig,
-                                                                   GFP_KERNEL);
+       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig);
        if (!pconfig)
                return -ENOMEM;
 
index 5b4d84c..dcd7440 100644 (file)
@@ -769,8 +769,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
        sconfig.bps = snd_pcm_format_width(params_format(params));
 
        /* Port configuration */
-       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig,
-                                                                   GFP_KERNEL);
+       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig);
        if (!pconfig)
                return -ENOMEM;
 
index 87bde13..7f01e43 100644 (file)
@@ -747,8 +747,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
        sconfig.bps = snd_pcm_format_width(params_format(params));
 
        /* Port configuration */
-       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig,
-                                                                   GFP_KERNEL);
+       struct sdw_port_config *pconfig __free(kfree) = kzalloc_obj(*pconfig);
        if (!pconfig)
                return -ENOMEM;
 
index e180657..ad48d67 100644 (file)
@@ -253,8 +253,7 @@ static struct sdw_intel_ctx
                        num_slaves++;
        }
 
-       ctx->peripherals = kmalloc_flex(*ctx->peripherals, array, num_slaves,
-                                       GFP_KERNEL);
+       ctx->peripherals = kmalloc_flex(*ctx->peripherals, array, num_slaves);
        if (!ctx->peripherals)
                goto err;
        ctx->peripherals->num_peripherals = num_slaves;
index 63aa37f..dcade7b 100644 (file)
@@ -1565,8 +1565,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
                        return PTR_ERR(qspi->base[CHIP_SELECT]);
        }
 
-       qspi->dev_ids = kzalloc_objs(struct bcm_qspi_dev_id, num_irqs,
-                                    GFP_KERNEL);
+       qspi->dev_ids = kzalloc_objs(struct bcm_qspi_dev_id, num_irqs);
        if (!qspi->dev_ids)
                return -ENOMEM;
 
index ea5c151..05bbd37 100644 (file)
@@ -443,8 +443,7 @@ static int mpc52xx_spi_probe(struct platform_device *op)
        ms->gpio_cs_count = gpiod_count(&op->dev, NULL);
        if (ms->gpio_cs_count > 0) {
                host->num_chipselect = ms->gpio_cs_count;
-               ms->gpio_cs = kmalloc_objs(*ms->gpio_cs, ms->gpio_cs_count,
-                                          GFP_KERNEL);
+               ms->gpio_cs = kmalloc_objs(*ms->gpio_cs, ms->gpio_cs_count);
                if (!ms->gpio_cs) {
                        rc = -ENOMEM;
                        goto err_alloc_gpio;
index 9efadfb..fa4c680 100644 (file)
@@ -158,8 +158,7 @@ static int virtio_spi_transfer_one(struct spi_controller *ctrl,
        unsigned int incnt = 0;
        int ret;
 
-       struct virtio_spi_req *spi_req __free(kfree) = kzalloc_obj(*spi_req,
-                                                                  GFP_KERNEL);
+       struct virtio_spi_req *spi_req __free(kfree) = kzalloc_obj(*spi_req);
        if (!spi_req)
                return -ENOMEM;
 
index aa93af8..cab02b5 100644 (file)
@@ -275,8 +275,7 @@ static int channel_attr_groups_set(struct gb_channel *channel,
        channel->attr_group = kzalloc_obj(*channel->attr_group);
        if (!channel->attr_group)
                return -ENOMEM;
-       channel->attr_groups = kzalloc_objs(*channel->attr_groups, 2,
-                                           GFP_KERNEL);
+       channel->attr_groups = kzalloc_objs(*channel->attr_groups, 2);
        if (!channel->attr_groups)
                return -ENOMEM;
 
@@ -1011,8 +1010,7 @@ static int gb_lights_light_config(struct gb_lights *glights, u8 id)
        light->name = kstrndup(conf.name, NAMES_MAX, GFP_KERNEL);
        if (!light->name)
                return -ENOMEM;
-       light->channels = kzalloc_objs(struct gb_channel, conf.channel_count,
-                                      GFP_KERNEL);
+       light->channels = kzalloc_objs(struct gb_channel, conf.channel_count);
        if (!light->channels)
                return -ENOMEM;
        /*
@@ -1153,8 +1151,7 @@ static int gb_lights_create_all(struct gb_lights *glights)
        if (ret < 0)
                goto out;
 
-       glights->lights = kzalloc_objs(struct gb_light, glights->lights_count,
-                                      GFP_KERNEL);
+       glights->lights = kzalloc_objs(struct gb_light, glights->lights_count);
        if (!glights->lights) {
                ret = -ENOMEM;
                goto out;
index c51efea..5d180b0 100644 (file)
@@ -545,8 +545,7 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
                }
        }
 
-       gbpsy->props = kzalloc_objs(*gbpsy->props, gbpsy->properties_count,
-                                   GFP_KERNEL);
+       gbpsy->props = kzalloc_objs(*gbpsy->props, gbpsy->properties_count);
        if (!gbpsy->props) {
                ret = -ENOMEM;
                goto out_put_operation;
index a19dc99..a7f22de 100644 (file)
@@ -696,8 +696,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                        ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL;
                dev_dbg(isp->dev, "allocating %d 3a buffers\n", count);
                while (count--) {
-                       s3a_buf = kzalloc_obj(struct atomisp_s3a_buf,
-                                             GFP_KERNEL);
+                       s3a_buf = kzalloc_obj(struct atomisp_s3a_buf);
                        if (!s3a_buf)
                                goto error;
 
@@ -716,8 +715,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                count = ATOMISP_CSS_Q_DEPTH + 1;
                dev_dbg(isp->dev, "allocating %d dis buffers\n", count);
                while (count--) {
-                       dis_buf = kzalloc_obj(struct atomisp_dis_buf,
-                                             GFP_KERNEL);
+                       dis_buf = kzalloc_obj(struct atomisp_dis_buf);
                        if (!dis_buf)
                                goto error;
                        if (atomisp_css_allocate_stat_buffers(
@@ -739,8 +737,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                        dev_dbg(isp->dev, "allocating %d metadata buffers for type %d\n",
                                count, i);
                        while (count--) {
-                               md_buf = kzalloc_obj(struct atomisp_metadata_buf,
-                                                    GFP_KERNEL);
+                               md_buf = kzalloc_obj(struct atomisp_metadata_buf);
                                if (!md_buf)
                                        goto error;
 
index 78ea854..ee7ea04 100644 (file)
@@ -6252,8 +6252,7 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
 
                mycs->num_vf_pp = 1;
        }
-       mycs->vf_pp_binary = kzalloc_objs(struct ia_css_binary, mycs->num_vf_pp,
-                                         GFP_KERNEL);
+       mycs->vf_pp_binary = kzalloc_objs(struct ia_css_binary, mycs->num_vf_pp);
        if (!mycs->vf_pp_binary) {
                err = -ENOMEM;
                goto ERR;
@@ -7921,8 +7920,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
 
        /* allocate pipes */
        curr_stream->num_pipes = num_pipes;
-       curr_stream->pipes = kzalloc_objs(struct ia_css_pipe *, num_pipes,
-                                         GFP_KERNEL);
+       curr_stream->pipes = kzalloc_objs(struct ia_css_pipe *, num_pipes);
        if (!curr_stream->pipes) {
                curr_stream->num_pipes = 0;
                kfree(curr_stream);
index a2a8a46..57ecf55 100644 (file)
@@ -262,8 +262,7 @@ sh_css_load_firmware(struct device *dev, const char *fw_data,
                sh_css_blob_info = NULL;
        }
 
-       fw_minibuffer = kzalloc_objs(struct fw_param, sh_css_num_binaries,
-                                    GFP_KERNEL);
+       fw_minibuffer = kzalloc_objs(struct fw_param, sh_css_num_binaries);
        if (!fw_minibuffer)
                return -ENOMEM;
 
index 4248763..fcebace 100644 (file)
@@ -4464,8 +4464,7 @@ ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream)
        if (!params || !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])
                goto err;
 
-       dvs_config = kvzalloc_objs(struct ia_css_dvs_6axis_config, 1,
-                                  GFP_KERNEL);
+       dvs_config = kvzalloc_objs(struct ia_css_dvs_6axis_config, 1);
        if (!dvs_config)
                goto err;
 
index 356f3f5..4cf3486 100644 (file)
@@ -2332,8 +2332,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (err_chk) {
                master_num--;
 
-               tsi148_device->flush_image = kmalloc_obj(*tsi148_device->flush_image,
-                                                        GFP_KERNEL);
+               tsi148_device->flush_image = kmalloc_obj(*tsi148_device->flush_image);
                if (!tsi148_device->flush_image) {
                        retval = -ENOMEM;
                        goto err_master;
index c50828e..3c92f94 100644 (file)
@@ -66,8 +66,7 @@ static struct se_device *iblock_alloc_device(struct se_hba *hba, const char *nam
        }
        ib_dev->ibd_exclusive = true;
 
-       ib_dev->ibd_plug = kzalloc_objs(*ib_dev->ibd_plug, nr_cpu_ids,
-                                       GFP_KERNEL);
+       ib_dev->ibd_plug = kzalloc_objs(*ib_dev->ibd_plug, nr_cpu_ids);
        if (!ib_dev->ibd_plug)
                goto free_dev;
 
index 24e0667..f88e63a 100644 (file)
@@ -1712,8 +1712,7 @@ core_scsi3_decode_spec_i_port(
                 * the dest_node_acl and dest_se_deve pointers for the
                 * loop below.
                 */
-               tidh_new = kzalloc_obj(struct pr_transport_id_holder,
-                                      GFP_KERNEL);
+               tidh_new = kzalloc_obj(struct pr_transport_id_holder);
                if (!tidh_new) {
                        pr_err("Unable to allocate tidh_new\n");
                        core_scsi3_lunacl_undepend_item(dest_se_deve);
index ba9af41..af1f8ea 100644 (file)
@@ -563,8 +563,7 @@ static int qcomtee_supp_send(struct tee_context *ctx, u32 errno, u32 num_params,
 
 static int qcomtee_open(struct tee_context *ctx)
 {
-       struct qcomtee_context_data *ctxdata __free(kfree) = kzalloc_obj(*ctxdata,
-                                                                        GFP_KERNEL);
+       struct qcomtee_context_data *ctxdata __free(kfree) = kzalloc_obj(*ctxdata);
        if (!ctxdata)
                return -ENOMEM;
 
index 01bc8dc..ebba200 100644 (file)
@@ -91,8 +91,7 @@ int qcomtee_memobj_param_to_object(struct qcomtee_object **object,
        struct tee_shm *shm;
        int err;
 
-       struct qcomtee_mem_object *mem_object __free(kfree) = kzalloc_obj(*mem_object,
-                                                                         GFP_KERNEL);
+       struct qcomtee_mem_object *mem_object __free(kfree) = kzalloc_obj(*mem_object);
        if (!mem_object)
                return -ENOMEM;
 
index 3dafbdc..ef9642d 100644 (file)
@@ -560,8 +560,7 @@ static int tee_ioctl_open_session(struct tee_context *ctx,
                return -EINVAL;
 
        if (arg.num_params) {
-               params = kzalloc_objs(struct tee_param, arg.num_params,
-                                     GFP_KERNEL);
+               params = kzalloc_objs(struct tee_param, arg.num_params);
                if (!params)
                        return -ENOMEM;
                uparams = uarg->params;
@@ -638,8 +637,7 @@ static int tee_ioctl_invoke(struct tee_context *ctx,
                return -EINVAL;
 
        if (arg.num_params) {
-               params = kzalloc_objs(struct tee_param, arg.num_params,
-                                     GFP_KERNEL);
+               params = kzalloc_objs(struct tee_param, arg.num_params);
                if (!params)
                        return -ENOMEM;
                uparams = uarg->params;
@@ -699,8 +697,7 @@ static int tee_ioctl_object_invoke(struct tee_context *ctx,
                return -EINVAL;
 
        if (arg.num_params) {
-               params = kzalloc_objs(struct tee_param, arg.num_params,
-                                     GFP_KERNEL);
+               params = kzalloc_objs(struct tee_param, arg.num_params);
                if (!params)
                        return -ENOMEM;
                uparams = uarg->params;
index 35df0fd..1a1a95b 100644 (file)
@@ -690,8 +690,7 @@ void __init intel_hfi_init(void)
         * This allocation may fail. CPU hotplug callbacks must check
         * for a null pointer.
         */
-       hfi_instances = kzalloc_objs(*hfi_instances, max_hfi_instances,
-                                    GFP_KERNEL);
+       hfi_instances = kzalloc_objs(*hfi_instances, max_hfi_instances);
        if (!hfi_instances)
                return;
 
index 014e6e5..7af160c 100644 (file)
@@ -186,13 +186,11 @@ int tt_add_tz(void)
 {
        int ret;
 
-       struct tt_thermal_zone *tt_zone __free(kfree) = kzalloc_obj(*tt_zone,
-                                                                   GFP_KERNEL);
+       struct tt_thermal_zone *tt_zone __free(kfree) = kzalloc_obj(*tt_zone);
        if (!tt_zone)
                return -ENOMEM;
 
-       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work,
-                                                           GFP_KERNEL);
+       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work);
        if (!tt_work)
                return -ENOMEM;
 
@@ -245,8 +243,7 @@ int tt_del_tz(const char *arg)
        if (ret != 1)
                return -EINVAL;
 
-       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work,
-                                                           GFP_KERNEL);
+       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work);
        if (!tt_work)
                return -ENOMEM;
 
@@ -332,13 +329,11 @@ int tt_zone_add_trip(const char *arg)
 {
        int id;
 
-       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work,
-                                                           GFP_KERNEL);
+       struct tt_work *tt_work __free(kfree) = kzalloc_obj(*tt_work);
        if (!tt_work)
                return -ENOMEM;
 
-       struct tt_trip *tt_trip __free(kfree) = kzalloc_obj(*tt_trip,
-                                                           GFP_KERNEL);
+       struct tt_trip *tt_trip __free(kfree) = kzalloc_obj(*tt_trip);
        if (!tt_trip)
                return -ENOMEM;
 
index 085a414..6ebb83c 100644 (file)
@@ -107,8 +107,7 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
        if (!count)
                return NULL;
 
-       struct thermal_trip *tt __free(kfree) = kzalloc_objs(*tt, count,
-                                                            GFP_KERNEL);
+       struct thermal_trip *tt __free(kfree) = kzalloc_objs(*tt, count);
        if (!tt)
                return ERR_PTR(-ENOMEM);
 
index b86ccb5..e5b48a3 100644 (file)
@@ -2503,8 +2503,7 @@ struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
        }
 
        /* initialize ports */
-       sw->ports = kzalloc_objs(*sw->ports, sw->config.max_port_number + 1,
-                                GFP_KERNEL);
+       sw->ports = kzalloc_objs(*sw->ports, sw->config.max_port_number + 1);
        if (!sw->ports) {
                ret = -ENOMEM;
                goto err_free_sw_ports;
index c587ded..12d08de 100644 (file)
@@ -238,8 +238,7 @@ static int goldfish_tty_create_driver(void)
        int ret;
        struct tty_driver *tty;
 
-       goldfish_ttys = kzalloc_objs(*goldfish_ttys, goldfish_tty_line_count,
-                                    GFP_KERNEL);
+       goldfish_ttys = kzalloc_objs(*goldfish_ttys, goldfish_tty_line_count);
        if (goldfish_ttys == NULL) {
                ret = -ENOMEM;
                goto err_alloc_goldfish_ttys_failed;
index 37f3ef4..ad3a7bc 100644 (file)
@@ -111,8 +111,7 @@ static int serial8250_probe_acpi(struct platform_device *pdev)
        struct resource *regs;
        int ret, line;
 
-       struct uart_8250_port *uart __free(kfree) = kzalloc_obj(*uart,
-                                                               GFP_KERNEL);
+       struct uart_8250_port *uart __free(kfree) = kzalloc_obj(*uart);
        if (!uart)
                return -ENOMEM;
 
@@ -157,8 +156,7 @@ static int serial8250_probe_platform(struct platform_device *dev, struct plat_se
 {
        int ret, i;
 
-       struct uart_8250_port *uart __free(kfree) = kzalloc_obj(*uart,
-                                                               GFP_KERNEL);
+       struct uart_8250_port *uart __free(kfree) = kzalloc_obj(*uart);
        if (!uart)
                return -ENOMEM;
 
index 8c665fc..2868716 100644 (file)
@@ -391,8 +391,7 @@ int jsm_tty_init(struct jsm_board *brd)
                         * Okay to malloc with GFP_KERNEL, we are not at
                         * interrupt context, and there are no locks held.
                         */
-                       brd->channels[i] = kzalloc_obj(struct jsm_channel,
-                                                      GFP_KERNEL);
+                       brd->channels[i] = kzalloc_obj(struct jsm_channel);
                        if (!brd->channels[i]) {
                                jsm_dbg(CORE, &brd->pci_dev,
                                        "%s:%d Unable to allocate memory for channel struct\n",
index 78bb2a5..4877569 100644 (file)
@@ -3088,8 +3088,7 @@ static int serial_core_add_one_port(struct uart_driver *drv, struct uart_port *u
        if (uport->attr_group)
                num_groups++;
 
-       uport->tty_groups = kzalloc_objs(*uport->tty_groups, num_groups,
-                                        GFP_KERNEL);
+       uport->tty_groups = kzalloc_objs(*uport->tty_groups, num_groups);
        if (!uport->tty_groups)
                return -ENOMEM;
 
index 0b9a19a..a5d0457 100644 (file)
@@ -3344,8 +3344,7 @@ struct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner,
 
        if (!(flags & TTY_DRIVER_DEVPTS_MEM)) {
                driver->ttys = kzalloc_objs(*driver->ttys, lines);
-               driver->termios = kzalloc_objs(*driver->termios, lines,
-                                              GFP_KERNEL);
+               driver->termios = kzalloc_objs(*driver->termios, lines);
                if (!driver->ttys || !driver->termios) {
                        err = -ENOMEM;
                        goto err_free_all;
index dba09eb..13bc048 100644 (file)
@@ -1548,8 +1548,7 @@ static int kbd_connect(struct input_handler *handler, struct input_dev *dev,
 {
        int error;
 
-       struct input_handle __free(kfree) *handle = kzalloc_obj(*handle,
-                                                               GFP_KERNEL);
+       struct input_handle __free(kfree) *handle = kzalloc_obj(*handle);
        if (!handle)
                return -ENOMEM;
 
index c0e2fa2..dee842e 100644 (file)
@@ -2567,16 +2567,14 @@ struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
        if (!hcd)
                return NULL;
        if (primary_hcd == NULL) {
-               hcd->address0_mutex = kmalloc_obj(*hcd->address0_mutex,
-                                                 GFP_KERNEL);
+               hcd->address0_mutex = kmalloc_obj(*hcd->address0_mutex);
                if (!hcd->address0_mutex) {
                        kfree(hcd);
                        dev_dbg(dev, "hcd address0 mutex alloc failed\n");
                        return NULL;
                }
                mutex_init(hcd->address0_mutex);
-               hcd->bandwidth_mutex = kmalloc_obj(*hcd->bandwidth_mutex,
-                                                  GFP_KERNEL);
+               hcd->bandwidth_mutex = kmalloc_obj(*hcd->bandwidth_mutex);
                if (!hcd->bandwidth_mutex) {
                        kfree(hcd->address0_mutex);
                        kfree(hcd);
index 218c180..4d9e4bd 100644 (file)
@@ -931,8 +931,7 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)
                goto fail;
 
        /* allocate temporary function list */
-       midi_function = kzalloc_objs(*midi_function, (MAX_PORTS * 4) + 11,
-                                    GFP_KERNEL);
+       midi_function = kzalloc_objs(*midi_function, (MAX_PORTS * 4) + 11);
        if (!midi_function) {
                status = -ENOMEM;
                goto fail;
index 61ce54c..4c66343 100644 (file)
@@ -1187,8 +1187,7 @@ static int f_midi2_init_ep(struct f_midi2 *midi2, struct f_midi2_ep *ep,
                return -ENODEV;
        usb_ep->complete = complete;
 
-       usb_ep->reqs = kzalloc_objs(*usb_ep->reqs, midi2->info.num_reqs,
-                                   GFP_KERNEL);
+       usb_ep->reqs = kzalloc_objs(*usb_ep->reqs, midi2->info.num_reqs);
        if (!usb_ep->reqs)
                return -ENOMEM;
        for (i = 0; i < midi2->info.num_reqs; i++) {
index 51602d9..438201d 100644 (file)
@@ -397,8 +397,7 @@ static int bdc_mem_alloc(struct bdc *bdc)
                "ieps:%d eops:%d num_eps:%d\n",
                num_ieps, num_oeps, bdc->num_eps);
        /* allocate array of ep pointers */
-       bdc->bdc_ep_array = kzalloc_objs(struct bdc_ep *, bdc->num_eps,
-                                        GFP_KERNEL);
+       bdc->bdc_ep_array = kzalloc_objs(struct bdc_ep *, bdc->num_eps);
        if (!bdc->bdc_ep_array)
                goto fail;
 
index 027c379..433d64a 100644 (file)
@@ -603,8 +603,7 @@ static int uhci_start(struct usb_hcd *hcd)
                goto err_alloc_frame;
        }
 
-       uhci->frame_cpu = kzalloc_objs(*uhci->frame_cpu, UHCI_NUMFRAMES,
-                                      GFP_KERNEL);
+       uhci->frame_cpu = kzalloc_objs(*uhci->frame_cpu, UHCI_NUMFRAMES);
        if (!uhci->frame_cpu)
                goto err_alloc_frame_cpu;
 
index e3550ac..583623c 100644 (file)
@@ -179,8 +179,7 @@ static struct mu3h_sch_tt *find_tt(struct usb_device *udev)
        if (utt->multi) {
                tt_index = utt->hcpriv;
                if (!tt_index) {        /* Create the index array */
-                       tt_index = kzalloc_objs(*tt_index, utt->hub->maxchild,
-                                               GFP_KERNEL);
+                       tt_index = kzalloc_objs(*tt_index, utt->hub->maxchild);
                        if (!tt_index)
                                return ERR_PTR(-ENOMEM);
                        utt->hcpriv = tt_index;
index d847498..687f6a8 100644 (file)
@@ -1029,8 +1029,7 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg
                        return -EINVAL;
 
                size = CHUNK_ALIGN(arg);
-               vec = kzalloc_objs(struct mon_pgmap, size / CHUNK_SIZE,
-                                  GFP_KERNEL);
+               vec = kzalloc_objs(struct mon_pgmap, size / CHUNK_SIZE);
                if (vec == NULL) {
                        ret = -ENOMEM;
                        break;
index cc663d8..c0d0c24 100644 (file)
@@ -1677,8 +1677,7 @@ static int mos7840_port_probe(struct usb_serial_port *port)
        /* Initialize LED timers */
        if (mos7840_port->has_led) {
                mos7840_port->led_urb = usb_alloc_urb(0, GFP_KERNEL);
-               mos7840_port->led_dr = kmalloc_obj(*mos7840_port->led_dr,
-                                                  GFP_KERNEL);
+               mos7840_port->led_dr = kmalloc_obj(*mos7840_port->led_dr);
                if (!mos7840_port->led_urb || !mos7840_port->led_dr) {
                        status = -ENOMEM;
                        goto error;
index ba2c1e5..f38a4d7 100644 (file)
@@ -1865,8 +1865,7 @@ static int ucsi_init(struct ucsi *ucsi)
        }
 
        /* Allocate the connectors. Released in ucsi_unregister() */
-       connector = kzalloc_objs(*connector, ucsi->cap.num_connectors + 1,
-                                GFP_KERNEL);
+       connector = kzalloc_objs(*connector, ucsi->cap.num_connectors + 1);
        if (!connector) {
                ret = -ENOMEM;
                goto err_reset;
index f7929b4..bfc10f6 100644 (file)
@@ -476,8 +476,7 @@ static int init_status_attrs(void)
 {
        int id;
 
-       status_attrs = kzalloc_objs(struct status_attr, vhci_num_controllers,
-                                   GFP_KERNEL);
+       status_attrs = kzalloc_objs(struct status_attr, vhci_num_controllers);
        if (status_attrs == NULL)
                return -ENOMEM;
 
@@ -501,8 +500,7 @@ int vhci_init_attr_group(void)
        struct attribute **attrs;
        int ret, i;
 
-       attrs = kzalloc_objs(struct attribute *, (vhci_num_controllers + 5),
-                            GFP_KERNEL);
+       attrs = kzalloc_objs(struct attribute *, (vhci_num_controllers + 5));
        if (attrs == NULL)
                return -ENOMEM;
 
index 4acd612..8425ad2 100644 (file)
@@ -3903,8 +3903,7 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
        mlx5_cmd_init_async_ctx(mdev, &mvdev->async_ctx);
 
        ndev->vqs = kzalloc_objs(*ndev->vqs, max_vqs);
-       ndev->event_cbs = kzalloc_objs(*ndev->event_cbs, max_vqs + 1,
-                                      GFP_KERNEL);
+       ndev->event_cbs = kzalloc_objs(*ndev->event_cbs, max_vqs + 1);
        if (!ndev->vqs || !ndev->event_cbs) {
                err = -ENOMEM;
                goto err_alloc;
index 24b4fca..5fbecb9 100644 (file)
@@ -246,13 +246,11 @@ struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *dev_attr,
        if (!vdpasim->config)
                goto err_iommu;
 
-       vdpasim->vqs = kzalloc_objs(struct vdpasim_virtqueue, dev_attr->nvqs,
-                                   GFP_KERNEL);
+       vdpasim->vqs = kzalloc_objs(struct vdpasim_virtqueue, dev_attr->nvqs);
        if (!vdpasim->vqs)
                goto err_iommu;
 
-       vdpasim->iommu = kmalloc_objs(*vdpasim->iommu, vdpasim->dev_attr.nas,
-                                     GFP_KERNEL);
+       vdpasim->iommu = kmalloc_objs(*vdpasim->iommu, vdpasim->dev_attr.nas);
        if (!vdpasim->iommu)
                goto err_iommu;
 
index 32573f6..08488ed 100644 (file)
@@ -43,8 +43,7 @@ pds_vfio_print_guest_region_info(struct pds_vfio_pci_device *pds_vfio,
        u8 num_regions;
        int err;
 
-       region_info = kzalloc_objs(struct pds_lm_dirty_region_info, max_regions,
-                                  GFP_KERNEL);
+       region_info = kzalloc_objs(struct pds_lm_dirty_region_info, max_regions);
        if (!region_info)
                return;
 
index 1223453..478beaf 100644 (file)
@@ -251,8 +251,7 @@ int vfio_pci_core_feature_dma_buf(struct vfio_pci_core_device *vdev, u32 flags,
                ret = -ENOMEM;
                goto err_free_ranges;
        }
-       priv->phys_vec = kzalloc_objs(*priv->phys_vec, get_dma_buf.nr_ranges,
-                                     GFP_KERNEL);
+       priv->phys_vec = kzalloc_objs(*priv->phys_vec, get_dma_buf.nr_ranges);
        if (!priv->phys_vec) {
                ret = -ENOMEM;
                goto err_free_priv;
index 9b2e888..8096518 100644 (file)
@@ -293,8 +293,7 @@ static int vhost_net_set_ubuf_info(struct vhost_net *n)
                if (!zcopy)
                        continue;
                n->vqs[i].ubuf_info =
-                       kmalloc_objs(*n->vqs[i].ubuf_info, UIO_MAXIOV,
-                                    GFP_KERNEL);
+                       kmalloc_objs(*n->vqs[i].ubuf_info, UIO_MAXIOV);
                if  (!n->vqs[i].ubuf_info)
                        goto err;
        }
index a3e7930..7c05df1 100644 (file)
@@ -382,8 +382,7 @@ static int vhost_scsi_copy_cmd_log(struct vhost_virtqueue *vq,
                                   unsigned int log_num)
 {
        if (!cmd->tvc_log)
-               cmd->tvc_log = kmalloc_objs(*cmd->tvc_log, vq->dev->iov_limit,
-                                           GFP_KERNEL);
+               cmd->tvc_log = kmalloc_objs(*cmd->tvc_log, vq->dev->iov_limit);
 
        if (unlikely(!cmd->tvc_log)) {
                vq_err(vq, "Failed to alloc tvc_log\n");
@@ -1939,8 +1938,7 @@ static int vhost_scsi_setup_vq_cmds(struct vhost_virtqueue *vq, int max_cmds)
                return -ENOMEM;
        }
 
-       svq->upages = kzalloc_objs(struct page *, VHOST_SCSI_PREALLOC_UPAGES,
-                                  GFP_KERNEL);
+       svq->upages = kzalloc_objs(struct page *, VHOST_SCSI_PREALLOC_UPAGES);
        if (!svq->upages)
                goto out;
 
index 12d493e..2f2c45d 100644 (file)
@@ -514,8 +514,7 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev)
 
        for (i = 0; i < dev->nvqs; ++i) {
                vq = dev->vqs[i];
-               vq->indirect = kmalloc_objs(*vq->indirect, UIO_MAXIOV,
-                                           GFP_KERNEL);
+               vq->indirect = kmalloc_objs(*vq->indirect, UIO_MAXIOV);
                vq->log = kmalloc_objs(*vq->log, dev->iov_limit);
                vq->heads = kmalloc_objs(*vq->heads, dev->iov_limit);
                vq->nheads = kmalloc_array(dev->iov_limit, sizeof(*vq->nheads),
index 990e803..866c116 100644 (file)
@@ -431,8 +431,7 @@ static struct dac_ops ics5342_ops = {
 
 static struct dac_info * ics5342_init(dac_read_regs_t drr, dac_write_regs_t dwr, void *data)
 {
-       struct ics5342_info *ics_info = kzalloc_obj(struct ics5342_info,
-                                                   GFP_KERNEL);
+       struct ics5342_info *ics_info = kzalloc_obj(struct ics5342_info);
        struct dac_info *info = &ics_info->dac;
 
        if (!ics_info)
index 18cef14..6945872 100644 (file)
@@ -476,8 +476,7 @@ static int modes_setup(struct mmpfb_info *fbi)
                return 0;
        }
        /* put videomode list to info structure */
-       videomodes = kzalloc_objs(struct fb_videomode, videomode_num,
-                                 GFP_KERNEL);
+       videomodes = kzalloc_objs(struct fb_videomode, videomode_num);
        if (!videomodes)
                return -ENOMEM;
 
index 0fc5d43..c81fe5e 100644 (file)
@@ -32,8 +32,7 @@ int dss_init_overlay_managers(void)
 
        num_managers = dss_feat_get_num_mgrs();
 
-       managers = kzalloc_objs(struct omap_overlay_manager, num_managers,
-                               GFP_KERNEL);
+       managers = kzalloc_objs(struct omap_overlay_manager, num_managers);
 
        BUG_ON(managers == NULL);
 
index fa0d105..5704f60 100644 (file)
@@ -946,8 +946,7 @@ static int ufx_ops_ioctl(struct fb_info *info, unsigned int cmd,
 
        /* TODO: Help propose a standard fb.h ioctl to report mmap damage */
        if (cmd == UFX_IOCTL_REPORT_DAMAGE) {
-               struct dloarea *area __free(kfree) = kmalloc_obj(*area,
-                                                                GFP_KERNEL);
+               struct dloarea *area __free(kfree) = kmalloc_obj(*area);
                if (!area)
                        return -ENOMEM;
 
index db14827..3c6a9b5 100644 (file)
@@ -1164,8 +1164,7 @@ static const struct fb_ops dlfb_ops = {
 
 static void dlfb_deferred_vfree(struct dlfb_data *dlfb, void *mem)
 {
-       struct dlfb_deferred_free *d = kmalloc_obj(struct dlfb_deferred_free,
-                                                  GFP_KERNEL);
+       struct dlfb_deferred_free *d = kmalloc_obj(struct dlfb_deferred_free);
        if (!d)
                return;
        d->mem = mem;
index 610a355..88667fc 100644 (file)
@@ -487,8 +487,7 @@ static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
                mode++;
        }
 
-       par->vbe_modes = kzalloc_objs(struct vbe_mode_ib, par->vbe_modes_cnt,
-                                     GFP_KERNEL);
+       par->vbe_modes = kzalloc_objs(struct vbe_mode_ib, par->vbe_modes_cnt);
        if (!par->vbe_modes)
                return -ENOMEM;
 
index c1d0a49..d3a2bbe 100644 (file)
@@ -184,8 +184,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
                goto timingfail;
        }
 
-       disp->timings = kzalloc_objs(struct display_timing *, disp->num_timings,
-                                    GFP_KERNEL);
+       disp->timings = kzalloc_objs(struct display_timing *, disp->num_timings);
        if (!disp->timings) {
                pr_err("%pOF: could not allocate timings array\n", np);
                goto timingfail;
index 757cd84..5bca500 100644 (file)
@@ -285,8 +285,7 @@ int acrn_vm_ram_map(struct acrn_vm *vm, struct acrn_vm_memmap *memmap)
        }
 
        /* Prepare the vm_memory_region_batch */
-       regions_info = kzalloc_flex(*regions_info, regions_op, nr_regions,
-                                   GFP_KERNEL);
+       regions_info = kzalloc_flex(*regions_info, regions_op, nr_regions);
        if (!regions_info) {
                ret = -ENOMEM;
                goto unmap_kernel_map;
index e96d32f..34b4b98 100644 (file)
@@ -934,8 +934,7 @@ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave,
 
        max_nr_pages = mem_region.memory_size / NE_MIN_MEM_REGION_SIZE;
 
-       ne_mem_region->pages = kzalloc_objs(*ne_mem_region->pages, max_nr_pages,
-                                           GFP_KERNEL);
+       ne_mem_region->pages = kzalloc_objs(*ne_mem_region->pages, max_nr_pages);
        if (!ne_mem_region->pages) {
                rc = -ENOMEM;
 
index d3bdd68..da97b6a 100644 (file)
@@ -134,13 +134,11 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
 
        vp_dev->msix_vectors = nvectors;
 
-       vp_dev->msix_names = kmalloc_objs(*vp_dev->msix_names, nvectors,
-                                         GFP_KERNEL);
+       vp_dev->msix_names = kmalloc_objs(*vp_dev->msix_names, nvectors);
        if (!vp_dev->msix_names)
                goto error;
        vp_dev->msix_affinity_masks
-               = kzalloc_objs(*vp_dev->msix_affinity_masks, nvectors,
-                              GFP_KERNEL);
+               = kzalloc_objs(*vp_dev->msix_affinity_masks, nvectors);
        if (!vp_dev->msix_affinity_masks)
                goto error;
        for (i = 0; i < nvectors; ++i)
index a16e21d..61ea855 100644 (file)
@@ -158,10 +158,8 @@ struct gntdev_grant_map *gntdev_alloc_map(struct gntdev_priv *priv, int count,
            NULL == add->being_removed)
                goto err;
        if (xen_pv_domain()) {
-               add->kmap_ops   = kvmalloc_objs(add->kmap_ops[0], count,
-                                               GFP_KERNEL);
-               add->kunmap_ops = kvmalloc_objs(add->kunmap_ops[0], count,
-                                               GFP_KERNEL);
+               add->kmap_ops   = kvmalloc_objs(add->kmap_ops[0], count);
+               add->kunmap_ops = kvmalloc_objs(add->kunmap_ops[0], count);
                if (NULL == add->kmap_ops || NULL == add->kunmap_ops)
                        goto err;
        }
index 908d009..97e27f7 100644 (file)
@@ -1635,8 +1635,7 @@ int gnttab_init(void)
         */
        max_nr_glist_frames = max_nr_grefs / RPP;
 
-       gnttab_list = kmalloc_objs(grant_ref_t *, max_nr_glist_frames,
-                                  GFP_KERNEL);
+       gnttab_list = kmalloc_objs(grant_ref_t *, max_nr_glist_frames);
        if (gnttab_list == NULL)
                return -ENOMEM;
 
index d7effba..a395b38 100644 (file)
@@ -61,8 +61,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
        unsigned int i, ok;
        int ret = 0;
 
-       dst_cx_states = kzalloc_objs(struct xen_processor_cx, _pr->power.count,
-                                    GFP_KERNEL);
+       dst_cx_states = kzalloc_objs(struct xen_processor_cx, _pr->power.count);
        if (!dst_cx_states)
                return -ENOMEM;
 
@@ -412,8 +411,7 @@ static int check_acpi_ids(struct acpi_processor *pr_backup)
                return -ENOMEM;
        }
 
-       acpi_psd = kzalloc_objs(struct acpi_psd_package, nr_acpi_bits,
-                               GFP_KERNEL);
+       acpi_psd = kzalloc_objs(struct acpi_psd_package, nr_acpi_bits);
        if (!acpi_psd) {
                bitmap_free(acpi_id_present);
                bitmap_free(acpi_id_cst_present);
index dee1a05..3035c7d 100644 (file)
@@ -543,8 +543,7 @@ static int scsiback_gnttab_data_map(struct vscsiif_request *ring_req,
        }
 
        /* free of (sgl) in fast_flush_area() */
-       pending_req->sgl = kmalloc_objs(struct scatterlist, nr_segments,
-                                       GFP_KERNEL);
+       pending_req->sgl = kmalloc_objs(struct scatterlist, nr_segments);
        if (!pending_req->sgl)
                return -ENOMEM;
 
index d4eaacf..a07bdd1 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -510,8 +510,7 @@ static int aio_setup_ring(struct kioctx *ctx, unsigned int nr_events)
 
        ctx->ring_folios = ctx->internal_folios;
        if (nr_pages > AIO_RING_PAGES) {
-               ctx->ring_folios = kzalloc_objs(struct folio *, nr_pages,
-                                               GFP_KERNEL);
+               ctx->ring_folios = kzalloc_objs(struct folio *, nr_pages);
                if (!ctx->ring_folios) {
                        put_aio_ring_file(ctx);
                        return -ENOMEM;
index d9154b2..8e89cc5 100644 (file)
@@ -1873,8 +1873,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
        /*
         * Allocate a structure for each thread.
         */
-       info->thread = kzalloc_flex(*info->thread, notes, info->thread_notes,
-                                   GFP_KERNEL);
+       info->thread = kzalloc_flex(*info->thread, notes, info->thread_notes);
        if (unlikely(!info->thread))
                return 0;
 
index 2bd0178..ae21732 100644 (file)
@@ -733,8 +733,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
        ret = get_anon_bdev(&pending_snapshot->anon_dev);
        if (ret < 0)
                goto free_pending;
-       pending_snapshot->root_item = kzalloc_obj(struct btrfs_root_item,
-                                                 GFP_KERNEL);
+       pending_snapshot->root_item = kzalloc_obj(struct btrfs_root_item);
        pending_snapshot->path = btrfs_alloc_path();
        if (!pending_snapshot->root_item || !pending_snapshot->path) {
                ret = -ENOMEM;
index fa17707..90e50e6 100644 (file)
@@ -117,8 +117,7 @@ static void btrfs_free_dummy_device(struct btrfs_device *dev)
 
 struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(u32 nodesize, u32 sectorsize)
 {
-       struct btrfs_fs_info *fs_info = kzalloc_obj(struct btrfs_fs_info,
-                                                   GFP_KERNEL);
+       struct btrfs_fs_info *fs_info = kzalloc_obj(struct btrfs_fs_info);
 
        if (!fs_info)
                return fs_info;
index a27db82..39930d9 100644 (file)
@@ -454,8 +454,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
                goto out;
        }
 
-       zones = kvzalloc_objs(struct blk_zone, BTRFS_REPORT_NR_ZONES,
-                             GFP_KERNEL);
+       zones = kvzalloc_objs(struct blk_zone, BTRFS_REPORT_NR_ZONES);
        if (!zones) {
                ret = -ENOMEM;
                goto out;
index b251fff..0849eaf 100644 (file)
@@ -734,8 +734,7 @@ int cachefiles_ondemand_init_obj_info(struct cachefiles_object *object,
        if (!cachefiles_in_ondemand_mode(volume->cache))
                return 0;
 
-       object->ondemand = kzalloc_obj(struct cachefiles_ondemand_info,
-                                      GFP_KERNEL);
+       object->ondemand = kzalloc_obj(struct cachefiles_ondemand_info);
        if (!object->ondemand)
                return -ENOMEM;
 
index 55b7005..29df8aa 100644 (file)
@@ -1736,8 +1736,7 @@ static bool dump_vma_snapshot(struct coredump_params *cprm)
        gate_vma = get_gate_vma(mm);
        cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0);
 
-       cprm->vma_meta = kvmalloc_objs(*cprm->vma_meta, cprm->vma_count,
-                                      GFP_KERNEL);
+       cprm->vma_meta = kvmalloc_objs(*cprm->vma_meta, cprm->vma_count);
        if (!cprm->vma_meta) {
                mmap_write_unlock(mm);
                return false;
index 211aa93..c411df5 100644 (file)
@@ -85,8 +85,7 @@ static int erofs_init_inode_xattrs(struct inode *inode)
        }
        vi->xattr_name_filter = le32_to_cpu(ih->h_name_filter);
        vi->xattr_shared_count = ih->h_shared_count;
-       vi->xattr_shared_xattrs = kmalloc_objs(uint, vi->xattr_shared_count,
-                                              GFP_KERNEL);
+       vi->xattr_shared_xattrs = kmalloc_objs(uint, vi->xattr_shared_count);
        if (!vi->xattr_shared_xattrs) {
                erofs_put_metabuf(&buf);
                ret = -ENOMEM;
index 8dd9e39..3a32f49 100644 (file)
@@ -96,8 +96,7 @@ static int exfat_allocate_bitmap(struct super_block *sb,
        }
        sbi->map_sectors = ((need_map_size - 1) >>
                        (sb->s_blocksize_bits)) + 1;
-       sbi->vol_amap = kvmalloc_objs(struct buffer_head *, sbi->map_sectors,
-                                     GFP_KERNEL);
+       sbi->vol_amap = kvmalloc_objs(struct buffer_head *, sbi->map_sectors);
        if (!sbi->vol_amap)
                return -ENOMEM;
 
index b20a6eb..603f264 100644 (file)
@@ -1122,8 +1122,7 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc)
        }
        db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
                   EXT2_DESC_PER_BLOCK(sb);
-       sbi->s_group_desc = kvmalloc_objs(struct buffer_head *, db_count,
-                                         GFP_KERNEL);
+       sbi->s_group_desc = kvmalloc_objs(struct buffer_head *, db_count);
        if (sbi->s_group_desc == NULL) {
                ret = -ENOMEM;
                ext2_msg(sb, KERN_ERR, "error: not enough memory");
index 2dbaf3c..c0022f0 100644 (file)
@@ -598,8 +598,7 @@ int ext4_init_orphan_info(struct super_block *sb)
        }
        oi->of_blocks = inode->i_size >> sb->s_blocksize_bits;
        oi->of_csum_seed = EXT4_I(inode)->i_csum_seed;
-       oi->of_binfo = kvmalloc_objs(struct ext4_orphan_block, oi->of_blocks,
-                                    GFP_KERNEL);
+       oi->of_binfo = kvmalloc_objs(struct ext4_orphan_block, oi->of_blocks);
        if (!oi->of_binfo) {
                ret = -ENOMEM;
                goto out_put;
index fa4053f..642e3d5 100644 (file)
@@ -46,8 +46,7 @@ static long do_sys_name_to_handle(const struct path *path,
        if (f_handle.handle_bytes > MAX_HANDLE_SZ)
                return -EINVAL;
 
-       handle = kzalloc_flex(*handle, f_handle, f_handle.handle_bytes,
-                             GFP_KERNEL);
+       handle = kzalloc_flex(*handle, f_handle, f_handle.handle_bytes);
        if (!handle)
                return -ENOMEM;
 
@@ -368,8 +367,7 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
        if (retval)
                goto out_path;
 
-       handle = kmalloc_flex(*handle, f_handle, f_handle.handle_bytes,
-                             GFP_KERNEL);
+       handle = kmalloc_flex(*handle, f_handle, f_handle.handle_bytes);
        if (!handle) {
                retval = -ENOMEM;
                goto out_path;
index 0fbd9a4..cb2c529 100644 (file)
@@ -2268,8 +2268,7 @@ jbd2_journal_initialize_fast_commit(journal_t *journal)
 
        /* Are we called twice? */
        WARN_ON(journal->j_fc_wbuf != NULL);
-       journal->j_fc_wbuf = kmalloc_objs(struct buffer_head *, num_fc_blks,
-                                         GFP_KERNEL);
+       journal->j_fc_wbuf = kmalloc_objs(struct buffer_head *, num_fc_blks);
        if (!journal->j_fc_wbuf)
                return -ENOMEM;
 
index d0b689e..4521a77 100644 (file)
@@ -115,8 +115,7 @@ int jffs2_sum_add_padding_mem(struct jffs2_summary *s, uint32_t size)
 int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri,
                                uint32_t ofs)
 {
-       struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem,
-                                                      GFP_KERNEL);
+       struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem);
 
        if (!temp)
                return -ENOMEM;
@@ -264,8 +263,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs,
        switch (je16_to_cpu(node->u.nodetype)) {
                case JFFS2_NODETYPE_INODE: {
                        struct jffs2_sum_inode_mem *temp =
-                               kmalloc_obj(struct jffs2_sum_inode_mem,
-                                           GFP_KERNEL);
+                               kmalloc_obj(struct jffs2_sum_inode_mem);
 
                        if (!temp)
                                goto no_mem;
@@ -316,8 +314,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs,
 #ifdef CONFIG_JFFS2_FS_XATTR
                case JFFS2_NODETYPE_XATTR: {
                        struct jffs2_sum_xattr_mem *temp;
-                       temp = kmalloc_obj(struct jffs2_sum_xattr_mem,
-                                          GFP_KERNEL);
+                       temp = kmalloc_obj(struct jffs2_sum_xattr_mem);
                        if (!temp)
                                goto no_mem;
 
@@ -332,8 +329,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs,
                }
                case JFFS2_NODETYPE_XREF: {
                        struct jffs2_sum_xref_mem *temp;
-                       temp = kmalloc_obj(struct jffs2_sum_xref_mem,
-                                          GFP_KERNEL);
+                       temp = kmalloc_obj(struct jffs2_sum_xref_mem);
                        if (!temp)
                                goto no_mem;
                        temp->nodetype = node->r.nodetype;
index 4452e68..6b4f685 100644 (file)
@@ -784,8 +784,7 @@ int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
 
        BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
 
-       xref_tmphash = kzalloc_objs(struct jffs2_xattr_ref *, XREF_TMPHASH_SIZE,
-                                   GFP_KERNEL);
+       xref_tmphash = kzalloc_objs(struct jffs2_xattr_ref *, XREF_TMPHASH_SIZE);
        if (!xref_tmphash)
                return -ENOMEM;
 
index d6707fb..480d02d 100644 (file)
@@ -365,8 +365,7 @@ struct mb_cache *mb_cache_create(int bucket_bits)
        cache->c_max_entries = bucket_count << 4;
        INIT_LIST_HEAD(&cache->c_list);
        spin_lock_init(&cache->c_list_lock);
-       cache->c_hash = kmalloc_objs(struct hlist_bl_head, bucket_count,
-                                    GFP_KERNEL);
+       cache->c_hash = kmalloc_objs(struct hlist_bl_head, bucket_count);
        if (!cache->c_hash) {
                kfree(cache);
                goto err_out;
index 1d7b50c..6880c5c 100644 (file)
@@ -2171,8 +2171,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                if (atomic_inc_return(&nn->pending_async_copies) >
                                (int)rqstp->rq_pool->sp_nrthreads)
                        goto out_dec_async_copy_err;
-               async_copy->cp_src = kmalloc_obj(*async_copy->cp_src,
-                                                GFP_KERNEL);
+               async_copy->cp_src = kmalloc_obj(*async_copy->cp_src);
                if (!async_copy->cp_src)
                        goto out_dec_async_copy_err;
                if (!nfs4_init_copy_state(nn, copy))
index 90dc841..74f5067 100644 (file)
@@ -8959,12 +8959,10 @@ static int nfs4_state_create_net(struct net *net)
        struct nfsd_net *nn = net_generic(net, nfsd_net_id);
        int i;
 
-       nn->conf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE,
-                                          GFP_KERNEL);
+       nn->conf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE);
        if (!nn->conf_id_hashtbl)
                goto err;
-       nn->unconf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE,
-                                            GFP_KERNEL);
+       nn->unconf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE);
        if (!nn->unconf_id_hashtbl)
                goto err_unconf_id;
        nn->sessionid_hashtbl = kmalloc_objs(struct list_head,
index ace7deb..fe19495 100644 (file)
@@ -1677,8 +1677,7 @@ static int o2hb_map_slot_data(struct o2hb_region *reg)
        if (reg->hr_tmp_block == NULL)
                return -ENOMEM;
 
-       reg->hr_slots = kzalloc_objs(struct o2hb_disk_slot, reg->hr_blocks,
-                                    GFP_KERNEL);
+       reg->hr_slots = kzalloc_objs(struct o2hb_disk_slot, reg->hr_blocks);
        if (reg->hr_slots == NULL)
                return -ENOMEM;
 
@@ -1694,8 +1693,7 @@ static int o2hb_map_slot_data(struct o2hb_region *reg)
                           "at %u blocks per page\n",
             reg->hr_num_pages, reg->hr_blocks, spp);
 
-       reg->hr_slot_data = kzalloc_objs(struct page *, reg->hr_num_pages,
-                                        GFP_KERNEL);
+       reg->hr_slot_data = kzalloc_objs(struct page *, reg->hr_num_pages);
        if (!reg->hr_slot_data)
                return -ENOMEM;
 
index 6a0c038..4c86a9d 100644 (file)
@@ -114,8 +114,7 @@ int ocfs2_compute_replay_slots(struct ocfs2_super *osb)
        if (osb->replay_map)
                return 0;
 
-       replay_map = kzalloc_flex(*replay_map, rm_replay_slots, osb->max_slots,
-                                 GFP_KERNEL);
+       replay_map = kzalloc_flex(*replay_map, rm_replay_slots, osb->max_slots);
        if (!replay_map) {
                mlog_errno(-ENOMEM);
                return -ENOMEM;
index 8187137..3aa4a08 100644 (file)
@@ -385,8 +385,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb,
 
        trace_ocfs2_map_slot_buffers(bytes, si->si_blocks);
 
-       si->si_bh = kzalloc_objs(struct buffer_head *, si->si_blocks,
-                                GFP_KERNEL);
+       si->si_bh = kzalloc_objs(struct buffer_head *, si->si_blocks);
        if (!si->si_bh) {
                status = -ENOMEM;
                mlog_errno(status);
index c54266c..5dd2708 100644 (file)
@@ -219,8 +219,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc)
                goto out_free_bufmap;
 
        bufmap->desc_array =
-               kzalloc_objs(struct orangefs_bufmap_desc, bufmap->desc_count,
-                            GFP_KERNEL);
+               kzalloc_objs(struct orangefs_bufmap_desc, bufmap->desc_count);
        if (!bufmap->desc_array)
                goto out_free_index_array;
 
index c1cbf2f..d1f895e 100644 (file)
@@ -232,8 +232,7 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record)
                         */
                        struct persistent_ram_zone *tmp_prz, *prz_next;
 
-                       tmp_prz = kzalloc_obj(struct persistent_ram_zone,
-                                             GFP_KERNEL);
+                       tmp_prz = kzalloc_obj(struct persistent_ram_zone);
                        if (!tmp_prz)
                                return -ENOMEM;
                        prz = tmp_prz;
index 57b0af6..e0244db 100644 (file)
@@ -993,8 +993,7 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
                todo -= walk->len;
 
                len = min(todo, POLLFD_PER_PAGE);
-               walk = walk->next = kmalloc_flex(*walk, entries, len,
-                                                GFP_KERNEL);
+               walk = walk->next = kmalloc_flex(*walk, entries, len);
                if (!walk) {
                        err = -ENOMEM;
                        goto out_fds;
index aec6f2c..22cde46 100644 (file)
@@ -673,8 +673,7 @@ parse_dfs_referrals(struct get_dfs_referral_rsp *rsp, u32 rsp_size,
        cifs_dbg(FYI, "num_referrals: %d dfs flags: 0x%x ...\n",
                 *num_of_nodes, le32_to_cpu(rsp->DFSFlags));
 
-       *target_nodes = kzalloc_objs(struct dfs_info3_param, *num_of_nodes,
-                                    GFP_KERNEL);
+       *target_nodes = kzalloc_objs(struct dfs_info3_param, *num_of_nodes);
        if (*target_nodes == NULL) {
                rc = -ENOMEM;
                goto parse_DFS_referrals_exit;
index 011525a..abc45f8 100644 (file)
@@ -2239,8 +2239,7 @@ xfs_init_fs_context(
        if (!mp)
                return -ENOMEM;
 #ifdef DEBUG
-       mp->m_errortag = kzalloc_objs(*mp->m_errortag, XFS_ERRTAG_MAX,
-                                     GFP_KERNEL);
+       mp->m_errortag = kzalloc_objs(*mp->m_errortag, XFS_ERRTAG_MAX);
        if (!mp->m_errortag) {
                kfree(mp);
                return -ENOMEM;
index 8604c8a..48c6cf5 100644 (file)
@@ -202,8 +202,7 @@ xfs_zone_gc_data_alloc(
        data = kzalloc_obj(*data);
        if (!data)
                return NULL;
-       data->iter.recs = kzalloc_objs(*data->iter.recs, XFS_ZONE_GC_RECS,
-                                      GFP_KERNEL);
+       data->iter.recs = kzalloc_objs(*data->iter.recs, XFS_ZONE_GC_RECS);
        if (!data->iter.recs)
                goto out_free_data;
 
index 9b76765..e83b2ec 100644 (file)
@@ -903,8 +903,7 @@ static int zonefs_get_zone_info(struct zonefs_zone_data *zd)
        struct block_device *bdev = zd->sb->s_bdev;
        int ret;
 
-       zd->zones = kvzalloc_objs(struct blk_zone, bdev_nr_zones(bdev),
-                                 GFP_KERNEL);
+       zd->zones = kvzalloc_objs(struct blk_zone, bdev_nr_zones(bdev));
        if (!zd->zones)
                return -ENOMEM;
 
@@ -948,8 +947,7 @@ static int zonefs_init_zgroup(struct super_block *sb,
        if (!zgroup->g_nr_zones)
                return 0;
 
-       zgroup->g_zones = kvzalloc_objs(struct zonefs_zone, zgroup->g_nr_zones,
-                                       GFP_KERNEL);
+       zgroup->g_zones = kvzalloc_objs(struct zonefs_zone, zgroup->g_nr_zones);
        if (!zgroup->g_zones)
                return -ENOMEM;
 
index 2449111..da68702 100644 (file)
@@ -294,8 +294,7 @@ static inline int udp_lib_init_sock(struct sock *sk)
        up->forward_threshold = sk->sk_rcvbuf >> 2;
        set_bit(SOCK_CUSTOM_SOCKOPT, &sk->sk_socket->flags);
 
-       up->udp_prod_queue = kzalloc_objs(*up->udp_prod_queue, nr_node_ids,
-                                         GFP_KERNEL);
+       up->udp_prod_queue = kzalloc_objs(*up->udp_prod_queue, nr_node_ids);
        if (!up->udp_prod_queue)
                return -ENOMEM;
        for (int i = 0; i < nr_node_ids; i++)
index 80b3e94..3ece2da 100644 (file)
@@ -910,8 +910,7 @@ static struct bpf_prog_pack *alloc_new_pack(bpf_jit_fill_hole_t bpf_fill_ill_ins
        struct bpf_prog_pack *pack;
        int err;
 
-       pack = kzalloc_flex(*pack, bitmap, BITS_TO_LONGS(BPF_PROG_CHUNK_COUNT),
-                           GFP_KERNEL);
+       pack = kzalloc_flex(*pack, bitmap, BITS_TO_LONGS(BPF_PROG_CHUNK_COUNT));
        if (!pack)
                return NULL;
        pack->ptr = bpf_jit_alloc_exec(BPF_PROG_PACK_SIZE);
index 33829e4..1d19b1b 100644 (file)
@@ -545,8 +545,7 @@ static struct gcov_node *new_node(struct gcov_node *parent,
        if (!node)
                goto err_nomem;
        if (info) {
-               node->loaded_info = kzalloc_objs(struct gcov_info *, 1,
-                                                GFP_KERNEL);
+               node->loaded_info = kzalloc_objs(struct gcov_info *, 1);
                if (!node->loaded_info)
                        goto err_nomem;
        }
index 46dbba7..8fa22ab 100644 (file)
@@ -298,8 +298,7 @@ struct gcov_info *gcov_info_dup(struct gcov_info *info)
        if (!dup->filename)
                goto err_free;
 
-       dup->functions = kzalloc_objs(struct gcov_fn_info *, info->n_functions,
-                                     GFP_KERNEL);
+       dup->functions = kzalloc_objs(struct gcov_fn_info *, info->n_functions);
        if (!dup->functions)
                goto err_free;
 
index 96a8647..776a226 100644 (file)
@@ -1293,8 +1293,7 @@ static int __init lock_torture_init(void)
        /* Initialize the statistics so that each run gets its own numbers. */
        if (nwriters_stress) {
                lock_is_write_held = false;
-               cxt.lwsa = kmalloc_objs(*cxt.lwsa, cxt.nrealwriters_stress,
-                                       GFP_KERNEL);
+               cxt.lwsa = kmalloc_objs(*cxt.lwsa, cxt.nrealwriters_stress);
                if (cxt.lwsa == NULL) {
                        VERBOSE_TOROUT_STRING("cxt.lwsa: Out of memory");
                        firsterr = -ENOMEM;
index 0af32c7..8657e6e 100644 (file)
@@ -1106,8 +1106,7 @@ void __init padata_init(void)
 #endif
 
        possible_cpus = num_possible_cpus();
-       padata_works = kmalloc_objs(struct padata_work, possible_cpus,
-                                   GFP_KERNEL);
+       padata_works = kmalloc_objs(struct padata_work, possible_cpus);
        if (!padata_works)
                goto remove_dead_state;
 
index 5d1cd7d..7188a12 100644 (file)
@@ -638,8 +638,7 @@ static __init_or_module int add_sysfs_param(struct module_kobject *mk,
                        return -ENOMEM;
                mk->mp->grp.name = "parameters";
                /* NULL-terminated attribute array. */
-               mk->mp->grp.attrs = kzalloc_obj(mk->mp->grp.attrs[0],
-                                               GFP_KERNEL);
+               mk->mp->grp.attrs = kzalloc_obj(mk->mp->grp.attrs[0]);
                /* Caller will cleanup via free_module_param_attrs */
                if (!mk->mp->grp.attrs)
                        return -ENOMEM;
index 6c1acf9..16adcbe 100644 (file)
@@ -755,8 +755,7 @@ kfree_scale_thread(void *arg)
                }
 
                for (i = 0; i < kfree_alloc_num; i++) {
-                       alloc_ptr = kzalloc_objs(struct kfree_obj, kfree_mult,
-                                                GFP_KERNEL);
+                       alloc_ptr = kzalloc_objs(struct kfree_obj, kfree_mult);
                        if (!alloc_ptr)
                                return -ENOMEM;
 
@@ -1146,8 +1145,7 @@ rcu_scale_init(void)
                schedule_timeout_uninterruptible(1);
        writer_tasks = kzalloc_objs(writer_tasks[0], nrealwriters);
        writer_durations = kcalloc(nrealwriters, sizeof(*writer_durations), GFP_KERNEL);
-       writer_n_durations = kzalloc_objs(*writer_n_durations, nrealwriters,
-                                         GFP_KERNEL);
+       writer_n_durations = kzalloc_objs(*writer_n_durations, nrealwriters);
        writer_done = kzalloc_objs(writer_done[0], nrealwriters);
        if (gp_async) {
                if (gp_async_max <= 0) {
index 197cea4..9279bb5 100644 (file)
@@ -4592,8 +4592,7 @@ rcu_torture_init(void)
        if (WARN_ON(nocbs_toggle < 0))
                nocbs_toggle = HZ;
        if (nrealnocbers > 0) {
-               nocb_tasks = kzalloc_objs(nocb_tasks[0], nrealnocbers,
-                                         GFP_KERNEL);
+               nocb_tasks = kzalloc_objs(nocb_tasks[0], nrealnocbers);
                if (nocb_tasks == NULL) {
                        TOROUT_ERRSTRING("out of memory");
                        firsterr = -ENOMEM;
index 5a812b5..62b1f3a 100644 (file)
@@ -4838,8 +4838,7 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops)
        if (ret < 0)
                goto err_free_ei;
 
-       sch->global_dsqs = kzalloc_objs(sch->global_dsqs[0], nr_node_ids,
-                                       GFP_KERNEL);
+       sch->global_dsqs = kzalloc_objs(sch->global_dsqs[0], nr_node_ids);
        if (!sch->global_dsqs) {
                ret = -ENOMEM;
                goto err_free_hash;
index b44f5ae..23de371 100644 (file)
@@ -3903,8 +3903,7 @@ __tracing_open(struct inode *inode, struct file *file, bool snapshot)
        if (!iter)
                return ERR_PTR(-ENOMEM);
 
-       iter->buffer_iter = kzalloc_objs(*iter->buffer_iter, nr_cpu_ids,
-                                        GFP_KERNEL);
+       iter->buffer_iter = kzalloc_objs(*iter->buffer_iter, nr_cpu_ids);
        if (!iter->buffer_iter)
                goto release;
 
@@ -9310,8 +9309,7 @@ static void setup_trace_scratch(struct trace_array *tr,
               mod_addr_comp, NULL, NULL);
 
        if (IS_ENABLED(CONFIG_MODULES)) {
-               module_delta = kzalloc_flex(*module_delta, delta, nr_entries,
-                                           GFP_KERNEL);
+               module_delta = kzalloc_flex(*module_delta, delta, nr_entries);
                if (!module_delta) {
                        pr_info("module_delta allocation failed. Not able to decode module address.");
                        goto reset;
@@ -10929,8 +10927,7 @@ void __init ftrace_boot_snapshot(void)
 void __init early_trace_init(void)
 {
        if (tracepoint_printk) {
-               tracepoint_print_iter = kzalloc_obj(*tracepoint_print_iter,
-                                                   GFP_KERNEL);
+               tracepoint_print_iter = kzalloc_obj(*tracepoint_print_iter);
                if (MEM_FAIL(!tracepoint_print_iter,
                             "Failed to allocate trace iterator\n"))
                        tracepoint_printk = 0;
index a45cdd0..73ea180 100644 (file)
@@ -5674,8 +5674,7 @@ static int print_entries(struct seq_file *m,
                        (HIST_FIELD_FL_PERCENT | HIST_FIELD_FL_GRAPH)))
                        continue;
                if (!stats) {
-                       stats = kzalloc_objs(*stats, hist_data->n_vals,
-                                            GFP_KERNEL);
+                       stats = kzalloc_objs(*stats, hist_data->n_vals);
                        if (!stats) {
                                n_entries = -ENOMEM;
                                goto out;
index b3ce9bb..e0a5dc8 100644 (file)
@@ -842,8 +842,7 @@ static int __store_entry_arg(struct trace_probe *tp, int argnum)
                if (!earg)
                        return -ENOMEM;
                earg->size = 2 * tp->nr_args + 1;
-               earg->code = kzalloc_objs(struct fetch_insn, earg->size,
-                                         GFP_KERNEL);
+               earg->code = kzalloc_objs(struct fetch_insn, earg->size);
                if (!earg->code) {
                        kfree(earg);
                        return -ENOMEM;
index 23a7d7e..5bea473 100644 (file)
@@ -120,8 +120,7 @@ int unwind_user_faultable(struct unwind_stacktrace *trace)
                return -EINVAL;
 
        if (!info->cache) {
-               info->cache = kzalloc_flex(*cache, entries, UNWIND_MAX_ENTRIES,
-                                          GFP_KERNEL);
+               info->cache = kzalloc_flex(*cache, entries, UNWIND_MAX_ENTRIES);
                if (!info->cache)
                        return -ENOMEM;
        }
index 25a3e8a..bcc6e0a 100644 (file)
@@ -1204,8 +1204,7 @@ found_leaf:
                        node = parent;
 
                        /* Create a new node to collapse into */
-                       new_n0 = kzalloc_obj(struct assoc_array_node,
-                                            GFP_KERNEL);
+                       new_n0 = kzalloc_obj(struct assoc_array_node);
                        if (!new_n0)
                                goto enomem;
                        edit->new_meta[0] = assoc_array_node_to_ptr(new_n0);
index 04736a8..1fef217 100644 (file)
@@ -194,8 +194,7 @@ kunit_filter_suites(const struct kunit_suite_set *suite_set,
        /* Parse attribute filters */
        if (filters) {
                filter_count = kunit_get_filter_count(filters);
-               parsed_filters = kzalloc_objs(*parsed_filters, filter_count,
-                                             GFP_KERNEL);
+               parsed_filters = kzalloc_objs(*parsed_filters, filter_count);
                if (!parsed_filters) {
                        *err = -ENOMEM;
                        goto free_parsed_glob;
index 365f1fc..33cea5f 100644 (file)
@@ -104,8 +104,7 @@ static void test_ratelimit_stress(struct kunit *test)
        int i;
        const int n_stress_kthread = cpumask_weight(cpu_online_mask);
        struct stress_kthread skt = { 0 };
-       struct stress_kthread *sktp = kzalloc_objs(*sktp, n_stress_kthread,
-                                                  GFP_KERNEL);
+       struct stress_kthread *sktp = kzalloc_objs(*sktp, n_stress_kthread);
 
        KUNIT_EXPECT_NOT_NULL_MSG(test, sktp, "Memory allocation failure");
        for (i = 0; i < n_stress_kthread; i++) {
index 5a12d11..3a0782e 100644 (file)
@@ -26,8 +26,7 @@ struct damon_sysfs_scheme_region {
 static struct damon_sysfs_scheme_region *damon_sysfs_scheme_region_alloc(
                struct damon_region *region)
 {
-       struct damon_sysfs_scheme_region *sysfs_region = kmalloc_obj(*sysfs_region,
-                                                                    GFP_KERNEL);
+       struct damon_sysfs_scheme_region *sysfs_region = kmalloc_obj(*sysfs_region);
 
        if (!sysfs_region)
                return NULL;
@@ -138,8 +137,7 @@ struct damon_sysfs_scheme_regions {
 static struct damon_sysfs_scheme_regions *
 damon_sysfs_scheme_regions_alloc(void)
 {
-       struct damon_sysfs_scheme_regions *regions = kmalloc_obj(*regions,
-                                                                GFP_KERNEL);
+       struct damon_sysfs_scheme_regions *regions = kmalloc_obj(*regions);
 
        if (!regions)
                return NULL;
@@ -851,8 +849,7 @@ static struct damon_sysfs_watermarks *damon_sysfs_watermarks_alloc(
                enum damos_wmark_metric metric, unsigned long interval_us,
                unsigned long high, unsigned long mid, unsigned long low)
 {
-       struct damon_sysfs_watermarks *watermarks = kmalloc_obj(*watermarks,
-                                                               GFP_KERNEL);
+       struct damon_sysfs_watermarks *watermarks = kmalloc_obj(*watermarks);
 
        if (!watermarks)
                return NULL;
@@ -1659,8 +1656,7 @@ struct damon_sysfs_access_pattern {
 static
 struct damon_sysfs_access_pattern *damon_sysfs_access_pattern_alloc(void)
 {
-       struct damon_sysfs_access_pattern *access_pattern = kmalloc_obj(*access_pattern,
-                                                                       GFP_KERNEL);
+       struct damon_sysfs_access_pattern *access_pattern = kmalloc_obj(*access_pattern);
 
        if (!access_pattern)
                return NULL;
@@ -2681,12 +2677,10 @@ static int damos_sysfs_add_migrate_dest(struct damos *scheme,
        struct damos_migrate_dests *dests = &scheme->migrate_dests;
        int i;
 
-       dests->node_id_arr = kmalloc_objs(*dests->node_id_arr, sysfs_dests->nr,
-                                         GFP_KERNEL);
+       dests->node_id_arr = kmalloc_objs(*dests->node_id_arr, sysfs_dests->nr);
        if (!dests->node_id_arr)
                return -ENOMEM;
-       dests->weight_arr = kmalloc_objs(*dests->weight_arr, sysfs_dests->nr,
-                                        GFP_KERNEL);
+       dests->weight_arr = kmalloc_objs(*dests->weight_arr, sysfs_dests->nr);
        if (!dests->weight_arr)
                /* ->node_id_arr will be freed by scheme destruction */
                return -ENOMEM;
index f2e7551..576d1dd 100644 (file)
@@ -609,8 +609,7 @@ static struct damon_sysfs_intervals *damon_sysfs_intervals_alloc(
                unsigned long sample_us, unsigned long aggr_us,
                unsigned long update_us)
 {
-       struct damon_sysfs_intervals *intervals = kmalloc_obj(*intervals,
-                                                             GFP_KERNEL);
+       struct damon_sysfs_intervals *intervals = kmalloc_obj(*intervals);
 
        if (!intervals)
                return NULL;
index d3a30b1..596f33e 100644 (file)
@@ -725,12 +725,10 @@ static int damos_test_help_dests_setup(struct damos_migrate_dests *dests,
 {
        size_t i;
 
-       dests->node_id_arr = kmalloc_objs(*dests->node_id_arr, nr_dests,
-                                         GFP_KERNEL);
+       dests->node_id_arr = kmalloc_objs(*dests->node_id_arr, nr_dests);
        if (!dests->node_id_arr)
                return -ENOMEM;
-       dests->weight_arr = kmalloc_objs(*dests->weight_arr, nr_dests,
-                                        GFP_KERNEL);
+       dests->weight_arr = kmalloc_objs(*dests->weight_arr, nr_dests);
        if (!dests->weight_arr) {
                kfree(dests->node_id_arr);
                dests->node_id_arr = NULL;
index 862835d..729b7ff 100644 (file)
@@ -821,8 +821,7 @@ static unsigned long damos_va_migrate(struct damon_target *target,
        use_target_nid = dests->nr_dests == 0;
        nr_dests = use_target_nid ? 1 : dests->nr_dests;
        priv.scheme = s;
-       priv.migration_lists = kmalloc_objs(*priv.migration_lists, nr_dests,
-                                           GFP_KERNEL);
+       priv.migration_lists = kmalloc_objs(*priv.migration_lists, nr_dests);
        if (!priv.migration_lists)
                return 0;
 
index 85481c3..bda71ae 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -3586,8 +3586,7 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
                         * Allocate stable and unstable together:
                         * MAXSMP NODES_SHIFT 10 will use 16kB.
                         */
-                       buf = kzalloc_objs(*buf, nr_node_ids + nr_node_ids,
-                                          GFP_KERNEL);
+                       buf = kzalloc_objs(*buf, nr_node_ids + nr_node_ids);
                        /* Let us assume that RB_ROOT is NULL is zero */
                        if (!buf)
                                err = -ENOMEM;
index 631df06..986f809 100644 (file)
@@ -912,8 +912,7 @@ static int __init memory_tier_init(void)
                panic("%s() failed to register memory tier subsystem\n", __func__);
 
 #ifdef CONFIG_MIGRATION
-       node_demotion = kzalloc_objs(struct demotion_nodes, nr_node_ids,
-                                    GFP_KERNEL);
+       node_demotion = kzalloc_objs(struct demotion_nodes, nr_node_ids);
        WARN_ON(!node_demotion);
 #endif
 
index 4a33eb2..0e5175f 100644 (file)
@@ -229,8 +229,7 @@ int mempolicy_set_node_perf(unsigned int node, struct access_coordinate *coords)
        if (!new_bw)
                return -ENOMEM;
 
-       new_wi_state = kmalloc_flex(*new_wi_state, iw_table, nr_node_ids,
-                                   GFP_KERNEL);
+       new_wi_state = kmalloc_flex(*new_wi_state, iw_table, nr_node_ids);
        if (!new_wi_state) {
                kfree(new_bw);
                return -ENOMEM;
@@ -3642,8 +3641,7 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
            kstrtou8(buf, 0, &weight) || weight == 0)
                return -EINVAL;
 
-       new_wi_state = kzalloc_flex(*new_wi_state, iw_table, nr_node_ids,
-                                   GFP_KERNEL);
+       new_wi_state = kzalloc_flex(*new_wi_state, iw_table, nr_node_ids);
        if (!new_wi_state)
                return -ENOMEM;
 
@@ -3695,8 +3693,7 @@ static ssize_t weighted_interleave_auto_store(struct kobject *kobj,
        if (kstrtobool(buf, &input))
                return -EINVAL;
 
-       new_wi_state = kzalloc_flex(*new_wi_state, iw_table, nr_node_ids,
-                                   GFP_KERNEL);
+       new_wi_state = kzalloc_flex(*new_wi_state, iw_table, nr_node_ids);
        if (!new_wi_state)
                return -ENOMEM;
        for (i = 0; i < nr_node_ids; i++)
index 1aa561a..a6cdf36 100644 (file)
@@ -618,8 +618,7 @@ int __mmu_notifier_register(struct mmu_notifier *subscription,
                 * know that mm->notifier_subscriptions can't change while we
                 * hold the write side of the mmap_lock.
                 */
-               subscriptions = kzalloc_obj(struct mmu_notifier_subscriptions,
-                                           GFP_KERNEL);
+               subscriptions = kzalloc_obj(struct mmu_notifier_subscriptions);
                if (!subscriptions)
                        return -ENOMEM;
 
index a94aa10..94af29d 100644 (file)
@@ -3265,8 +3265,7 @@ static struct swap_cluster_info *setup_clusters(struct swap_info_struct *si,
                spin_lock_init(&cluster_info[i].lock);
 
        if (!(si->flags & SWP_SOLIDSTATE)) {
-               si->global_cluster = kmalloc_obj(*si->global_cluster,
-                                                GFP_KERNEL);
+               si->global_cluster = kmalloc_obj(*si->global_cluster);
                if (!si->global_cluster)
                        goto err;
                for (i = 0; i < SWAP_NR_ORDERS; i++)
index 66ab920..25f097c 100644 (file)
@@ -1564,8 +1564,7 @@ static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
            (chan->mode == L2CAP_MODE_ERTM ||
             chan->mode == L2CAP_MODE_LE_FLOWCTL ||
             chan->mode == L2CAP_MODE_EXT_FLOWCTL)) {
-               struct l2cap_rx_busy *rx_busy = kmalloc_obj(*rx_busy,
-                                                           GFP_KERNEL);
+               struct l2cap_rx_busy *rx_busy = kmalloc_obj(*rx_busy);
                if (!rx_busy) {
                        err = -ENOMEM;
                        goto done;
index e80e516..f70e2ba 100644 (file)
@@ -798,15 +798,13 @@ EXPORT_SYMBOL(can_proto_unregister);
 static int can_pernet_init(struct net *net)
 {
        spin_lock_init(&net->can.rcvlists_lock);
-       net->can.rx_alldev_list = kzalloc_obj(*net->can.rx_alldev_list,
-                                             GFP_KERNEL);
+       net->can.rx_alldev_list = kzalloc_obj(*net->can.rx_alldev_list);
        if (!net->can.rx_alldev_list)
                goto out;
        net->can.pkg_stats = kzalloc_obj(*net->can.pkg_stats);
        if (!net->can.pkg_stats)
                goto out_free_rx_alldev_list;
-       net->can.rcv_lists_stats = kzalloc_obj(*net->can.rcv_lists_stats,
-                                              GFP_KERNEL);
+       net->can.rcv_lists_stats = kzalloc_obj(*net->can.rcv_lists_stats);
        if (!net->can.rcv_lists_stats)
                goto out_free_pkg_stats;
 
index 2e2fd24..5136b37 100644 (file)
@@ -1140,8 +1140,7 @@ static int build_initial_monmap(struct ceph_mon_client *monc)
        int i;
 
        /* build initial monmap */
-       monc->monmap = kzalloc_flex(*monc->monmap, mon_inst, num_mon,
-                                   GFP_KERNEL);
+       monc->monmap = kzalloc_flex(*monc->monmap, mon_inst, num_mon);
        if (!monc->monmap)
                return -ENOMEM;
        monc->monmap->num_mon = num_mon;
index 27e5fcb..6ff4256 100644 (file)
@@ -9133,8 +9133,7 @@ static int netdev_offload_xstats_enable_l3(struct net_device *dev,
        int err;
        int rc;
 
-       dev->offload_xstats_l3 = kzalloc_obj(*dev->offload_xstats_l3,
-                                            GFP_KERNEL);
+       dev->offload_xstats_l3 = kzalloc_obj(*dev->offload_xstats_l3);
        if (!dev->offload_xstats_l3)
                return -ENOMEM;
 
index da0d231..f23cea9 100644 (file)
@@ -306,8 +306,7 @@ net_dm_hw_reset_per_cpu_data(struct per_cpu_dm_data *hw_data)
        struct net_dm_hw_entries *hw_entries;
        unsigned long flags;
 
-       hw_entries = kzalloc_flex(*hw_entries, entries, dm_hit_limit,
-                                 GFP_KERNEL);
+       hw_entries = kzalloc_flex(*hw_entries, entries, dm_hit_limit);
        if (!hw_entries) {
                /* If the memory allocation failed, we try to perform another
                 * allocation in 1/10 second. Otherwise, the probe function
index c0a9c5b..5071d7f 100644 (file)
@@ -32,8 +32,7 @@ struct flow_offload_action *offload_action_alloc(unsigned int num_actions)
        struct flow_offload_action *fl_action;
        int i;
 
-       fl_action = kzalloc_flex(*fl_action, action.entries, num_actions,
-                                GFP_KERNEL);
+       fl_action = kzalloc_flex(*fl_action, action.entries, num_actions);
        if (!fl_action)
                return NULL;
 
index 4de15aa..8cb3fc5 100644 (file)
@@ -64,8 +64,7 @@ static int mse_get_channels(struct phy_device *phydev,
        if (!data->capability.supported_caps)
                return 0;
 
-       data->snapshots = kzalloc_objs(*data->snapshots, PHY_MSE_CHANNEL_COUNT,
-                                      GFP_KERNEL);
+       data->snapshots = kzalloc_objs(*data->snapshots, PHY_MSE_CHANNEL_COUNT);
        if (!data->snapshots)
                return -ENOMEM;
 
index 6e62e80..8036e76 100644 (file)
@@ -1737,8 +1737,7 @@ static __net_init int ipv4_mib_init_net(struct net *net)
        net->mib.icmp_statistics = alloc_percpu(struct icmp_mib);
        if (!net->mib.icmp_statistics)
                goto err_icmp_mib;
-       net->mib.icmpmsg_statistics = kzalloc_obj(struct icmpmsg_mib,
-                                                 GFP_KERNEL);
+       net->mib.icmpmsg_statistics = kzalloc_obj(struct icmpmsg_mib);
        if (!net->mib.icmpmsg_statistics)
                goto err_icmpmsg_mib;
 
index a521ac0..01cb587 100644 (file)
@@ -365,8 +365,7 @@ static struct hlist_head *fib_info_laddrhash_bucket(const struct net *net,
 static struct hlist_head *fib_info_hash_alloc(unsigned int hash_bits)
 {
        /* The second half is used for prefsrc */
-       return kvzalloc_objs(struct hlist_head, (1 << hash_bits) * 2,
-                            GFP_KERNEL);
+       return kvzalloc_objs(struct hlist_head, (1 << hash_bits) * 2);
 }
 
 static void fib_info_hash_free(struct hlist_head *head)
index 3518c5f..defe6b3 100644 (file)
@@ -137,8 +137,7 @@ static int nh_notifier_mpath_info_init(struct nh_notifier_info *info,
        int i;
 
        info->type = NH_NOTIFIER_INFO_TYPE_GRP;
-       info->nh_grp = kzalloc_flex(*info->nh_grp, nh_entries, num_nh,
-                                   GFP_KERNEL);
+       info->nh_grp = kzalloc_flex(*info->nh_grp, nh_entries, num_nh);
        if (!info->nh_grp)
                return -ENOMEM;
 
index 5696ceb..9f48b0f 100644 (file)
@@ -355,8 +355,7 @@ static int snmp6_alloc_dev(struct inet6_dev *idev)
        }
 
 
-       idev->stats.icmpv6dev = kzalloc_obj(struct icmpv6_mib_device,
-                                           GFP_KERNEL);
+       idev->stats.icmpv6dev = kzalloc_obj(struct icmpv6_mib_device);
        if (!idev->stats.icmpv6dev)
                goto err_icmp;
        idev->stats.icmpv6msgdev = kzalloc_obj(struct icmpv6msg_mib_device,
index 25ff514..23cc9b4 100644 (file)
@@ -921,8 +921,7 @@ static int __net_init ipv6_init_mibs(struct net *net)
        net->mib.icmpv6_statistics = alloc_percpu(struct icmpv6_mib);
        if (!net->mib.icmpv6_statistics)
                goto err_icmp_mib;
-       net->mib.icmpv6msg_statistics = kzalloc_obj(struct icmpv6msg_mib,
-                                                   GFP_KERNEL);
+       net->mib.icmpv6msg_statistics = kzalloc_obj(struct icmpv6msg_mib);
        if (!net->mib.icmpv6msg_statistics)
                goto err_icmpmsg_mib;
        return 0;
index 2029d40..9058e71 100644 (file)
@@ -2477,8 +2477,7 @@ static int __net_init fib6_net_init(struct net *net)
 
        spin_lock_init(&net->ipv6.fib_table_hash_lock);
 
-       net->ipv6.fib6_main_tbl = kzalloc_obj(*net->ipv6.fib6_main_tbl,
-                                             GFP_KERNEL);
+       net->ipv6.fib6_main_tbl = kzalloc_obj(*net->ipv6.fib6_main_tbl);
        if (!net->ipv6.fib6_main_tbl)
                goto out_fib_table_hash;
 
@@ -2491,8 +2490,7 @@ static int __net_init fib6_net_init(struct net *net)
        INIT_HLIST_HEAD(&net->ipv6.fib6_main_tbl->tb6_gc_hlist);
 
 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
-       net->ipv6.fib6_local_tbl = kzalloc_obj(*net->ipv6.fib6_local_tbl,
-                                              GFP_KERNEL);
+       net->ipv6.fib6_local_tbl = kzalloc_obj(*net->ipv6.fib6_local_tbl);
        if (!net->ipv6.fib6_local_tbl)
                goto out_fib6_main_tbl;
        net->ipv6.fib6_local_tbl->tb6_id = RT6_TABLE_LOCAL;
index 22efb39..b2e6c8b 100644 (file)
@@ -1742,8 +1742,7 @@ static int ieee80211_reconfig_nan(struct ieee80211_sub_if_data *sdata)
        if (WARN_ON(res))
                return res;
 
-       funcs = kzalloc_objs(*funcs, sdata->local->hw.max_nan_de_entries + 1,
-                            GFP_KERNEL);
+       funcs = kzalloc_objs(*funcs, sdata->local->hw.max_nan_de_entries + 1);
        if (!funcs)
                return -ENOMEM;
 
index e05991e..005c113 100644 (file)
@@ -1510,8 +1510,7 @@ int __init ip_vs_conn_init(void)
         */
        tab_array_size = array_size(ip_vs_conn_tab_size,
                                    sizeof(*ip_vs_conn_tab));
-       ip_vs_conn_tab = kvmalloc_objs(*ip_vs_conn_tab, ip_vs_conn_tab_size,
-                                      GFP_KERNEL);
+       ip_vs_conn_tab = kvmalloc_objs(*ip_vs_conn_tab, ip_vs_conn_tab_size);
        if (!ip_vs_conn_tab)
                return -ENOMEM;
 
index c029ff6..06dece1 100644 (file)
@@ -386,8 +386,7 @@ static int ip_vs_mh_init_svc(struct ip_vs_service *svc)
        if (!s)
                return -ENOMEM;
 
-       s->lookup = kzalloc_objs(struct ip_vs_mh_lookup, IP_VS_MH_TAB_SIZE,
-                                GFP_KERNEL);
+       s->lookup = kzalloc_objs(struct ip_vs_mh_lookup, IP_VS_MH_TAB_SIZE);
        if (!s->lookup) {
                kfree(s);
                return -ENOMEM;
index 5efffc5..dbc54a3 100644 (file)
@@ -322,8 +322,7 @@ static int nfnl_cthelper_update_policy_all(struct nlattr *tb[],
        struct nf_conntrack_expect_policy *policy;
        int i, ret = 0;
 
-       new_policy = kmalloc_objs(*new_policy, helper->expect_class_max + 1,
-                                 GFP_KERNEL);
+       new_policy = kmalloc_objs(*new_policy, helper->expect_class_max + 1);
        if (!new_policy)
                return -ENOMEM;
 
index a3e818c..f39cd7c 100644 (file)
@@ -102,8 +102,7 @@ static struct netlink_policy_dump_state *alloc_state(void)
 {
        struct netlink_policy_dump_state *state;
 
-       state = kzalloc_flex(*state, policies, INITIAL_POLICIES_ALLOC,
-                            GFP_KERNEL);
+       state = kzalloc_flex(*state, policies, INITIAL_POLICIES_ALLOC);
        if (!state)
                return ERR_PTR(-ENOMEM);
        state->n_alloc = INITIAL_POLICIES_ALLOC;
index 8051e31..7c92565 100644 (file)
@@ -1586,15 +1586,13 @@ static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
 {
        int i, err;
 
-       ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info,
-                                            GFP_KERNEL);
+       ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info);
        if (!ovs_net->ct_limit_info)
                return -ENOMEM;
 
        ovs_net->ct_limit_info->default_limit = OVS_CT_LIMIT_DEFAULT;
        ovs_net->ct_limit_info->limits =
-               kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS,
-                            GFP_KERNEL);
+               kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS);
        if (!ovs_net->ct_limit_info->limits) {
                kfree(ovs_net->ct_limit_info);
                return -ENOMEM;
index bbb9b52..e209099 100644 (file)
@@ -1797,8 +1797,7 @@ static int ovs_dp_vport_init(struct datapath *dp)
 {
        int i;
 
-       dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS,
-                                GFP_KERNEL);
+       dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS);
        if (!dp->ports)
                return -ENOMEM;
 
index 4b83512..23f629e 100644 (file)
@@ -34,8 +34,7 @@ static struct hlist_head *dev_table;
  */
 int ovs_vport_init(void)
 {
-       dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS,
-                                GFP_KERNEL);
+       dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS);
        if (!dev_table)
                return -ENOMEM;
 
index 753f3bb..72d0935 100644 (file)
@@ -1754,8 +1754,7 @@ static int fanout_add(struct sock *sk, struct fanout_args *args)
                        /* legacy PACKET_FANOUT_MAX */
                        args->max_num_members = 256;
                err = -ENOMEM;
-               match = kvzalloc_flex(*match, arr, args->max_num_members,
-                                     GFP_KERNEL);
+               match = kvzalloc_flex(*match, arr, args->max_num_members);
                if (!match)
                        goto out;
                write_pnet(&match->net, sock_net(sk));
index 8457ec7..ac6affa 100644 (file)
@@ -172,8 +172,7 @@ static int rds_ib_add_one(struct ib_device *device)
        rds_ibdev->max_initiator_depth = device->attrs.max_qp_init_rd_atom;
        rds_ibdev->max_responder_resources = device->attrs.max_qp_rd_atom;
 
-       rds_ibdev->vector_load = kzalloc_objs(int, device->num_comp_vectors,
-                                             GFP_KERNEL);
+       rds_ibdev->vector_load = kzalloc_objs(int, device->num_comp_vectors);
        if (!rds_ibdev->vector_load) {
                pr_err("RDS/IB: %s failed to allocate vector memory\n",
                        __func__);
index 0206492..aa6465d 100644 (file)
@@ -934,8 +934,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
                 * would have to use GFP_ATOMIC there, and don't want to deal
                 * with failed allocations.
                 */
-               rm->atomic.op_notifier = kmalloc_obj(*rm->atomic.op_notifier,
-                                                    GFP_KERNEL);
+               rm->atomic.op_notifier = kmalloc_obj(*rm->atomic.op_notifier);
                if (!rm->atomic.op_notifier) {
                        ret = -ENOMEM;
                        goto err;
index a6729e8..343309e 100644 (file)
@@ -3341,8 +3341,7 @@ int tcf_exts_init_ex(struct tcf_exts *exts, struct net *net, int action,
         * This reference might be taken later from tcf_exts_get_net().
         */
        exts->net = net;
-       exts->actions = kzalloc_objs(struct tc_action *, TCA_ACT_MAX_PRIO,
-                                    GFP_KERNEL);
+       exts->actions = kzalloc_objs(struct tc_action *, TCA_ACT_MAX_PRIO);
        if (!exts->actions)
                return -ENOMEM;
 #endif
index eec2229..9241c02 100644 (file)
@@ -1480,8 +1480,7 @@ static int __init init_u32(void)
 #ifdef CONFIG_NET_CLS_ACT
        pr_info("    Actions configured\n");
 #endif
-       tc_u_common_hash = kvmalloc_objs(struct hlist_head, U32_HASH_SIZE,
-                                        GFP_KERNEL);
+       tc_u_common_hash = kvmalloc_objs(struct hlist_head, U32_HASH_SIZE);
        if (!tc_u_common_hash)
                return -ENOMEM;
 
index 7c7a068..a01f14b 100644 (file)
@@ -2849,8 +2849,7 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt,
        for (i = 1; i <= CAKE_QUEUES; i++)
                quantum_div[i] = 65535 / i;
 
-       qd->tins = kvzalloc_objs(struct cake_tin_data, CAKE_MAX_TINS,
-                                GFP_KERNEL);
+       qd->tins = kvzalloc_objs(struct cake_tin_data, CAKE_MAX_TINS);
        if (!qd->tins)
                return -ENOMEM;
 
index 16cd38a..8181b52 100644 (file)
@@ -496,8 +496,7 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt,
                goto init_failure;
 
        if (!q->flows) {
-               q->flows = kvzalloc_objs(struct fq_codel_flow, q->flows_cnt,
-                                        GFP_KERNEL);
+               q->flows = kvzalloc_objs(struct fq_codel_flow, q->flows_cnt);
                if (!q->flows) {
                        err = -ENOMEM;
                        goto init_failure;
index a386c40..95e5d9b 100644 (file)
@@ -604,8 +604,7 @@ static int hhf_init(struct Qdisc *sch, struct nlattr *opt,
 
        if (!q->hh_flows) {
                /* Initialize heavy-hitter flow table. */
-               q->hh_flows = kvzalloc_objs(struct list_head, HH_FLOWS_CNT,
-                                           GFP_KERNEL);
+               q->hh_flows = kvzalloc_objs(struct list_head, HH_FLOWS_CNT);
                if (!q->hh_flows)
                        return -ENOMEM;
                for (i = 0; i < HH_FLOWS_CNT; i++)
index 4dd8379..0ed199f 100644 (file)
@@ -82,8 +82,7 @@ int mq_init_common(struct Qdisc *sch, struct nlattr *opt,
                return -EOPNOTSUPP;
 
        /* pre-allocate qdiscs, attachment can't fail */
-       priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues,
-                                   GFP_KERNEL);
+       priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues);
        if (!priv->qdiscs)
                return -ENOMEM;
 
index ddb18e9..b832764 100644 (file)
@@ -388,8 +388,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt,
        }
 
        /* pre-allocate qdisc, attachment can't fail */
-       priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues,
-                                   GFP_KERNEL);
+       priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues);
        if (!priv->qdiscs)
                return -ENOMEM;
 
index 2e42a68..f721c03 100644 (file)
@@ -1376,8 +1376,7 @@ static struct tc_taprio_qopt_offload *taprio_offload_alloc(int num_entries)
 {
        struct __tc_taprio_qopt_offload *__offload;
 
-       __offload = kzalloc_flex(*__offload, offload.entries, num_entries,
-                                GFP_KERNEL);
+       __offload = kzalloc_flex(*__offload, offload.entries, num_entries);
        if (!__offload)
                return NULL;
 
index b423abb..c9f999a 100644 (file)
@@ -749,12 +749,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
                                   GFP_KERNEL);
        if (!link->wr_rx_bufs)
                goto no_mem_wr_tx_bufs;
-       link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr,
-                                      GFP_KERNEL);
+       link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr);
        if (!link->wr_tx_ibs)
                goto no_mem_wr_rx_bufs;
-       link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr,
-                                      GFP_KERNEL);
+       link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr);
        if (!link->wr_rx_ibs)
                goto no_mem_wr_tx_ibs;
        link->wr_tx_rdmas = kzalloc_objs(link->wr_tx_rdmas[0],
@@ -765,8 +763,7 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
                                             link->max_send_wr, GFP_KERNEL);
        if (!link->wr_tx_rdma_sges)
                goto no_mem_wr_tx_rdmas;
-       link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr,
-                                       GFP_KERNEL);
+       link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr);
        if (!link->wr_tx_sges)
                goto no_mem_wr_tx_rdma_sges;
        link->wr_rx_sges = kcalloc(link->max_recv_wr,
@@ -790,12 +787,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
                link->wr_tx_v2_ib = kzalloc_obj(*link->wr_tx_v2_ib);
                if (!link->wr_tx_v2_ib)
                        goto no_mem_tx_compl;
-               link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge,
-                                                GFP_KERNEL);
+               link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge);
                if (!link->wr_tx_v2_sge)
                        goto no_mem_v2_ib;
-               link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend,
-                                                 GFP_KERNEL);
+               link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend);
                if (!link->wr_tx_v2_pend)
                        goto no_mem_v2_sge;
        }
index 932908c..9d3fb68 100644 (file)
@@ -1817,8 +1817,7 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
        last = (snd_buf->page_base + snd_buf->page_len - 1) >> PAGE_SHIFT;
        rqstp->rq_enc_pages_num = last - first + 1 + 1;
        rqstp->rq_enc_pages
-               = kmalloc_objs(struct page *, rqstp->rq_enc_pages_num,
-                              GFP_KERNEL);
+               = kmalloc_objs(struct page *, rqstp->rq_enc_pages_num);
        if (!rqstp->rq_enc_pages)
                goto out;
        for (i=0; i < rqstp->rq_enc_pages_num; i++) {
index 9b27b53..237f67a 100644 (file)
@@ -1745,8 +1745,7 @@ struct cache_detail *cache_create_net(const struct cache_detail *tmpl, struct ne
        if (cd == NULL)
                return ERR_PTR(-ENOMEM);
 
-       cd->hash_table = kzalloc_objs(struct hlist_head, cd->hash_size,
-                                     GFP_KERNEL);
+       cd->hash_table = kzalloc_objs(struct hlist_head, cd->hash_size);
        if (cd->hash_table == NULL) {
                kfree(cd);
                return ERR_PTR(-ENOMEM);
index d784565..f28c607 100644 (file)
@@ -1441,8 +1441,7 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
                return ERR_PTR(-ENOMEM);
 
        if (sendpages) {
-               svsk->sk_bvec = kzalloc_objs(*svsk->sk_bvec, sendpages,
-                                            GFP_KERNEL);
+               svsk->sk_bvec = kzalloc_objs(*svsk->sk_bvec, sendpages);
                if (!svsk->sk_bvec) {
                        kfree(svsk);
                        return ERR_PTR(-ENOMEM);
index f64f03a..2a786c5 100644 (file)
@@ -202,8 +202,7 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
                return -ENOMEM;
        }
 
-       attrbuf = kzalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1,
-                              GFP_KERNEL);
+       attrbuf = kzalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1);
        if (!attrbuf) {
                err = -ENOMEM;
                goto err_out;
@@ -338,8 +337,7 @@ static int __tipc_nl_compat_doit(struct tipc_nl_compat_cmd_doit *cmd,
        if (!trans_buf)
                return -ENOMEM;
 
-       attrbuf = kmalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1,
-                              GFP_KERNEL);
+       attrbuf = kmalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1);
        if (!attrbuf) {
                err = -ENOMEM;
                goto trans_out;
index 1c4d298..5ea8344 100644 (file)
@@ -3798,8 +3798,7 @@ static int __net_init unix_net_init(struct net *net)
                goto err_sysctl;
 #endif
 
-       net->unx.table.locks = kvmalloc_objs(spinlock_t, UNIX_HASH_SIZE,
-                                            GFP_KERNEL);
+       net->unx.table.locks = kvmalloc_objs(spinlock_t, UNIX_HASH_SIZE);
        if (!net->unx.table.locks)
                goto err_proc;
 
index 8149928..2ea72c6 100644 (file)
@@ -1106,8 +1106,7 @@ static int nl80211_prepare_wdev_dump(struct netlink_callback *cb,
                struct nlattr **attrbuf_free = NULL;
 
                if (!attrbuf) {
-                       attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR,
-                                              GFP_KERNEL);
+                       attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR);
                        if (!attrbuf)
                                return -ENOMEM;
                        attrbuf_free = attrbuf;
@@ -15299,8 +15298,7 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev,
        if (n_patterns > coalesce->n_patterns)
                return -EINVAL;
 
-       new_rule->patterns = kzalloc_objs(new_rule->patterns[0], n_patterns,
-                                         GFP_KERNEL);
+       new_rule->patterns = kzalloc_objs(new_rule->patterns[0], n_patterns);
        if (!new_rule->patterns)
                return -ENOMEM;
 
@@ -16094,8 +16092,7 @@ static int nl80211_nan_add_func(struct sk_buff *skb,
 
                        func->srf_num_macs = n_entries;
                        func->srf_macs =
-                               kzalloc_objs(*func->srf_macs, n_entries,
-                                            GFP_KERNEL);
+                               kzalloc_objs(*func->srf_macs, n_entries);
                        if (!func->srf_macs) {
                                err = -ENOMEM;
                                goto out;
index e8a6274..281e7af 100644 (file)
@@ -42,8 +42,7 @@ void xp_destroy(struct xsk_buff_pool *pool)
 
 int xp_alloc_tx_descs(struct xsk_buff_pool *pool, struct xdp_sock *xs)
 {
-       pool->tx_descs = kvzalloc_objs(*pool->tx_descs, xs->tx->nentries,
-                                      GFP_KERNEL);
+       pool->tx_descs = kvzalloc_objs(*pool->tx_descs, xs->tx->nentries);
        if (!pool->tx_descs)
                return -ENOMEM;
 
@@ -332,8 +331,7 @@ static struct xsk_dma_map *xp_create_dma_map(struct device *dev, struct net_devi
        if (!dma_map)
                return NULL;
 
-       dma_map->dma_pages = kvzalloc_objs(*dma_map->dma_pages, nr_pages,
-                                          GFP_KERNEL);
+       dma_map->dma_pages = kvzalloc_objs(*dma_map->dma_pages, nr_pages);
        if (!dma_map->dma_pages) {
                kfree(dma_map);
                return NULL;
index 2b7ccc4..1769417 100644 (file)
@@ -611,8 +611,7 @@ static bool unpack_secmark(struct aa_ext *e, struct aa_ruleset *rules)
                if (!aa_unpack_array(e, NULL, &size))
                        goto fail;
 
-               rules->secmark = kzalloc_objs(struct aa_secmark, size,
-                                             GFP_KERNEL);
+               rules->secmark = kzalloc_objs(struct aa_secmark, size);
                if (!rules->secmark)
                        goto fail;
 
index 7d63764..bf2d7ba 100644 (file)
@@ -921,8 +921,7 @@ static int __init ima_init_arch_policy(void)
        for (rules = arch_rules; *rules != NULL; rules++)
                arch_entries++;
 
-       arch_policy_entry = kzalloc_objs(*arch_policy_entry, arch_entries + 1,
-                                        GFP_KERNEL);
+       arch_policy_entry = kzalloc_objs(*arch_policy_entry, arch_entries + 1);
        if (!arch_policy_entry)
                return 0;
 
index 807e464..67a9030 100644 (file)
@@ -631,8 +631,7 @@ static int duplicate_policydb_cond_list(struct policydb *newp,
                return rc;
 
        newp->cond_list_len = 0;
-       newp->cond_list = kzalloc_objs(*newp->cond_list, origp->cond_list_len,
-                                      GFP_KERNEL);
+       newp->cond_list = kzalloc_objs(*newp->cond_list, origp->cond_list_len);
        if (!newp->cond_list)
                goto error;
 
index 661322f..d3b410d 100644 (file)
@@ -1296,8 +1296,7 @@ static int read_cons_helper(struct policydb *p, struct constraint_node **nodep,
                                        return rc;
                                if (p->policyvers >=
                                    POLICYDB_VERSION_CONSTRAINT_NAMES) {
-                                       e->type_names = kzalloc_obj(*e->type_names,
-                                                                   GFP_KERNEL);
+                                       e->type_names = kzalloc_obj(*e->type_names);
                                        if (!e->type_names)
                                                return -ENOMEM;
                                        type_set_init(e->type_names);
index 3ae8408..04961c4 100644 (file)
@@ -855,8 +855,7 @@ static int onyx_init_codec(struct aoa_codec *codec)
        /* if no inputs are present... */
        if ((onyx->codec.connected & 0xC) == 0) {
                if (!onyx->codec_info)
-                       onyx->codec_info = kmalloc_obj(struct codec_info,
-                                                      GFP_KERNEL);
+                       onyx->codec_info = kmalloc_obj(struct codec_info);
                if (!onyx->codec_info)
                        return -ENOMEM;
                ci = onyx->codec_info;
@@ -867,8 +866,7 @@ static int onyx_init_codec(struct aoa_codec *codec)
        /* if no outputs are present... */
        if ((onyx->codec.connected & 3) == 0) {
                if (!onyx->codec_info)
-                       onyx->codec_info = kmalloc_obj(struct codec_info,
-                                                      GFP_KERNEL);
+                       onyx->codec_info = kmalloc_obj(struct codec_info);
                if (!onyx->codec_info)
                        return -ENOMEM;
                ci = onyx->codec_info;
index e5a0e3c..14b4a39 100644 (file)
@@ -163,8 +163,7 @@ int snd_pcm_plugin_build(struct snd_pcm_substream *plug,
                channels = src_format->channels;
        else
                channels = dst_format->channels;
-       plugin->buf_channels = kzalloc_objs(*plugin->buf_channels, channels,
-                                           GFP_KERNEL);
+       plugin->buf_channels = kzalloc_objs(*plugin->buf_channels, channels);
        if (plugin->buf_channels == NULL) {
                snd_pcm_plugin_free(plugin);
                return -ENOMEM;
index 48b0aa0..aaf8083 100644 (file)
@@ -441,8 +441,7 @@ int snd_seq_pool_init(struct snd_seq_pool *pool)
        if (snd_BUG_ON(!pool))
                return -EINVAL;
 
-       cellptr = kvmalloc_objs(struct snd_seq_event_cell, pool->size,
-                               GFP_KERNEL);
+       cellptr = kvmalloc_objs(struct snd_seq_event_cell, pool->size);
        if (!cellptr)
                return -ENOMEM;
 
index 114ebf8..70520c7 100644 (file)
@@ -1352,8 +1352,7 @@ int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
        bool input, output;
        int err, num;
 
-       ump->out_cvts = kzalloc_objs(*ump->out_cvts, SNDRV_UMP_MAX_GROUPS,
-                                    GFP_KERNEL);
+       ump->out_cvts = kzalloc_objs(*ump->out_cvts, SNDRV_UMP_MAX_GROUPS);
        if (!ump->out_cvts)
                return -ENOMEM;
 
index d337f59..d9b9458 100644 (file)
@@ -1154,12 +1154,10 @@ static int vx_init_audio_io(struct vx_core *chip)
        chip->audio_info = rmh.Stat[1];
 
        /* allocate pipes */
-       chip->playback_pipes = kzalloc_objs(struct vx_pipe *, chip->audio_outs,
-                                           GFP_KERNEL);
+       chip->playback_pipes = kzalloc_objs(struct vx_pipe *, chip->audio_outs);
        if (!chip->playback_pipes)
                return -ENOMEM;
-       chip->capture_pipes = kzalloc_objs(struct vx_pipe *, chip->audio_ins,
-                                          GFP_KERNEL);
+       chip->capture_pipes = kzalloc_objs(struct vx_pipe *, chip->audio_ins);
        if (!chip->capture_pipes) {
                kfree(chip->playback_pipes);
                return -ENOMEM;
index e4f174d..bf342a7 100644 (file)
@@ -9831,8 +9831,7 @@ static int ca0132_prepare_verbs(struct hda_codec *codec)
         */
        if (ca0132_use_pci_mmio(spec))
                spec->desktop_init_verbs = ca0132_init_verbs1;
-       spec->spec_init_verbs = kzalloc_objs(struct hda_verb, NUM_SPEC_VERBS,
-                                            GFP_KERNEL);
+       spec->spec_init_verbs = kzalloc_objs(struct hda_verb, NUM_SPEC_VERBS);
        if (!spec->spec_init_verbs)
                return -ENOMEM;
 
index ce76b81..3bc33c5 100644 (file)
@@ -845,8 +845,7 @@ static void print_codec_info(struct snd_info_entry *entry,
                if (wid_caps & AC_WCAP_CONN_LIST) {
                        conn_len = snd_hda_get_num_raw_conns(codec, nid);
                        if (conn_len > 0) {
-                               conn = kmalloc_objs(hda_nid_t, conn_len,
-                                                   GFP_KERNEL);
+                               conn = kmalloc_objs(hda_nid_t, conn_len);
                                if (!conn)
                                        return;
                                if (snd_hda_get_raw_connections(codec, nid, conn,
index a213e5b..4c7506d 100644 (file)
@@ -101,8 +101,7 @@ int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx,
                setup_op = snd_hdac_stream_setup;
 
        for (i = 0; i < num_stream; i++) {
-               struct hdac_ext_stream *hext_stream = kzalloc_obj(*hext_stream,
-                                                                 GFP_KERNEL);
+               struct hdac_ext_stream *hext_stream = kzalloc_obj(*hext_stream);
                if (!hext_stream)
                        return -ENOMEM;
                tag = ++stream_tag;
index 09d88f2..3e10253 100644 (file)
@@ -374,8 +374,7 @@ static int widget_tree_create(struct hdac_device *codec)
        if (!tree->root)
                return -ENOMEM;
 
-       tree->nodes = kzalloc_objs(*tree->nodes, codec->num_nodes + 1,
-                                  GFP_KERNEL);
+       tree->nodes = kzalloc_objs(*tree->nodes, codec->num_nodes + 1);
        if (!tree->nodes)
                return -ENOMEM;
 
index f106f46..6fd4f62 100644 (file)
@@ -221,8 +221,7 @@ add_symbol (struct snd_cs46xx * chip, char * symbol_name, u32 address, int type)
 
 struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
 {
-       struct dsp_spos_instance * ins = kzalloc_obj(struct dsp_spos_instance,
-                                                    GFP_KERNEL);
+       struct dsp_spos_instance * ins = kzalloc_obj(struct dsp_spos_instance);
 
        if (ins == NULL)
                return NULL;
@@ -232,8 +231,7 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
                vmalloc(array_size(DSP_MAX_SYMBOLS,
                                   sizeof(struct dsp_symbol_entry)));
        ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);
-       ins->modules = kmalloc_objs(struct dsp_module_desc, DSP_MAX_MODULES,
-                                   GFP_KERNEL);
+       ins->modules = kmalloc_objs(struct dsp_module_desc, DSP_MAX_MODULES);
        if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) {
                cs46xx_dsp_spos_destroy(chip);
                goto error;
index 080c5fe..77845b7 100644 (file)
@@ -1286,8 +1286,7 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
        if (!icode)
                return err;
 
-       icode->gpr_map = kzalloc_objs(u_int32_t, 512 + 256 + 256 + 2 * 1024,
-                                     GFP_KERNEL);
+       icode->gpr_map = kzalloc_objs(u_int32_t, 512 + 256 + 256 + 2 * 1024);
        if (!icode->gpr_map)
                goto __err_gpr;
        controls = kzalloc_objs(*controls, SND_EMU10K1_GPR_CONTROLS);
@@ -1803,8 +1802,7 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
        if (!icode)
                return err;
 
-       icode->gpr_map = kzalloc_objs(u_int32_t, 256 + 160 + 160 + 2 * 512,
-                                     GFP_KERNEL);
+       icode->gpr_map = kzalloc_objs(u_int32_t, 256 + 160 + 160 + 2 * 512);
        if (!icode->gpr_map)
                goto __err_gpr;
 
index 0290bf6..41b322f 100644 (file)
@@ -423,8 +423,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                        return -ENOMEM;
        }
        if (! dev->idx_table) {
-               dev->idx_table = kmalloc_objs(*dev->idx_table, VIA_TABLE_SIZE,
-                                             GFP_KERNEL);
+               dev->idx_table = kmalloc_objs(*dev->idx_table, VIA_TABLE_SIZE);
                if (! dev->idx_table)
                        return -ENOMEM;
        }
index 94430e8..a6f176d 100644 (file)
@@ -278,8 +278,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                        return -ENOMEM;
        }
        if (! dev->idx_table) {
-               dev->idx_table = kmalloc_objs(*dev->idx_table, VIA_TABLE_SIZE,
-                                             GFP_KERNEL);
+               dev->idx_table = kmalloc_objs(*dev->idx_table, VIA_TABLE_SIZE);
                if (! dev->idx_table)
                        return -ENOMEM;
        }
index bf5f218..8d91a0e 100644 (file)
@@ -89,8 +89,7 @@ static int au1000_setup_dma_link(struct audio_stream *stream,
                pointer->start = (u32)(dma_start + (i * period_bytes));
                pointer->relative_end = (u32) (((i+1) * period_bytes) - 0x1);
                if (i < periods - 1) {
-                       pointer->next = kmalloc_obj(struct pcm_period,
-                                                   GFP_KERNEL);
+                       pointer->next = kmalloc_obj(struct pcm_period);
                        if (!pointer->next) {
                                au1000_release_dma_link(stream);
                                return -ENOMEM;
index 31799ca..056adbc 100644 (file)
@@ -665,8 +665,7 @@ static int aw_dev_load_cfg_by_hdr(struct aw_device *aw_dev,
 {
        int ret;
 
-       struct aw_all_prof_info *all_prof_info __free(kfree) = kzalloc_obj(*all_prof_info,
-                                                                          GFP_KERNEL);
+       struct aw_all_prof_info *all_prof_info __free(kfree) = kzalloc_obj(*all_prof_info);
        if (!all_prof_info)
                return -ENOMEM;
 
index 1f89029..ec4059f 100644 (file)
@@ -2143,8 +2143,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
 
        /* For DT platforms allocate onecell data for clock registration */
        if (np) {
-               clk_data = kzalloc_flex(*clk_data, hws, DA7219_DAI_NUM_CLKS,
-                                       GFP_KERNEL);
+               clk_data = kzalloc_flex(*clk_data, hws, DA7219_DAI_NUM_CLKS);
                if (!clk_data)
                        return -ENOMEM;
 
index b6a2c39..6233aa9 100644 (file)
@@ -3820,8 +3820,7 @@ static int rx_macro_probe(struct platform_device *pdev)
                rx->rxn_reg_stride = 0x80;
                rx->rxn_reg_stride2 = 0xc;
                def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults);
-               reg_defaults = kmalloc_objs(struct reg_default, def_count,
-                                           GFP_KERNEL);
+               reg_defaults = kmalloc_objs(struct reg_default, def_count);
                if (!reg_defaults)
                        return -ENOMEM;
                memcpy(&reg_defaults[0], rx_defaults, sizeof(rx_defaults));
@@ -3835,8 +3834,7 @@ static int rx_macro_probe(struct platform_device *pdev)
                rx->rxn_reg_stride = 0xc0;
                rx->rxn_reg_stride2 = 0x0;
                def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults);
-               reg_defaults = kmalloc_objs(struct reg_default, def_count,
-                                           GFP_KERNEL);
+               reg_defaults = kmalloc_objs(struct reg_default, def_count);
                if (!reg_defaults)
                        return -ENOMEM;
                memcpy(&reg_defaults[0], rx_defaults, sizeof(rx_defaults));
index e26aaea..5ad0448 100644 (file)
@@ -2725,8 +2725,7 @@ static int wsa_macro_probe(struct platform_device *pdev)
        case LPASS_CODEC_VERSION_2_1:
                wsa->reg_layout = &wsa_codec_v2_1;
                def_count = ARRAY_SIZE(wsa_defaults) + ARRAY_SIZE(wsa_defaults_v2_1);
-               reg_defaults = kmalloc_objs(*reg_defaults, def_count,
-                                           GFP_KERNEL);
+               reg_defaults = kmalloc_objs(*reg_defaults, def_count);
                if (!reg_defaults)
                        return -ENOMEM;
                memcpy(&reg_defaults[0], wsa_defaults, sizeof(wsa_defaults));
@@ -2741,8 +2740,7 @@ static int wsa_macro_probe(struct platform_device *pdev)
        case LPASS_CODEC_VERSION_2_9:
                wsa->reg_layout = &wsa_codec_v2_5;
                def_count = ARRAY_SIZE(wsa_defaults) + ARRAY_SIZE(wsa_defaults_v2_5);
-               reg_defaults = kmalloc_objs(*reg_defaults, def_count,
-                                           GFP_KERNEL);
+               reg_defaults = kmalloc_objs(*reg_defaults, def_count);
                if (!reg_defaults)
                        return -ENOMEM;
                memcpy(&reg_defaults[0], wsa_defaults, sizeof(wsa_defaults));
index 3304d20..460fae5 100644 (file)
@@ -509,8 +509,7 @@ static int fw_parse_data_kernel(struct tasdevice_fw *tas_fmw,
        img_data->nr_blk = get_unaligned_be32(&data[offset]);
        offset += 4;
 
-       img_data->dev_blks = kzalloc_objs(struct tasdev_blk, img_data->nr_blk,
-                                         GFP_KERNEL);
+       img_data->dev_blks = kzalloc_objs(struct tasdev_blk, img_data->nr_blk);
        if (!img_data->dev_blks) {
                offset = -ENOMEM;
                goto out;
@@ -1239,8 +1238,7 @@ static int fw_parse_data(struct tasdevice_fw *tas_fmw,
        img_data->nr_blk = get_unaligned_be16(&data[offset]);
        offset += 2;
 
-       img_data->dev_blks = kzalloc_objs(struct tasdev_blk, img_data->nr_blk,
-                                         GFP_KERNEL);
+       img_data->dev_blks = kzalloc_objs(struct tasdev_blk, img_data->nr_blk);
        if (!img_data->dev_blks) {
                offset = -ENOMEM;
                goto out;
@@ -1284,8 +1282,7 @@ static int fw_parse_program_data(struct tasdevice_priv *tas_priv,
        }
 
        tas_fmw->programs =
-               kzalloc_objs(struct tasdevice_prog, tas_fmw->nr_programs,
-                            GFP_KERNEL);
+               kzalloc_objs(struct tasdevice_prog, tas_fmw->nr_programs);
        if (!tas_fmw->programs) {
                offset = -ENOMEM;
                goto out;
@@ -2207,8 +2204,7 @@ int tas2781_load_calibration(void *context, char *file_name,
        fmw.size = fw_entry->size;
        fmw.data = fw_entry->data;
 
-       tas_fmw = tasdev->cali_data_fmw = kzalloc_obj(struct tasdevice_fw,
-                                                     GFP_KERNEL);
+       tas_fmw = tasdev->cali_data_fmw = kzalloc_obj(struct tasdevice_fw);
        if (!tasdev->cali_data_fmw) {
                ret = -ENOMEM;
                goto out;
index 1f4aac4..2e23848 100644 (file)
@@ -1430,8 +1430,7 @@ static int wm_adsp_buffer_populate(struct wm_adsp_compr_buf *buf)
        u32 offset = 0;
        int i, ret;
 
-       buf->regions = kzalloc_objs(*buf->regions, caps->num_regions,
-                                   GFP_KERNEL);
+       buf->regions = kzalloc_objs(*buf->regions, caps->num_regions);
        if (!buf->regions)
                return -ENOMEM;
 
index ea76524..1630a10 100644 (file)
@@ -3972,8 +3972,7 @@ static int dapm_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
         * stuff that increases stack usage.
         * So, we use kzalloc()/kfree() for params in this function.
         */
-       struct snd_pcm_hw_params *params __free(kfree) = kzalloc_obj(*params,
-                                                                    GFP_KERNEL);
+       struct snd_pcm_hw_params *params __free(kfree) = kzalloc_obj(*params);
        if (!params)
                return -ENOMEM;
 
index dac8e7b..8006777 100644 (file)
@@ -1622,8 +1622,7 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget)
                        continue;
 
                /* Reserve memory for all hw configs, eventually freed by widget */
-               config = kzalloc_objs(*config, slink->num_hw_configs,
-                                     GFP_KERNEL);
+               config = kzalloc_objs(*config, slink->num_hw_configs);
                if (!config) {
                        ret = -ENOMEM;
                        goto free_comp;
index a2e9fef..8371e54 100644 (file)
@@ -865,8 +865,7 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
                        SOF_IPC4_NODE_INDEX_INTEL_DMIC(ipc4_copier->dai_index);
                break;
        default:
-               ipc4_copier->gtw_attr = kzalloc_obj(*ipc4_copier->gtw_attr,
-                                                   GFP_KERNEL);
+               ipc4_copier->gtw_attr = kzalloc_obj(*ipc4_copier->gtw_attr);
                if (!ipc4_copier->gtw_attr) {
                        ret = -ENOMEM;
                        goto free_available_fmt;
index c389031..450147b 100644 (file)
@@ -86,8 +86,7 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch
 
        emu->card = card;
        emu->name = kstrdup_const(name, GFP_KERNEL);
-       emu->voices = kzalloc_objs(struct snd_emux_voice, emu->max_voices,
-                                  GFP_KERNEL);
+       emu->voices = kzalloc_objs(struct snd_emux_voice, emu->max_voices);
        if (emu->name == NULL || emu->voices == NULL)
                return -ENOMEM;
 
index 62d1ba6..2ed01e9 100644 (file)
@@ -136,8 +136,7 @@ snd_emux_create_port(struct snd_emux *emu, char *name,
        if (!p)
                return NULL;
 
-       p->chset.channels = kzalloc_objs(*p->chset.channels, max_channels,
-                                        GFP_KERNEL);
+       p->chset.channels = kzalloc_objs(*p->chset.channels, max_channels);
        if (!p->chset.channels) {
                kfree(p);
                return NULL;
index 0e8be4e..dd25a64 100644 (file)
@@ -551,8 +551,7 @@ int usb6fire_control_init(struct sfire_chip *chip)
 {
        int i;
        int ret;
-       struct control_runtime *rt = kzalloc_obj(struct control_runtime,
-                                                GFP_KERNEL);
+       struct control_runtime *rt = kzalloc_obj(struct control_runtime);
        struct comm_runtime *comm_rt = chip->comm;
 
        if (!rt)
index bad575f..6dbaf30 100644 (file)
@@ -255,8 +255,7 @@ int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
        struct usb_line6 *line6 = line6pcm->line6;
        int i;
 
-       line6pcm->in.urbs = kzalloc_objs(struct urb *, line6->iso_buffers,
-                                        GFP_KERNEL);
+       line6pcm->in.urbs = kzalloc_objs(struct urb *, line6->iso_buffers);
        if (line6pcm->in.urbs == NULL)
                return -ENOMEM;
 
index 5d3666e..7ebaf12 100644 (file)
@@ -404,8 +404,7 @@ int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm)
        struct usb_line6 *line6 = line6pcm->line6;
        int i;
 
-       line6pcm->out.urbs = kzalloc_objs(struct urb *, line6->iso_buffers,
-                                         GFP_KERNEL);
+       line6pcm->out.urbs = kzalloc_objs(struct urb *, line6->iso_buffers);
        if (line6pcm->out.urbs == NULL)
                return -ENOMEM;
 
index 3c3b197..ac8c71b 100644 (file)
@@ -3603,8 +3603,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif)
                return -ENOMEM;
        mixer->chip = chip;
        mixer->ignore_ctl_error = !!(chip->quirk_flags & QUIRK_FLAG_IGNORE_CTL_ERROR);
-       mixer->id_elems = kzalloc_objs(*mixer->id_elems, MAX_ID_ELEMS,
-                                      GFP_KERNEL);
+       mixer->id_elems = kzalloc_objs(*mixer->id_elems, MAX_ID_ELEMS);
        if (!mixer->id_elems) {
                kfree(mixer);
                return -ENOMEM;
index 9bc449e..11e205d 100644 (file)
@@ -274,8 +274,7 @@ static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
        mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!mixer->rc_urb)
                return -ENOMEM;
-       mixer->rc_setup_packet = kmalloc_obj(*mixer->rc_setup_packet,
-                                            GFP_KERNEL);
+       mixer->rc_setup_packet = kmalloc_obj(*mixer->rc_setup_packet);
        if (!mixer->rc_setup_packet) {
                usb_free_urb(mixer->rc_urb);
                mixer->rc_urb = NULL;
index 9dcd1d1..3808df5 100644 (file)
@@ -942,8 +942,7 @@ static int usx2y_audio_stream_new(struct snd_card *card, int playback_endpoint,
 
        for (i = playback_endpoint ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE;
             i <= SNDRV_PCM_STREAM_CAPTURE; ++i) {
-               usx2y_substream[i] = kzalloc_obj(struct snd_usx2y_substream,
-                                                GFP_KERNEL);
+               usx2y_substream[i] = kzalloc_obj(struct snd_usx2y_substream);
                if (!usx2y_substream[i])
                        return -ENOMEM;
 
index 379a4a1..dc62648 100644 (file)
@@ -442,8 +442,7 @@ static int shbuf_setup_backstore(struct xen_snd_front_pcm_stream_info *stream,
 
        stream->buffer_sz = buffer_sz;
        stream->num_pages = DIV_ROUND_UP(stream->buffer_sz, PAGE_SIZE);
-       stream->pages = kzalloc_objs(struct page *, stream->num_pages,
-                                    GFP_KERNEL);
+       stream->pages = kzalloc_objs(struct page *, stream->num_pages);
        if (!stream->pages)
                return -ENOMEM;