]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
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 a4dae1baae9972023a5b3102b3f5d8ed8ea20f5d..b6cce510c34343f8a3e8c7fbae6c5cd0109d6384 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 34d761ef08b0ef917198e75035581a97a30a7a2b..592dd8668de463c33a81f3ab6fd2b13574456bdc 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 222be8fc4aece271b4129ceb1f7a4fd862f9d6c5..0aa10cadb9591b0a525d343b0de4b15d9b899ca9 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 b7fdb089f2af4e771ffacdc3931b40b62b50a557..2ba2dd26a7ead8135c101381f36a189c31691ccc 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 c7302dd2ef25da89a6ccc8500dfe311fba0a8f7b..2fe787e6c2dcb6322d11af5cbe3add419f129d71 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 8a8d8c2b893096b462c6bd8f832488a635ccbd4a..243c0a1c8cda00f2c77b82adc0ff17e5d86cb101 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 e3cb23906fcd54ea657a370eb01b18cd455fbfef..db98e9af8812136a537c1c4cf95c3fff7bf32f62 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 1389a3131993989eaf36cb53596538043bbe4451..6cd461f8296872f390bacdab68916b27a5baea16 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 5214e2d43e785fe026c726df5e6c8ac06dd7a3ee..6aa578e6348daba8bf260b1669f6ea8345ea76df 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 ed2842bea1cb3c570858879724f95a1dcddc835b..b3fd5c648dea628a6482ab66bb9c59a4de585acc 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 0e297d70647fe8107119744ebbb38f9d84425846..9bb73cb42a657cc19db402af263c68d322202c86 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 731d8b355343425706435a5238cc83ed611bd35d..24d0a894d965fee23b1b1be4a89a4699d5147a0e 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 2a347424690825af3dd59f7b55b53470361bf978..87fd6d7769e9abbc1044934a6d91fd568e6af2eb 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 eba2771342243b201253b9f36c73e4a3428cfbfa..257886ec3f70f898a7c5420497e45618b1d81608 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 e9af4fa940b196fac5c08bffec6c507bcca72456..26f62ae5f6713e68eb525df51402dfbdace17cf6 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 7e3749131c592ff3745ea79d0b43637e2a712df2..9c2f5e442338990f70661d01ec2505b2f2fb0443 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 fc80495027ba071279dcd1cc8853acb88682fedc..86d93e8dddae3ebb2a2441db6f9c47a7fb71fa44 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 0ae82e529c217c87b214d0d0efe8dfdaefbc0afc..2a430722cbe415dd56c92fed2e513e524f46481a 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 1e67082eb3b49fa60725a7fea78656e40f1888c1..cbbb94d41fd0a98af092354a792f41c2604b27d9 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 81f0be76f48ae1f8537a77d8349f6e3aa4e70924..371460e3448412c84ae2ffafe42d659884bb9f68 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 8d5e2d5c0bc5deef5b55f12bef066815b1060aa3..ecefcffcf7b10c99ca240342550ccf7080d4085e 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 5434c87542e52e90e78a44280b0bb521826b81c9..2cc90055499a54e0f6a75e04277aecf9a2a12078 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 069e6b7882805f34ca4f981ecdc445be58499558..5ed6e0b7e71563c3b5c59b3a899231fea81d77b1 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 e945ed62302748a10750c56df2918a01f37cd9a6..323adc93f2dc0c69fa65f042c4e8b73ec1b89f62 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 852e8ff5ebd9b4d47c1792557cc0a47be825121b..5d364540673d462234f55b8d4f563bff2def354a 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 1021a4e33ac6b15c0fd84cc9f6ec859c01853933..38b7fd2f63be1d6355cfa5ddb012155573434aee 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 c196aa0c1bd16a258831bc0b514f83bb7d3e417f..d2486506a8086bd31128faef8bc8320fa24bbaa7 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 8517d5fbf79c13b63db7a90b27769ee4e51fc577..d22cabe119b1660c6cc876256778706528114d29 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 9a05abe8d43fd5448a4dda322b888db6c64a5f6f..24b8b1c40e2510e4fa77aaf1d52aa379c3845981 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 970880d9adf452018a31a538c2ddc7c6538ed112..4ac74443687a2c13e9809c1cd95978f744e77ef7 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 a561674bac97e42f1478cd4ddfa5e2c630172587..8c290ddd325181e92cd31def182b8f6d9649a31c 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 ae5e6b15e7de662a4f6eb4ca6888a8e9fd4f496c..9992193d7338f523a1b8b0ee469bc663ece02628 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 cbd74e3adb9ff1aa7a5aac04aa16106808678cd3..4fbd4bbf2909f233e597f1522f2ae6d17b20e958 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 6c896eb816de2da2c106f51b6e3ae3111f26a870..ba4257bda77bfc1eca47fcac284edf775b92c69a 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 05b1cc7918c5ed74a22f49467aa9b90949796d1f..1d5e29fc6463b1717ac41cfa4c3ad092c594ad71 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 d499063a79ec870e7cafe661d82bc384ea8e1e01..f0ab99dd74d6e14b0585d495a5733b0229d36ed8 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 1f8f7cf2d3fbb2a2ff9ff7d9809fd82b56b2ace1..6c7c4ff8a8a95d85b702ddc55d9d088e8d140dcf 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 8a0da0194cab934b994656c2adea242e7b5d3939..abe5ed0d405af3ddbaa5ec402e7e240146f8f6c6 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 f4f8f9122f5cc9b8cbc489762e3c57fdddd2e0dc..ea3a0e57c83678550ad4509ab29565e803dc9d85 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 e3daeaad057d06477ce12f84dad9107636ae6f77..a5bb6078824b7de8e99217820b98699213d541cf 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 751697899a98fa1a2777cc8a74505f3f3728d8ef..a9248af078f69b3f0ea64e16998d64f8c8164648 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 5c211617178902e60bef16b57854189861a352eb..f0e513e9ed5d3bc6d107c586f8266afa19660105 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 328093ed7136f1c6c4e1ddcb5f3de04c0fdfdea7..ea4bffe3c02d0548809f0ecd2d735c5fe5c34991 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 bd4d332520bbc9ac93d1dbe3ca367a3aa3123cd7..79d2e92e5c28d771ba5ad292e37f51370806d1dd 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 f1c7c2ad509450a88d656044d1382c25b7a151da..fdf55c285c9a70b4db1b928616fa90d16e7d4a28 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 2d398ae5c6629cbfb59fda90e76e397c8cb63f10..c0f92b93747da5bde895ac46384759f4ffdee33f 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 c1f759fb575812662a2764966e434bb0266be05e..afffde4cfe7a3cd2f8db4ac4c50569ea9d7f68ef 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 a6f453d4785b7968100fad3cd9f14d5ce6539adc..dfdd004fb1a9ccd1deead51120d196932019c4cc 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 12c3a0330f676c8ebca1f964d7d3e5d817755f0f..f37247e7a5cbdf9324c71790d6634253fd3bc6c0 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 8108ef0c089a022feb90b20f23c27b658223aa99..bb9cb00f95855b24e0585dc8574e5adfb4342c0c 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 b90761dcd87f893e15ff0fc29e239fd0143973f1..0d38e93772c233d3e1fb574807b748ec569a05a6 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 06a2797e02130cd17d796f5c0b0791ff171fa12f..2e723fff6e8a43bd8ccc8752efbd96afefdb68e6 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 c2dd784bc14b15a2c1d816dc6a358e32932468d3..3cfef456a1f34d25b57abbb8f20d12df2e242a7f 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 7844424f7b17b4e004ab5b5e33c10276c5260f26..41cc8cefea01d3fefb76b70ce202718dd89cc283 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 bc665b8abd7b442a745243bf6c22529ee9b16510..7871099bc0d442398940ef2c27d5be4f7dbdf630 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 adfd61af86ee9e4d4e24a18be19e6ea729846d33..4b865ef800b1e3a996a0b0e350d1c37bc6ca58ec 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 777a5ae0cd337925d33554d264381fea7150bb2d..8fc7fc3bf86760a0c02983cacdb25dcab831a60d 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 e12abdec2647d43ca2bb8c58445d17c09222dc4b..b216cba1c3bf2b750aaae59a6793bade44c857bd 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 a27261914bd1fb7812cd8a59e1d99ce79bd56baa..879b8b7064281ffa28bca00c85bc8656e989bf19 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 7845fc7fe6c2545f804876f36b27dbb7cb73674a..f16a1e67a667d6b2d355df25d8c038825cef9e02 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 790b36286813cc3330ed461732d49e77f8edc2fb..0a728ca2c494836b0e0ce4c3f4aea41794c0868b 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 a6d8988538ecaf90560a0e56c6cf304df8b2a06d..8f6781c2701a824d75441669b486ded8ae6f08a8 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 5d5ba7c7d9ba69adcace121454dd8f992d358f64..08175fe2f530dcf3955fccb5388a2fc5e0d2728d 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 40d7e45d65dc95475d05d6b79458135b93ba7e0c..9a33217c68d9d83a8b2bbbd53bfcc3ea4249566d 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 0614fca4feb101637357cec4bf5ace9ffd08915f..38a5766a435ca27f5319c3259798e0e10ce937f6 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 eea99037a4ed9908fb05edcb1ba942331a449250..819ab1b55df3bf2ab6b429769c34f02ac792ed04 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 e51de3498d2ce137b8775483bbd00411849f4de6..9c0e6e7a7cacdf59d3282e00e896395bb6b81c19 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 60224187b3364a08d55c4743ccae970d7010caf1..4265bc442dfd2988dccc51a005c8f405ce3d94bb 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 090e7f136e6e93fdae8a7b14e9ab25c620330577..565b4d99bebb06e89222b4995b7e89ed66982e33 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 7d8a811e5de4462b649a88a0af699eb6ff5c9b29..f726c00aba721f499951d00734c83b9891feec44 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 de7392fb59a44c78c102b35f8c75df3e561e6711..49639ad8f0b3d140f520372ba8c3c22044a5c4b2 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 96c1fbb74d829dbbc6162b7c088d3b27c6d891e8..aa9e93a6af7bda0a38a1df7e72eeabb4cdd09f1c 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 c96606f769478fc1486957ec4ae4c254913f489f..a7266e20258de1405d6d532e002b4b2776cb3904 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 4ccc272b3c4fb3ba96ba14aad4ec5fde40367ebe..c14856e3040fe514594ba71b610ada650a7a8ee9 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 322c84d49f4435100feaeca984c1f7cadee5b124..5c333da15077c1602f142707a21c933fc5630981 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 fb9b199ff289cdb2bfc4c255e23d4843c19dbbf5..319af4deec01c188524807d39dff92bbd08f3601 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 1a73ceb1a758239b9ab96ae3fadc87ccca1f97aa..41e4c69131bd6ec79c59159d0e7dc49b3f6f12b4 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 4f4457fa5d974b54ae7c9598518344f25403b269..28f2e1b2a9323de16fab4522e4b6a6058ea5677a 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 6362ffb73b0bb6c0c7b5f295089cb9dde980acf1..211535fd8ac9bf3c65b352784d1b604fe67a2924 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 38d1d2e357f3e37cbd300bb35540c8b7693d4ac7..9eb2cb83fa69825a5c575b74ad6f21851e611b7d 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 e6c787261cb6a586f7dff8a7a5949da001c67a68..78655422253d5c91d6802d039b356c2ac1e0cffb 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 b719b2483e87f960b405c857e28236da715ffaf3..501980303ddf3421fb48b6ad0e1917a393143c98 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 66d00514600afa7fc47135283d844a06f1fb3fd1..cf057f531a589f12978cdce08b998452ffea8267 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 eb9ecc9fd840639d6a3c05f31e7d2a353b4bea46..1997639b113edcb88e05425ed7a7c4cefeb6211a 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 ba2074536a82a8f441f32eac51c7842a864c2ef9..8d6a9e279f738d733dd26e5c7ef1c14b9eefda0b 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 bc0344d9a07beb4933a0e69f6686b78c30329d6c..9455c2abcc2429ce98fc0459754add0d01001be7 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 7f8bd500eae24f74cd46e3ea705b6436216f7bfe..0056ab81fbc39a7181a87140c939cfa4145f9f2a 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 3b95a3609cde69357d33bc4066ad2e2384ca7adc..e7eff6c2f0925226b247666cbe8922f34085e907 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 1b252074b926526ddee16e00d8aeada9c0745e89..1ec54fc4c2ba47bef3add2308d467aefdfcda5c8 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 d9d9d1c605f7fb923ae951373e6e8bf061aa0168..a18d1d11725f1f58b5d7a3e95f95527a18baf3b5 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 6c26cf0a7f646d01000dc6d98a94c4fdd819d27c..a68706406b88056e6d387c5c6956f97b5eda22a1 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 ae0f4f92c6108ef616194173f4768d8bd4587939..5a8ad86018e86f4e8d3137197137ea3cf2ae9804 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 c61f4473c0fa60a11c635f533ecd0e14c9301639..b7b6c97d2147bef05291a3716172eb903f72c5fe 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 a9e290a23dfe6dc4e47b9afb9796ba6a041a902e..944d8b882afa355820968219083e233af7d44a02 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 d00a79070bacadc6fa0a77dd7a9cf049643188ff..d1626685ed9fe88327605a0460ee60ef57e500e5 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 3373f9be2e4251d205a9d3f9d1e0385813d271ff..15174216d8c413eb4698d5032973eed2d0511837 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 0bb65e1408096237b90415beb86145072517a599..70adde049b53508ce0abe851492541d357a2ebe9 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 fe37f53f2d29eada1f2aa12cb4bb6e33fa630a4d..608cd0213b4062bc05cf30adc9081871192224b9 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 bacaa4a1a20d61b180d1097698ffa60210fdc229..8bf0fe1fcb4db0bf1e8e8b9cf45c5d10b2cf7b52 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 37eb56ab7832a9e526837215b97b6414f0bf53b1..346d1345f11c28566a9813ed44819ff2b6e6129f 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 9818b9e69affa4a9812cbf09bc5813a2060d0e09..3c9b3f67946158dd8aa92aaec764e8c69bd688f9 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 a3cdcf67886b19459ba6a84b9275e2b91f9f899d..955bff8820dab2db354341435a712ea82f63c2a2 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 70509a1ceecd2bf6be93f9b0f40d8ecc37fcaff4..3906ebedbae8484d307c7bb1d43444d58d89e1c5 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 7173dad6ead51b90515a10676b31eaf4b708b2e7..94b8ecb892bb17eda40601990ffd9b87d0ff85a9 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 a960d0467bfc0abb698df83b25c722a48812dcb9..5e88fd44812de1a5f4a2d0bdde6b7e54bc95b716 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 33354fc35a43a0d8fcb6578fec5005b2e055bc58..84941a918b01fcb959f34c300bf8c8fb13cc8c3a 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 b9133f4fc3f905368a7fec45309eacce6b72c660..f6a812e49ddca4b9da9ae355b74288802cf6cd93 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 4ff421b518ce9d6987efa289d54be8baca37fd60..0c5ad5a5545318ca02afb9fff5caaa3ed6ac4108 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 47bd26f5086a1be60ad16a6b3b60e0533452f084..29e9828422bb079a0d21abd7aff9cf8f7ad9feb4 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 5a8cd90b39a73cc0543fc116705d54c837eeafbf..0f783173d0ecd15e38dc3303d8ea5e918190af8c 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 b5d32236da68013fb8923b36f16f6974bdf06da1..b2c6a1660c51fade0e13ff0aa8a502605dc82cea 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 c458852cea76182fe016f92a7c11898dc5bee833..13ac28754c0368b85af5c900ccd7bf5c89fb3c7e 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 0e3b00a572b212b4741664e515b34a8d392d5e9b..d54d6a671326435b44b846ca1b52a790f485a1b2 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 74ea67a49caba32bf91448921c20d64d12a388f2..0635cbeacfc8e6cfdd092de177205634c9637135 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 138fefd7f7f8485cca11fbc2a5bf8f52f5d527b4..4087a36a0571a0430e5a90849e320174f747a426 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 021da74d0296713c8ee759e536541bbe3a6a1f6c..9787c09faad83a5d412bfb573af9f9d678498984 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 2904bb016c92d359c0eb6240f15d9acd05cf4c12..e1349afbf9333fda9cb8ee78880cfcaa00b76608 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 06d19e9f97f6dd20d71a2f79cb1dde88c3194567..be757db993a56b5538f31d954686524866c8e2ae 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 8dc164939ec350dd9e62322d3569356be9384a19..13b87c8e6d0caf62ce311dad409a9b4d3f091caa 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 8ea3ba6789eb46b4e9e91ba148a79cfaa2ceec39..955b5efc283ef565f8c1cfcaccd6d653f2f78f19 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 a6f4d8babdb2551e32975bfd61da5c713d885f22..d2614ace4de1aff89ecdc69659ef210203a1a03e 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 b08752c57a7e68b2427d0700aa944d020e6c946e..62807b65f2af8b9602ce9a468826aa63d4894057 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 c9c82fc9604aec8284f1075c054d2a2e4cb2267b..babd23e5a27ee48cde812a31934d096d109c52b5 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 fa008b858e394c32e25879f82f98a05188085e14..d1bf2e150c1ad3a6722862b5845803831082ea7f 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 2b2636e652794a4221ef33e03a07f4f5631f4cb6..24e4b4fc915640a9dc528c7a58a7606c3c560ed3 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 6d1f5cae1a6508d308db853e869ac57461240f99..04b45242dc762fa9350c9906f8f37e5e263c3a53 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 7ab8c2ff220a188562b3b2ff760be6e80b78e1bd..6e64a96fa285a76fde462cacf057081ce88f77d3 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 522d5bd76269fa622c4264fa9f014c3762b5865a..275745aa5829292d4b3a96ac11777f6bbd56e9a5 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 afb788d61011684e9cdf2e9caec1987974ce41bf..a1d05df0ac99b1ba79ef4134e21fe5bf5143acac 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 0bbc29ec5a3a6e119cf48567f3a25d2fc3f53ee0..a7ffe10eea1b4494aa940a99c6ee01ecfdab98ec 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 103642f156ed62fc2826c6a929deccb4299d57b1..a72e20db5363be4c5c930db5762d94fcc54e68b6 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 e016cbdf28e4ad2d7efd64d1fe1bd556c3edfb5f..4221c7b7c5060c90a13b3b2496c6b17c9faaf417 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 f4f2929c682366beba1617647f4b7c00b7e9c2be..d25fdedb0d9f178787ab94733bd028302a7fcd7c 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 fe61f05af876a5b2cf07cbb5ae9a433dd11303d6..4910e5557a67382bccc5aeda404c3baa1790d292 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 b188f099077ec081a067621a2dccd73a05dbcc2e..d0f7bd2a3481bc4a89bedb293e27165a81443849 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 a2fdf0d451ef4a223db90bf81caf79122130ae9a..bafc7b699dcc3d12ed0f283fe872018b45bf0f26 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 8283098b23880a97d4bf18a822d79ce910ced4a6..12e24fbf8c4630c8f42004eb9c80ba1e6524817e 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 988f4299801078b2a8bd6b94915502b33332c4d2..b3d6f2cd8ab6f3b985d0cbc9caa0b2ed6adf7ce0 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 9ae1399549c312a94db8086dc2e96631e8cb274e..8c54c02a0e26cc3bece609d423bac5b2c1a1cdc9 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 451d596783e0a847841ab1dc4c172eb9b7c0a5d0..08d0e05a313ea0d65ca47dd7189828001ce2abba 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 0684d2e68827064472f7e2fdb17411c6b125211f..b0aba3a6f13c23b7baf9a0a4c8f1bf6382040a4d 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 820656aef040f21d6c837ac541631be6bd538f3d..2856b0337e8786ef41ffff137eb1cbc402130428 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 01c8e2dd64eddaa37ee704a881b789525e02aa55..03464f21d11965bf9dc8c8da995a6029d3e8bdb5 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 1481915d4d715d133ef5f151eefab92bc563840d..3e87b6a553be914806b2e4c87bf55463a67a97ba 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 2b242df1b952e2995fa2b375bf3b1ef2895a41cf..5722be96542252e8d60bbc98852f9824690eb71a 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 8e0b38762c961ed8abed0eae87f9c21dba0b8fcb..92c123aca0c90a1e824f5e4e152a5dff813dd53d 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 0a28d35735496e17b83a117d2f99982511e9f92d..95852d277c226f28fa237c9e228e698ca3e961b2 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 678ee1a73ac6ccfdce22481b0b9d5f9c90792279..58c6a00397cf17def877d5e43c18b5b788204ca1 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 c0c2f4da5cd273a096b224cbe598d874abeb850b..71d76b021375db6a618141d6a852b43b61832f9c 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 31aa80943c16e4ccfd2b357effbedf1c6aceb3b4..c27645708286aba3d8fd5278fc5600523dee4760 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 d1f781e61f1e4967b6c959166c0495928c70fc86..d66d8ac6d897dcccf81339e9eb6c67dea0ca4d76 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 3d1c8344c8bbca3b9536a62f7d3d702f1d869652..bbe185e15eb679d017f8601a43d51309d199d2cb 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 9906ecdc51ea3cbce0c9c5823678dcdb990b0e30..13ac1980a37686f7777c2b86d46ee979f9297e63 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 86281ee78f8c69511acae8d610aac79f97338b5b..4ea76e46ab15de2036f22ff58465547ea111522c 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 a1bee22573621517fd85c20b1224736f9caba3db..e83b8cea1e7347a3d403c9b63de0a9fb322d7820 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 465a31eb94c39db74ce30fead3519c61174771ce..df0ff1580acc78137d8077e28fa265c85f9f3f60 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 b08f5d3cb67300ac448559f9dea30c846be35611..7842bee57e636cd4cd34a0bb23cd5b96a6b863cb 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 c69a7f962a4299ab961921bc92c829c081070c91..1874d5d6b782002557f8ac752c4dcf9b5e112be3 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 e4e179212d57b0bb9fd63cd4297117de3a25a7a4..d52201cb359fd5ab74881eb23842b32cb4884c50 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 b1b598dd97f23020fdb007a6e416ef3a88f420a1..41877105f498b304a78de1a444ba8ebf04a23a35 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 d3b8de5c9b322c1361a3ac2f60f93961cfae49a4..2ddc1c10e68cd6fd6c70cb146f0326ebcc778702 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 4398b5db4834bdee38af079c283de78bb7e98b81..e8377c190f635e30518ac9c1f644e8d54a19a2ba 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 68845cbf838346d35370e9b32ab095612f52e829..045ce01bd74eb1ebcce9a174544b64c99d11ddb2 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 debf6a08e012cff067b70b8d1a8c5b2f68b7c45f..f23b7338f7594c2e8f8374d27ef9e7d390c1631e 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 d936192c3a6c27ebb27506d350dfe482a2a5204a..c1582c27ac872b4a5a2fb5cf1833de366cc6903b 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 2be765f70889d64483740c1a9bb6f6e1a5afb3e8..3494a40cea99f7047ecbd995ea3dfd1805f1d7ae 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 bc41df90715c3917a6768f888385d4d6990327d1..080bc7f24ffaacd1a5af2d9ced1eb8d682fd316b 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 ae95b1497af3984abddcd4cccef569d9cf04de2c..af51ac4ea59e20e4b1c6c809ae9223653ecb49a0 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 ce272e279c5f3c55d4daba16d9e7b69143fd4348..e37aab939a41bc215205d895ad6f34a1985431fc 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 a62ff18f3434938ab591e9d414fe713d8bcd8dc0..31271fe2a10e36d55e01d74fcea419a70481a058 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 37d704ac38416f62015ac5a7badd776c7f1f4a63..72752ddf72a4ab1790d7297af500b4dfb589c44c 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 c81327da1f72b836fa1c57038bbbd8ab8f6cf77e..6edefa6ee006f663f78a4e1d1b8a5614b77bdf86 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 34de209680fb38f52c85f2a9ee1909f741560589..5de17e3bb7d72a80d5edb89eea880bdda137cbb1 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 b19409890899f39756fd23e342f2129fc5dec872..a5fb0e883676925079c1f12a92b6638618ed90af 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 d3d3ebea9e78c0da2c67aba1b8b719121ba21036..77067e1315d2215721751efe187058f06c31ce7f 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 ff3776eb0c6922c24f693b078c0899c13c80ac82..74c818e3fbd066a884573364181098b35f42a0dc 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 4f12543270c3ada6dca0f99532a5b17e6e2660ae..163e09ca073078aa204b47610dc38dda465655be 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 317cc269cc064cb1734dc74687e3c5f10a9fae82..cf030af18aad10a7e66c99ccd716afa7007b9897 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 16eb73ba6b0ce7dc33e3d8e7cfee9e9124001bc5..5eabaf55dfc5ac575cf1dd01ef50fb55ac0787da 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 35495da90ee7079aebd2bf7b6ea1d376e5737cc5..2b4faab376930b62e8fe7bc8d516c322009e6c23 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 f06608df14c4e7274730fe6519f57fdbb4b00f0f..447a9c26bb77d610411ccb5757181a8cc66ca19e 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 a0d146a99f2a220f9715a904bcbd621b78d6b955..e030f1e186cb7f3680c1f7e345b0f149681d3482 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 b82034f3bc2ab12b8ea7e2191b0d7dcad7a83068..f4f8b2132edd775fd6d28993b1bf8de957b618a6 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 1334776dd0346bc21949ea89cba1d29cc91e8309..cec2df1ad0af54a33cc3ae60eb572b2ae34d14d7 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 fc50552771a49c6320c743439a6dfd4c41135b6c..9994d4369da8ef605527bfbd016d71a4ad9e19d5 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 1fbc104afa6a15427bd9f8ee64b3d477338042ed..3fd84dd85e9b299574fb4a3eb6c1a4cb96482d04 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 087a893afbba1b051e25c380b34fefab90854d2e..de197ae4b37f8f0b2568f5d044544194e990f5c3 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 0af7eaf9abc14010565ab4f543fc80ff3db1f4dc..fad34384203867e6059bb287f649211a43641b25 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 19acd1eff4f3dd61a96ccc2392a45b3117a40941..9d07dad358cfd09b560cab5eba4484bc7852191b 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 565c47f976b17683f3c315828e233ca43f83ef1d..664c72087da6a3580fb4768bd64242c886b045f1 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 3bdf32234bb328adc47d7fc397012e90e3c38c44..af02c409c2f60b31a22053c0fefced5b2361a41e 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 2a101fd5a714819bad6eb21a385635d745be50f5..41f916f11a766b5f29b5c9099688201ddc76f16d 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 0562e7235deca5e78c11251ecee8d28d3186517f..2d14660f3d457ff1166cb34a2e2cc1486eae789d 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 8e41cb8d0011980455c335d8eae5e0d41af2b999..65fbdf3a04f9e24dc46fe7ece69f8bfb8877005a 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 b2e3778fb7a75b0cb6ea71e6c43c9c3c43265894..421c460ac972de3e9ad01d59e82059fc0bbd713a 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 f0a5cef171647b833b720fb1cfdf55c82860362a..5d2cf724cbd7b66716c85af4c01f11bcd8457362 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 3e8c36484b06bd52022dca0a820ff37ebfe3291a..46adef2a30c0329fdb087e89d4a37a8e407463f2 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 802ddbb7aa889c33f548f28b2dad7d4d23158e72..9ffcd9e8b58d5debba9d6493434b26f46041c7cb 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 a4805d47ea4dd5362ddab72d0238f3d1cb8f4d06..09362cf4f22f661bd3a42e17ae3d4588aaa0cca7 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 59ea7b9c60b8fac53ea2d22145101b025790345a..eb4b253ff83549f29471924e38815915bc7cc7d6 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 c35a3f77118cf55712fa9289c3641d7b14ce7d63..fbf693addd749b6f65f35c1a234fab2fc3f4d012 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 a63087ceaf9e6537121bdc9630ccf00cf6cc9179..348603262af0709a8d35012fed921ade6021e300 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 71782c369acf94a53a43d7c11ca4956ff1f7cf0c..5933ae04a6aa5459115013aaa712d5e4d71cec86 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 e81431957e7f63a87aaef1630e115bf2ca38b3f5..3ca11aad569d99c16bffdf7ae83252a93486fd5b 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 78be370927488f0e98ab190a6f1fd18a37f9ac37..a91a7e96cb886a62c3b470c66f995be835c5bd18 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 a301e1580b3f6d7aa13be70a640e9fdfc818fe7f..d0122d4776100259c0850648c6bc66a99427b84f 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 85f5f9bdf741d263d9462daa38beaacd7d81458f..a1fa3571eca001d7193fa816257109c031c334ca 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 62f9bf3371cd9cf55a45a92956dcccfc2a762f42..83865c02d477cdab4b3075d93aad1e61a9333f6f 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 478f4b98bc2dff06c539b393e0093d5175f4aaf3..e12ec59afb8d0d3cf9f1934e0a461903ad30e62c 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 c1904e0d24c737e38aff3e013a4ba532e04b9e83..db995dce914a193ab3c97627a79cb49f7dfef334 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 d47a78af3622d88f3f54183c4caea2c1a27893af..b0ee3d0ae681238522cbab3d80d2907a9970ec51 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 8c3b76e71eae8d63f120d673e18f8743c8ba3d82..21e5ed9f72a30e755f91a6b548b475b5b75b9b49 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 351271045d36fed1d9df267e4728dbaa0d306cf9..29d860a5c9c82f43090387b72610f7756ec9dfb1 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 73b9959119a59bfce38825a88fe4fd5452a2f07d..77bd4152a6c1a1b936c627c18422fd6e00f6d1d6 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 539119d2b59402899219cd570e26365cfcde2f0c..41fef2d02449bb8452526870f5856235c93fd892 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 ec973aebebf3b4048487d3a66893e678a54f0e29..e1a7c454a0a9dc90e3fc2d960fcfd16c8a8e2325 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 4387d5f5898fb066707ec4f0f8dee59b59e74cde..8894a063b1a15f2d948e2eff41d92128e2fc6bc7 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 671f9857fbeda8969f031c53a96b186390bf3227..b29541bc484384e6ab828c07d83f0196bb68e4ae 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 6d6a69d9d23fb13d9378568115f65e07b615e1bb..214d511be88041d837c427480eba7c09b0cd6301 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 aa594460741280dd7a489348e4e1066b78dfd1c8..dcc92131488eab75a09274060f302da257c6227a 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 59b3ba3265fe5939f7a14d3c8d74010bc1869e24..155223f5f05f5a594707dfc204db5534e2c95389 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 839b8d0092f2bd2579835bc48e47e5c76bcf58e0..18054952337fb0d40959e45ebe86540c972b2bdd 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 f5bd6e96fb90a9e39c987a5433639452fb0df91c..8b2b6c54e86a969c073c8c12f7291890e11229c3 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 7370fb7f4f5f5b082d6e5fc55ca486025ea3b106..4ee2b5acf2e08d15b4acc47b4a74e4bbde0407e6 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 eba8618ccbf15594d589fb69dbaa755addf4cb96..5cfd8fcfa5e86644a3f78d4fcaa5db913fab4b42 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 670cb06833967596a823ae645a008afbae9528a4..c868649508fb3b804e34f0add538ac9904e414db 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 6814262d2c8f6e2a84ff9b0d42f05d30baa1596f..0041623b5add1441915abaf3c16f117fd559787e 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 05bc2131376cb585a40257e43bcce49438d33e01..1bcf92f908436dd4281366de947301add208ee58 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 c407db0c26aa1a7961dfe12b9970b2892f8068d0..b4324793c9ffdad386f3c8690db954f114158578 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 c4c11d25c6362ca15e56eaed75d937a91f97ec80..2f2b3b716d3dc7d0501cf14467d14c1a641e5092 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 b96b556b80c84d3dfbca56c29b99912b1a583042..6a4e268ffd99523886cf65a17d2bde2e45f050d8 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 b4377dbc99f012aa6d940a5f427db053a7d948ce..373f08a125ffe750940bc2405c8a36dce7f0d8a1 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 f021e58d454f5eb274636b2a9d0f7204b548a874..2db819ab85d2dc9c3795debb1b27e441add85c68 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 589dc9df34aaed3674860ebd6314283c16a3d087..5c72aad3dae70db93322e35e8bac86fac061a335 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 170f1688c2118c2f829b56a71ef39d42df8bf6ff..45207310048be38dcce0530f3c48336c9b529a02 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 e4e725e4f4e77cfe9264d31c3d17f8a53124acd2..6613957fff06ad397448bc65f1b2993eab5ad99c 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 ab16765a407b6ff6e43d31a61a026c7afb49fa71..572f4adfd111b45039a57c8dee63ea5f91b3487a 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 d0b3a10d808f1942ecba02e3e761cabdb08de397..e6ee35406165a7d8850db2bb78164231c5e48af7 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 0b0c058e9013626b378dfd7d111ce7ed6cd4c53b..3bae91d7eefed706fb6305b7a8053a8c9d03952a 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 3497011eb8ff95f7bfd9f52c231f79dd8bee3b8e..b645a18181843165ceaa64e9d6ed2ff26f3d58da 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 d172cab1564c2af615421b782e6b79ff2eb821f2..091f5c7e9730004f32996f649cc803d5495f8415 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 7e86e89360e26a5b710aaa5577d3951fa7859950..1f93bc5a3d02ebfd3800c3892444a0b22bc08dd8 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 7ee31fd8974191ae7460d13da3d941275d2dbf04..c3e66ef2133aa1d74c828d154d6d5f50f7b4a58d 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 94ad448c35b6dde036f14f111d4d0b3f0f731f23..8adcf5c15d456fc85977a02cdc9e4abdf5639810 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 92e54c27897ed9564f77097590281ccf5de3ade5..ba2ff353e1a9ac0d64062586242297a6c03c54fa 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 60ebcfe6d4287cc502dbd7c50c9fd88af9d5cb5d..135b75a3e0137c2d5434cf7a69d3ad1ee18d87a5 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 60306d075428b520e10ee26ea4aec6cbb79d4906..55730e29d3ae9c5310a92eca29f9ad8b18e5f862 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 865621839d0308e31d18ee79c3932a0513c6d1c1..b2d3927b5567395748d322d234b07d0f91425b38 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 36ad47ce22b6f4cb92911db16548b3cd4dc7cf4a..39723928a019994f92c422b452a3c5c81f2a78e4 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 e40cfeb64911cb909fa01279e98a83ffe97418ea..4dd3f29933cf1a19c85242a21909bb22eb642a1a 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 c6ccef09916df6e2274c94b1011676c9a82116f7..13b355fadd581a6771fba1ea4305575da512de85 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 c5605e9d90901de465de497bcff7ea0e7a4b993c..95bf53cc29e38fb8fe6631574390b9842e0b9faf 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 c80043a6a99f882684217c0ea865c93136d8bf9d..eec4c1da3f9e3110b1ae77f86cabb266ff9c1996 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 b2d434746167c787fdf4bed9475c4fdf75f1a095..ca5d0f51cf7da1a6dfdeebd2fabdb30ad640779d 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 a1b2567895bf1075e1a9b7423bad81e9f763cb0e..9be5d95da5877e6742e2be97251de73d99ff4e2c 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 ee79048e30332777e29f817db099f04d1ef4e0fc..1b854f53f21e2207d44ab3b132622ab16eb7e898 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 99b2e091983055d33c54f58182aef66472da291e..1af477e58480b79cdbe9c2b4da5b131f515affe4 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 84f4b1ece77743023bdec61f7745c08ea362951d..deadab28cdbefaeda9355870eb87a6f7d413431b 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 9834dbd04726c7dd4cd72aba86e60ec79edd640e..d4296dbf7eb00be4712ab28fc0e426b4ee86d954 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 4a2348b7f8a21b99dae5914a0512470eeef1f473..ae60fd54229298d29b582bd4272d2eacd9876df8 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 db3c2537360fef1cf0bf9a220bdbe02dbe40ee61..592a9601faaafa082198fee593581f8702f97503 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 ad9d5c5702b1e1b303a862f67f4603736b4f8218..55f54bd556a47f4573a44b0fab3a42be463f2498 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 949bc2403b2daf14aa3639258bb4a2b3001a07bf..dec730798d58162ce875b83cef257870212339c1 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 5ddd979a1b10c49d3b1b50abf10a6956fcda3aeb..4dc1defe27a5f7bcb4c0c679dfe068e06cbc1acf 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 9958920f635e99ed487b8a3b0225c2a764443141..a4acb78fafb669f49e71f739764b9779617f0cb5 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 e0aec8ee2dee7816ff8a9d7aef113a0073d2396b..7bbe0263411eb72ec56f623e78b6b83abb295e2c 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 9446a56d692f4e681bf9774414d955def0d1a59b..9e6be49bebb2c638c7e6ab65254d823656f31367 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 d422983f0ee4776c3cd6c14adba1eda0e3ab7603..b903a2da1fd16a753b7bab3330aa829282c5539f 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 c066befec91b06a707e01415d9adc55d0d12a3eb..21b7753eedad494ef97b0255cdae2ec2f2a9453a 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 e65acf97e02f36a4d34df77055011ba5fc8eda7a..6ab9a0aee1ec606a31bbda0722fd7056a1300b66 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 df6f34d5e041c6debe282501286cb076be00efe3..d892a597ac2bd81b0cf9e501c8429adaacb24ea1 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 22c83e44091d9847d3fb628a7720e4e2917af526..4a2a4638b476ab0627d43d5fb0c70a0fa980c2e2 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 5a3092abb4e62d719ce92bd375412b73653f3d24..fc45c384833fa89af4ddf924de2582bb7c294326 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 dbd452efe7aa3851c50b399944030bcdeed7929a..c6c295f5b7830337d34479a3d6fb6eedf942987f 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 d55f6a98c4560a6458a94b81834e398105194825..7f565613b5cfd432b5086ffcce2d3a717bb3e76b 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 d9991d1f6e9a069cb86d790ed079998e5300a80a..c3ef9f85c7eb88a3684daaea3dc68bff7a71e3e5 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 02abeed9c75dce07ddec5f8a69ac5d7b9fb48e86..758ed4ae5f7a8585b666946e197b9bf34d2ab20b 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 cd2d2670700dae8641fe110cf0750bbb681de01b..17d7cc3aa11d5a424a48d6814933f5deec7a8a9a 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 312d8856adb4830186674e5f983ee01137ec20b9..5c5ecfacf506125d46b6a45bf8b483607e049bb5 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 5a7cc3b1987e2c4f6349c2519469286d6f79b828..2d7932b3c492fa50900fbc44ea8bbd70097fb86e 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 4ba87b0ed62f981cb07677fcfdf90ca16701920f..9ee0d500436cbfdf54ee31d59947893835877ea8 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 1b9104d41b555d20291dadc9433f92f23092cd94..0a2d9eb725113fb64e686988c0cab25c8c4d578c 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 51130bac39748c216f4899dd10df8084cab566fc..b5b93b42e6c4be046736ccb4c6766c8d06ea699c 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 fdf7cecb8336692b613da60326535489bf336d36..bc61a13c336a03693942c43c45ca5502a6591719 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 67ed1542aa8a6fabeea2f1d2995df7e1b1cfdd6b..a092c92953de3b8fcd53c7129501831d17615419 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 1d2d0d8bdcdf0f06fb25d518b91474b3a69b2864..1148d732f94fbf6de01268016cddbb5482959c76 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 59f22e83c93111881c1df90a09d29ed471ab36a5..37e24450d1298f5c2630e621b651f0deedef6e1d 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 7889d76bf69d39fe9ef26565bf3f0a48cec979ee..5b3f40bd98d86d47b7331622e8053622fd6511e1 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 03fdd2b16c4ee24ad4efc767e2a6d970a2ac58a5..f72c9837e135efa2d7146d12b54b2e0f4df4cbdc 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 3627797c627270b8e51ed6db78b3755bcfb0e4e5..3d084d4ff5770ecb016a7731c0a5b717672da093 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 53c60543d748d314e36fd1f6f381e990c7c30c06..2172a2092e3f927b9c8b38846df1a5efafa9b7eb 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 4035f58efa314f5d12afe06ed1de4745072c878c..b3e49e5bef104dba0cbe38406287a188554327e0 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 2702825ccb8d86ada13f2a93409ace6d546552b9..15af53237217c7c767a0d06a188fab3f0f57f359 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 e4c539dd2359cb89ab22736fb2a94d6aab74bbcd..c6e1b9e4122a66aa0615e954caefe1e039e8437a 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 72338935311669688235f27065e4b5632415ba4d..e5e7ecd14284e40752e4a3020b7dc4e6453b1888 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 1109eac528906ba0ea2c46cffc7c4ccc3b504e6f..6ee12aab12597ffaf028a7470bbdc85effb24f51 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 cd9163c5c87247b35ac85eb19ad8be57d607e48b..b8fa4ecfc961060cd72c0947d7cf0877438867e3 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 d1ad88908634364728294dd047220ecd74e273f4..5b4482dd627436c6d4aaba722a85e2856572d003 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 2b4de32ad60017591cb7c3ec482dc69f78fb7056..cbccb0b9ac10d70720120c533e839c351a6edfc0 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 ee7463815e77e4e2685243c63af4ad7e2d259631..b2e2a219639d293d7da69303d361374932f2f6db 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 16b48377f82510bba0bd2012a36ecad4ca1a08f9..665323b90b64f78d0f556bafddfacd42904feb87 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 ccb59ac9860cb809b865ef6ce02ee0d9ec097817..47de8cc9937e9e70ba3e3ef3f806674db63286a8 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 005902d47eb6fb25e898e3a594d273b58307f50e..dedc301235a0dc3be5634d705e0dee1028d3adc6 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 38a2fecf33f8078b9351096c6d6aba22c74d2601..bca908054e1b6dd84a8a0bacfa8b4eaad11161b5 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 3a88103c1fc4804d0bb0035ef9e71f1ce7752768..b62a9bf160c52006fc30b2d5dd6e5b0c04ef076d 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 4498ef7810ffb7bd380ef7e086b0553c2f1da6c2..e89be2fbd5eb2708b3d94e58dfa39e98562b1950 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 81970a53a04949c71833e7e25b204ece6010b600..f27c28d934ae64842d5d229f107d6152a54001b7 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 fb8e70eae3839b564ae375de3ce39ef68584c4ab..4026715677362d5ddebb15a32df6d5e7149692ea 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 84de723cacb4117ab80854b8127c15b9579d888a..233adb1fe9ac42930e65a03bc56c52cc9d7f81d4 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 c0cd2592dd936376a81ae58961f396c2f7d7ba23..f1c3b4d143248993c0ac95e783e2554fdc100c6b 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 59c8f72b0b34a19ee0b9f67db852550e61f00bc1..0140bfaed7216d540611b92276d1a68f6c9fff49 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 d90d288b0cad44ba9b1566192d3abc65e7f13275..e00b87acf481ac8b33ffe573a4597bad941c72f6 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 e1c4bf0775fb644be05652b12cc7cc0278d7107b..d60ba624105cd0338116cbe81363d088b09d34c2 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 341fde71356eb471ad29ea3ab1ed1854156fe488..05dcb6675cd661fa99c2ca694c96b35a8190f399 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 0fb09ddc43efe9055adace14ab736b24077d86b3..6764d64e79500dcbcf89d15ffd448513af85f110 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 35aab9488edc410e6c61a3c663073ab057b77458..d446d8124a8b05245c1f020babe0877adae926ec 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 fe56c7b5828b6d5bed37400d612840951a53a6dc..54a8557ef55781fe260ae817e2bb0d0f1eccec67 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 dd6df9004ecbd0108911ef40bedfcfbbd6aca7c4..a98f0ee46b6c5b75db2203fa46f5064ab0ec8942 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 9ac431afdd33a837a62b0806fb49aeb8a5691810..30783814f9d9bf6e71f9afa8aa55c7563cc51473 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 562d3f0df24ef0e6c36ad3177661af33341cb281..9103feb70ce8b433bdb863eb0e35a00b2060626c 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 85fbe72deda5de4dcff3c1b1f94625d3dace11a3..84418dbd5a27086c2e2a01309dfc11e423edf8a5 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 b7c04036ace52b613e764a355aa2b9b2378f3ff1..aa28b1d32c4e4c82d039d1a487c1eb4b335eb9cc 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 5e29670d41ffefcebf036fa49e6300ca879c7d3d..ccdacb6d36a957eaec764fbc236f97e4fc4398c0 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 229be06fda14021c999fe78b90625cc1ba907ca4..14089d57e5f754bd04ab1b18e8949285fd4706f1 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 2f429ca8e5aaa3781753ac9536d6f21f2f7aa76e..aa239ccda270e9dcf713cdd71b965fa86097e675 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 f31e4b8f44579f9db24700cc3cfa7eb121375a9d..1489fda9d24a09c0db193e329b5d81636e53cc60 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 8d7edd18117da5e8a8ce28b18df900f7a47dc566..ec605acddd886ac47a68b722f0cae6546106d24a 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 b79d1a0883dca673b03ce93ec46cf3f0f4a853cf..ef0045db409fca89df71118f9f4ed007833af32f 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 cef705c5ffd4c7ea7d69f51b6384d88e698930e9..181400e147c0df8e271411e539e193cb80b02c3b 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 b0c524e920cb61de588b15121342f18709d9e42a..7be1648c4e4f0c3d55a2eabfa445f749e3c07ec2 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 b785d129ef50cfd57ce95ba04ce93594f0c34f71..a8e8d431071bac8c2a875f148e06c468389a309a 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 88668065a308fea3edda00910dae4b2f4087320f..abd3d21a18cab2e1d2544e00a100062700ffaff5 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 14f7018501cf69d35721ac50213872b53ea297ec..d753d329502a6559f9bb02137222dd8a39287bbd 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 de91a6e497a74b07b4fcbffb6d73c224cfbd2d4b..ebb0c4b98f3ce3b45cad961cf71178ed13a451d0 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 f77ff444a6b0f0265620b113724a8c1afab02846..e2a48059e85469feee664559478cf1e2ec94401c 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 623900e732c1d010946230262ce1a72d7d9beb1f..99fb5c088a45ac9a485181a9180eedf637b7b1c7 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 21899b6223b65a2c937d73054ea21e77e1090ccc..d15c55de2723edd0ef63ee51d6e58d6c0c4273b1 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 87346979ef0990b24fcc63fa7bd8f4ca73718d32..16392420903aeb99f7b448df68646a902699ff8c 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 706684f9b86aa025307b46c513f60c91ba3fef41..fe1dac11d4aea1659c6b75a05537ed7d6439024a 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 62efe93061abe9a94880e0aa807291ef7f083223..685a1f7b2fb1913d5c90dc91b1af32f53632a5d0 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 c2078ea934624023a41bfba0616931e4ec6de663..15167e127461a83e1c0fa7894dbe9184b00fd98b 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 84f167a463ce33ceae7e65abd7d69b85a67b5a28..803e433536e41aaf3e74db890091ad5dceb43f12 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 0f9bd7abbceced87425ab91fd3676a34355171df..0d600a5f726798e027a70d6c2a22b33da1478172 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 a6555fc0b79af4d6f08a8a05a0a0e82363a85892..88c678687981a54dc21a97258795efda129a33ca 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 6b7d1fd18e5d680f6986f0b75a9c6787ec2e9515..4d3f5f8630305cdf34aeaf9713f1c0adec399a76 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 3e8b4a38b8aedf4ff6a4f960c029d477eab72cbf..6b375720e395c4794591f1454dedc13c8899b587 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 735434d4b4c2fa4fb133bba90f92a65ae1fbe505..163badeef76f2e5de05c4cf24df8857229a762f6 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 10007cd842cbf7d404e6e5bed56f7558ee5a539d..1beb9d3f1f1edebbb0212a3e00e63ae3d6eb2339 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 a4d0184eeda019d150e9bb2bd07eaadbcbc58123..f7fc5cc04b92e9a33044b61826c5a741ce6443ba 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 82719241e4c1bff304e087bf0a3f8d99c8cdde31..d25f3ec1e2aa245cb910075704516c31a9fa6505 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 c0a3bc9363817b48c0a4c1ce79ec9d3270da78ae..a4d9c070d481a182890a58e4b8c850c4c29f7f17 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 cf71f8e5448f2810c789a126466712ceb642a3d4..4fa6c90624e5ea81f9cc3cb3b423d34848e1e999 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 fcf3a702bdf82dbeee066382215b3962657b81f4..47356a5d5804265fef7aae9bc81a5efeb32aeaaf 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 63c7a25a055f9c1825303ea34cae1f391effa6f1..969178573940ff5fb84ad9988351c56faf638234 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 30c24a3e728f7e7017cbf1b7f1f5e1437207035e..48bea1117771d0de1f6c9b915f63e9414c37f188 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 d11d19e75726a71cc3efb61a645c40785b647f3f..4262965c4f99b6b9a91437f4ad8cc941c41c0e19 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 4e608379d6e74fb7d9120d4cb02e74bdaa68704f..15b6a8e35681b96d8eeae1134e57de8c37c92e92 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 f23ec2bb03bf69c64bb1c602ba9b0b6d7f3becd0..772c787268932744c166433f444cc44640a2121a 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 e2e21d66eba576914143672a6ae3df155e33d207..7e0e7b4fded9c060174135f2e03db898167cf196 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 926bf7b61e59e73d77525c568382fdcb9c5d01ee..bdc04a6ec9c73a9d9c0736fa8c85f293b4d57c8a 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 d7acf0425e4fc6fac81485b838f8ff408ca547f4..a49ef682dc1359c0947e18b4c95c8cb9b11974eb 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 9b8d40d7aa374c8bd19afc2fc8c418ff4e8de6df..fc9185d44d925fd5f7815f0aa0f5ffb6a7d93b9e 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 4ea98e398b3086391c539645f7485ba1aca7fa37..9eb5d919d9bad225c76cf65332891dcd0e9cfa4b 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 b8ba7d2f22e13544ae449dba43e8ac1657a8d9ba..a412c0e7bd4ef4faa740cef29bbff102deb76905 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 cfd9ab8caff5321c0878de511c447c58a5886aed..cf3bc973523849951b13135a461f4cd09868561e 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 87432dc99265432279a439f649e6d3b4d5cd1bee..ad6e9d5c3daaca33f4f894970d9131053244d747 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 3199453b3bc9c24c0feb4e34a858460bcddd4ce8..9f7efdab6e90842581d13ca1e836c0925f278aff 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 512012fd39f8feda76e6cbd519d87c821466c974..c8032755f9a46a5f9b00dddb7ad9eb53c9f9c70b 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 35e047392d4ada0e523da6a36f2be98c465be6a6..f0c549e62c550f886a949b6c9a8d3f744f298a84 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 93b7f38f59a85b2fe2919104f48bab5bf509d6dc..a1de08ee38152d0bccbab2840a125b7401c6958f 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 0904323b016d524c15ad9f281aa3449989fcac32..84cf8e7fb17a50e0208681c8025b704a35df53a8 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 c1dd9ccc32d04e78533c6a89d98d4db982760873..f8580508e0e2e1b4b5c6ab7d0e0f41b760d521a8 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 58dc56671fb4f368e79c44e191a1227393ea9d9d..911808ab13a79d2494c4d7250d0c851f53c40f78 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 2b2de6e2bc5bdf3e3b5835d4215b6a76f9238577..b51f320149e570e086a6fdb3351e4c50774a3588 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 05af57750b6aba427f43e9f4666d41ea6d667cb5..9df8918216f6f7fff428679758973586e935a478 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 612abed61fff9c662ecc5f98b5e2d681ca02236e..b368ec2fea4305da988a17f0548ab5f6def066ce 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 00408af127e1189a500f929d7f16c274c3d94c16..7ef1babfeca69498856c69e1aea2119e159a2449 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 3594496dd5a69ac4d6ffb09e038c8ba2cd2df12e..4d06c6ba664188a52c928658bf16c946a5e94694 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 8c099682d3db77abfa6a8d35bc49786de07992b1..a20dc3ca640cdc9fdb5f6916c53398c5a51556b3 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 2950a804fa0281633b0684d918b371b45a2f0052..94f15e08a88c18cf78913a6d31c4219055be481b 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 942a33ae55ee0529d15b0f3ec5dc09ac16e90973..8c3dd7331bfd880486811a8a70a93b4a283731a5 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 8120cafdad2f6016174a75512ffe7966b53bbaa3..da0f8c353e6a7ee65c7d03c00cf48ee8fc05e5dc 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 605a7853e0cfa3f234197ce724eade1ccfe2eb7e..b638f94094a96bb8b0335af0234dd289b5c0457a 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 37c02ed32ad5b4731b492e853a9ca4b09316a088..c2f05a9abb88afb33629151f2d8c646fcbc9ea22 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 e0b9b55c0d3ceb7f455023f71a523f04d77d42ad..e1e82a72cf1bb85419590ae65f3f4d427bf98ff0 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 7fb78df3d8ab5934a2b36b664902ff0719f49d83..51addf8291881420cb8ffafc41d3b4eb723ba919 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 a6f8805e1932adf5a2341786306447e04132d5b9..a71cd729fde69eca29ccfc69c92ee53cee046735 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 4787ea610edc25a3faecbc172537f672c81a2f67..a8dca32ba8777fdec38076332a614a68150dfc3d 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 5018cc5f639356d1fb0591dfa661bbc297ea8121..5743c9a98005deba45274426838da9a1a2c47190 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 283948d784da6db9280b2bd5992e049587e0c552..ef5174eb01ec713832ff725284820c60401a5dee 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 a74d0205efdaa5a87c41f9f30830d0e7060a44d9..6062497827acb61e970bc3beea75aa4b8bde4fc5 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 7db3dbc488a75021e3b3512195918e37b6362276..0092bc16f88709ae5c0325e83067636fb85065b4 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 701936b281671196e72554b4772ac909256be475..0055ca7236e164a25d13e5e58706b9bf80c6506a 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 104d92a3db2881921715c1a0376a2b8ae02529f2..bc290430245ec64db506c4fd1061ca0ff8f57167 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 724cd8be100393a5fb3939c35935dd7b92750363..b826eb2827aaf7ba3deb377360214e342ccef012 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 1b91c3448f2272d99533e82554982ce05435eee9..23244cdfc1bc65bb2bdfda94192fe6b12d57c031 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 2b812dd1b9ce93a08f3d4685aa2c132b1d3f9527..bfc76b5f5350b5fb5049a9e248113e90d75841fe 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 4940b40f472d2c154f65ba278d260846fefd67a8..ed302f5ec47681eb7d5d7ba63548e131a206fed2 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 b91687c55a65d451a0bc86cacff38ad58c3c694f..91adbb5cba92abb25198f919345af44d86c3768c 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 7cad3da8a24360b09dc9c33cbb93dbf5f825673e..70768392912c58774e20cd21eacdb61809e1e92c 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 a363817993ab8042ab08719cca999d83af33f5cc..c0a495e2a6bde5e730c369185e9937cdf6605813 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 08f55f437c99b83153967abe5b07ace37f0e1c34..dc2213b5ce2464bc88e7b91dc6e21873bd50831c 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 4eebbeb29beec320cfde74e9413134d9428a8c56..9d4ef4d42be3961ffc81c45be75a53e0915551d8 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 197513da0fe5d711e46aa89f2e23a4470325e2c0..4eb6ed29d3cc6f45db940c951b6fdea84575398d 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 282c10e50d532c452523ad52390e05c24e55841c..c706c793215942bc7e3232bf98c439ac5a025b9a 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 d2023cee1f3518e70c07189cc52cd57602a3e193..0b856e269eac5c26138272b77c16cbd4fa55b215 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 44980f61e330b84c07e43a8c28575709fe8855bd..529ab21a3b567cf8336c80f6a09e31032dd83bbd 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 5c3b4eaf144b6a6dcba918fb415608227d061f00..f7653aa9a24a8a5812894e7aada1f17df074b0fc 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 11b16799103db4ccda30fc37d9e828461215fbb4..bc5b80c31693f11e3aab82d2b0c558aa0555dfdf 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 7830bff308594820b018ff939f3709b8bf622e0c..8a1ad3ed42bd9a6efbbeb047872216319bb67600 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 9c00d1ed825a0c4010b3278266f3da4446430848..4ac3ad681ffae856e30dbfdacc4ea24433ba38e5 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 fa3e6b3488fd92b19418fcf3ffa8259eba3f4d72..1236ec233b7fc766d75891bf0743560cad6bba91 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 3bef50ca443239d5222255903a1e9f381cbee182..a25fd8799a2fc09433cec9cd2a00d0ab28a7200f 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 2aeea250a49b7055fc0799520b84dc3af97d0818..37d8523ac05b9b633c2ea8dfcc63153186f1c8b9 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 132644a387ef6f0dfce009db5d5f4e7a98164836..ab232b3fbbd0e4f0eb30d48979efeaab65d637be 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 21094a03189afb96bae0d984292385dc654b3e1b..dbed30943ef4d55b02c79e7bfb50918a6e6a0258 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 9fee3a511e4baf9e7a641db8de3f9c147ff22c94..898deb3f11c417b076417a4cba15a42c8528a797 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 7b9aa330e2205e928047449ff19c49dc7c2b7d37..0b52509cb14c47a514f3d542bac1da75855025e6 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 4b299142e4b942b5c113abf6f3105b7bf22d8251..21c666dbb129d084fd42b8921b010b334b00fcb3 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 9841c65f379086f1bedad87d8fd652afe356fb87..bceaf4b1b85d5fa231ffe58135c09e9c6e7709aa 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 7f2bef05370356542dd8cb967060d3961fff45d1..53b6e2b09eb974e3f340a01505e9db1fd25fe37d 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 9bb07355bf28f195b90edcfc3c02bb44b46d46c3..6cd63190f55d0831b1152355eaaf7fb158e7c336 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 bd0134b6e92033772ed67e245253e847de4ef40a..f91f8b672b0201b2036e3fdd6f9785cd81d8320d 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 a964828ba46c5a0deb895fba9bbc9bfc77a3801e..d2dde43269e9e2ecbab0dfd6a03a5dd26f01f0ed 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 dfdbfb89b090421ae587f5cbf865de9b6975fed2..d4d488c7cfd602c5d31abe5d989c84dc4b6b9163 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 e17de31bb3bfa241067cb9fd911bb83fe4fbf87f..04fc8d309b0415200dd94bb618234d26a238f008 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 3eeac3fa3b895c8a18a1ce726dc1ad15824665d5..b3c0ae2ea6a3b71c0bfb3e2a40b0010c0eea601d 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 cf655af6c4f0f93ed7c2cd70ab75c1ed46a1660f..412f713064068f032c782064ca5221b805af87cf 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 1c4ce3ac6bbfce00029bab92d0c2e039333e4b2a..d9bcc3f61c658fd389fec8f3a0f9bf0978936aa9 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 e31072dd08639835095aed6be4969d2f71c7e81a..27e5c21091386b3c8b51b82eb066ebd0c6e75882 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 0ecc4f7d0288163a8e4c712f1f946454a589cf36..382d097e4b11e0b94aca10f62858a3c96f44896b 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 030085d878d95c49f20d8f77f13afb3abcba242b..87abb36f50c1342fc1f8ad2878e8bf93825849a0 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 e0e6234000bc81439232c47e5330e33a43b5ed3a..1e3ad275b88ccd6da0be73faf306efac9e52400d 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 e222627b7855affea09e060578282c2023d2927b..431d77da15a5f5680a90fa40299c22c5a31aa0c1 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 38af1f35b339071787d133bd9583c715ba20a39b..42f89a179a3faf396fdc770085ccaa0380cda676 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 5df25e5fbabd221bc3ee5ccdd57937d3c732c8ee..fb61f98b8b3011b11d61a452001208e2b50f130d 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 58f77972c86a1bd3c0e22d902fc6089edc4aa1f7..d1b8650cb4b488c71eb097c84b51d6382bd329b8 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 3dab841f64ff856bc979ae72d477f865d6f8be38..ec55eb2a6c04246c96d7ef6ca362b8b08517dd94 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 4bf13cc76a9f501a05816729841cc32260f8e539..562fe945b4224255ca8a4f3994e4de2e19a74147 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 e8334a3479606180f520d10ae5b1131e302d45fd..29e7786c443471429c1437cecce8d9b298d6aa55 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 89f0ac592d707874ea049d4e9bee4ec1243a6de3..3a762d17ba6c6b26039426af677cd9fa31a5f4c1 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 27af9627394a0070c644f2fd4bed123b61b9e741..30facdece3e29c16d4e54f179e1aed5fdb24a0de 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 4ed63950fd9d6934d1086c32972db9115dd21844..7ed4452e20a9c07add1692cf1d5e10fd09a4c4a7 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 4872931eb118a7d9368bb3fc47de4986e927ab46..3aa5765139d8e0a771691ffedd24f7a52c2033fb 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 4e151865fa7ba730f16be28f243ce80c69d5b366..b9b8142d99a3c58a9ce8e41560a93cd676be07e5 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 982e9866d8e04f7bb4b0d1f7d76f84432b658900..e6b7e75894ff18a157c3cc1c80e5ba68c158065d 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 870f97c79991dd9ca093bced9a27471c32192fa6..cdd9023e860a9b6a30b9c09cdb5fef4f72b7e054 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 d720bcd703739d73c701d8f0fb75331c751ccaef..1b274217408261cb7a93c5d8fd07ac5c8debba5b 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 52de57d7c7dc9b1e932310c42cdaa5c98549b7cb..c5ba22eed8f19feef19f4a2778b22a7b826f182f 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 e844ffa4d6b74c331f9e693bb48ddad47a40cff2..b6c12460b54a9ee37c25030ceb1831b531147a36 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 3f5d16875b340dda6cfc3e790443209725a54210..1f6bde5d762658e5995f5551530ff23573819791 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 477526f04cd9ce5889797de96892f0d8b256a2e4..f2a96d5b45f57e184336a292be77381b3f6ca398 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 f1b117ea1c6531958ab018c9bd22d4e02b230bc7..23e86f2920228b824f73c8a8a28048f3980ca35f 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 8f0dd304cefae2e1ebfdf673e95f99bac89fcf51..dea21c11ade73f0d2c692e2f10c0c2d95b6a3d6d 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 11ceaa97fa4f41b44e50ac340baad74a755ebe60..aca77853abb81bbb1873d472cd063113a2d23df5 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 663224454268ef59190f37aeabac8b38d5163592..51aae5a6857a76d9015a2f88fa926afcb4d97f00 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 2d34fe465d1327fa49cebbcaa96639618971364e..367fb62458a5c68af672582a04c56867a59ac2b9 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 3af4218381a177ab993d3948518f6833064798d2..bd3cf1a4cee19efb97c9704d14ca08ddd6d438de 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 1c314df256c919f6ecbad64a6b590704bc4b9815..d7c2074e9a895e27d0656b5c061b67c6a6a609d5 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 4d29c63479026e14101716b5f0ffc112d4d79cbc..2782e955d3ac326d33806fd55ba8a81f3236e184 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 bbd8b61180eb214bafacaa10eee46b2bd2248883..6722de0a33157f6cfbf3a2cbcd0217bd68dd561c 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 e7081614f597a1b33d092a93c530e8154fd873d8..30f172ce822cf3a886ce26dbaaffe084211ddaf8 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 4c9b04ca515487e024a156be03d3b0bbbb868c82..3900a73cfffbc25ccdb190df3f6c715061d64582 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 be6b7f9508ed319d4eb164f267e33ddff91455e0..0da85d36647d9145549559a67da792547e54ad55 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 b405584fa8a0f84ce976805d6ae0bdef0b5d4e00..560f5ee531d205c91fd08f5ac4ffaf1e0cfd4a9b 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 d6c55a80a7cee7dcb69ad25aeac65de6a14f6827..2757636425293693372a52917650a120e448c3ce 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 d1358c716079ae3e3ac90cd17fca7ea2f1a1b0a3..e2ba919fa6fd38132c4de1f53e0ed4d7df954ae6 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 69ab4f8cf05db05908ae48d2d96bb573e8ebc659..f1ad937405a36b902cb840a312acda744ee3a268 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 874659d5eb97eba1e864a586bbff5dd866bf25e9..84942c1ea72689d2591093fdf57f9b2ddd2ce0ae 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 a7ed770d49cc43e85ff0ca1e6b200f93ba811bcc..143fdd8aae4959e7b2a4e0ef952563ba0cb6d4bb 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 4b15fe4c30fb07bb7e1fc406c7ede47689bea454..26557cd32008aaeabfeff8384187bd0e8c7e6b36 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 13e22179f57aac78e603dd275337a2f7f7bc40dd..7b6369e43451d4b4e769011f0f6330978e2e4f74 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 8c7894a69e5c98d8b32658a6fa8e192d19a99ea2..9befd0719f74e555b32e3ff9d7d02f4607aac737 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 0422a1c2535be46e28f97f4ba5ac55e1bd65d508..9919183ad39ed74b388e43dbebc5ac71e237412b 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 75ee09571af6fbb5b024f84ec5787061fb4cfda9..e5e51d021b2c089a0d1acdc6d5520bdeeefa06dd 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 1fcd53af44796049232354444784247f00d12a53..8a1773defd1b8f702cb33631df0371853bb36a61 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 1c61d4a83e8bc8753594cf9f4f25bc1139f792dc..eb436362d384ad2bf274fb42aee58d103ef5a622 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 480b644afed5337bda4c132e9b449a8163a99d03..2560c4edee2e0d09cfaf2fdc1ab6b6beb59528a0 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 c0905469911c5ab585f0c9e194550dc819c3ee71..10d162e7ae11cc6ea9fd4df3d1ffff33baf366d3 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 a9c7bab489b28c1773502b30429d7726a92593c7..7928e76da723e575be74f534cef5a986e4964270 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 aeaa998e2f75dd864c78ab55d2dcce8075354abc..06cfabfaa0f7b98c9ac0c1061d12b64bf85c800c 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 eb5f9c2bf445551da07802dcbea2eb72ccdc5277..4ca692727b11eae85f1ce0c0d35349320931af45 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 bff27b223f5d48f4ccd938c24ac11e3d447c9ce7..5b0435d7bc395840ffef3e18c62857399bfd35cb 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 f9a6471b36d0fde62194c074ebe490c5acdce802..3c798e598bc5440a315959a7f7a8795d4026324f 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 163eabd47f55d6da52f01254f655ac30c032b9f1..8bc4e2b69569e55e64ae3c39fe897e2ac521e4bc 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 4826f44ebced70efd8e5789c3fe802afe27b1338..9861daa82d9e85b61802b01632314541b6b00474 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 83d043d62231f8ac3e324d6da14ad288d2536239..4fb38e47c652f5ba67e0fa2b0d88e39f18596396 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 9b7b05362c684f5cf8b9072016b0ca030495631e..79ea53bc1a322b99701a7c5d5646ff7f2418cbad 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 19319956ca134b1bd14bdc72f967507465c8c3d2..e71eed756091142a44c3a07d448d1b87ae056159 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 106cbe12398ad4330a5e6173fccf8787e213cecb..688cb578e8650342a1505f9096e48386ce49c4a5 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 e2f1169e05facd489a980d9f4b83fdbe89b5396f..0704dbc52d822c5f76a0dc16d6ecaa5001341277 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 85f2e23f26381c3012e9cd45153aa768b40552e5..fb689bd4374c7d14bb0fc1197b886e98b9b538e1 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 65b84ea060d1ceb71c728d11e26687679af2ce45..6fe964816322ad21751f1a89dd939ad911d1b4d2 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 019828d3713f7c0745ed9afdb5ff421e43edae9a..bfaa9aa63fa1bff44d54e194e8557cb6c46acc98 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 32eb56335c63b844b6943a859b756aeb53fe31d2..ff6ca7b2cd4f4cd56c4b7932d0b1652770e78359 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 4f16779f2e3e1c29e941630221979b30ff03c6c5..5051ada43d2fa614b8948cf044baa5b1e47269b6 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 f7cc47b9b2343886625061ca88dd2ab0bad9ea01..e7e955bc9631f8254fd414e2569941d34d4c41fa 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 ddea1e715f00f3c868be1575d96f630f08d39dc7..db4dd7fb77f5cbe8de92b956eaff2462a98cba77 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 68eb11117c2db50773805bc0068bdb15484dfc8a..e574f91f624cf1d1086dc7b2c53c6f4d7f8d8acb 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 aa3647422f837c885e0089d02d8f75096ec3a21b..fd0a1a8ac2a1f3b04cd3c21cc8c87df2081d3b5f 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 26bff77f743ba68e2c23bf6dc2dbfbf787cf1ae0..8ec76329237a49f3693baed8496c7a11120cc6db 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 9d3df883656b5cc4c6e2c76d585116595807155e..0216a2a600a392a3a8986c88d9e9e55778a6c215 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 83dfd6aae9fefe5363c9518e0633262c78279a58..4ceb108fad48b8dfab633ea13d06e05a3e339ecb 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 864632a0785160966655bf7957358629f5adeeb4..930643612df51157d396215c90bfbbb1c75c5b7c 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 02482de18b56bd44fefb34e55696c0a954ffcf04..0c97211b6254e84594713df9a22f12c5a667b618 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 3dc05dfaa983e76181a912e646e0e470ad2f4f6b..3b3532cc12d775740430d34b35265b47e7fc649c 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 cda6ee47440059599fc702a0eef0863d0d552d7c..aa7c90d191f49052d7627f302cb86f21b803f23b 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 36d8244252bd2984f12967589693fb7002b6c306..71de14abf6f97abaaae3a33719b26b1143605141 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 cb286ba821db1c297015edad7daf7be49b7b139b..b06e4c37ff617ed35261114a12b91618c6ee8d1c 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 1a3f2a35519f719ca9437f782ac2fb08593223c2..ee5ab5ceb2be2def5c864c3d638bd5625e86ed3f 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 97c69f522a82c06447a9dbc691c07b278eea66ae..ed4178155a5d6505821ed0f6b46743005bfbc53d 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 d0b10a2020ea6b776cff9307aa6a4e1019de84d6..ecd9a3b8754f636984c06e4a75ca520d5bd70b20 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 4652dc7dd6044041893d436778f18500b1b66819..2b72fa98ddf13ecae2420ae4cc320f1ddbf562b2 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 e7f66e4f63b5ec6219363f4a31f35514c5c7a083..1825f7cf5dc07f903fb300b8eb8cebb503e1b6b8 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 8fb6bb58b589d4b97c8aa6dafe0d9cac0c7316a7..6f72a3f15907944b9c9008fcf3a6e41d66e4bf63 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 f26233d4bcbb04337710654f78aba45e7e7386f2..b72ab9951875e66839340c668181468b6d7422f2 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 23e5163acc9a2878efe3e8360fcb09aeec888e61..a9cbe955e084f71912df2eeb89bdc015825ce6df 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 cf7424be9f4b085cf472ca0d3dfb17e02e8b05d4..8e604697d6c20d692bb1f53d8f33ccf639a95d38 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 43f8ef03b1cf67e40114a0176abfdd41f0493754..715e561bf8ca972a1116a8d0b0d2b7cb91c82e40 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 c6d64b46789884c5d773221c839895f10a4e65d0..c6b88909b6b78118a01fadc29a43d647e43ec056 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 a8b9c346c74b593d6d37434a98ed1faaee27319d..9e4983d31628426117c669ab8340a2a0f1bb0139 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 bc172f5a70c917d6f6292c6232d8d1bfdc2d46e3..e998627141a00dcded15891e362b8f34ec717f9f 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 8d368c90112204278078b7508e18a7639199891a..cdc38ebf8d41109e3680c184bfbc3b5945865e93 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 c4c6b3088a7acbdaa3cfb5060cb53705917aa0f8..1c54f50d0cc5014e3bbb1134d5f9f6332aac7fca 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 3d1c94d2d9995d28b03339866dca123a6eb111af..acddae68947aa468f3eb2c9a26d112747d79eb3c 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 6eabe78c938acf8493bcb9a6b745cedb7a76c873..3a8df7a180427a40612ffad0119af7a2e024ae11 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 1608fd0a582be59ac04d37e54ad02b630f706db2..a9557356c9abbefbfce956e81428787f2821857a 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 beb33003fe5435b581f5d2cb2ee0d706e3d15ad9..45b342ea06373b0498d50e79b885a0dd6de9cc86 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 029459df3343d1e2f3ae3324b37ee6995107fce1..8837f44fd06bb86c359ff192a508c607604eb276 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 cc771ee9bac395b0e0f9ef6c84b6818a6d635720..22358b2c2ecd9bde4aad6f1561476c55dc03daa4 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 c9efb948f6c70eaa8d718614844e7d60e19d6974..8d0ff339ad088541dd3ddf5200afce62c5522134 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 402842e0dad448bba355e7a2acf23a62a777e312..1f26d89fc908013cbdf9a0e8c4d473e5c33c74fe 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 9e8977f4f072c02fbafbc2ef9f56371652ca9e27..6d235c417fdd1ac24474b7cb624055d9dc7d7410 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 467211014977f27804fdf2f7d22c02697399da10..ef98efc8fb1b2bdc89f597dea9dca986c73a0bbf 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 3f0d093f2c5e1cbbf707b06c53ff14082c5b5159..3b8ff0744e7c5912fd5f4ba7e0b35585e6e97264 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 ad6f5c40f23d0a314c59bfe12dfbe0d4e4666ca9..897ab65b71aaa71be1c24248c4868bb57f2e61d3 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 5f37ee7b9ab15f7e92bebd831f337baedecab219..2d0811be7346287dcb624ee34eadc2b13308b8b9 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 4e23b292e4df1904bd751f4302b6a99891c884b2..7c662d5f2b72f4bfc5e0a6c06f93ce7ce2df165a 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 0de3f5de237e2a70b4bb2f397cc0b6bb8817873e..d7979d75b073b8a56fe33db315a7b3365b7f91e7 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 1c49aad5d5f81993d2bc9832b6ef48e9b39a47bb..148c110c5a2bcfc72a0e13506d4ab68ea030b48b 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 ae9a63d8128d3d7953f61ab3200f915e5ec2c6e2..4e511f8700a8abc1bb70acd441377d2f1362d24c 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 0abf519243f570a51ca93ccfea37b7c11fe71c65..1561a601c7f2c91c43a8391f3e5110e90dc642bd 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 db2e2bbab1b15efff33cfe05d94df4d3840d5508..1b3fcc2b335533ef9e7de417057ee08556aa705e 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 bf2c30d0f5ff1d8930f79fae158e59025ea408b5..ca18a4c7e14ad229f9d9cb09a87ceda296b3312e 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 1f927dd9e152dbfc02ff972dc1846aaa6bb26508..7bafb051d5ec9564af02484feaa570f147c6ef8f 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 b428402710512764b49ebde35250ecbcb24b9317..1318e94f85246418d6c653161e91daa79f91d924 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 95b5c1cfdce41f628c94fc066444f3334284adc8..da1b7ce8089e219fcac1b4ad7e265566bca1c780 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 6af080d0f21b4a2b23175d4ef4c15dbc6f11a6e3..7dad6d3ba239224ddb006f4363dfc16849b0bf47 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 dc557ed8091008da507b400b328227f52b43bc08..c2f2c118224c603788093c3adcb728cd408c9abd 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 f0b902d2ecc1322fbbcd109063c3f7e241f1be93..dc7b617837ef0402566863dd71038d8a012b8fa7 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 9134418ca3f214ed6f8261e3f6af826cf9abee98..45c572460f460f7326bb8d4880b9f55ee1493ba9 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 851a24641c35d6b1c4913eb8d670cb6805aec27f..527355a671b64966fb34789bc85f3bce9a8a6e65 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 c4e75cc53f64c1e157dfb4f120936d5c7299ac5a..d316b35f404b2fb52fedd1d756fc6af62ed67bff 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 afbefc5f49bc5f3b724ffc2be40c26c50f19bca0..b6bef092f8b803bd5c94beeb9563f06d94fd65af 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 9bd8dff3d35a6a90f076de9b529f3cbf24c2e8e2..e0b51438dc9b17cc06652fb3f8aadc4c7fcfce24 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 c1eebff582d952117863da10c742e0cdad43bddd..e35c2e18518f0c581a59fb47b5df67a7ed7b6c16 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 20a7347fa258db33f202b03c910308656197a47c..405e7c03b1cfe027a85e4e5e85937e412e2b5a31 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 1bf73073c814e6f3970a092973f6403c450168db..57111139e84fa997f1947930a0eb846103eec6ac 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 62fe19dd28093553368565cdc26a88f4270a60a4..9ab3f61196a346bc8e2347139539f2154a34d82d 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 1cb21d74bb56fd6328abeefbcb02b164f564f050..3088e044dbcbb23d5d14d29db2d44d05ecf9a188 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 efc1ad23531867f8ad0b3b6cc09897c803b7505b..5e43d0acc86e6fa5ce951c4242e58d71be7e969b 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 7fca8d726aaf86b069e447abe43402d1d5224b8a..4eaadc711c99df3ff056876cf4f82dbe7740097c 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 db09382c38f3e7510c5be80ee617b85bd2927dc5..4b3f4f11928d466269622c04cc5a8897db104e0f 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 f51a7de9f16a59b3e1a6f7ebfa22c5b79e59ce0d..31006ce56832929e77c28129c515e9ea5b31693d 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 98893b269679a26f4bd059b622bbe23a3513c9d8..866641666e410cf0bef379351f6cee2a39ef30a4 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 6ea3b1bd628013a05090c49f01904a8c5190da0b..f96adfd5b21973538314197b82dc2f28ddc85dd1 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 692d3cafa16d84d55c764c5409886526a24a153d..a197fb98be3e68a3355933631857517b615f6e64 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 4ccd5294c545cc6dbf54212c1dcce923a38a9d05..81c58b1ec200fe361c1b72ab4e9682e8b6ed0578 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 49575cb2a2dcd465af3233b2ea94088e43107424..c1939b88e75bf6e4de05d9c2e0666bf64623f8db 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 c4d28987af3fec391e246ecb834d61b53e448c9b..cffce14879a62518447074f4fa26dd67a6fe086b 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 e52d4acd1310726c143695d60ea67cfdd913d6cc..0294fd97e6db541104c6278d2d10affcc9b34c28 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 87e60297395b14425ab3913bfe69b3b3fbabcf12..385af5e6e6d0d5a00c70728ed35311c0b0d56484 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 17d39c2d454bbb5f390d9632e3625a7358e0c8cc..e7b35019a5a7d80325de199998ca06314f15fe39 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 f58cb046e9ea301cdebc288e1af491f7a05426a9..7971339e269f430290f64854d4e7bc1a9a364890 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 c0ae52880b2e1762cbf8124e2b6667f130dd079c..6305b96aaa7331a17bffa1daecacb0404d521346 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 fc9167e784be022ad63466f1fc3b69c32942658d..48434292a39b53840162f3b0ddc9f269056b6afb 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 3da2f768f2233e64b1233b5bae6a81a4d7c5e8ed..1c7624a6cb97ad302f1c7f0db01758f40d9a4efc 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 042f8ca6a463111a0d6879bf2ba9239a25091e5b..c3c4cb6704d13acab40d8e75f1ac0b626812ce4f 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 9222e645756f3be5b311a4fc12c2ba9789161b69..5b0987ccc27022120028ea45dba34920589b1914 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 564ff527979782f41de11da774ec6d5b0918b123..4b7c54b76228695c2718d6a95a12e270c06c084e 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 fdbb8b0005f211a4733be5712140eebe04ea5a07..a496075c0d2a15369575be0dd5caf399699cc2a7 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 fa75eb77e0cb545ecf94cbc6f55cfc52cbed070d..1c48bf6d545794801b783e7ba69d09ad0e63c8f6 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 89a90bd90c44e65bf3c58428160b05dd600f8819..667f2c8b9594af930fc7063960471bddc9a8773f 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 477f56385e54adc5a67358a0143e3a8590c8ab33..d3e7a52c22a7613227e023021e1b2da8967dadd4 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 353f9c6ef214b5cbdeeee3cfe94678ff09c50501..b9adb34502bdac2a3bc8b775228626f2ceb4a967 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 9f2945de0caa8a7762eedb4416fee3913d47dc86..021009e9085bec3db9c4daa1f6235600210a6099 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 4d5b12ba0eff9abb7a33cf265eeb2bf0ef2b84a1..019a65a5283adf316a49113ce9604e350ac02ccd 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 93fab4fb2adf7a0410c6126febd403a0786d5e31..c0cc6cc0afd8bf3ec0850286d40c59c8d3f054c3 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 e8407338697cc9da474c3c3d63163b736316587c..e5a02c2990d01793841533d6be71c042a98b6171 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 2ffd47b6a99703a7d7575029878d6f01ee5d85f4..fa223949eac01969affb00f40fc6b8983e50feca 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 2fa8ac601778595bc4e3a925eb0dd4c7bc5fc1c6..644d3679748d43d1862a66802a4a296fd31e4392 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 174a8fa911f053ea074c2ea07a5fba0a688b6f44..5ab239f38588f8d4286b52bdec3ba78be773288b 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 d3e263fedbca6f110eee8314e21d1282c1e82f89..85ca8650adebf0a9c45a6c4e35b2b762fdc04ff2 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 ef7becf744da6234b530bf479a17c6a27407131d..45ec722d25ea696b2c14088de3c4378ff919d02b 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 40d640dedfdcf139404fd664cd4d655f4ba2b0d4..c78f74b8f45c88657c69158fbb070fd808faac99 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 6545ef855bd1992f4e5c9da4148959227c29c129..da6599ae3d0d825babcec21940412a8e996dd485 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 fe1ab38b7b6a29528ca6413e4b2e3b0951b3b520..2fa8f7ddb7031774fe8541b71fede2e068c47c73 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 6c264def99119704499c3587c74a277ae01f1f95..faab6fd9bc2949bc4b46b581d39e0f7e0ddf09fb 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 c2f2c383b1f4a282ae280798d16ebd7fff796d6d..26e0ff380860dbce0e11d3baa752fc2f01901336 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 d8d6afed157584d8e2ace0873188c4d2a7a64782..9c7a541a45235a597468d499f730f4de1d0f6739 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 3e201f2c56daa6d39381915823db9b11c03c41fa..78d5ecd14f656c9a47feb22d193cc0854b3870f3 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 fd9a980ef50268dac69a8a63382c3fbebf3bee9a..1838032f648621a9e95d4b9595c09fb7e3275136 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 290d29bc9682a6ece26a4964628db38316101f0d..a895ff0d15bad4529d99572088e0803a7c520f77 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 e47a954acd439bbc234bc6cd6ce80f6000854a53..5d5d9f97904be5aa2610b7f3b09651f4b1dc86d7 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 c93dc8b4fe592f10e017b9cf115c69c714c48c1a..03f78c07f87f50975ff26f87a8644b5428faae7b 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 a6d936150b3108f08461173b32238fddc16dac19..cee709617a3130ffd37f1b27032b6e36ccdc209b 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 ab7e871b679dc3753d17289f5eb3a931a27c2e16..a25a78a5332d66874cdaf16819193e141198d35b 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 e13abb6f925cd56be0acf69a30e65ea9cab17ae5..d07c2786cb1211dd5a7653d20f265cbfadd67a11 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 6f5e5d1311e57d4cec5a601e6fdf7858d64a8c4e..057a7910c570a590fa691f79053b5184779bd896 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 dab6b288db51daeecfc85adbbb89430ca00bd246..1cbfbe44cb7cddcf241a6600f03b015c0a537376 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 9572f925406c0c8919841fd54a7d780ef7126912..f4eadc1028a9a6cb6c2a58ded68f3d5b455bd4cf 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 1532183897ab424b893f520b1c11912baeab054b..538da0e98131a37eea7ea81a51cf9d083b726002 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 5b18c7ac6aa23eb1ddae485792ff253ffde02a63..c98064200390a36a9dd2910d56a12af01d99d7a3 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 f02c93d6a2c97b31d6869d1a51addeb00b3d5c1a..2699e4e09b5bebd9462bba17608ef4f5d2ca9a7a 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 1b938359df084cdf4118ba3c976c77aadc9e9baa..07bdb95dd7e239bc25e44ca4a72b3ca75c8a09c2 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 be4c140789526fd618afe8c1b426152c870009b3..dc23efc797414e9358afe2cb0677d0ac68ac9423 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 8d34d1ca386624d77fe9901044f7b1e88e016252..06ad016e367e1f5c7aa1d754c9e52e31f169168d 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 111b23875f4d067bf4cada16d34abc13643ee3e8..b2c9a3b0236a100046f99f9a689dcf322cb91649 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 6407d6561d9e13a2130a748d501c2e4171e669b6..3b6e17e0dbfa5edd59901b41c82af7ab94a3cb7e 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 5fe066a6c37752de40c14dd6a957e54bd4af9825..e70d336b4ab391e47f04f484f9f60ea478659d49 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 af1a34bed2f123da009bebb3b9c67f2a9ed8da48..a120f0e37a64410b20ab06b73ffff97c5c144e81 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 f1b6abba81e600f2e642b4a25e4ac447378c20c3..da429b3a42838250604156b489a08dda8052fe75 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 ddb061ac300b3a66fef7b67735a29874b9777ecf..d5e0b3d653f5c7ef921ace9887a3a04ee9cf8270 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 5badce1b8ff58734ca00ed4aa7659634c1cea92f..2493b720822299ac8f33781f32e1a97495669e24 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 bb34a3a612cfa756468156fce9fbfc542d358b98..53eaff1e0f65c4d86bd6f8595d1f714fb7ac29f6 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 6117b516a23a6fa61dcc6ea6ef3b49655e043328..33776330956c93844764afb472bd7c49d8b4d9c5 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 6dca934b033a2795194c060540e5002422666eab..c563133f751e8f015b1312965a3f5e5b3d424bea 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 976181464fbb14a24d8963f5f712772266b09b81..8dff710073586d85b0a4faee79eaf35350159780 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 9c9cb5c97f5c6cc818772644d3009ebae9edf8cc..e47da45e93a0116a857559fe57617e23cc1fff13 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 91933d2f5159b6ad00d0b5adf6eb4371d0d51b7e..1515495fd9ea7e8a66a77c935ac3d5280bf583a5 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 c096bbf68b2f6659e65b991b3f4450a1e63050a6..35101e9b7ba74ff440400d1b6971149247cf7870 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 2fb918677eb602b9c0308bf450aa46503c8bd8a8..5c25381ef8002aeabf17f7af78c7b5bdaeb320ce 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 b6da5cfe444f52b4a799730281ab1e97bc611f9a..151cac9f9c2a0ce6d50cb6c69f480128f3c1e887 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 ba903569f88501b47bb031343859c0a07df5c8ff..72259f489075f226a02195af8400aa855fccc1eb 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 a3982a8dfba8684a31c7aea06fe1b1e3f73e483d..7471dc8736e63292c0f57be93d58967e24840751 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 7db37f044850fa8f4f8525e3137b9c65fe864244..8e419ddfa51616a9d8d378c830c227fa98f9780f 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 c2f405785c5fba5ea4ff71c9d61f5a7ab3e95f89..b9ccb334389618921c1ba31ec2070b894bf2da4a 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 5b4d84ceecffd2a0eee2b3897bf4c38df276bdca..dcd7440e78fa64e8936eecef098de3d1e475add2 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 87bde136d234c30777cd57068feeac102025a043..7f01e43ae978a299c84a27c55e4833f67a510b6e 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 e180657ae231febb8a775b021068fad3a128aac0..ad48d67fa9358b6e772e77616db54f33979eeb9e 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 63aa37f194908c372f9d82805d0a3a414006e0a1..dcade7b99cef18290d1a937a0fa8d4fdb3c943da 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 ea5c15191f237f066e137902a16c79de8aab4447..05bbd3795e7d802e559bf8a85551712f5b0cd380 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 9efadfb7a74f6dd1996a874787d0e31319132972..fa4c68049eca41b9c00d9791692392c5c3ab2ba8 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 aa93af873d632797a904bc323cf59a14d5f1f851..cab02b5da867ff6632c4c4f9adc15462e6240512 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 c51efeaee7073bffb59b6b016658d037aecd3526..5d180b0f8e4cdbd5eb682958627fdf0630130f33 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 a19dc99922adae81f1bae8ab64710c8358ac5c99..a7f22de1c8899f49071ee88d2e41b94f976901b9 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 78ea854d903daf5c3e6ffdc689af07e1632db552..ee7ea04c4fc5ada9829e52356e1e2896876b50d1 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 a2a8a46c628b9ba9a62cd76ebb495439574d861c..57ecf5549c23d59fece948ac9fb54fb215d5a955 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 424876311da5f82aa895145deb2687814edd0ac8..fcebace11daf6c3f7634da99d2d59254a3ea9280 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 356f3f5ec69a56b095ab26bcb1e5d1d78bc773da..4cf3486646ceeaa24c3aeacacc46bd76e92adfd0 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 c50828eb844adb0452a66904fb65b73e9b600843..3c92f94497b47e73db66d32273f20b421a1226bb 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 24e0667483bd7b4c8295b8a156dc8e5191048ce9..f88e63aefcd84b5fbf7668df108f62ae712ac7d3 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 ba9af41ec8b52503404f0af20096528f09c73852..af1f8ead24620c47d7c84f300eef441f419a1add 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 01bc8dcc22e78e1962e4094f34ff0d4ac1ca4850..ebba200ddf44577d2e34fad7bfcc6fb12358df9c 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 3dafbdc8d2c21751d772d1f36bca12eeef837d83..ef9642d726728d563f4ef2163adfaab5d9b531b4 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 35df0fd5562fca93075f07ec1c55c5d5150999b4..1a1a95b3940538b9022fc2983ad18c5c4f338ae6 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 014e6e5f0e83af95704acac1c5521b8e9413ddde..7af160ceb634e145ca4f52e4264c367e7d381d41 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 085a414d874b9d6e0a0d5c1719076c8b975e3305..6ebb83cb70b2f085337378ff88a22b4d2612f307 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 b86ccb5b53fd18722992ec480a9a73166cedaa1f..e5b48a331c5833a05b13eef1c9dde8b5b4c53eb0 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 c587ded7f9a5146bd604f593ec94af037ee387fd..12d08de59095a25a5578a6410944f5b029499878 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 37f3ef4d041d7f0a0e2ee463fab8ae4f07b409a5..ad3a7bc31d6ff86a7e45c8928a5e79337e948c3e 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 8c665fc771dda095457ac4da456efac36fab70ab..286871610c39a92ebd0dce378f1a435b3adfed61 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 78bb2a5f1cdfc9812b4cee6a8885c35e01b1c78f..487756947a962972868fb6fe73c2fabdc25d4a43 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 0b9a19afc3e7172d13d76032242af0eb21c95c06..a5d0457e0e2844049ffc7c39a874a9337e046528 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 dba09eb91f3828c455fbe44b81284eb0ab2e1e59..13bc048f45e869843b116dc013f3d2259fdecd24 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 c0e2fa2bd282c7d6eba5b414736211dbe78ee41a..dee842ea69311dd66cca406013dc40857b9aa733 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 218c180980f77e5f2e4513c4b93f0517ee553e1f..4d9e4bd700d8996516093b565dc966b4f3cedc4f 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 61ce54c3392bf7267530e5e4b955ce78bf1e20c4..4c663431e99f25745d68cf909da210565a62aac4 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 51602d9eca022b29f59b6dd5b8cc6f6994a9e3aa..438201dc96ca7d8eec1ab3cff6e6a07574b60058 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 027c3798a581a141b044d7a0b57ecd96613bcb82..433d64a5fab564742df5d00c61b55dbeecb56214 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 e3550acaf1a03f78b17e0026b52a5c389462c07b..583623cd4d8fa66897ee8c448d83653ad06f7f1e 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 d847498299638c937d52dfe3796f07ad2cabdccc..687f6a8981f34f8c0d972e916e27445ef4699729 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 cc663d8191bd2e2a719513f2326034fe88011abb..c0d0c24b074b074966d56680c2b95951fd4f4019 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 ba2c1e549968a72a9a6e6fe4afbac7152666535f..f38a4d7ebc4243c92027bafccfe11f8341c228ff 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 f7929b4a43a415cc56f9a8d44100889ab482c545..bfc10f665e52a767f0cd51ae118d3c73bf7d939c 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 4acd612858859c86ee9e6a3719bc5d2a3f69a029..8425ad23b961657dbc86b4f027a6e398b7c5e4e3 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 24b4fca22893cb403efd83d1377844ff1a4d6d50..5fbecb95f7ffb5d13b31ef72f274799f9febff82 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 32573f6e8cc60ca301793588c31444d729eae166..08488eda2b3b788c77cd53de6ea513b95c9eedd9 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 12234538254c5b85938f336dfaea2cd6e31cef12..478beafc6ac3f2b420c4239ead6bf6d2bd909143 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 9b2e888a533c4fcff739dbae3f7cdaf69dde3ada..80965181920c363da044c1115a347e6150cf56de 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 a3e7930e1ca55857de286edc04128416b5db6f28..7c05df14bd4caa3932188e40caa85e658d4a77fb 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 12d493eb8bce9a8a547ba09191ddc32cd4c9476f..2f2c45d2088320a29ca5c7f565cf42d6fa37b366 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 990e8038ffb3e1b3f21d57bfd3c5e8b564359307..866c1165704ed32c0f57734b823bcb7bb764b81a 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 18cef14e6d4cf92ed834469da11db1bc514e042e..694587256e065857319075769f54935a3843c33d 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 0fc5d43c58ff2916a743326a5889f0a3f8e7a651..c81fe5e68e424ed1cb134de017a1c8c0b53a35b3 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 fa0d105841b3841246fa0e3964fd176662851e51..5704f60e1741b8e3cfe5b588af4c050d3750979f 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 db14827aebddbc2dfccd2e5079d06acb0db2a9b7..3c6a9b5758d95581c5a9547bb433ae930a6fd6dd 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 610a355dcb05f17af1fa87c610b1123fe5fe3f8c..88667fccc27b9766124c1b940f6f8d729fd27b4b 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 c1d0a495ea1cd58dc745438c42502996e67b6ac7..d3a2bbed5feab20b73fc234bf3b15594a003f4e1 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 757cd84eff3bc4cc35df0922d992a4ec73de37fd..5bca500a83e0557e3953bc263746e055d055fef4 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 e96d32f4eef8b80d3ba0db238f48eed5dfa6fbcd..34b4b982dbbd3598a25954e039629c844a0f670e 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 d3bdd68d4b6aafd952881122624bb0a399d59bea..da97b6a988debc78db67228740b3998d4928e386 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 a16e21d2ca9180f67f49018039f0e7f48faa1d1c..61ea855c45087efe4ccc36fb7ac07108ec0a803a 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 908d009f70fd802b6181a52d01535cd140486736..97e27f754d396a5b3845d7d3cfa096f9a8a6be8f 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 d7effbaf89482c35032d3f03e9c8ac0dbfd08c6b..a395b382c6497a36086c9fde9fc5eac513109a14 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 dee1a05fdd44fdf656ed87fd312ebed66af5aba7..3035c7d0f1b77260ae39d45a96432f95e130c269 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 d4eaacf80da21eaaf40ae571705480c94207bb91..a07bdd1aaaa6097905a344cda16ae43aba0aca52 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 d9154b2f870ac6bf680ddd567d202fd7caaaa45b..8e89cc5b282004f17895e9ecc2063ff0d4a61c4e 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 2bd0178c95a239db0d6c0d60b8490d932ae8cbe4..ae2173235c4dbbca0910705c562334bc6a058247 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 fa177070d2d00cc33a55237f7d9bd1d6b7c90f61..90e50e62dd1725e48a6bcd546bd3c8e9c79a99d3 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 a27db827d87bb771198e74c51057586f8e914307..39930d99943c1ffe2c6f89879a8d9111fbf6cd96 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 b251fff2bed05cf67a105e01a168969a37e9667a..0849eaf583cd2764efcd0de2a52dab424c31b7f8 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 55b700517e9ff448d7a6a1170f717c03cf67156c..29df8aa19e2e76ea10de4b67397f885398b212d5 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 211aa9336e5a48f7215c66a8369ddb4d845cea54..c411df5d9dfc7ed6a1eb6e56f7cee02642f91355 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 8dd9e39f8ccfd606a38b493467bb2adb747e962c..3a32f49f9dbd19ec66f81c180effdb35fd867e99 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 b20a6eb6822b73edb0b78b01a260a95b0f4165c5..603f2641fe10e558d51a87ee551f892dc4cfc85c 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 2dbaf3c01168f787fa7572b0f64ad45ba7c03f88..c0022f0bff8749badfe80d2a7628bea5ce96ab1e 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 fa4053f9e015b3ba58fb00b450debe00b07d57a8..642e3d5694972aa5d2a51ac500da55b650dca843 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 0fbd9a47ae67c0e73a033650625c235c89412d3e..cb2c529a8f1bea33df6d4135e5782b9a77792732 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 d0b689ee8d327caf6db43652e4f1593f2d53079e..4521a7723f306b30eaf76e00ff362ddb243f742a 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 4452e6837b34f6766a6074f8c7aab37d25234214..6b4f68593c291bf9ec22da43c0669f3d289217cb 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 d6707fbdeb505677ff37539bc1e4067a59594273..480d02d6ebf03e7fe6dc2d62347ba3e4630deee0 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 1d7b50c2cc3d8dd7543bda04a2b5a17c553c8dbf..6880c5c520e75da7ce08a107546a66eeef5110d9 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 90dc841c2157e5bd8114df2748e29054ce786aa6..74f50670cbe7820fbca5268d17ea046bea3d948e 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 ace7debb2f0de784c7d0bcefa6a83bdd7342df29..fe19495783367ae6d0bf5c77681a0903808705e1 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 6a0c038dab5a13322705bca39e89695548097364..4c86a9d468700259eed137f97bf847973ec6669c 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 8187137b8417849860da2790b3d893362d174f15..3aa4a082ea03310b46d9a8d5678ffdb6473dad32 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 c54266c75eedf4be3ea3ef03fcc16312972747de..5dd2708cce947aa0b2ddf3b6da218c3e09d19746 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 c1cbf2fd1c0f0c5c21cd6729abd99c3cfab5775f..d1f895e57a95a7043d4ac3fd8a48c025af49c1c8 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 57b0af64cc1e388ff82a4f3e932a91db62f465ae..e0244dbe44291653296005a48bf49505f03be100 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 aec6f2c524081727f8ad4752748d6cd1dca0f255..22cde46309fe05e63c350d8a37fac66f804fefc4 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 011525a2cbc80f75198444ed2c0415ac50ab4309..abc45f860a7326e244c1ed1c070cf884fe89e361 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 8604c8a2d86bfc2d9ae87d0009071327625b365d..48c6cf584447238482b1691087bfcb57cf358417 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 9b76765537517708c4fcac1f6447431c392ba237..e83b2ec5e49f81674bfbb5e1fd2c65add32cda1c 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 24491111477a2bb3bc3a92bf7ca0c71e3740d7a0..da68702ddf6edc6a28440490be07be7eef2d1a4e 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 80b3e94f3fe337e7d7e3c5b22f55245f872e312f..3ece2da55625cb9a7d4d5f46ce00dd2678892356 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 33829e4a4d399873607faaa1f5bfe942f95e1b18..1d19b1be207a7dae423335cb7ce350f5c0856ba4 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 46dbba7b0efdd5c31b674f879d9ad3323e8c7e54..8fa22ababd94330108584279411802b55fbad053 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 96a8647a0074b1d58c6cad7c037f9646693529e7..776a226fc2375f76c695fdbf0cfe39e7c49e9c2b 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 0af32c78ea6997b7b09bc2be2106873c579a6885..8657e6e0c224a219b903ac2dbb34f5cf3ee1d64b 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 5d1cd7d0b51a01e2a1de963945dfe7c04e14a602..7188a12dbe864715f776c698b379111b96d41514 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 6c1acf9ba69b28801a8f03bc00ac62ea8f0e028f..16adcbecf8756ae34cf5ec2b02dd82a183488cce 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 197cea4d1f2606f6425a1aaf1e5643d0331d63df..9279bb57586b1557a190ea8b246c813df098d012 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 5a812b510d5d608e3d5544df250db6df04f945e8..62b1f3ac5630e46610c323ddce1e24a9ccff857f 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 b44f5ae8958e39a6fb18f6af2facabedc9f5eac4..23de3719f49527664127a8290b5ed13d0bf2be0b 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 a45cdd05123b08bf862f18a05afeeabd3f55a2c5..73ea180cad555898693e92ee397a1c9493c7c167 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 b3ce9bb0b9718c98be07af081cf2f4b89256b38f..e0a5dc86c07e971f0b77590158cd505a38943926 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 23a7d7ea93d4e126fc5a7802af731072900e2867..5bea473142549b907b02da52e0fda3e94d5b5230 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 25a3e8ab22cb8aad04b6e24d83bf33bd07b1de77..bcc6e0a013eb839b7b6f86aa424e7c8f5a17129b 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 04736a804e4c68d814d4a76c0fb54be29c94b13b..1fef217de11db17f815adf30cc6c428befbf64ef 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 365f1fc1f25631f01e2b4fe06eb9ff49718373d7..33cea5f3d28b2797327ac6231eb4abd6258322a0 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 5a12d1103d33f5eb4d3fcb1169478c341bfaaba8..3a0782e576fab71fe88b9417b9c722094aec904f 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 f2e7551eea3f868c3582ea5f9b1a3f6ffc844e30..576d1ddd736bff3c0d1cf874b91ee94059c7c713 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 d3a30b1705641ba4f70ffef1e377cd7efd370027..596f33ec2d810f5dfc80d03482cb5e34113b988c 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 862835d69af16c43491e823ffe9208858ce1e88c..729b7ffd3565b91cfaf6d24d24f07c3b830c208e 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 85481c3e3f2c86855d07f5ae473bf183d16b2580..bda71ae609ff3d13a5cc64f6f0b7552f0d260eec 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 631df0614331b8155f301b702f18a91eeeff47bd..986f809376ebdecf47afc5bd94df30e922994bf9 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 4a33eb2a1f7f59d5ae6b56a1bc32cd29b40bab86..0e5175f1c767d81394276559b9610c24d854f5bc 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 1aa561a055ebcf820e652b0c8bf8677a176dced9..a6cdf3674bdc528f2aa6bce08274c85032bf4680 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 a94aa1054fd829405c6a1306b2488429ec459baf..94af29d1de8887135f8466c7c7b75121a45d273c 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 66ab920d8f50eaacb3f6e10dd67ed7a8b5518070..25f097cb1685f555ae49610b2fdf0da68883ce37 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 e80e516bfde952af1b0835da636899620b29cc09..f70e2ba0aadc0d9aa8bb90c965ecf6eab3ae6a22 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 2e2fd241dd19785fdd6e5d6ad4890fcd7bbc53be..5136b3766c44de370c9b7ba6907adc69e9595de3 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 27e5fcbaa2d6e99aa93f2739454342009ebf082a..6ff4256700e6029dd10775191e9c83dfae58dae8 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 da0d231e19521d6008a55370c3245b3582525d2d..f23cea9e1aafb1e98a17f75e6b9c10ce3e2b9d45 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 c0a9c5b3c977254492772a734241145b35576837..5071d7fe6ce2a5cd7a5db0112a17f396794147ad 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 4de15aad543b3cea363a849254ecbdcf0e60d18e..8cb3fc5e7be4fc403713a475fb3f86fa8fd783c5 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 6e62e80236a46f1b949714d2a0924eddd1bc9cca..8036e76aa1e473ba241f1f2ec37e038dccd3b6bd 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 a521ac0da2f75f82e85f67d425ccc992bc5223ec..01cb587866d8f8d02c6bacce565c6e9f46afebeb 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 3518c5f27cb2956e5e9935ab13ed30652e51f72e..defe6b30f18ff279fe97b1648a976cf5a25ee1d4 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 5696ceb09dc7baac5fef149e0491e401b89b006a..9f48b0f210e6e8a442cd8bc716260d63549170a7 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 25ff5148c926b0f9e11703e46d6d45831e0383de..23cc9b4cb2f122975e8601f83b36c168784b9041 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 2029d40a9d2c9161bdf05aaf13b93d7cd9f95fcf..9058e71241dc376ebff2581ba882357c61d6adb8 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 22efb399b5bc03c192626fa579c75cd014e1bbe8..b2e6c8b98381bc0ab5e6bd204c833f490f6a50e8 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 e05991ec49f3a59034df3d96257561cd9513eea0..005c1134d7565dc1d3fcc5c25478d17655b8d638 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 c029ff6b3eb295fb3683cd504e96e535fa12a64b..06dece1fb9ee5640dfab499cc5a3fc8934977eef 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 5efffc52d9815e4f54b3f0c9d794a75c8187aa54..dbc54a3b70743a5384417ebbedfd9efb4a1d1536 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 a3e818c7c0cf1f8d8ea9f53a4f2cece3d25e6f55..f39cd7cc4fb5ac7cb758a418d0e660720eec9e61 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 8051e3127d2c093be05c5e5ba6ea89072fe6b964..7c9256572284f81ad866754eec466998c81724be 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 bbb9b52861c06a730f373ea6f05e2d62a52e5ce5..e209099218b410990274a67977f2ae08f914de95 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 4b83512cbc65301146bddf19184930e3c2182e62..23f629e94a36ab7eac59c235135eadcbd3e386b3 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 753f3bb25970230f002e51d8fe15e603f0ce47c2..72d0935139f0f5feb00c051143fb47f45fd1f94d 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 8457ec7c3ab8f17a44a09c375a21b05fb4e51315..ac6affa33ce759e84634666c6077e30f7261032e 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 0206492014b7bf8dfa97e5469cf81a30da5b1e07..aa6465dc742c2db14558b4e678c71c7c51867ef7 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 a6729e87bc2519a46cd69472c3f5e5a8ab50cd42..343309e9009b0b3705a42ef8c4a4e9c8c99b6016 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 eec222908977dd3c8252e11f253727756c55fa9e..9241c025aa741964080d895422795a7396ffb543 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 7c7a068513e79aa70aa05fd28aa0faadf7499ea0..a01f14b1c21629c933601c950d05703d91c88e8c 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 16cd38a179e5523e6772fa073ceb36984ccaad1d..8181b52dd9a8aa5ec298cfbd523aea6ad1cfec9e 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 a386c40b67da53ab2f294c31c13d6d7287249f21..95e5d9bfd9c8c0cac08e080b8f1e0332e722aa3b 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 4dd8379c97b645b13e969a02505504d31757519c..0ed199fa18f04a06197116b6ab64ff3647dbace9 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 ddb18e97bb91c57721a2e95035a6c88e7c6b2402..b83276409416fabeccc441e5127211632ddcfedb 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 2e42a6801d5b391ed6804beb93e8c9279168d0c7..f721c03514f6008ecc59fe4c4ca4a082099dc125 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 b423abb4210dbd216c8ca4b26dca28ee1eae9bbf..c9f999ae10e08d243336d05e35aa1b5eeb45f920 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 932908c1ef67b3c175010be18d0801b48bc4fc6a..9d3fb6848f400131f1db7698a80f03fa053fc601 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 9b27b533a3c056d1f750e687e4282c5b64b5613d..237f67a5d004cfa2a44fa056221c2157c3d13db7 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 d7845650f0a0162b2fc274bc999502e18df7126b..f28c6076f7e80d1655874dd942998424aeb138b6 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 f64f03ab4933ad749e1f811cd745706af6e55a21..2a786c56c8c59e31ca48c48804409c94bc52d33a 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 1c4d298a9eb3d2f9056e86e9d76de5416328e41c..5ea834414ed5da622357d85d8af915c76d81180f 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 814992861b4ff276e06feec6d3a2fd24045c5f37..2ea72c64b405a0877a2f4101731427aff18aaded 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 e8a62743e3db7c209da7b5f4f03b9ad3fa95a9c2..281e7af2c50b32b54eedebf478441f26aa19925a 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 2b7ccc4e385376b0ab4d8b98103bf890117699bd..1769417a996248e559ced5bf80698fb6127df7fb 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 7d63764feda2e733a57c507758695c6622b503e8..bf2d7ba4c14a9c948f76a82e8e14394e23b9b687 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 807e464340c7942c9000da76fe81b6abad09be94..67a903081699158127f4f6cdc13700ffc91fd283 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 661322ff16691205c81c629eb229413366f3aab0..d3b410d04c2591ec797d66535391e441806634b1 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 3ae8408cd3036b244a9344b40d3632499ef6bea3..04961c456d2c5057d39261de2d555121d47ee417 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 e5a0e3c79f7e0e037f9f7e7f6b0a41c2a8e5ee3f..14b4a390a2192fba18b8d80d0f050ad915a0a9b0 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 48b0aa0c33956220982e2532c5ceab7f63ef4241..aaf808316c30d4474ff393776041ec3fcac96deb 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 114ebf8c3a516cd5ed83fd4ecbf38671b506ad9e..70520c7ca293aba08fc9fcd9ccca651576a866ba 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 d337f5990e5c651067956698a666d14e8c4c4aaf..d9b94580704aa68eb9fed58d2bfe7b07bb533b8c 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 e4f174d0ebb10f925286facd09bf9ea5d4191b64..bf342a76807cabe1fe4e21d0e9e028a4b2dea153 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 ce76b8190b9f3149d7ffb9e4c1e29d2fe7e1ff88..3bc33c5617b2cdc7afa5e8e2f9ad0698ee034dff 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 a213e5b06bdba062767f9e0c59816bee794d294e..4c7506d49f55a6e9ca979ef7e85d61ba70d64519 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 09d88f22957a3392bf5cd13f6b25dfe33599a9d1..3e102538e058679710b14164f2204c07546a0279 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 f106f46aeb877cd915b29c7a43cac89996fd5c56..6fd4f629d1d57ddbae1f50bc124f53526d5ef92b 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 080c5fedc8509de4be64a8b3353a74d5d77fef12..77845b709e12f51f8554f7f911289356fabcd9cd 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 0290bf6b089df95c42b9d93486de4c9c9842cb70..41b322fbd9efd5f25b89ca0d8404add85be9e0ea 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 94430e87791daa6eac8b70e51e668ef66176c3ea..a6f176d612e3af862132a611933cceeba8e663b3 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 bf5f2185c5266884b0fcc6576fdaa10aac8ebe5c..8d91a0e0f112d4f2b581fed7bc9d8ddc65e8d85a 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 31799ca5bb0fcd1ecb879c188f4301852c3b69ed..056adbcd1ce89086f69a24b86d8eca44f45f80ed 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 1f890294064cc8f6517274d5b9a2ed7c683baf49..ec4059f381be3c72d564bcf11ec192f50a4daa51 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 b6a2c39882ac869f43f28384da9b3cde6436a67a..6233aa9f5bc6d86d48d793ebcbea3e6ed9edbbb6 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 e26aaea450d6da42f1397786772c5856d2f53809..5ad0448af649da09f818b657d09327c86106063c 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 3304d20ab2ade7d6403e8aafce507d65f451f0f3..460fae51c2f52f8b443114b759b22bad8513db2d 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 1f4aac4017cf8e973e7b48e9d4a44fbc22eff372..2e23848e1dce942e974867da571f3209d38dad29 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 ea76524d9b76e9250f89c44c664105f44109759e..1630a10c7ea3bd20c14fb54197e4d310da34a9fd 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 dac8e7ba5981573f7dbdee1575e968f51347cb0a..8006777f2f64fcd0dac70392eae72f40add83d6b 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 a2e9fef2760c1376b25d2993a0a851ea5a6921ae..8371e54314b453c5efb7d891066506d40d7b026f 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 c38903144c727671242b4d5f2dbfd077954b108c..450147b1abed5cc25922ff41cdc91545c3fdff38 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 62d1ba66721c2d0d2a6c7b17816abf5d211ca616..2ed01e9d79bb9057142baafa7625db0c3d054077 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 0e8be4efbf443870b68bfd534f7d5e40e7d5b6c1..dd25a6407b6385abe88aa731187731229aba3576 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 bad575fa4ed23dbb0f8878a9145e10878e6830bd..6dbaf30232f97bed4b11b89af50e72e1183f5dc5 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 5d3666ebaf8302b9a0e8b4abe8ca14d262162421..7ebaf125f969204d5782fea85ce35b0f2c2a727d 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 3c3b197de39daf8a3004e41b1187eeec07e4675d..ac8c71ba948349a9f1dbe2c7a068c01633fd444d 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 9bc449ea93274c52ac75429ea82c8dd1deaffebb..11e205da7964de636110b8f2eebcd224ab23f4c8 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 9dcd1d18c199ef07f0ef14fd5602ab8132e0fafc..3808df54727d65cae9d1cd7d407af179962d8acf 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 379a4a1cb911190ec0e96c8b858af081b08bdb03..dc626480123acddac290a8331114428253e695d9 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;