]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
authorKees Cook <kees@kernel.org>
Sun, 22 Feb 2026 07:46:04 +0000 (23:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Feb 2026 16:26:33 +0000 (08:26 -0800)
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
      kzalloc_obj,kzalloc_objs,kzalloc_flex,
    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

   ALLOC(...
  - , GFP_KERNEL
   )

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
415 files changed:
arch/arm/probes/kprobes/test-core.c
arch/mips/kernel/smp-cps.c
arch/powerpc/kvm/e500_mmu.c
arch/powerpc/perf/imc-pmu.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/powernv/opal-async.c
arch/powerpc/platforms/pseries/papr_platform_attributes.c
arch/riscv/kernel/module.c
arch/riscv/kvm/vcpu_sbi_fwft.c
arch/s390/kernel/perf_pai.c
arch/um/drivers/ubd_kern.c
arch/um/drivers/vfio_kern.c
arch/x86/events/intel/core.c
arch/x86/events/intel/uncore_discovery.c
arch/x86/kvm/vmx/tdx.c
block/blk-crypto-fallback.c
block/blk-zoned.c
drivers/accel/habanalabs/common/context.c
drivers/accel/habanalabs/common/device.c
drivers/accel/habanalabs/common/hw_queue.c
drivers/accel/habanalabs/common/hwmon.c
drivers/accel/habanalabs/gaudi/gaudi.c
drivers/accel/habanalabs/gaudi2/gaudi2.c
drivers/accel/habanalabs/goya/goya.c
drivers/accel/rocket/rocket_job.c
drivers/acpi/acpi_video.c
drivers/acpi/riscv/irq.c
drivers/acpi/x86/s2idle.c
drivers/android/binder.c
drivers/android/binder_alloc.c
drivers/atm/eni.c
drivers/base/cacheinfo.c
drivers/block/rnbd/rnbd-clt.c
drivers/block/xen-blkfront.c
drivers/bus/mhi/ep/main.c
drivers/bus/mhi/ep/ring.c
drivers/clk/aspeed/clk-ast2600.c
drivers/clk/clk-clps711x.c
drivers/clk/clk-npcm7xx.c
drivers/clocksource/ingenic-sysost.c
drivers/comedi/drivers/ni_tio.c
drivers/crypto/intel/qat/qat_common/adf_telemetry.c
drivers/crypto/intel/qat/qat_common/qat_uclo.c
drivers/edac/edac_device.c
drivers/edac/sb_edac.c
drivers/extcon/extcon.c
drivers/firewire/core-iso.c
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_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/dcn31/dcn31_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.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/smu13/smu_v13_0_7_ppt.c
drivers/gpu/drm/display/drm_dp_mst_topology.c
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_buddy.c
drivers/gpu/drm/drm_client_modeset.c
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/i915/display/intel_display_power_map.c
drivers/gpu/drm/i915/display/intel_hdcp.c
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
drivers/gpu/drm/nouveau/nouveau_sched.c
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
drivers/gpu/drm/panthor/panthor_mmu.c
drivers/gpu/drm/qxl/qxl_display.c
drivers/gpu/drm/radeon/ci_dpm.c
drivers/gpu/drm/radeon/kv_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/rs780_dpm.c
drivers/gpu/drm/radeon/rv6xx_dpm.c
drivers/gpu/drm/radeon/rv770_dpm.c
drivers/gpu/drm/radeon/si_dpm.c
drivers/gpu/drm/radeon/sumo_dpm.c
drivers/gpu/drm/radeon/trinity_dpm.c
drivers/gpu/drm/v3d/v3d_submit.c
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
drivers/gpu/drm/xen/xen_drm_front_evtchnl.c
drivers/hid/hid-core.c
drivers/hv/connection.c
drivers/hwmon/acpi_power_meter.c
drivers/hwmon/coretemp.c
drivers/iio/adc/ti-tsc2046.c
drivers/iio/dac/ad5360.c
drivers/iio/industrialio-core.c
drivers/iio/industrialio-event.c
drivers/infiniband/core/cache.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/device.c
drivers/infiniband/core/iwpm_util.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/uverbs_uapi.c
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/cxgb4/device.c
drivers/infiniband/hw/cxgb4/qp.c
drivers/infiniband/hw/hfi1/affinity.c
drivers/infiniband/hw/hfi1/pio.c
drivers/infiniband/hw/hfi1/user_exp_rcv.c
drivers/infiniband/hw/hns/hns_roce_hem.c
drivers/infiniband/hw/hns/hns_roce_mr.c
drivers/infiniband/hw/mana/main.c
drivers/infiniband/hw/mlx4/mad.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/macsec.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_memfree.c
drivers/infiniband/hw/usnic/usnic_uiom.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
drivers/infiniband/ulp/iser/iser_initiator.c
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/iommu/amd/init.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
drivers/iommu/iova.c
drivers/irqchip/irq-mtk-sysirq.c
drivers/irqchip/irq-riscv-imsic-state.c
drivers/irqchip/irq-stm32-exti.c
drivers/md/dm-crypt.c
drivers/md/dm-integrity.c
drivers/md/dm-pcache/cache.c
drivers/md/dm-pcache/cache_key.c
drivers/md/dm-stats.c
drivers/md/md-cluster.c
drivers/md/raid10.c
drivers/media/pci/tw686x/tw686x-core.c
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
drivers/media/v4l2-core/v4l2-subdev.c
drivers/memstick/core/mspro_block.c
drivers/message/fusion/mptsas.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0020.c
drivers/mtd/nand/onenand/onenand_base.c
drivers/mtd/nand/raw/nand_base.c
drivers/mtd/parsers/sharpslpart.c
drivers/net/can/usb/ucan.c
drivers/net/dsa/mv88e6xxx/devlink.c
drivers/net/dsa/sja1105/sja1105_vl.c
drivers/net/ethernet/amd/pds_core/core.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
drivers/net/ethernet/broadcom/sb1250-mac.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/brocade/bna/bnad.c
drivers/net/ethernet/cavium/liquidio/lio_core.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
drivers/net/ethernet/cisco/enic/enic_main.c
drivers/net/ethernet/engleder/tsnep_main.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/ucc_geth.c
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_tx_dqo.c
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/huawei/hinic3/hinic3_main.c
drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/i40e/i40e_client.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ptp.c
drivers/net/ethernet/intel/ice/devlink/port.c
drivers/net/ethernet/intel/ice/ice_xsk.c
drivers/net/ethernet/intel/idpf/idpf_idc.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/igb/igb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/libie/fwlog.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/marvell/prestera/prestera_devlink.c
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/eq.c
drivers/net/ethernet/mellanox/mlx4/intf.c
drivers/net/ethernet/mellanox/mlx4/qp.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
drivers/net/ethernet/mellanox/mlx5/core/dev.c
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/hwmon.c
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.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.c
drivers/net/ethernet/mellanox/mlxsw/core_env.c
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
drivers/net/ethernet/mellanox/mlxsw/minimal.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum1_mr_tcam.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/netronome/nfp/bpf/verifier.c
drivers/net/ethernet/netronome/nfp/flower/metadata.c
drivers/net/ethernet/qlogic/qed/qed_dev.c
drivers/net/ethernet/qlogic/qed/qed_iwarp.c
drivers/net/ethernet/qlogic/qed/qed_ll2.c
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_ooo.c
drivers/net/ethernet/qlogic/qede/qede_main.c
drivers/net/ethernet/qlogic/qla3xxx.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/renesas/ravb_main.c
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/efx_common.c
drivers/net/ethernet/sfc/falcon/tx.c
drivers/net/ethernet/sfc/mae.c
drivers/net/ethernet/sfc/siena/efx_channels.c
drivers/net/ethernet/sfc/siena/efx_common.c
drivers/net/ethernet/sfc/siena/tx_common.c
drivers/net/ethernet/sfc/tx_common.c
drivers/net/ethernet/spacemit/k1_emac.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
drivers/net/ethernet/via/via-velocity.c
drivers/net/ethernet/wangxun/libwx/wx_hw.c
drivers/net/netdevsim/dev.c
drivers/net/phy/dp83640.c
drivers/net/phy/phy_led_triggers.c
drivers/net/pse-pd/pd692x0.c
drivers/net/wireless/ath/ath11k/debugfs.c
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/wil6210/debugfs.c
drivers/net/wireless/broadcom/b43legacy/debugfs.c
drivers/net/wireless/broadcom/b43legacy/main.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2200.c
drivers/net/wireless/intel/iwlwifi/dvm/tt.c
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
drivers/net/wireless/intel/iwlwifi/mld/scan.c
drivers/net/wireless/intel/iwlwifi/mld/sta.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/scan.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/cfg80211.c
drivers/net/wireless/marvell/mwifiex/cmdevt.c
drivers/net/wireless/marvell/mwifiex/scan.c
drivers/net/wireless/quantenna/qtnfmac/commands.c
drivers/nvme/host/fc.c
drivers/nvme/target/pci-epf.c
drivers/parisc/iosapic.c
drivers/platform/x86/amd/wbrf.c
drivers/platform/x86/dell/dell-wmi-base.c
drivers/platform/x86/dell/dell-wmi-privacy.c
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c
drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
drivers/platform/x86/hp/hp-bioscfg/int-attributes.c
drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
drivers/platform/x86/intel/int1092/intel_sar.c
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
drivers/platform/x86/intel/tpmi_power_domains.c
drivers/platform/x86/uv_sysfs.c
drivers/powercap/powercap_sys.c
drivers/resctrl/mpam_devices.c
drivers/s390/crypto/zcrypt_api.c
drivers/scsi/aacraid/aachba.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/csiostor/csio_wr.c
drivers/scsi/esas2r/esas2r_init.c
drivers/scsi/hpsa.c
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ipr.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_nvmet.c
drivers/scsi/mac53c94.c
drivers/scsi/megaraid/megaraid_sas_base.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/pmcraid.c
drivers/scsi/qedi/qedi_main.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/smartpqi/smartpqi_init.c
drivers/soundwire/qcom.c
drivers/staging/greybus/power_supply.c
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
drivers/staging/media/atomisp/pci/sh_css.c
drivers/tee/qcomtee/call.c
drivers/thermal/cpufreq_cooling.c
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/testing/zone.c
drivers/tty/serial/sunsab.c
drivers/usb/gadget/configfs.c
drivers/usb/gadget/function/f_midi2.c
drivers/usb/gadget/function/u_audio.c
drivers/usb/isp1760/isp1760-hcd.c
drivers/usb/storage/ene_ub6250.c
drivers/vdpa/mlx5/net/mlx5_vnet.c
drivers/vdpa/vdpa_sim/vdpa_sim.c
drivers/vhost/scsi.c
drivers/virt/nitro_enclaves/ne_misc_dev.c
drivers/xen/events/events_base.c
drivers/xen/gntdev-dmabuf.c
drivers/xen/xen-acpi-processor.c
drivers/xen/xen-front-pgdir-shbuf.c
fs/afs/cmservice.c
fs/afs/dir.c
fs/afs/rotate.c
fs/btrfs/fiemap.c
fs/btrfs/scrub.c
fs/btrfs/send.c
fs/ceph/mds_client.c
fs/erofs/zutil.c
fs/ext4/mballoc.c
fs/isofs/compress.c
fs/jffs2/fs.c
fs/nfs/callback_xdr.c
fs/nfs/delegation.c
fs/nfsd/export.c
fs/nfsd/nfs4recover.c
fs/nfsd/nfs4state.c
fs/pstore/ram_core.c
fs/smb/client/smbdirect.c
fs/squashfs/file.c
fs/udf/super.c
kernel/bpf/syscall.c
kernel/events/hw_breakpoint.c
kernel/locking/locktorture.c
kernel/rcu/rcuscale.c
kernel/rcu/rcutorture.c
kernel/rcu/tasks.h
kernel/sched/ext_idle.c
kernel/time/timer_migration.c
kernel/trace/trace_events_synth.c
kernel/trace/trace_syscalls.c
kernel/user_namespace.c
lib/objagg.c
mm/damon/stat.c
mm/damon/tests/sysfs-kunit.h
net/bridge/br_mdb.c
net/core/devmem.c
net/ipv4/cipso_ipv4.c
net/ipv4/devinet.c
net/ipv4/nexthop.c
net/ipv4/udp_tunnel_nic.c
net/ipv6/addrconf.c
net/ipv6/calipso.c
net/mac80211/cfg.c
net/mac80211/main.c
net/netfilter/ipvs/ip_vs_mh.c
net/netfilter/nf_tables_api.c
net/netfilter/nfnetlink_cthelper.c
net/sched/sch_htb.c
net/smc/smc_wr.c
net/unix/af_unix.c
net/wireless/core.c
net/wireless/nl80211.c
net/xdp/xsk_buff_pool.c
net/xfrm/xfrm_iptfs.c
security/integrity/ima/ima_crypto.c
security/selinux/ss/conditional.c
security/selinux/ss/policydb.c
sound/core/seq/oss/seq_oss_synth.c
sound/firewire/amdtp-stream.c
sound/pci/emu10k1/emufx.c
sound/soc/codecs/pcm6240.c
sound/soc/codecs/tas2781-fmwlib.c
sound/soc/qcom/qdsp6/topology.c
sound/soc/soc-dapm.c
sound/soc/sof/ipc4-pcm.c
sound/soc/sof/ipc4-topology.c
sound/synth/emux/emux_effect.c
sound/usb/qcom/qc_audio_offload.c
sound/xen/xen_snd_front_evtchnl.c

index ef93f2f1db62fca6d58c55703680b4334dac4be6..7a2baa135f0f1d46da5d9dca83b3dd60bf759552 100644 (file)
@@ -764,7 +764,7 @@ static int coverage_start_fn(const struct decode_header *h, void *args)
 static int coverage_start(const union decode_item *table)
 {
        coverage.base = kmalloc_objs(struct coverage_entry,
-                                    MAX_COVERAGE_ENTRIES, GFP_KERNEL);
+                                    MAX_COVERAGE_ENTRIES);
        coverage.num_entries = 0;
        coverage.nesting = 0;
        return table_iter(table, coverage_start_fn, &coverage);
index 70a846c5ddba3454cf15c021b33fc062a3358d34..b01ebaace48e2e8623e86f26ab44a48e324b2568 100644 (file)
@@ -342,7 +342,7 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)
        /* Allocate cluster boot configuration structs */
        nclusters = mips_cps_numclusters();
        mips_cps_cluster_bootcfg = kzalloc_objs(*mips_cps_cluster_bootcfg,
-                                               nclusters, GFP_KERNEL);
+                                               nclusters);
        if (!mips_cps_cluster_bootcfg)
                goto err_out;
 
@@ -368,8 +368,7 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)
                        int v;
                        core_vpes = core_vpe_count(cl, c);
                        core_bootcfg[c].vpe_config = kzalloc_objs(*core_bootcfg[c].vpe_config,
-                                                                 core_vpes,
-                                                                 GFP_KERNEL);
+                                                                 core_vpes);
                        for (v = 0; v < core_vpes; v++)
                                cpumask_set_cpu(nvpe++, &mips_cps_cluster_bootcfg[cl].cpumask);
                        if (!core_bootcfg[c].vpe_config)
index 13bcadccb2b7518dd43ead6d6969a794f3a86002..48580c85f23b0e8465cccf0ca00f4363aa73d946 100644 (file)
@@ -913,8 +913,7 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
        vcpu_e500->gtlb_params[1].sets = 1;
 
        vcpu_e500->gtlb_arch = kmalloc_objs(*vcpu_e500->gtlb_arch,
-                                           KVM_E500_TLB0_SIZE + KVM_E500_TLB1_SIZE,
-                                           GFP_KERNEL);
+                                           KVM_E500_TLB0_SIZE + KVM_E500_TLB1_SIZE);
        if (!vcpu_e500->gtlb_arch)
                return -ENOMEM;
 
@@ -922,14 +921,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
        vcpu_e500->gtlb_offset[1] = KVM_E500_TLB0_SIZE;
 
        vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref,
-                                              vcpu_e500->gtlb_params[0].entries,
-                                              GFP_KERNEL);
+                                              vcpu_e500->gtlb_params[0].entries);
        if (!vcpu_e500->gtlb_priv[0])
                goto free_vcpu;
 
        vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref,
-                                              vcpu_e500->gtlb_params[1].entries,
-                                              GFP_KERNEL);
+                                              vcpu_e500->gtlb_params[1].entries);
        if (!vcpu_e500->gtlb_priv[1])
                goto free_vcpu;
 
index db98e9af8812136a537c1c4cf95c3fff7bf32f62..c1563b4eaa946be4a9a4bbbb4f11f1658fffe4cf 100644 (file)
@@ -1699,8 +1699,7 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
                /* Needed for hotplug/migration */
                if (!per_nest_pmu_arr) {
                        per_nest_pmu_arr = kzalloc_objs(struct imc_pmu *,
-                                                       get_max_nest_dev() + 1,
-                                                       GFP_KERNEL);
+                                                       get_max_nest_dev() + 1);
                        if (!per_nest_pmu_arr)
                                goto err;
                }
index d4665daa34c26b4a584bb46bbb5c2e5f1c611727..10fa9b844fccd8cae2b2340c2878c0be1887927f 100644 (file)
@@ -2282,7 +2282,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
        }
 
        ctx->switch_log = kmalloc_flex(*ctx->switch_log, log,
-                                      SWITCH_LOG_BUFSIZE, GFP_KERNEL);
+                                      SWITCH_LOG_BUFSIZE);
 
        if (!ctx->switch_log) {
                rc = -ENOMEM;
index 2cacfe5407c9a8e4ece18898e62057ae7bce2033..6560c024bfd212e427cc1946c0723770cb88f8d1 100644 (file)
@@ -266,7 +266,7 @@ int __init opal_async_comp_init(void)
 
        opal_max_async_tokens = be32_to_cpup(async);
        opal_async_tokens = kzalloc_objs(*opal_async_tokens,
-                                        opal_max_async_tokens, GFP_KERNEL);
+                                        opal_max_async_tokens);
        if (!opal_async_tokens) {
                err = -ENOMEM;
                goto out_opal_node;
index 38b417c158ba3645a6d971469b8859b4e732f9d4..c6159870de0e11bf18919e52d2b5c94ea2a7a08f 100644 (file)
@@ -314,8 +314,7 @@ retry:
        /* Allocate the groups before registering */
        for (idx = 0; idx < num_attrs; idx++) {
                papr_groups[idx].pg.attrs = kzalloc_objs(*papr_groups[idx].pg.attrs,
-                                                        KOBJ_MAX_ATTRS + 1,
-                                                        GFP_KERNEL);
+                                                        KOBJ_MAX_ATTRS + 1);
                if (!papr_groups[idx].pg.attrs)
                        goto out_pgattrs;
 
index cc2f980700f34c1220f501e59d8b06259028359f..1961135689db93a0bfba7a4b85ada579633f6c94 100644 (file)
@@ -754,7 +754,7 @@ initialize_relocation_hashtable(unsigned int num_relocations,
 
        /* Number of relocations may be large, so kvmalloc it */
        *relocation_hashtable = kvmalloc_objs(**relocation_hashtable,
-                                             hashtable_size, GFP_KERNEL);
+                                             hashtable_size);
        if (!*relocation_hashtable)
                return 0;
 
index 14cea431b863a1ed16003f356a03f6a65d566572..2eab15339694f66b5462f5f08da41fbfffe2fc27 100644 (file)
@@ -353,7 +353,7 @@ static int kvm_sbi_ext_fwft_init(struct kvm_vcpu *vcpu)
        int i;
 
        fwft->configs = kzalloc_objs(struct kvm_sbi_fwft_config,
-                                    ARRAY_SIZE(features), GFP_KERNEL);
+                                    ARRAY_SIZE(features));
        if (!fwft->configs)
                return -ENOMEM;
 
index 8fd3e47307a3f6ce66c5ea7b2be1434f6fa55b35..86f71a3d1ef2d38141c195e9da63d3253c8a28b1 100644 (file)
@@ -282,8 +282,7 @@ static int pai_alloc_cpu(struct perf_event *event, int cpu)
                        need_paiext_cb = true;
                }
                cpump->save = kvmalloc_objs(struct pai_userdata,
-                                           pai_pmu[idx].num_avail + 1,
-                                           GFP_KERNEL);
+                                           pai_pmu[idx].num_avail + 1);
                if (!cpump->area || !cpump->save ||
                    (need_paiext_cb && !cpump->paiext_cb)) {
                        pai_free(mp);
index 42f392e6add342362d3d98b063951985053aa13d..012b2bcaa8a07b6bd6ea35e49eeebce145dd244d 100644 (file)
@@ -1070,7 +1070,7 @@ static int __init ubd_init(void)
                return -1;
 
        irq_req_buffer = kmalloc_objs(struct io_thread_req *,
-                                     UBD_REQ_BUFFER_SIZE, GFP_KERNEL);
+                                     UBD_REQ_BUFFER_SIZE);
        irq_remainder = 0;
 
        if (irq_req_buffer == NULL) {
@@ -1078,7 +1078,7 @@ static int __init ubd_init(void)
                return -ENOMEM;
        }
        io_req_buffer = kmalloc_objs(struct io_thread_req *,
-                                    UBD_REQ_BUFFER_SIZE, GFP_KERNEL);
+                                    UBD_REQ_BUFFER_SIZE);
 
        io_remainder = 0;
 
index 7b6492174da0676a3b350433967ca0be820448af..e6dab473cde4718c2a68bbe6ef36878b90cf79a1 100644 (file)
@@ -515,7 +515,7 @@ static void uml_vfio_open_device(struct uml_vfio_device *dev)
        }
 
        dev->intr_ctx = kmalloc_objs(struct uml_vfio_intr_ctx,
-                                    dev->udev.irq_count, GFP_KERNEL);
+                                    dev->udev.irq_count);
        if (!dev->intr_ctx) {
                pr_err("Failed to allocate interrupt context (%s)\n",
                       dev->name);
index 41f5710401459858a7dec7024e7abcde4e770bc7..cf3a4fe06ff26c3da41ae1818df7fe4e4232af53 100644 (file)
@@ -7379,7 +7379,7 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
 
        x86_pmu.num_hybrid_pmus = hweight_long(pmus_mask);
        x86_pmu.hybrid_pmu = kzalloc_objs(struct x86_hybrid_pmu,
-                                         x86_pmu.num_hybrid_pmus, GFP_KERNEL);
+                                         x86_pmu.num_hybrid_pmus);
        if (!x86_pmu.hybrid_pmu)
                return -ENOMEM;
 
index c8bf3983accf7104131edc42e584b72c44fc00d1..12e259a988dd17996a165f229b2a338bf75fef55 100644 (file)
@@ -745,8 +745,7 @@ intel_uncore_generic_init_uncores(enum uncore_access_type type_id, int num_extra
        int i = 0;
 
        uncores = kzalloc_objs(struct intel_uncore_type *,
-                              num_discovered_types[type_id] + num_extra + 1,
-                              GFP_KERNEL);
+                              num_discovered_types[type_id] + num_extra + 1);
        if (!uncores)
                return empty_uncore;
 
index d22cabe119b1660c6cc876256778706528114d29..c5065f84b78be3ca09cd854611e6c9dc3ec61ae4 100644 (file)
@@ -2407,7 +2407,7 @@ static int __tdx_td_init(struct kvm *kvm, struct td_params *td_params,
        /* TDVPS = TDVPR(4K page) + TDCX(multiple 4K pages), -1 for TDVPR. */
        kvm_tdx->td.tdcx_nr_pages = tdx_sysinfo->td_ctrl.tdvps_base_size / PAGE_SIZE - 1;
        tdcs_pages = kzalloc_objs(*kvm_tdx->td.tdcs_pages,
-                                 kvm_tdx->td.tdcs_nr_pages, GFP_KERNEL);
+                                 kvm_tdx->td.tdcs_nr_pages);
        if (!tdcs_pages)
                goto free_tdr;
 
index 24b8b1c40e2510e4fa77aaf1d52aa379c3845981..61f5954108329fd02554fbc7e98a7bb14ef33a18 100644 (file)
@@ -574,7 +574,7 @@ static int blk_crypto_fallback_init(void)
                goto fail_destroy_profile;
 
        blk_crypto_keyslots = kzalloc_objs(blk_crypto_keyslots[0],
-                                          blk_crypto_num_keyslots, GFP_KERNEL);
+                                          blk_crypto_num_keyslots);
        if (!blk_crypto_keyslots)
                goto fail_free_wq;
 
index 54ee346ddb5af129c228895d380e82b19b8db1d5..9d1dd6ccfad723382f1b32911f2d2a81c270032e 100644 (file)
@@ -1805,7 +1805,7 @@ static int disk_alloc_zone_resources(struct gendisk *disk,
 
        disk->zone_wplugs_hash =
                kzalloc_objs(struct hlist_head,
-                            disk_zone_wplugs_hash_size(disk), GFP_KERNEL);
+                            disk_zone_wplugs_hash_size(disk));
        if (!disk->zone_wplugs_hash)
                return -ENOMEM;
 
index 276c97aba992cbe942458d0376ea90b00819a999..69c68b187bb7a05c40677d84b076963a68c94f83 100644 (file)
@@ -210,8 +210,7 @@ int hl_ctx_init(struct hl_device *hdev, struct hl_ctx *ctx, bool is_kernel_ctx)
        atomic_set(&ctx->thread_ctx_switch_token, 1);
        ctx->thread_ctx_switch_wait_token = 0;
        ctx->cs_pending = kzalloc_objs(struct hl_fence *,
-                                      hdev->asic_prop.max_pending_cs,
-                                      GFP_KERNEL);
+                                      hdev->asic_prop.max_pending_cs);
        if (!ctx->cs_pending)
                return -ENOMEM;
 
index d4c3473fb64fdeb7992da954cca0b42351f93037..09b27bac3a31de86f852129ef6c818ebe64d620b 100644 (file)
@@ -893,8 +893,7 @@ static int device_early_init(struct hl_device *hdev)
 
        if (hdev->asic_prop.completion_queues_count) {
                hdev->cq_wq = kzalloc_objs(struct workqueue_struct *,
-                                          hdev->asic_prop.completion_queues_count,
-                                          GFP_KERNEL);
+                                          hdev->asic_prop.completion_queues_count);
                if (!hdev->cq_wq) {
                        rc = -ENOMEM;
                        goto asid_fini;
@@ -2159,8 +2158,7 @@ int hl_device_init(struct hl_device *hdev)
 
        if (user_interrupt_cnt) {
                hdev->user_interrupt = kzalloc_objs(*hdev->user_interrupt,
-                                                   user_interrupt_cnt,
-                                                   GFP_KERNEL);
+                                                   user_interrupt_cnt);
                if (!hdev->user_interrupt) {
                        rc = -ENOMEM;
                        goto early_fini;
@@ -2227,7 +2225,7 @@ int hl_device_init(struct hl_device *hdev)
         */
        if (cq_cnt) {
                hdev->completion_queue = kzalloc_objs(*hdev->completion_queue,
-                                                     cq_cnt, GFP_KERNEL);
+                                                     cq_cnt);
 
                if (!hdev->completion_queue) {
                        dev_err(hdev->dev,
@@ -2249,8 +2247,7 @@ int hl_device_init(struct hl_device *hdev)
        }
 
        hdev->shadow_cs_queue = kzalloc_objs(struct hl_cs *,
-                                            hdev->asic_prop.max_pending_cs,
-                                            GFP_KERNEL);
+                                            hdev->asic_prop.max_pending_cs);
        if (!hdev->shadow_cs_queue) {
                rc = -ENOMEM;
                goto cq_fini;
index f0ab99dd74d6e14b0585d495a5733b0229d36ed8..4232f374dfc362979d565f1992485caf774d678d 100644 (file)
@@ -1083,7 +1083,7 @@ int hl_hw_queues_create(struct hl_device *hdev)
        int i, rc, q_ready_cnt;
 
        hdev->kernel_queues = kzalloc_objs(*hdev->kernel_queues,
-                                          asic->max_queues, GFP_KERNEL);
+                                          asic->max_queues);
 
        if (!hdev->kernel_queues) {
                dev_err(hdev->dev, "Not enough memory for H/W queues\n");
index 3c0f405a51484290cad0b65c86ee9c6ef76e9fb8..768604d2392de4334bde8e2a4ea7b5aa729ad2d5 100644 (file)
@@ -196,7 +196,7 @@ int hl_build_hwmon_channel_info(struct hl_device *hdev, struct cpucp_sensor *sen
        }
 
        channels_info = kzalloc_objs(struct hwmon_channel_info *,
-                                    num_active_sensor_types + 1, GFP_KERNEL);
+                                    num_active_sensor_types + 1);
        if (!channels_info) {
                rc = -ENOMEM;
                goto channels_info_array_err;
index 76fdf3b77b876db52cb5f52a92d840224e453237..5ddb38aaff7a171d292e31614fcf6d07a9f4732f 100644 (file)
@@ -540,7 +540,7 @@ static int gaudi_set_fixed_properties(struct hl_device *hdev)
 
        prop->max_queues = GAUDI_QUEUE_ID_SIZE;
        prop->hw_queues_props = kzalloc_objs(struct hw_queue_properties,
-                                            prop->max_queues, GFP_KERNEL);
+                                            prop->max_queues);
 
        if (!prop->hw_queues_props)
                return -ENOMEM;
index 91f46719931c57b05462d9b97d201278284484ab..5d9c6f0698b75a2d1920f2ad3cc120f3a0b0acb3 100644 (file)
@@ -2763,7 +2763,7 @@ static int gaudi2_set_fixed_properties(struct hl_device *hdev)
 
        prop->max_queues = GAUDI2_QUEUE_ID_SIZE;
        prop->hw_queues_props = kzalloc_objs(struct hw_queue_properties,
-                                            prop->max_queues, GFP_KERNEL);
+                                            prop->max_queues);
 
        if (!prop->hw_queues_props)
                return -ENOMEM;
@@ -3944,8 +3944,7 @@ static int gaudi2_special_blocks_config(struct hl_device *hdev)
        prop->glbl_err_max_cause_num = GAUDI2_GLBL_ERR_MAX_CAUSE_NUM;
        prop->num_of_special_blocks = ARRAY_SIZE(gaudi2_special_blocks);
        prop->special_blocks = kmalloc_objs(*prop->special_blocks,
-                                           prop->num_of_special_blocks,
-                                           GFP_KERNEL);
+                                           prop->num_of_special_blocks);
        if (!prop->special_blocks)
                return -ENOMEM;
 
@@ -3960,8 +3959,7 @@ static int gaudi2_special_blocks_config(struct hl_device *hdev)
        if (ARRAY_SIZE(gaudi2_iterator_skip_block_types)) {
                prop->skip_special_blocks_cfg.block_types =
                                kmalloc_objs(gaudi2_iterator_skip_block_types[0],
-                                            ARRAY_SIZE(gaudi2_iterator_skip_block_types),
-                                            GFP_KERNEL);
+                                            ARRAY_SIZE(gaudi2_iterator_skip_block_types));
                if (!prop->skip_special_blocks_cfg.block_types) {
                        rc = -ENOMEM;
                        goto free_special_blocks;
@@ -3977,8 +3975,7 @@ static int gaudi2_special_blocks_config(struct hl_device *hdev)
        if (ARRAY_SIZE(gaudi2_iterator_skip_block_ranges)) {
                prop->skip_special_blocks_cfg.block_ranges =
                                kmalloc_objs(gaudi2_iterator_skip_block_ranges[0],
-                                            ARRAY_SIZE(gaudi2_iterator_skip_block_ranges),
-                                            GFP_KERNEL);
+                                            ARRAY_SIZE(gaudi2_iterator_skip_block_ranges));
                if (!prop->skip_special_blocks_cfg.block_ranges) {
                        rc = -ENOMEM;
                        goto free_skip_special_blocks_types;
index f94a331f4c32f41e040874ae4e0aedf53233c63d..bf12702e0a69edcb7693bb39636ec6e319bf1799 100644 (file)
@@ -364,7 +364,7 @@ int goya_set_fixed_properties(struct hl_device *hdev)
 
        prop->max_queues = GOYA_QUEUE_ID_SIZE;
        prop->hw_queues_props = kzalloc_objs(struct hw_queue_properties,
-                                            prop->max_queues, GFP_KERNEL);
+                                            prop->max_queues);
 
        if (!prop->hw_queues_props)
                return -ENOMEM;
index 755971c13caf204e9168aece4401bf86ee0e644e..ac51bff39833fa4381666b21de9f68139e1e878d 100644 (file)
@@ -497,8 +497,7 @@ int rocket_job_open(struct rocket_file_priv *rocket_priv)
 {
        struct rocket_device *rdev = rocket_priv->rdev;
        struct drm_gpu_scheduler **scheds = kmalloc_objs(*scheds,
-                                                        rdev->num_cores,
-                                                        GFP_KERNEL);
+                                                        rdev->num_cores);
        unsigned int core;
        int ret;
 
index 5f47514787522dbae465ac79c34b07985fcfc237..3fa28f1abca38cbd740fed61064e989bc98c7c70 100644 (file)
@@ -837,8 +837,7 @@ int acpi_video_get_levels(struct acpi_device *device,
         * special levels (see below)
         */
        br->levels = kmalloc_objs(*br->levels,
-                                 obj->package.count + ACPI_VIDEO_FIRST_LEVEL,
-                                 GFP_KERNEL);
+                                 obj->package.count + ACPI_VIDEO_FIRST_LEVEL);
        if (!br->levels) {
                result = -ENOMEM;
                goto out_free;
@@ -1331,7 +1330,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
                          dod->package.count);
 
        active_list = kzalloc_objs(struct acpi_video_enumerated_device,
-                                  1 + dod->package.count, GFP_KERNEL);
+                                  1 + dod->package.count);
        if (!active_list) {
                status = -ENOMEM;
                goto out;
index afffde4cfe7a3cd2f8db4ac4c50569ea9d7f68ef..9b88d0993e880794d6f6c5ed95ec4d6ce5f08092 100644 (file)
@@ -343,7 +343,7 @@ static u32 riscv_acpi_add_prt_dep(acpi_handle handle)
                        acpi_get_handle(handle, entry->source, &link_handle);
                        dep_devices.count = 1;
                        dep_devices.handles = kzalloc_objs(*dep_devices.handles,
-                                                          1, GFP_KERNEL);
+                                                          1);
                        if (!dep_devices.handles) {
                                acpi_handle_err(handle, "failed to allocate memory\n");
                                continue;
@@ -355,7 +355,7 @@ static u32 riscv_acpi_add_prt_dep(acpi_handle handle)
                        gsi_handle = riscv_acpi_get_gsi_handle(entry->source_index);
                        dep_devices.count = 1;
                        dep_devices.handles = kzalloc_objs(*dep_devices.handles,
-                                                          1, GFP_KERNEL);
+                                                          1);
                        if (!dep_devices.handles) {
                                acpi_handle_err(handle, "failed to allocate memory\n");
                                continue;
index 82075543a1edf02ff310dba2749a10c15aa24050..b6b1dd76a06ba01b5e3d4f10207d70565e322862 100644 (file)
@@ -130,8 +130,7 @@ static void lpi_device_get_constraints_amd(void)
                        }
 
                        lpi_constraints_table = kzalloc_objs(*lpi_constraints_table,
-                                                            package->package.count,
-                                                            GFP_KERNEL);
+                                                            package->package.count);
 
                        if (!lpi_constraints_table)
                                goto free_acpi_buffer;
@@ -210,7 +209,7 @@ static void lpi_device_get_constraints(void)
                return;
 
        lpi_constraints_table = kzalloc_objs(*lpi_constraints_table,
-                                            out_obj->package.count, GFP_KERNEL);
+                                            out_obj->package.count);
        if (!lpi_constraints_table)
                goto free_acpi_buffer;
 
index 0dccb4526a7c729e9f7df3411c65a702e213775f..21f91d9f2fbcf934347a0df5a78e869753ca2680 100644 (file)
@@ -5903,7 +5903,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                }
 
                target_procs = kzalloc_objs(struct binder_proc *,
-                                           target_procs_count, GFP_KERNEL);
+                                           target_procs_count);
 
                if (!target_procs) {
                        mutex_unlock(&binder_procs_lock);
index 4dd3415d8fdb296e8df24b339d0d7bd1b1d5c698..241f16a9b63d1215dc339345786b56fe86e0490a 100644 (file)
@@ -917,7 +917,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
        alloc->vm_start = vma->vm_start;
 
        alloc->pages = kvzalloc_objs(alloc->pages[0],
-                                    alloc->buffer_size / PAGE_SIZE, GFP_KERNEL);
+                                    alloc->buffer_size / PAGE_SIZE);
        if (!alloc->pages) {
                ret = -ENOMEM;
                failure_string = "alloc page array";
index d155f9dab44c5fe8c6b92231b7b2eb8e5a8f6dad..12cb3aa588bcece32a6d6a105719de53fe90c8e1 100644 (file)
@@ -1846,8 +1846,7 @@ static int eni_start(struct atm_dev *dev)
        buffer_mem = eni_dev->mem - (buf - eni_dev->ram);
        eni_dev->free_list_size = buffer_mem/MID_MIN_BUF_SIZE/2;
        eni_dev->free_list = kmalloc_objs(*eni_dev->free_list,
-                                         eni_dev->free_list_size + 1,
-                                         GFP_KERNEL);
+                                         eni_dev->free_list_size + 1);
        if (!eni_dev->free_list) {
                printk(KERN_ERR DEV_LABEL "(itf %d): couldn't get free page\n",
                    dev->number);
index eb16451ba0a3ed2a9e1eb342d4ac58dfe911839b..391ac5e3d2f566e077d470e961f511a5fb754d76 100644 (file)
@@ -884,7 +884,7 @@ static int cpu_cache_sysfs_init(unsigned int cpu)
 
        /* Allocate all required memory */
        per_cpu_index_dev(cpu) = kzalloc_objs(struct device *,
-                                             cache_leaves(cpu), GFP_KERNEL);
+                                             cache_leaves(cpu));
        if (unlikely(per_cpu_index_dev(cpu) == NULL))
                goto err_out;
 
index c60dafbe79e8316ade68bca9d5857c39d493887b..4d6725a0035e90d8b947bc2013effaeee476d5ab 100644 (file)
@@ -1418,7 +1418,7 @@ static struct rnbd_clt_dev *init_dev(struct rnbd_clt_session *sess,
         * nr_poll_queues: the number of polling queues
         */
        dev->hw_queues = kzalloc_objs(*dev->hw_queues,
-                                     nr_cpu_ids + nr_poll_queues, GFP_KERNEL);
+                                     nr_cpu_ids + nr_poll_queues);
        if (!dev->hw_queues) {
                ret = -ENOMEM;
                goto out_alloc;
index 8fc7fc3bf86760a0c02983cacdb25dcab831a60d..f765970578f98bcd76d2a5f46834c66952f6de53 100644 (file)
@@ -2209,12 +2209,11 @@ static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo)
                rinfo->shadow[i].grants_used =
                        kvzalloc_objs(rinfo->shadow[i].grants_used[0], grants);
                rinfo->shadow[i].sg = kvzalloc_objs(rinfo->shadow[i].sg[0],
-                                                   psegs, GFP_KERNEL);
+                                                   psegs);
                if (info->max_indirect_segments)
                        rinfo->shadow[i].indirect_grants =
                                kvzalloc_objs(rinfo->shadow[i].indirect_grants[0],
-                                             INDIRECT_GREFS(grants),
-                                             GFP_KERNEL);
+                                             INDIRECT_GREFS(grants));
                if ((rinfo->shadow[i].grants_used == NULL) ||
                        (rinfo->shadow[i].sg == NULL) ||
                     (info->max_indirect_segments &&
index 879b8b7064281ffa28bca00c85bc8656e989bf19..e3d0a3cbaf9446a4a1d99979d0247f6aa8dc73d1 100644 (file)
@@ -1137,7 +1137,7 @@ int mhi_ep_power_up(struct mhi_ep_cntrl *mhi_cntrl)
        mhi_ep_mmio_init(mhi_cntrl);
 
        mhi_cntrl->mhi_event = kzalloc_objs(*mhi_cntrl->mhi_event,
-                                           mhi_cntrl->event_rings, GFP_KERNEL);
+                                           mhi_cntrl->event_rings);
        if (!mhi_cntrl->mhi_event)
                return -ENOMEM;
 
@@ -1400,7 +1400,7 @@ static int mhi_ep_chan_init(struct mhi_ep_cntrl *mhi_cntrl,
         * only the defined channels
         */
        mhi_cntrl->mhi_chan = kzalloc_objs(*mhi_cntrl->mhi_chan,
-                                          mhi_cntrl->max_chan, GFP_KERNEL);
+                                          mhi_cntrl->max_chan);
        if (!mhi_cntrl->mhi_chan)
                return -ENOMEM;
 
index ee5b7f4755c5094dc0adfb273b5ef5ce8699aab0..9375b16ff2a5df55dac1c701bb4f1f9c2b9d9aa1 100644 (file)
@@ -206,7 +206,7 @@ int mhi_ep_ring_start(struct mhi_ep_cntrl *mhi_cntrl, struct mhi_ep_ring *ring,
 
        /* Allocate ring cache memory for holding the copy of host ring */
        ring->ring_cache = kzalloc_objs(struct mhi_ring_element,
-                                       ring->ring_size, GFP_KERNEL);
+                                       ring->ring_size);
        if (!ring->ring_cache)
                return -ENOMEM;
 
index bc9a5b81009dca828a59f6a931fb50f3e75cc67f..873879e5ad9b8ee8fd7d2b6213dbe2ecc7e70760 100644 (file)
@@ -839,7 +839,7 @@ static void __init aspeed_g6_cc_init(struct device_node *np)
        soc_rev = (readl(scu_g6_base + ASPEED_G6_SILICON_REV) & CHIP_REVISION_ID) >> 16;
 
        aspeed_g6_clk_data = kzalloc_flex(*aspeed_g6_clk_data, hws,
-                                         ASPEED_G6_NUM_CLKS, GFP_KERNEL);
+                                         ASPEED_G6_NUM_CLKS);
        if (!aspeed_g6_clk_data)
                return;
        aspeed_g6_clk_data->num = ASPEED_G6_NUM_CLKS;
index babe42e5953317f45971fd45dcb6ce11f6e49ce9..27a57a9b3cb3469568619de89ac1ac3b3fec87e5 100644 (file)
@@ -54,7 +54,7 @@ static void __init clps711x_clk_init_dt(struct device_node *np)
        BUG_ON(!base);
 
        clps711x_clk = kzalloc_flex(*clps711x_clk, clk_data.hws,
-                                   CLPS711X_CLK_MAX, GFP_KERNEL);
+                                   CLPS711X_CLK_MAX);
        BUG_ON(!clps711x_clk);
 
        spin_lock_init(&clps711x_clk->lock);
index 2cd1ae4f152dbc87c192af787cc39af0c64d298a..79eca6ee3120c646e3f8255a6d99eb0f052a139a 100644 (file)
@@ -422,7 +422,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
                goto npcm7xx_init_error;
 
        npcm7xx_clk_data = kzalloc_flex(*npcm7xx_clk_data, hws,
-                                       NPCM7XX_NUM_CLOCKS, GFP_KERNEL);
+                                       NPCM7XX_NUM_CLOCKS);
        if (!npcm7xx_clk_data)
                goto npcm7xx_init_np_err;
 
index d967972c1fdc292cbbf6e2038af7e21b7443d2d3..026615bbe921f457e5ea0746fd128a35f491d967 100644 (file)
@@ -459,7 +459,7 @@ static int __init ingenic_ost_probe(struct device_node *np)
        ost->soc_info = id->data;
 
        ost->clocks = kzalloc_flex(*ost->clocks, hws,
-                                  ost->soc_info->num_channels, GFP_KERNEL);
+                                  ost->soc_info->num_channels);
        if (!ost->clocks) {
                ret = -ENOMEM;
                goto err_clk_disable;
index d6e7e200698158c1cf34fd9326574845b4278a29..519359a870a793c9cfeb14d2c2d41ac9d8841167 100644 (file)
@@ -1795,7 +1795,7 @@ ni_gpct_device_construct(struct comedi_device *dev,
 
        counter_dev->counters = kzalloc_objs(*counter, num_counters);
        counter_dev->regs = kzalloc_objs(*counter_dev->regs,
-                                        counter_dev->num_chips, GFP_KERNEL);
+                                        counter_dev->num_chips);
        if (!counter_dev->regs || !counter_dev->counters) {
                kfree(counter_dev->regs);
                kfree(counter_dev->counters);
index a745c1ca40487a9b210b1f6caaa88a4c965f5e06..8c575113cbcd7ab62fe5504f99e812a1e54ae89f 100644 (file)
@@ -76,7 +76,7 @@ static int adf_tl_alloc_mem(struct adf_accel_dev *accel_dev)
                goto err_free_tl;
 
        telemetry->regs_hist_buff = kmalloc_objs(*telemetry->regs_hist_buff,
-                                                tl_data->num_hbuff, GFP_KERNEL);
+                                                tl_data->num_hbuff);
        if (!telemetry->regs_hist_buff)
                goto err_free_rp_indexes;
 
index 30f83f06d18558fcdcee56f7c00733a928ed2b57..e61a367b0d178dd5211dbc433a4be5d55326ba78 100644 (file)
@@ -1200,8 +1200,7 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle,
 
        if (suof_handle->img_table.num_simgs != 0) {
                suof_img_hdr = kzalloc_objs(img_header,
-                                           suof_handle->img_table.num_simgs,
-                                           GFP_KERNEL);
+                                           suof_handle->img_table.num_simgs);
                if (!suof_img_hdr)
                        return -ENOMEM;
                suof_handle->img_table.simg_hdr = suof_img_hdr;
@@ -1892,8 +1891,7 @@ static int qat_uclo_map_objs_from_mof(struct icp_qat_mof_handle *mobj_handle)
                sobj_chunk_num = sobj_hdr->num_chunks;
 
        mobj_hdr = kzalloc_objs(*mobj_hdr,
-                               size_add(uobj_chunk_num, sobj_chunk_num),
-                               GFP_KERNEL);
+                               size_add(uobj_chunk_num, sobj_chunk_num));
        if (!mobj_hdr)
                return -ENOMEM;
 
index 0c5ad5a5545318ca02afb9fff5caaa3ed6ac4108..cf0d3c2dfc048fd396f257d984614dd7d8d70c41 100644 (file)
@@ -78,7 +78,7 @@ edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_name, unsigned nr_instance
        dev_ctl->instances = dev_inst;
 
        dev_blk = kzalloc_objs(struct edac_device_block,
-                              nr_instances * nr_blocks, GFP_KERNEL);
+                              nr_instances * nr_blocks);
        if (!dev_blk)
                goto free;
 
index fc434739b3c36455f288c218519553d393ebfcf7..09d4e816404b8d40607829ce69909b3ba0c387b6 100644 (file)
@@ -776,7 +776,7 @@ static struct sbridge_dev *alloc_sbridge_dev(int seg, u8 bus, enum domain dom,
                return NULL;
 
        sbridge_dev->pdev = kzalloc_objs(*sbridge_dev->pdev,
-                                        table->n_devs_per_imc, GFP_KERNEL);
+                                        table->n_devs_per_imc);
        if (!sbridge_dev->pdev) {
                kfree(sbridge_dev);
                return NULL;
index b2c6a1660c51fade0e13ff0aa8a502605dc82cea..d9e9815a5f962690e40b05250ddcdeb9566d7890 100644 (file)
@@ -1208,8 +1208,7 @@ static int extcon_alloc_groups(struct extcon_dev *edev)
                return 0;
 
        edev->extcon_dev_type.groups = kzalloc_objs(*edev->extcon_dev_type.groups,
-                                                   edev->max_supported + 2,
-                                                   GFP_KERNEL);
+                                                   edev->max_supported + 2);
        if (!edev->extcon_dev_type.groups)
                return -ENOMEM;
 
index 21c61405f79407919efb7f84ddfba26c13a560b7..d2b40a1a565e86eda39e6fc71d36d1575d602ff6 100644 (file)
@@ -31,8 +31,7 @@
 int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count)
 {
        struct page **page_array __free(kfree) = kzalloc_objs(page_array[0],
-                                                             page_count,
-                                                             GFP_KERNEL);
+                                                             page_count);
 
        if (!page_array)
                return -ENOMEM;
@@ -58,8 +57,7 @@ int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, struct fw_card *card,
                          enum dma_data_direction direction)
 {
        dma_addr_t *dma_addrs __free(kfree) = kzalloc_objs(dma_addrs[0],
-                                                          buffer->page_count,
-                                                          GFP_KERNEL);
+                                                          buffer->page_count);
        int i;
 
        if (!dma_addrs)
index 04b45242dc762fa9350c9906f8f37e5e263c3a53..af3d2fd61cf3fcc455edfb8d32e7be7261315063 100644 (file)
@@ -1179,8 +1179,7 @@ static int amdgpu_discovery_sysfs_ips(struct amdgpu_device *adev,
                         */
                        ip_hw_instance = kzalloc_flex(*ip_hw_instance,
                                                      base_addr,
-                                                     ip->num_base_address,
-                                                     GFP_KERNEL);
+                                                     ip->num_base_address);
                        if (!ip_hw_instance) {
                                DRM_ERROR("no memory for ip_hw_instance");
                                return -ENOMEM;
index d9b2252db00e9616d643630faff3ced57dcbd869..5179fa008626e06413e81decb51bc2b2aeddd6f8 100644 (file)
@@ -1728,8 +1728,7 @@ int amdgpu_gmc_init_mem_ranges(struct amdgpu_device *adev)
        bool valid;
 
        adev->gmc.mem_partitions = kzalloc_objs(struct amdgpu_mem_partition_info,
-                                               AMDGPU_MAX_MEM_RANGES,
-                                               GFP_KERNEL);
+                                               AMDGPU_MAX_MEM_RANGES);
        if (!adev->gmc.mem_partitions)
                return -ENOMEM;
 
index 49eedfbfb5e848b0de58df10eea7482b7d458446..254a4e983f40a89b8ce7be78adb061064b71808e 100644 (file)
@@ -437,7 +437,7 @@ int amdgpu_irq_add_id(struct amdgpu_device *adev,
        if (!adev->irq.client[client_id].sources) {
                adev->irq.client[client_id].sources =
                        kzalloc_objs(struct amdgpu_irq_src *,
-                                    AMDGPU_MAX_IRQ_SRC_ID, GFP_KERNEL);
+                                    AMDGPU_MAX_IRQ_SRC_ID);
                if (!adev->irq.client[client_id].sources)
                        return -ENOMEM;
        }
index ad5d2fcd03d735ebd34d99e2a82cb3e4cea9106b..60bbe00e8024506321e72c152ab9a6dfcf9d5164 100644 (file)
@@ -452,8 +452,7 @@ static int amdgpu_pmu_alloc_pmu_attrs(
                return -ENOMEM;
 
        fmt_attr_group->attrs = kzalloc_objs(*fmt_attr_group->attrs,
-                                            config->num_formats + 1,
-                                            GFP_KERNEL);
+                                            config->num_formats + 1);
 
        if (!fmt_attr_group->attrs)
                goto err_fmt_attr_grp;
@@ -464,7 +463,7 @@ static int amdgpu_pmu_alloc_pmu_attrs(
                goto err_evt_attr;
 
        evt_attr_group->attrs = kzalloc_objs(*evt_attr_group->attrs,
-                                            config->num_events + 1, GFP_KERNEL);
+                                            config->num_events + 1);
 
        if (!evt_attr_group->attrs)
                goto err_evt_attr_grp;
index eb3e62eb7b20d01a23f8ccb95e55899f9935ab63..c0336ca9bf6a8eabd397f66d8812cd650719969d 100644 (file)
@@ -3239,7 +3239,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
        if (from_rom) {
                err_data.err_addr =
                        kzalloc_objs(struct eeprom_table_record,
-                                    adev->umc.retire_unit, GFP_KERNEL);
+                                    adev->umc.retire_unit);
                if (!err_data.err_addr) {
                        dev_warn(adev->dev, "Failed to alloc UMC error address record in mca2pa conversion!\n");
                        return -ENOMEM;
index d319c37e0d4e52e260e71178beb9b6610dafabe9..eeaa56c8d129faafd8113b7f741471d8c9c32bdb 100644 (file)
@@ -1881,8 +1881,7 @@ static int amdgpu_ttm_pools_init(struct amdgpu_device *adev)
                return 0;
 
        adev->mman.ttm_pools = kzalloc_objs(*adev->mman.ttm_pools,
-                                           adev->gmc.num_mem_partitions,
-                                           GFP_KERNEL);
+                                           adev->gmc.num_mem_partitions);
        if (!adev->mman.ttm_pools)
                return -ENOMEM;
 
index 8da772ec4b4050ac1b22468b1e39de48708be91a..4df0f9d5ad11bc48d6faa3e12273ba4a30d9c6c4 100644 (file)
@@ -59,7 +59,7 @@ int amdgpu_umc_page_retirement_mca(struct amdgpu_device *adev,
 
        err_data.err_addr =
                kzalloc_objs(struct eeprom_table_record,
-                            adev->umc.max_ras_err_cnt_per_query, GFP_KERNEL);
+                            adev->umc.max_ras_err_cnt_per_query);
        if (!err_data.err_addr) {
                dev_warn(adev->dev,
                        "Failed to alloc memory for umc error record in MCA notifier!\n");
@@ -106,7 +106,7 @@ void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev,
 
        err_data->err_addr =
                kzalloc_objs(struct eeprom_table_record,
-                            adev->umc.max_ras_err_cnt_per_query, GFP_KERNEL);
+                            adev->umc.max_ras_err_cnt_per_query);
 
        /* still call query_ras_error_address to clear error status
         * even NOMEM error is encountered
@@ -132,8 +132,7 @@ void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev,
                            adev->umc.max_ras_err_cnt_per_query) {
                                err_data->err_addr =
                                        kzalloc_objs(struct eeprom_table_record,
-                                                    adev->umc.max_ras_err_cnt_per_query,
-                                                    GFP_KERNEL);
+                                                    adev->umc.max_ras_err_cnt_per_query);
 
                                /* still call query_ras_error_address to clear error status
                                 * even NOMEM error is encountered
@@ -163,8 +162,7 @@ void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev,
                            adev->umc.max_ras_err_cnt_per_query) {
                                err_data->err_addr =
                                        kzalloc_objs(struct eeprom_table_record,
-                                                    adev->umc.max_ras_err_cnt_per_query,
-                                                    GFP_KERNEL);
+                                                    adev->umc.max_ras_err_cnt_per_query);
 
                                /* still call query_ras_error_address to clear error status
                                 * even NOMEM error is encountered
@@ -554,7 +552,7 @@ int amdgpu_umc_lookup_bad_pages_in_a_row(struct amdgpu_device *adev,
        struct ras_err_data err_data;
 
        err_data.err_addr = kzalloc_objs(struct eeprom_table_record,
-                                        adev->umc.retire_unit, GFP_KERNEL);
+                                        adev->umc.retire_unit);
        if (!err_data.err_addr) {
                dev_warn(adev->dev, "Failed to alloc memory in bad page lookup!\n");
                return 0;
index 2c19b65de840ea0cc00b4f7034884c11afa027a5..5cef8cd141485337b92618dcee3bbf0cdd06faaf 100644 (file)
@@ -500,8 +500,7 @@ static int amdgpu_vkms_sw_init(struct amdgpu_ip_block *ip_block)
        struct amdgpu_device *adev = ip_block->adev;
 
        adev->amdgpu_vkms_output = kzalloc_objs(struct amdgpu_vkms_output,
-                                               adev->mode_info.num_crtc,
-                                               GFP_KERNEL);
+                                               adev->mode_info.num_crtc);
        if (!adev->amdgpu_vkms_output)
                return -ENOMEM;
 
index d0f7bd2a3481bc4a89bedb293e27165a81443849..09dabb3b329733fe3a7ba9ad398d7d60107492a3 100644 (file)
@@ -781,7 +781,7 @@ static int kfd_ioctl_get_process_apertures_new(struct file *filp,
         * the amount of memory allocated by user
         */
        pa = kzalloc_objs(struct kfd_process_device_apertures,
-                         args->num_of_nodes, GFP_KERNEL);
+                         args->num_of_nodes);
        if (!pa)
                return -ENOMEM;
 
index 212f613fad1e2f406e338a104533c40751bb381c..b96fbc03c371aa5793107414a66f75994fd2c102 100644 (file)
@@ -959,7 +959,7 @@ void amdgpu_dm_crtc_secure_display_create_contexts(struct amdgpu_device *adev)
        int i;
 
        crtc_ctx = kzalloc_objs(struct secure_display_crtc_context,
-                               adev->mode_info.num_crtc, GFP_KERNEL);
+                               adev->mode_info.num_crtc);
 
        if (!crtc_ctx) {
                adev->dm.secure_display_ctx.crtc_ctx = NULL;
index 13ac1980a37686f7777c2b86d46ee979f9297e63..8b555187ac75374baa4b92ab2d2421b70dc6b5cc 100644 (file)
@@ -2131,7 +2131,7 @@ enum dc_status dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context,
        display_e2e_pipe_params_st *pipes;
 
        pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                            dc->res_pool->pipe_count, GFP_KERNEL);
+                            dc->res_pool->pipe_count);
        if (!pipes)
                return DC_FAIL_BANDWIDTH_VALIDATE;
 
index e83b8cea1e7347a3d403c9b63de0a9fb322d7820..0f4307f8f3dd595d95cdb45dfeaecc3a87bc67bf 100644 (file)
@@ -931,7 +931,7 @@ static enum dc_status dcn21_validate_bandwidth(struct dc *dc, struct dc_state *c
        display_e2e_pipe_params_st *pipes;
 
        pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                            dc->res_pool->pipe_count, GFP_KERNEL);
+                            dc->res_pool->pipe_count);
        if (!pipes)
                return DC_FAIL_BANDWIDTH_VALIDATE;
 
index df0ff1580acc78137d8077e28fa265c85f9f3f60..2fa86b9587ed00638cb96dd66b026e5b5eeaf08f 100644 (file)
@@ -2045,8 +2045,7 @@ enum dc_status dcn30_validate_bandwidth(struct dc *dc,
        int vlevel = 0;
        int pipe_cnt = 0;
        display_e2e_pipe_params_st *pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                                                        dc->res_pool->pipe_count,
-                                                        GFP_KERNEL);
+                                                        dc->res_pool->pipe_count);
        DC_LOGGER_INIT(dc->ctx->logger);
 
        BW_VAL_TRACE_COUNT();
index 41877105f498b304a78de1a444ba8ebf04a23a35..2055f1f8af6521fa47ad9968a1bce9464182f474 100644 (file)
@@ -1768,8 +1768,7 @@ enum dc_status dcn31_validate_bandwidth(struct dc *dc,
        int vlevel = 0;
        int pipe_cnt = 0;
        display_e2e_pipe_params_st *pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                                                        dc->res_pool->pipe_count,
-                                                        GFP_KERNEL);
+                                                        dc->res_pool->pipe_count);
        DC_LOGGER_INIT(dc->ctx->logger);
 
        BW_VAL_TRACE_COUNT();
index 2ddc1c10e68cd6fd6c70cb146f0326ebcc778702..1939f720ba29573fa2cdd1a82c1abcca4520f20a 100644 (file)
@@ -1706,8 +1706,7 @@ enum dc_status dcn314_validate_bandwidth(struct dc *dc,
        int vlevel = 0;
        int pipe_cnt = 0;
        display_e2e_pipe_params_st *pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                                                        dc->res_pool->pipe_count,
-                                                        GFP_KERNEL);
+                                                        dc->res_pool->pipe_count);
        DC_LOGGER_INIT(dc->ctx->logger);
 
        BW_VAL_TRACE_COUNT();
index f23b7338f7594c2e8f8374d27ef9e7d390c1631e..7ebb7d1193af2e6e77c861c7be6756c3ab415131 100644 (file)
@@ -1751,8 +1751,7 @@ static bool dml1_validate(struct dc *dc, struct dc_state *context, enum dc_valid
        int vlevel = 0;
        int pipe_cnt = 0;
        display_e2e_pipe_params_st *pipes = kzalloc_objs(display_e2e_pipe_params_st,
-                                                        dc->res_pool->pipe_count,
-                                                        GFP_KERNEL);
+                                                        dc->res_pool->pipe_count);
 
        /* To handle Freesync properly, setting FreeSync DML parameters
         * to its default state for the first stage of validation
index 31271fe2a10e36d55e01d74fcea419a70481a058..2639163b8ba2ec183f6c009883f387bf9dbdfaba 100644 (file)
@@ -1715,14 +1715,12 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
 
        if (map_user_ramp && ramp && ramp->type == GAMMA_RGB_256) {
                rgb_user = kvzalloc_objs(*rgb_user,
-                                        ramp->num_entries + _EXTRA_POINTS,
-                                        GFP_KERNEL);
+                                        ramp->num_entries + _EXTRA_POINTS);
                if (!rgb_user)
                        goto rgb_user_alloc_fail;
 
                axis_x = kvzalloc_objs(*axis_x,
-                                      ramp->num_entries + _EXTRA_POINTS,
-                                      GFP_KERNEL);
+                                      ramp->num_entries + _EXTRA_POINTS);
                if (!axis_x)
                        goto axis_x_alloc_fail;
 
@@ -1940,8 +1938,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
        if (ramp && ramp->type != GAMMA_CS_TFM_1D &&
            (map_user_ramp || ramp->type != GAMMA_RGB_256)) {
                rgb_user = kvzalloc_objs(*rgb_user,
-                                        ramp->num_entries + _EXTRA_POINTS,
-                                        GFP_KERNEL);
+                                        ramp->num_entries + _EXTRA_POINTS);
                if (!rgb_user)
                        goto rgb_user_alloc_fail;
 
index 7a0d6e05e83bcdf5beb4fb3ed6e2dfbaa03416d1..cdf3f8e6ec2fd3b4620baea05aaeef59228e913f 100644 (file)
@@ -2725,7 +2725,7 @@ static int kv_parse_power_table(struct amdgpu_device *adev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        adev->pm.dpm.ps = kzalloc_objs(struct amdgpu_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!adev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 72752ddf72a4ab1790d7297af500b4dfb589c44c..6362a14b1a6ee6dab5275689f694bd12947581bc 100644 (file)
@@ -303,7 +303,7 @@ int amdgpu_parse_extended_power_table(struct amdgpu_device *adev)
 
                        adev->pm.dpm.dyn_state.phase_shedding_limits_table.entries =
                                kzalloc_objs(struct amdgpu_phase_shedding_limits_entry,
-                                            psl->ucNumEntries, GFP_KERNEL);
+                                            psl->ucNumEntries);
                        if (!adev->pm.dpm.dyn_state.phase_shedding_limits_table.entries)
                                return -ENOMEM;
 
index 6edefa6ee006f663f78a4e1d1b8a5614b77bdf86..61b1c5aa74cb5161261d91961c8ef53906288268 100644 (file)
@@ -7342,7 +7342,7 @@ static int si_parse_power_table(struct amdgpu_device *adev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        adev->pm.dpm.ps = kzalloc_objs(struct amdgpu_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!adev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 5de17e3bb7d72a80d5edb89eea880bdda137cbb1..6fcca65bd7d4dd764adb2d568ef08c99349f4ee2 100644 (file)
@@ -371,7 +371,7 @@ static int get_mclk_voltage_dependency_table(
                "Invalid PowerPlay Table!", return -1);
 
        mclk_table = kzalloc_flex(*mclk_table, entries,
-                                 mclk_dep_table->ucNumEntries, GFP_KERNEL);
+                                 mclk_dep_table->ucNumEntries);
        if (!mclk_table)
                return -ENOMEM;
 
@@ -415,7 +415,7 @@ static int get_sclk_voltage_dependency_table(
                        "Invalid PowerPlay Table!", return -1);
 
                sclk_table = kzalloc_flex(*sclk_table, entries,
-                                         tonga_table->ucNumEntries, GFP_KERNEL);
+                                         tonga_table->ucNumEntries);
                if (!sclk_table)
                        return -ENOMEM;
 
@@ -444,8 +444,7 @@ static int get_sclk_voltage_dependency_table(
                        "Invalid PowerPlay Table!", return -1);
 
                sclk_table = kzalloc_flex(*sclk_table, entries,
-                                         polaris_table->ucNumEntries,
-                                         GFP_KERNEL);
+                                         polaris_table->ucNumEntries);
                if (!sclk_table)
                        return -ENOMEM;
 
@@ -492,8 +491,7 @@ static int get_pcie_table(
                        "Invalid PowerPlay Table!", return -1);
 
                pcie_table = kzalloc_flex(*pcie_table, entries,
-                                         atom_pcie_table->ucNumEntries,
-                                         GFP_KERNEL);
+                                         atom_pcie_table->ucNumEntries);
                if (!pcie_table)
                        return -ENOMEM;
 
@@ -529,8 +527,7 @@ static int get_pcie_table(
                        "Invalid PowerPlay Table!", return -1);
 
                pcie_table = kzalloc_flex(*pcie_table, entries,
-                                         atom_pcie_table->ucNumEntries,
-                                         GFP_KERNEL);
+                                         atom_pcie_table->ucNumEntries);
                if (!pcie_table)
                        return -ENOMEM;
 
@@ -725,7 +722,7 @@ static int get_mm_clock_voltage_table(
        PP_ASSERT_WITH_CODE((0 != mm_dependency_table->ucNumEntries),
                "Invalid PowerPlay Table!", return -1);
        mm_table = kzalloc_flex(*mm_table, entries,
-                               mm_dependency_table->ucNumEntries, GFP_KERNEL);
+                               mm_dependency_table->ucNumEntries);
        if (!mm_table)
                return -ENOMEM;
 
index a5fb0e883676925079c1f12a92b6638618ed90af..59af3314ffc40e4fc07e9e8122aeaf36482c6657 100644 (file)
@@ -1483,7 +1483,7 @@ static int get_cac_leakage_table(struct pp_hwmgr *hwmgr,
                return -EINVAL;
 
        cac_leakage_table = kzalloc_flex(*cac_leakage_table, entries,
-                                        table->ucNumEntries, GFP_KERNEL);
+                                        table->ucNumEntries);
        if (!cac_leakage_table)
                return -ENOMEM;
 
@@ -1621,7 +1621,7 @@ static int init_phase_shedding_table(struct pp_hwmgr *hwmgr,
 
 
                        table = kzalloc_flex(*table, entries,
-                                            ptable->ucNumEntries, GFP_KERNEL);
+                                            ptable->ucNumEntries);
                        if (!table)
                                return -ENOMEM;
 
index 77067e1315d2215721751efe187058f06c31ce7f..052d139584fd1e005fad52fce92310b8afeb94e7 100644 (file)
@@ -351,7 +351,7 @@ static int get_mm_clock_voltage_table(
                        "Invalid PowerPlay Table!", return -1);
 
        mm_table = kzalloc_flex(*mm_table, entries,
-                               mm_dependency_table->ucNumEntries, GFP_KERNEL);
+                               mm_dependency_table->ucNumEntries);
        if (!mm_table)
                return -ENOMEM;
 
@@ -574,7 +574,7 @@ static int get_socclk_voltage_dependency_table(
                "Invalid PowerPlay Table!", return -1);
 
        clk_table = kzalloc_flex(*clk_table, entries,
-                                clk_dep_table->ucNumEntries, GFP_KERNEL);
+                                clk_dep_table->ucNumEntries);
        if (!clk_table)
                return -ENOMEM;
 
@@ -604,7 +604,7 @@ static int get_mclk_voltage_dependency_table(
                "Invalid PowerPlay Table!", return -1);
 
        mclk_table = kzalloc_flex(*mclk_table, entries,
-                                 mclk_dep_table->ucNumEntries, GFP_KERNEL);
+                                 mclk_dep_table->ucNumEntries);
        if (!mclk_table)
                return -ENOMEM;
 
@@ -641,7 +641,7 @@ static int get_gfxclk_voltage_dependency_table(
                        "Invalid PowerPlay Table!", return -1);
 
        clk_table = kzalloc_flex(*clk_table, entries,
-                                clk_dep_table->ucNumEntries, GFP_KERNEL);
+                                clk_dep_table->ucNumEntries);
        if (!clk_table)
                return -ENOMEM;
 
@@ -703,7 +703,7 @@ static int get_pix_clk_voltage_dependency_table(
                        "Invalid PowerPlay Table!", return -1);
 
        clk_table = kzalloc_flex(*clk_table, entries,
-                                clk_dep_table->ucNumEntries, GFP_KERNEL);
+                                clk_dep_table->ucNumEntries);
        if (!clk_table)
                return -ENOMEM;
 
@@ -794,7 +794,7 @@ static int get_pcie_table(struct pp_hwmgr *hwmgr,
                        return 0);
 
        pcie_table = kzalloc_flex(*pcie_table, entries,
-                                 atom_pcie_table->ucNumEntries, GFP_KERNEL);
+                                 atom_pcie_table->ucNumEntries);
        if (!pcie_table)
                return -ENOMEM;
 
index f4f8b2132edd775fd6d28993b1bf8de957b618a6..af0482c9caa75bf74aa8551e8b2f70c3dda0fbf6 100644 (file)
@@ -2400,8 +2400,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct smu_context *smu, char *buf
                return -EINVAL;
 
        activity_monitor_external = kzalloc_objs(*activity_monitor_external,
-                                                PP_SMC_POWER_PROFILE_COUNT,
-                                                GFP_KERNEL);
+                                                PP_SMC_POWER_PROFILE_COUNT);
        if (!activity_monitor_external)
                return -ENOMEM;
 
index 953228cc46cb601512d97966666c1bc4f85a6653..170113520a432a015de9a75d921658957b47c46f 100644 (file)
@@ -4605,8 +4605,7 @@ int drm_dp_mst_atomic_setup_commit(struct drm_atomic_state *state)
 
                num_commit_deps = hweight32(mst_state->pending_crtc_mask);
                mst_state->commit_deps = kmalloc_objs(*mst_state->commit_deps,
-                                                     num_commit_deps,
-                                                     GFP_KERNEL);
+                                                     num_commit_deps);
                if (!mst_state->commit_deps)
                        return -ENOMEM;
                mst_state->num_commit_deps = num_commit_deps;
index 664c72087da6a3580fb4768bd64242c886b045f1..f2cd2e25f00980e45eb7ef67ad78773afa136cf4 100644 (file)
@@ -136,12 +136,11 @@ drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state)
        if (!state->crtcs)
                goto fail;
        state->planes = kzalloc_objs(*state->planes,
-                                    dev->mode_config.num_total_plane,
-                                    GFP_KERNEL);
+                                    dev->mode_config.num_total_plane);
        if (!state->planes)
                goto fail;
        state->colorops = kzalloc_objs(*state->colorops,
-                                      dev->mode_config.num_colorop, GFP_KERNEL);
+                                      dev->mode_config.num_colorop);
        if (!state->colorops)
                goto fail;
 
index 2d14660f3d457ff1166cb34a2e2cc1486eae789d..dbf984f8e3011c0551da75bca2fe322a5085bbdd 100644 (file)
@@ -326,7 +326,7 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
 
        for_each_free_tree(i) {
                mm->free_trees[i] = kmalloc_objs(struct rb_root,
-                                                mm->max_order + 1, GFP_KERNEL);
+                                                mm->max_order + 1);
                if (!mm->free_trees[i])
                        goto out_free_tree;
 
index 65fbdf3a04f9e24dc46fe7ece69f8bfb8877005a..262b1b8773c58b7613181daa4b98f49973d04a15 100644 (file)
@@ -59,8 +59,7 @@ int drm_client_modeset_create(struct drm_client_dev *client)
 
        for (modeset = client->modesets; modeset->crtc; modeset++) {
                modeset->connectors = kzalloc_objs(*modeset->connectors,
-                                                  max_connector_count,
-                                                  GFP_KERNEL);
+                                                  max_connector_count);
                if (!modeset->connectors)
                        goto err_free;
        }
index 6d0bf06b4d31b5eb50703391849c63363e8ab290..90684f30a048322acf02cb7a5e5c37e43ce437e3 100644 (file)
@@ -846,8 +846,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
                }
 
                connector_set = kmalloc_objs(struct drm_connector *,
-                                            crtc_req->count_connectors,
-                                            GFP_KERNEL);
+                                            crtc_req->count_connectors);
                if (!connector_set) {
                        ret = -ENOMEM;
                        goto out;
index 75b3cf9c1a32a58b4c8b3e2b7d2a0f8aa7467496..5de9aaa5ba04343b7e0c419c2b720a4b36c8365a 100644 (file)
@@ -603,14 +603,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
         * connector data.
         */
        save_encoder_crtcs = kzalloc_objs(struct drm_crtc *,
-                                         dev->mode_config.num_encoder,
-                                         GFP_KERNEL);
+                                         dev->mode_config.num_encoder);
        if (!save_encoder_crtcs)
                return -ENOMEM;
 
        save_connector_encoders = kzalloc_objs(struct drm_encoder *,
-                                              dev->mode_config.num_connector,
-                                              GFP_KERNEL);
+                                              dev->mode_config.num_connector);
        if (!save_connector_encoders) {
                kfree(save_encoder_crtcs);
                return -ENOMEM;
index 28b15d9ee45e04f55a30008d4399e201188ac886..c559ff000e67b2bd83e8878296ce096b1458f8a1 100644 (file)
@@ -1824,7 +1824,7 @@ __set_power_wells(struct i915_power_domains *power_domains,
        power_domains->power_well_count = power_well_count;
        power_domains->power_wells =
                                kzalloc_objs(*power_domains->power_wells,
-                                            power_well_count, GFP_KERNEL);
+                                            power_well_count);
        if (!power_domains->power_wells)
                return -ENOMEM;
 
index 7c276b7cc9294619c710ebb8b7dfbfa6a73de5d1..555d35bae887818171d053ae206855e34c50b5d4 100644 (file)
@@ -2328,8 +2328,7 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
 
        if (!data->streams)
                data->streams = kzalloc_objs(struct hdcp2_streamid_type,
-                                            INTEL_NUM_PIPES(display),
-                                            GFP_KERNEL);
+                                            INTEL_NUM_PIPES(display));
        if (!data->streams) {
                drm_err(display->drm, "Out of Memory\n");
                return -ENOMEM;
index 77bd4152a6c1a1b936c627c18422fd6e00f6d1d6..865b61057566d9f08cbf52450f9959d069f98d52 100644 (file)
@@ -990,8 +990,7 @@ guc_capture_alloc_one_node(struct intel_guc *guc)
 
        for (i = 0; i < GUC_CAPTURE_LIST_TYPE_MAX; ++i) {
                new->reginfo[i].regs = kzalloc_objs(struct guc_mmio_reg,
-                                                   guc->capture->max_mmio_per_node,
-                                                   GFP_KERNEL);
+                                                   guc->capture->max_mmio_per_node);
                if (!new->reginfo[i].regs) {
                        while (i)
                                kfree(new->reginfo[--i].regs);
index 9bd3dc16a4677ce2ec489ba03831147f6781da98..5546be48879541f6a6168cdc2edf86b4eebf20ff 100644 (file)
@@ -70,16 +70,14 @@ nouveau_job_init(struct nouveau_job *job,
                }
 
                job->out_sync.objs = kzalloc_objs(*job->out_sync.objs,
-                                                 job->out_sync.count,
-                                                 GFP_KERNEL);
+                                                 job->out_sync.count);
                if (!job->out_sync.objs) {
                        ret = -ENOMEM;
                        goto err_free_out_sync;
                }
 
                job->out_sync.chains = kzalloc_objs(*job->out_sync.chains,
-                                                   job->out_sync.count,
-                                                   GFP_KERNEL);
+                                                   job->out_sync.count);
                if (!job->out_sync.chains) {
                        ret = -ENOMEM;
                        goto err_free_objs;
index 18054952337fb0d40959e45ebe86540c972b2bdd..a2c702b831a7c3870a70b4bf6f3b00ef81726809 100644 (file)
@@ -886,7 +886,7 @@ static int omap_dmm_probe(struct platform_device *dev)
 
        /* alloc engines */
        omap_dmm->engines = kzalloc_objs(*omap_dmm->engines,
-                                        omap_dmm->num_engines, GFP_KERNEL);
+                                        omap_dmm->num_engines);
        if (!omap_dmm->engines) {
                ret = -ENOMEM;
                goto fail;
index c5ebe68d5a979c8ac5a00253a03b7076cb45c5bb..41604a7aaf853118518e656e3e2a63ce02d5fe0c 100644 (file)
@@ -1258,7 +1258,7 @@ static int panthor_vm_prepare_map_op_ctx(struct panthor_vm_op_ctx *op_ctx,
                   ((ALIGN(va + size, 1ull << 21) - ALIGN_DOWN(va, 1ull << 21)) >> 21);
 
        op_ctx->rsvd_page_tables.pages = kzalloc_objs(*op_ctx->rsvd_page_tables.pages,
-                                                     pt_count, GFP_KERNEL);
+                                                     pt_count);
        if (!op_ctx->rsvd_page_tables.pages) {
                ret = -ENOMEM;
                goto err_cleanup;
@@ -1312,8 +1312,7 @@ static int panthor_vm_prepare_unmap_op_ctx(struct panthor_vm_op_ctx *op_ctx,
 
        if (pt_count) {
                op_ctx->rsvd_page_tables.pages = kzalloc_objs(*op_ctx->rsvd_page_tables.pages,
-                                                             pt_count,
-                                                             GFP_KERNEL);
+                                                             pt_count);
                if (!op_ctx->rsvd_page_tables.pages) {
                        ret = -ENOMEM;
                        goto err_cleanup;
index 8b2b6c54e86a969c073c8c12f7291890e11229c3..75d47e6b914222c85bec9f50fb67e393842f482d 100644 (file)
@@ -59,8 +59,7 @@ static int qxl_alloc_client_monitors_config(struct qxl_device *qdev,
        }
        if (!qdev->client_monitors_config) {
                qdev->client_monitors_config = kzalloc_flex(*qdev->client_monitors_config,
-                                                           heads, count,
-                                                           GFP_KERNEL);
+                                                           heads, count);
                if (!qdev->client_monitors_config)
                        return -ENOMEM;
        }
index 0041623b5add1441915abaf3c16f117fd559787e..22321eb95b7d5de747e47bd6fc2e18c29cde6d88 100644 (file)
@@ -5518,7 +5518,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 1544c24f46476a26eea80d94d3110abc0e7a2eb8..1693b36fc52ddfc3fc00fed5322666e9d28fa505 100644 (file)
@@ -2458,7 +2458,7 @@ static int kv_parse_power_table(struct radeon_device *rdev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 1bcf92f908436dd4281366de947301add208ee58..8059e019d4fcb5de30650498cb0d7e803944eb93 100644 (file)
@@ -4001,8 +4001,7 @@ static int ni_parse_power_table(struct radeon_device *rdev)
        power_info = (union power_info *)(mode_info->atom_context->bios + data_offset);
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      power_info->pplib.ucNumStates,
-                                      GFP_KERNEL);
+                                      power_info->pplib.ucNumStates);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
 
index b4324793c9ffdad386f3c8690db954f114158578..83f1ae31cbdbc8bf6d89f91321580d119fd5409d 100644 (file)
@@ -822,8 +822,7 @@ static int r600_parse_clk_voltage_dep_table(struct radeon_clock_voltage_dependen
        ATOM_PPLIB_Clock_Voltage_Dependency_Record *entry;
 
        radeon_table->entries = kzalloc_objs(struct radeon_clock_voltage_dependency_entry,
-                                            atom_table->ucNumEntries,
-                                            GFP_KERNEL);
+                                            atom_table->ucNumEntries);
        if (!radeon_table->entries)
                return -ENOMEM;
 
@@ -989,7 +988,7 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
 
                        rdev->pm.dpm.dyn_state.phase_shedding_limits_table.entries =
                                kzalloc_objs(struct radeon_phase_shedding_limits_entry,
-                                            psl->ucNumEntries, GFP_KERNEL);
+                                            psl->ucNumEntries);
                        if (!rdev->pm.dpm.dyn_state.phase_shedding_limits_table.entries) {
                                r600_free_extended_power_table(rdev);
                                return -ENOMEM;
index 2f2b3b716d3dc7d0501cf14467d14c1a641e5092..3dd9724b331d6d770b10ba19f6b1636e20c8c3b4 100644 (file)
@@ -2118,7 +2118,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
        if (num_modes == 0)
                return state_index;
        rdev->pm.power_state = kzalloc_objs(struct radeon_power_state,
-                                           num_modes, GFP_KERNEL);
+                                           num_modes);
        if (!rdev->pm.power_state)
                return state_index;
        /* last mode is usually default, array is low to high */
@@ -2590,8 +2590,7 @@ static int radeon_atombios_parse_power_table_4_5(struct radeon_device *rdev)
        if (power_info->pplib.ucNumStates == 0)
                return state_index;
        rdev->pm.power_state = kzalloc_objs(struct radeon_power_state,
-                                           power_info->pplib.ucNumStates,
-                                           GFP_KERNEL);
+                                           power_info->pplib.ucNumStates);
        if (!rdev->pm.power_state)
                return state_index;
        /* first mode is usually default, followed by low to high */
@@ -2608,8 +2607,7 @@ static int radeon_atombios_parse_power_table_4_5(struct radeon_device *rdev)
                          power_info->pplib.ucNonClockSize));
                rdev->pm.power_state[i].clock_info =
                        kzalloc_objs(struct radeon_pm_clock_info,
-                                    (power_info->pplib.ucStateEntrySize - 1) ? (power_info->pplib.ucStateEntrySize - 1) : 1,
-                                    GFP_KERNEL);
+                                    (power_info->pplib.ucStateEntrySize - 1) ? (power_info->pplib.ucStateEntrySize - 1) : 1);
                if (!rdev->pm.power_state[i].clock_info)
                        return state_index;
                if (power_info->pplib.ucStateEntrySize - 1) {
@@ -2692,8 +2690,7 @@ static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
        if (state_array->ucNumEntries == 0)
                return state_index;
        rdev->pm.power_state = kzalloc_objs(struct radeon_power_state,
-                                           state_array->ucNumEntries,
-                                           GFP_KERNEL);
+                                           state_array->ucNumEntries);
        if (!rdev->pm.power_state)
                return state_index;
        power_state_offset = (u8 *)state_array->states;
@@ -2705,8 +2702,7 @@ static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
                        &non_clock_info_array->nonClockInfo[non_clock_array_index];
                rdev->pm.power_state[i].clock_info =
                        kzalloc_objs(struct radeon_pm_clock_info,
-                                    power_state->v2.ucNumDPMLevels ? power_state->v2.ucNumDPMLevels : 1,
-                                    GFP_KERNEL);
+                                    power_state->v2.ucNumDPMLevels ? power_state->v2.ucNumDPMLevels : 1);
                if (!rdev->pm.power_state[i].clock_info)
                        return state_index;
                if (power_state->v2.ucNumDPMLevels) {
index af0a032e3dedd6c97b626a108673506a7ca5e402..64bb4cafb8b5300d6af5da00a024cbc8e0e74031 100644 (file)
@@ -805,8 +805,7 @@ static int rs780_parse_power_table(struct radeon_device *rdev)
        power_info = (union power_info *)(mode_info->atom_context->bios + data_offset);
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      power_info->pplib.ucNumStates,
-                                      GFP_KERNEL);
+                                      power_info->pplib.ucNumStates);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
 
index 3cb8842fce656f46ad6271e1d07f8ba16b53b6fd..c734370e53369ab5d0510084f146182edc794f23 100644 (file)
@@ -1888,8 +1888,7 @@ static int rv6xx_parse_power_table(struct radeon_device *rdev)
        power_info = (union power_info *)(mode_info->atom_context->bios + data_offset);
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      power_info->pplib.ucNumStates,
-                                      GFP_KERNEL);
+                                      power_info->pplib.ucNumStates);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
 
index 4d6ed9668ad15932cb7861993668d033f89ab0bc..5f5cf5dd1d587b1172c483ab5f20ecc3fe744983 100644 (file)
@@ -2284,8 +2284,7 @@ int rv7xx_parse_power_table(struct radeon_device *rdev)
        power_info = (union power_info *)(mode_info->atom_context->bios + data_offset);
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      power_info->pplib.ucNumStates,
-                                      GFP_KERNEL);
+                                      power_info->pplib.ucNumStates);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
 
index 6613957fff06ad397448bc65f1b2993eab5ad99c..b4aa49b1ac634977a789ed35eba4cb9046b3a314 100644 (file)
@@ -6779,7 +6779,7 @@ static int si_parse_power_table(struct radeon_device *rdev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 5f14adeee13ed93e076f4fb8f2d1e6466f960012..acee6c82e9f088e97cc7dfb1b78ffae139d34c08 100644 (file)
@@ -1480,7 +1480,7 @@ static int sumo_parse_power_table(struct radeon_device *rdev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 34b7beb9cf9ae2a6c07f4a2c6df747e5861c771e..566615c877cc3a223d2ad88e94942c3a67c60988 100644 (file)
@@ -1711,7 +1711,7 @@ static int trinity_parse_power_table(struct radeon_device *rdev)
                 le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset));
 
        rdev->pm.dpm.ps = kzalloc_objs(struct radeon_ps,
-                                      state_array->ucNumEntries, GFP_KERNEL);
+                                      state_array->ucNumEntries);
        if (!rdev->pm.dpm.ps)
                return -ENOMEM;
        power_state_offset = (u8 *)state_array->states;
index 091f5c7e9730004f32996f649cc803d5495f8415..18f2bf1fe89face6ede3de465c80b63a6635511e 100644 (file)
@@ -485,7 +485,7 @@ v3d_get_cpu_timestamp_query_params(struct drm_file *file_priv,
        job->job_type = V3D_CPU_JOB_TYPE_TIMESTAMP_QUERY;
 
        query_info->queries = kvmalloc_objs(struct v3d_timestamp_query,
-                                           timestamp.count, GFP_KERNEL);
+                                           timestamp.count);
        if (!query_info->queries)
                return -ENOMEM;
 
@@ -543,7 +543,7 @@ v3d_get_cpu_reset_timestamp_params(struct drm_file *file_priv,
        job->job_type = V3D_CPU_JOB_TYPE_RESET_TIMESTAMP_QUERY;
 
        query_info->queries = kvmalloc_objs(struct v3d_timestamp_query,
-                                           reset.count, GFP_KERNEL);
+                                           reset.count);
        if (!query_info->queries)
                return -ENOMEM;
 
@@ -599,7 +599,7 @@ v3d_get_cpu_copy_query_results_params(struct drm_file *file_priv,
        job->job_type = V3D_CPU_JOB_TYPE_COPY_TIMESTAMP_QUERY;
 
        query_info->queries = kvmalloc_objs(struct v3d_timestamp_query,
-                                           copy.count, GFP_KERNEL);
+                                           copy.count);
        if (!query_info->queries)
                return -ENOMEM;
 
index 84237edf1ac0fb409ca192946c3b29ccfa304026..fd77ab6568cbbc080c0b7c848d0257f00a0f3acd 100644 (file)
@@ -982,8 +982,7 @@ int vmw_mksstat_add_ioctl(struct drm_device *dev, void *data,
 
        /* Allocate statically-sized temp arrays for pages -- too big to keep in frame */
        pages_stat = (struct page **) kmalloc_objs(*pages_stat,
-                                                  ARRAY_SIZE(pdesc->statPPNs) + ARRAY_SIZE(pdesc->infoPPNs) + ARRAY_SIZE(pdesc->strsPPNs),
-                                                  GFP_KERNEL);
+                                                  ARRAY_SIZE(pdesc->statPPNs) + ARRAY_SIZE(pdesc->infoPPNs) + ARRAY_SIZE(pdesc->strsPPNs));
 
        if (!pages_stat)
                goto err_nomem;
index 88cc85395791c2f52be092243b660c6d13ad2f9a..a4888277164d3bea13ca6e4414044d8bcab71e1c 100644 (file)
@@ -213,7 +213,7 @@ int xen_drm_front_evtchnl_create_all(struct xen_drm_front_info *front_info)
 
        front_info->evt_pairs =
                        kzalloc_objs(struct xen_drm_front_evtchnl_pair,
-                                    cfg->num_connectors, GFP_KERNEL);
+                                    cfg->num_connectors);
        if (!front_info->evt_pairs) {
                ret = -ENOMEM;
                goto fail;
index ef307c4c575e4dacc51a00cfb8d749fa91400d28..840a601138688df5ad246b17c1d9a606f7c0380c 100644 (file)
@@ -1320,8 +1320,7 @@ int hid_open_report(struct hid_device *device)
        end = start + size;
 
        device->collection = kzalloc_objs(struct hid_collection,
-                                         HID_DEFAULT_NUM_COLLECTIONS,
-                                         GFP_KERNEL);
+                                         HID_DEFAULT_NUM_COLLECTIONS);
        if (!device->collection) {
                ret = -ENOMEM;
                goto err;
index 16b9959dba7eb42f1074babb9d08fd3561cba941..b5b322ce16df442cb40eec353935c0f2d4d891f9 100644 (file)
@@ -314,7 +314,7 @@ int vmbus_connect(void)
                version >> 16, version & 0xFFFF);
 
        vmbus_connection.channels = kzalloc_objs(struct vmbus_channel *,
-                                                MAX_CHANNEL_RELIDS, GFP_KERNEL);
+                                                MAX_CHANNEL_RELIDS);
        if (vmbus_connection.channels == NULL) {
                ret = -ENOMEM;
                goto cleanup;
index 2da06524bdb3ee4155b1f08757f6954ce9cbb3a2..1e3fab5f7946873c560127d1bec4c68b0851dbb1 100644 (file)
@@ -246,7 +246,7 @@ static int read_domain_devices(struct acpi_power_meter_resource *resource)
                goto end;
 
        resource->domain_devices = kzalloc_objs(struct acpi_device *,
-                                               pss->package.count, GFP_KERNEL);
+                                               pss->package.count);
        if (!resource->domain_devices) {
                res = -ENOMEM;
                goto end;
index 55f54bd556a47f4573a44b0fab3a42be463f2498..6a0d94711eadb8923181725a39252807ae811e94 100644 (file)
@@ -493,7 +493,7 @@ init_temp_data(struct platform_data *pdata, unsigned int cpu, int pkg_flag)
                 */
                pdata->nr_cores = NUM_REAL_CORES;
                pdata->core_data = kzalloc_objs(struct temp_data *,
-                                               pdata->nr_cores, GFP_KERNEL);
+                                               pdata->nr_cores);
                if (!pdata->core_data)
                        return NULL;
        }
index 14d95d63f27780d41878a7c28eccf0046258ac41..aba4b10a17acc31acee2febce4cf9bbd0bf0196c 100644 (file)
@@ -291,14 +291,12 @@ static int tsc2046_adc_read_one(struct tsc2046_adc_priv *priv, int ch_idx,
                return -ENOSPC;
 
        struct tsc2046_adc_atom *tx_buf __free(kfree) = kzalloc_objs(*tx_buf,
-                                                                    max_count,
-                                                                    GFP_KERNEL);
+                                                                    max_count);
        if (!tx_buf)
                return -ENOMEM;
 
        struct tsc2046_adc_atom *rx_buf __free(kfree) = kzalloc_objs(*rx_buf,
-                                                                    max_count,
-                                                                    GFP_KERNEL);
+                                                                    max_count);
        if (!rx_buf)
                return -ENOMEM;
 
index f95983f81f638c5bf0372fc4fb64d91bf77f5a07..bd32fa57b1d78260b6835a1ef19b56542d9507b6 100644 (file)
@@ -440,7 +440,7 @@ static int ad5360_alloc_channels(struct iio_dev *indio_dev)
        unsigned int i;
 
        channels = kzalloc_objs(struct iio_chan_spec,
-                               st->chip_info->num_channels, GFP_KERNEL);
+                               st->chip_info->num_channels);
 
        if (!channels)
                return -ENOMEM;
index d4a9dd889eef36e747444c18b3bc7ab712c77cde..22eefd048ba92e64affb84006ab3750a402b975f 100644 (file)
@@ -1587,7 +1587,7 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
 
        iio_dev_opaque->chan_attr_group.attrs =
                kzalloc_objs(iio_dev_opaque->chan_attr_group.attrs[0],
-                            attrcount + 1, GFP_KERNEL);
+                            attrcount + 1);
        if (iio_dev_opaque->chan_attr_group.attrs == NULL) {
                ret = -ENOMEM;
                goto error_clear_attrs;
index d71cb9fd09a3a618f700495e0057616e7104b2d5..4149efcd55390c8a94c40a62d758f2b50ca9558b 100644 (file)
@@ -607,7 +607,7 @@ int iio_device_register_eventset(struct iio_dev *indio_dev)
 
        ev_int->group.name = iio_event_group_name;
        ev_int->group.attrs = kzalloc_objs(ev_int->group.attrs[0],
-                                          attrcount + 1, GFP_KERNEL);
+                                          attrcount + 1);
        if (ev_int->group.attrs == NULL) {
                ret = -ENOMEM;
                goto error_free_setup_event_lines;
index 21b7753eedad494ef97b0255cdae2ec2f2a9453a..b415d4aad04f8d55b9e14b3ffe5a6c84aa4414d8 100644 (file)
@@ -1472,7 +1472,7 @@ ib_cache_update(struct ib_device *device, u32 port, bool update_gids,
 
        if (update_pkeys) {
                pkey_cache = kmalloc_flex(*pkey_cache, table,
-                                         tprops->pkey_tbl_len, GFP_KERNEL);
+                                         tprops->pkey_tbl_len);
                if (!pkey_cache) {
                        ret = -ENOMEM;
                        goto err;
index d892a597ac2bd81b0cf9e501c8429adaacb24ea1..e54c07c745754d0f8a6ac2a5fa00e98d1646f272 100644 (file)
@@ -5376,8 +5376,7 @@ static int cma_add_one(struct ib_device *device)
 
        cma_dev->device = device;
        cma_dev->default_gid_type = kzalloc_objs(*cma_dev->default_gid_type,
-                                                device->phys_port_cnt,
-                                                GFP_KERNEL);
+                                                device->phys_port_cnt);
        if (!cma_dev->default_gid_type) {
                ret = -ENOMEM;
                goto free_cma_dev;
index 358ffe6756a4beb3a3d756778bb39a0413b31678..1b5f1ee0a557ce04d6b9b5f7e24c4a570d629b27 100644 (file)
@@ -812,7 +812,7 @@ static int alloc_port_data(struct ib_device *device)
         * empty slots at the beginning.
         */
        pdata_rcu = kzalloc_flex(*pdata_rcu, pdata,
-                                size_add(rdma_end_port(device), 1), GFP_KERNEL);
+                                size_add(rdma_end_port(device), 1));
        if (!pdata_rcu)
                return -ENOMEM;
        /*
index 7817b7dab7f9a8720228872b05ac69bc4cd1da90..990cf928b32a87045546b642c8ddfc75a964ec79 100644 (file)
@@ -59,12 +59,12 @@ static struct iwpm_admin_data iwpm_admin;
 int iwpm_init(u8 nl_client)
 {
        iwpm_hash_bucket = kzalloc_objs(struct hlist_head,
-                                       IWPM_MAPINFO_HASH_SIZE, GFP_KERNEL);
+                                       IWPM_MAPINFO_HASH_SIZE);
        if (!iwpm_hash_bucket)
                return -ENOMEM;
 
        iwpm_reminfo_bucket = kzalloc_objs(struct hlist_head,
-                                          IWPM_REMINFO_HASH_SIZE, GFP_KERNEL);
+                                          IWPM_REMINFO_HASH_SIZE);
        if (!iwpm_reminfo_bucket) {
                kfree(iwpm_hash_bucket);
                return -ENOMEM;
index 7f565613b5cfd432b5086ffcce2d3a717bb3e76b..69df8b703cbd54002780d1cdf329f31c822a42ba 100644 (file)
@@ -859,7 +859,7 @@ alloc_hw_stats_device(struct ib_device *ibdev)
        if (!data)
                goto err_free_stats;
        data->group.attrs = kzalloc_objs(*data->group.attrs,
-                                        stats->num_counters + 2, GFP_KERNEL);
+                                        stats->num_counters + 2);
        if (!data->group.attrs)
                goto err_free_data;
 
@@ -1090,8 +1090,7 @@ static int setup_gid_attrs(struct ib_port *port,
        int ret;
 
        gid_attr_group = kzalloc_flex(*gid_attr_group, attrs_list,
-                                     size_mul(attr->gid_tbl_len, 2),
-                                     GFP_KERNEL);
+                                     size_mul(attr->gid_tbl_len, 2));
        if (!gid_attr_group)
                return -ENOMEM;
        gid_attr_group->port = port;
@@ -1155,8 +1154,7 @@ static struct ib_port *setup_port(struct ib_core_device *coredev, int port_num,
        int ret;
 
        p = kvzalloc_flex(*p, attrs_list,
-                         size_add(attr->gid_tbl_len, attr->pkey_tbl_len),
-                         GFP_KERNEL);
+                         size_add(attr->gid_tbl_len, attr->pkey_tbl_len));
        if (!p)
                return ERR_PTR(-ENOMEM);
        p->ibdev = device;
index 7ed69890d87a16f6c82d6d2863dbfc54be88688d..31b248295854bdb3f719715cbb2fa000257395c0 100644 (file)
@@ -446,7 +446,7 @@ static int uapi_finalize(struct uverbs_api *uapi)
        uapi->num_write = max_write + 1;
        uapi->num_write_ex = max_write_ex + 1;
        data = kmalloc_objs(*uapi->write_methods,
-                           uapi->num_write + uapi->num_write_ex, GFP_KERNEL);
+                           uapi->num_write + uapi->num_write_ex);
        if (!data)
                return -ENOMEM;
 
index 2f907246478facf4ba806f1c0a8e51b04202495c..341bae3d8a1d9bafd5303bd7e77eaf9fdaeb8315 100644 (file)
@@ -873,7 +873,7 @@ int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, struct net_device *netdev)
        /* Allocate one extra to hold the QP1 entries */
        rcfw->qp_tbl_size = max_t(u32, BNXT_RE_MAX_QPC_COUNT + 1, dev_attr->max_qp);
        rcfw->qp_tbl = kzalloc_objs(struct bnxt_qplib_qp_node,
-                                   rcfw->qp_tbl_size, GFP_KERNEL);
+                                   rcfw->qp_tbl_size);
        if (!rcfw->qp_tbl)
                return -ENOMEM;
 
index 505bf009941e247b430a27be12833e751ee0b4ba..102c5646b9ed61052b8c007261de35b71278cdb3 100644 (file)
@@ -882,8 +882,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
 
        if (c4iw_wr_log) {
                rdev->wr_log = kzalloc_objs(*rdev->wr_log,
-                                           1 << c4iw_wr_log_size_order,
-                                           GFP_KERNEL);
+                                           1 << c4iw_wr_log_size_order);
                if (rdev->wr_log) {
                        rdev->wr_log_size = 1 << c4iw_wr_log_size_order;
                        atomic_set(&rdev->wr_log_idx, 0);
index 0a2d9eb725113fb64e686988c0cab25c8c4d578c..d9a86e4c54618959dd90ff4c6b74f8e6b0e238ba 100644 (file)
@@ -2551,7 +2551,7 @@ static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
                if (!wq->sw_rq)
                        goto err_put_qpid;
                wq->pending_wrs = kzalloc_objs(*srq->wq.pending_wrs,
-                                              srq->wq.size, GFP_KERNEL);
+                                              srq->wq.size);
                if (!wq->pending_wrs)
                        goto err_free_sw_rq;
        }
index a684e25482b27e9402214ea840d9af5932082748..2b20907c9c124831cc04d961c0d0835b79c71021 100644 (file)
@@ -407,8 +407,7 @@ static int _dev_comp_vect_mappings_create(struct hfi1_devdata *dd,
        }
 
        dd->comp_vect_mappings = kzalloc_objs(*dd->comp_vect_mappings,
-                                             dd->comp_vect_possible_cpus,
-                                             GFP_KERNEL);
+                                             dd->comp_vect_possible_cpus);
        if (!dd->comp_vect_mappings) {
                ret = -ENOMEM;
                goto fail;
index bc61a13c336a03693942c43c45ca5502a6591719..51afaac88c725920b4aa69692170c24dd25fdd64 100644 (file)
@@ -408,7 +408,7 @@ int init_send_contexts(struct hfi1_devdata *dd)
        dd->hw_to_sw = kmalloc_array(TXE_NUM_CONTEXTS, sizeof(u8),
                                        GFP_KERNEL);
        dd->send_contexts = kzalloc_objs(struct send_context_info,
-                                        dd->num_send_contexts, GFP_KERNEL);
+                                        dd->num_send_contexts);
        if (!dd->send_contexts || !dd->hw_to_sw) {
                kfree(dd->hw_to_sw);
                kfree(dd->send_contexts);
@@ -2051,7 +2051,7 @@ int init_credit_return(struct hfi1_devdata *dd)
        int i;
 
        dd->cr_base = kzalloc_objs(struct credit_return_base,
-                                  node_affinity.num_possible_nodes, GFP_KERNEL);
+                                  node_affinity.num_possible_nodes);
        if (!dd->cr_base) {
                ret = -ENOMEM;
                goto done;
index a092c92953de3b8fcd53c7129501831d17615419..5b01070ed66f81b60cc7855e68bfb4dbda010db3 100644 (file)
@@ -59,8 +59,7 @@ int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd,
        if (!HFI1_CAP_UGET_MASK(uctxt->flags, TID_UNMAP)) {
                fd->invalid_tid_idx = 0;
                fd->invalid_tids = kzalloc_objs(*fd->invalid_tids,
-                                               uctxt->expected_count,
-                                               GFP_KERNEL);
+                                               uctxt->expected_count);
                if (!fd->invalid_tids) {
                        kfree(fd->entry_to_rb);
                        fd->entry_to_rb = NULL;
index 9b60392afa39f77d20a6acf924b53ab74d93a738..4eaaedcc76521002670112ce78a66934ad0e48ca 100644 (file)
@@ -778,8 +778,7 @@ int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
                                goto err_kcalloc_bt_l1;
 
                        table->bt_l1_dma_addr = kzalloc_objs(*table->bt_l1_dma_addr,
-                                                            num_bt_l1,
-                                                            GFP_KERNEL);
+                                                            num_bt_l1);
 
                        if (!table->bt_l1_dma_addr)
                                goto err_kcalloc_l1_dma;
@@ -793,8 +792,7 @@ int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
                                goto err_kcalloc_bt_l0;
 
                        table->bt_l0_dma_addr = kzalloc_objs(*table->bt_l0_dma_addr,
-                                                            num_bt_l0,
-                                                            GFP_KERNEL);
+                                                            num_bt_l0);
                        if (!table->bt_l0_dma_addr)
                                goto err_kcalloc_l0_dma;
                }
index 741e4f3c557f9818a78321089948680aca72e71a..896af1828a38de67bccb4c7295aa836637297a12 100644 (file)
@@ -459,8 +459,7 @@ int hns_roce_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
 
        mr->npages = 0;
        mr->page_list = kvzalloc_objs(dma_addr_t,
-                                     mr->pbl_mtr.hem_cfg.buf_pg_count,
-                                     GFP_KERNEL);
+                                     mr->pbl_mtr.hem_cfg.buf_pg_count);
        if (!mr->page_list)
                return sg_num;
 
index 3d6a9c42726996b66c12ab176a32cd790a33e7d9..8d99cd00f002c59a5bf964bcb4a2e7035693faac 100644 (file)
@@ -794,7 +794,7 @@ int mana_ib_create_eqs(struct mana_ib_dev *mdev)
                return err;
 
        mdev->eqs = kzalloc_objs(struct gdma_queue *,
-                                mdev->ib_dev.num_comp_vectors, GFP_KERNEL);
+                                mdev->ib_dev.num_comp_vectors);
        if (!mdev->eqs) {
                err = -ENOMEM;
                goto destroy_fatal_eq;
index e5e7ecd14284e40752e4a3020b7dc4e6453b1888..9aa6817aaf1664c692c7c71d22d486c4121614ae 100644 (file)
@@ -2158,7 +2158,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,
        int i;
 
        ctx->tun = kzalloc_objs(struct mlx4_ib_demux_pv_ctx *,
-                               dev->dev->caps.sqp_demux, GFP_KERNEL);
+                               dev->dev->caps.sqp_demux);
        if (!ctx->tun)
                return -ENOMEM;
 
index 6ee12aab12597ffaf028a7470bbdc85effb24f51..63360c5a73c778825ec8350939f9de71c7fc0224 100644 (file)
@@ -2426,7 +2426,7 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
        int i, j, eq = 0, total_eqs = 0;
 
        ibdev->eq_table = kzalloc_objs(ibdev->eq_table[0],
-                                      dev->caps.num_comp_vectors, GFP_KERNEL);
+                                      dev->caps.num_comp_vectors);
        if (!ibdev->eq_table)
                return;
 
index b52abe8c47c40c5a1dfb74216c8fc610984c1c72..b44832025ab7c13fac82d2f987eda205586b7fec 100644 (file)
@@ -181,7 +181,7 @@ int mlx5r_macsec_init_gids_and_devlist(struct mlx5_ib_dev *dev)
        max_gids = MLX5_CAP_ROCE(dev->mdev, roce_address_table_size);
        for (i = 0; i < dev->num_ports; i++) {
                dev->port[i].reserved_gids = kzalloc_objs(*dev->port[i].reserved_gids,
-                                                         max_gids, GFP_KERNEL);
+                                                         max_gids);
                if (!dev->port[i].reserved_gids)
                        goto err;
 
index ba89b03d36f9b71ee907ec434f1b45a72f366451..635002e684a55fcc2f6c42127f67abba38809b08 100644 (file)
@@ -5205,8 +5205,7 @@ static struct ib_device *mlx5_ib_add_sub_dev(struct ib_device *parent,
                return ERR_PTR(-ENOMEM);
 
        mplane->port = kzalloc_objs(*mplane->port,
-                                   mparent->num_plane * mparent->num_ports,
-                                   GFP_KERNEL);
+                                   mparent->num_plane * mparent->num_ports);
        if (!mplane->port) {
                ret = -ENOMEM;
                goto fail_kcalloc;
index 1c51814d535469c1c799c3d96f52f2962421532d..c50a50be6c61d9fddbb79fe8e7454e9e3d845607 100644 (file)
@@ -560,7 +560,7 @@ int mthca_cmd_use_events(struct mthca_dev *dev)
        int i;
 
        dev->cmd.context = kmalloc_objs(struct mthca_cmd_context,
-                                       dev->cmd.max_cmds, GFP_KERNEL);
+                                       dev->cmd.max_cmds);
        if (!dev->cmd.context)
                return -ENOMEM;
 
index e4380d7f232722fd7be96e996687ed35998e15db..9c5eb03f354ded5dcbdc214298e904f2b7c2c089 100644 (file)
@@ -718,7 +718,7 @@ int mthca_init_db_tab(struct mthca_dev *dev)
        dev->db_tab->min_group2 = dev->db_tab->npages - 1;
 
        dev->db_tab->page = kmalloc_objs(*dev->db_tab->page,
-                                        dev->db_tab->npages, GFP_KERNEL);
+                                        dev->db_tab->npages);
        if (!dev->db_tab->page) {
                kfree(dev->db_tab);
                return -ENOMEM;
index e94aa9608465bfb02151ce47288a8af45166e1b6..691c64a7351606b980c378b09bb243688b6fc176 100644 (file)
@@ -150,8 +150,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,
 
                while (ret) {
                        chunk = kmalloc_flex(*chunk, page_list,
-                                            min_t(int, ret, USNIC_UIOM_PAGE_CHUNK),
-                                            GFP_KERNEL);
+                                            min_t(int, ret, USNIC_UIOM_PAGE_CHUNK));
                        if (!chunk) {
                                ret = -ENOMEM;
                                goto out;
index f27c28d934ae64842d5d229f107d6152a54001b7..cc889b4889d8e9a680bef702b55dd04adedfd794 100644 (file)
@@ -272,7 +272,7 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
                ib_set_device_ops(&dev->ib_dev, &pvrdma_dev_srq_ops);
 
                dev->srq_tbl = kzalloc_objs(struct pvrdma_srq *,
-                                           dev->dsr->caps.max_srq, GFP_KERNEL);
+                                           dev->dsr->caps.max_srq);
                if (!dev->srq_tbl)
                        goto err_qp_free;
        }
index 0ae0f7722e0ff9c37091119fcd8a4d84185050fa..12a2d12fef07061ac460760cf6fb58d45d6bc0d2 100644 (file)
@@ -241,7 +241,7 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_conn,
 
        iser_conn->num_rx_descs = session->cmds_max;
        iser_conn->rx_descs = kmalloc_objs(struct iser_rx_desc,
-                                          iser_conn->num_rx_descs, GFP_KERNEL);
+                                          iser_conn->num_rx_descs);
        if (!iser_conn->rx_descs)
                goto rx_desc_alloc_fail;
 
index 233adb1fe9ac42930e65a03bc56c52cc9d7f81d4..348005e71891c8baf0f341365d2dc7d020cbdef1 100644 (file)
@@ -153,7 +153,7 @@ isert_alloc_rx_descriptors(struct isert_conn *isert_conn)
        int i, j;
 
        isert_conn->rx_descs = kzalloc_objs(struct iser_rx_desc,
-                                           ISERT_QP_MAX_RECV_DTOS, GFP_KERNEL);
+                                           ISERT_QP_MAX_RECV_DTOS);
        if (!isert_conn->rx_descs)
                return -ENOMEM;
 
index f1c3b4d143248993c0ac95e783e2554fdc100c6b..3362362f9e2e56f770babbddf35335b893c58957 100644 (file)
@@ -1871,7 +1871,7 @@ static int rtrs_rdma_conn_established(struct rtrs_clt_con *con,
 
                if (!clt_path->rbufs) {
                        clt_path->rbufs = kzalloc_objs(*clt_path->rbufs,
-                                                      queue_depth, GFP_KERNEL);
+                                                      queue_depth);
                        if (!clt_path->rbufs)
                                return -ENOMEM;
                }
index a05aed1fe5e953d91bca55ccb0f2c745cb23e068..f3fd7f39efb488893b8c4cda20b504124ebc9b89 100644 (file)
@@ -660,8 +660,7 @@ static inline void free_dev_table(struct amd_iommu_pci_seg *pci_seg)
 static inline int __init alloc_rlookup_table(struct amd_iommu_pci_seg *pci_seg)
 {
        pci_seg->rlookup_table = kvzalloc_objs(*pci_seg->rlookup_table,
-                                              pci_seg->last_bdf + 1,
-                                              GFP_KERNEL);
+                                              pci_seg->last_bdf + 1);
        if (pci_seg->rlookup_table == NULL)
                return -ENOMEM;
 
@@ -677,8 +676,7 @@ static inline void free_rlookup_table(struct amd_iommu_pci_seg *pci_seg)
 static inline int __init alloc_irq_lookup_table(struct amd_iommu_pci_seg *pci_seg)
 {
        pci_seg->irq_lookup_table = kvzalloc_objs(*pci_seg->irq_lookup_table,
-                                                 pci_seg->last_bdf + 1,
-                                                 GFP_KERNEL);
+                                                 pci_seg->last_bdf + 1);
        if (pci_seg->irq_lookup_table == NULL)
                return -ENOMEM;
 
@@ -696,7 +694,7 @@ static int __init alloc_alias_table(struct amd_iommu_pci_seg *pci_seg)
        int i;
 
        pci_seg->alias_table = kvmalloc_objs(*pci_seg->alias_table,
-                                            pci_seg->last_bdf + 1, GFP_KERNEL);
+                                            pci_seg->last_bdf + 1);
        if (!pci_seg->alias_table)
                return -ENOMEM;
 
index d60ba624105cd0338116cbe81363d088b09d34c2..4d00d796f078306ef591999ac75a6dd6eb571840 100644 (file)
@@ -1515,8 +1515,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_smmu_master *master)
                        DIV_ROUND_UP(max_contexts, CTXDESC_L2_ENTRIES);
 
                cd_table->l2.l2ptrs = kzalloc_objs(*cd_table->l2.l2ptrs,
-                                                  cd_table->l2.num_l1_ents,
-                                                  GFP_KERNEL);
+                                                  cd_table->l2.num_l1_ents);
                if (!cd_table->l2.l2ptrs)
                        return -ENOMEM;
 
index 8dcde926794d739022ada0784317c9d65c8fceba..6fe5563eaf9eb2a680cc094152598ed8e4f6d1da 100644 (file)
@@ -743,7 +743,7 @@ static int tegra241_cmdqv_init_vintf(struct tegra241_cmdqv *cmdqv, u16 max_idx,
        vintf->base = cmdqv->base + TEGRA241_VINTF(idx);
 
        vintf->lvcmdqs = kzalloc_objs(*vintf->lvcmdqs,
-                                     cmdqv->num_lvcmdqs_per_vintf, GFP_KERNEL);
+                                     cmdqv->num_lvcmdqs_per_vintf);
        if (!vintf->lvcmdqs) {
                ida_free(&cmdqv->vintf_ids, idx);
                return -ENOMEM;
index ac9d6a4c1432fc7d5ca972947b1d957bc17d32ed..f9cd18316d16b12b2f5f1777a184449ffa59b3d0 100644 (file)
@@ -716,7 +716,7 @@ int iova_domain_init_rcaches(struct iova_domain *iovad)
        int i, ret;
 
        iovad->rcaches = kzalloc_objs(struct iova_rcache,
-                                     IOVA_RANGE_CACHE_MAX_SIZE, GFP_KERNEL);
+                                     IOVA_RANGE_CACHE_MAX_SIZE);
        if (!iovad->rcaches)
                return -ENOMEM;
 
index d057209e1d153ec6ab1a48a92b828d120a5f4e4d..50f88293b4ccf3fe51724789b37770871d389adf 100644 (file)
@@ -155,7 +155,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
        }
 
        chip_data->intpol_bases = kzalloc_objs(*chip_data->intpol_bases,
-                                              nr_intpol_bases, GFP_KERNEL);
+                                              nr_intpol_bases);
        if (!chip_data->intpol_bases) {
                ret = -ENOMEM;
                goto out_free_intpol_words;
index 61f46fd800fcc2b094b1a1d75aaf832fcb9bc403..e3ed874d89e73bec97f08559cab9e2a805f5409e 100644 (file)
@@ -513,7 +513,7 @@ static int __init imsic_local_init(void)
 
                /* Allocate vector array */
                lpriv->vectors = kzalloc_objs(*lpriv->vectors,
-                                             global->nr_ids + 1, GFP_KERNEL);
+                                             global->nr_ids + 1);
                if (!lpriv->vectors)
                        goto fail_local_cleanup;
 
index 983b944ea29217fa50bb92584a25f38ac335c4a9..5fdf335acb46af761b0afd609e281cb4fc126e59 100644 (file)
@@ -275,7 +275,7 @@ stm32_exti_host_data *stm32_exti_host_init(const struct stm32_exti_drv_data *dd,
 
        host_data->drv_data = dd;
        host_data->chips_data = kzalloc_objs(struct stm32_exti_chip_data,
-                                            dd->bank_nr, GFP_KERNEL);
+                                            dd->bank_nr);
        if (!host_data->chips_data)
                goto free_host_data;
 
index 00d36d4aca52854a9f18d956179d2e65db5d5b72..54823341c9fda46b2d8e13428cbd51f3edf642d5 100644 (file)
@@ -2335,7 +2335,7 @@ static int crypt_alloc_tfms_skcipher(struct crypt_config *cc, char *ciphermode)
        int err;
 
        cc->cipher_tfm.tfms = kzalloc_objs(struct crypto_skcipher *,
-                                          cc->tfms_count, GFP_KERNEL);
+                                          cc->tfms_count);
        if (!cc->cipher_tfm.tfms)
                return -ENOMEM;
 
index a52ee38dc30c4e436501d197ade88440346a6373..06e805902151c831b7bf12c2a7342ef778a7c53f 100644 (file)
@@ -4500,7 +4500,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error)
                        }
 
                        sg = kvmalloc_objs(struct scatterlist,
-                                          ic->journal_pages + 1, GFP_KERNEL);
+                                          ic->journal_pages + 1);
                        if (!sg) {
                                *error = "Unable to allocate sg list";
                                r = -ENOMEM;
@@ -5271,7 +5271,7 @@ try_smaller_buffer:
                        goto bad;
                }
                ic->bbs = kvmalloc_objs(struct bitmap_block_status,
-                                       ic->n_bitmap_blocks, GFP_KERNEL);
+                                       ic->n_bitmap_blocks);
                if (!ic->bbs) {
                        ti->error = "Could not allocate memory for bitmap";
                        r = -ENOMEM;
index a616255b83e2893562cf9f77a530cf91251cd19b..bb1ada31e4836c63135fed545104b87b425a49ad 100644 (file)
@@ -139,7 +139,7 @@ static int cache_init(struct dm_pcache *pcache)
        int ret;
 
        cache->segments = kvzalloc_objs(struct pcache_cache_segment,
-                                       cache_dev->seg_num, GFP_KERNEL);
+                                       cache_dev->seg_num);
        if (!cache->segments) {
                ret = -ENOMEM;
                goto err;
index 3de356abf95273784ed45aed9dcb9185e3ee3cc5..e068e878231b42a5b4488e46ab20138079ca4c8f 100644 (file)
@@ -838,7 +838,7 @@ int cache_tree_init(struct pcache_cache *cache, struct pcache_cache_tree *cache_
         * an RB tree root and a spinlock for protecting its contents.
         */
        cache_tree->subtrees = kvzalloc_objs(struct pcache_cache_subtree,
-                                            cache_tree->n_subtrees, GFP_KERNEL);
+                                            cache_tree->n_subtrees);
        if (!cache_tree->subtrees) {
                ret = -ENOMEM;
                goto key_pool_exit;
index b26656dea4ec4a6c8017aeda77425c85ee17391a..c53cf07ab7b0b6885143ad972c56a394fb51c76b 100644 (file)
@@ -972,7 +972,7 @@ static int parse_histogram(const char *h, unsigned int *n_histogram_entries,
                        (*n_histogram_entries)++;
 
        *histogram_boundaries = kmalloc_objs(unsigned long long,
-                                            *n_histogram_entries, GFP_KERNEL);
+                                            *n_histogram_entries);
        if (!*histogram_boundaries)
                return -ENOMEM;
 
index 856e4b3c2bde5d2fdf26cafcf054a5beaad6a8e9..24dac6f09da828fc368176cfec50761e30d3cce6 100644 (file)
@@ -1544,7 +1544,7 @@ static int lock_all_bitmaps(struct mddev *mddev)
 
        cinfo->other_bitmap_lockres =
                kzalloc_objs(struct dlm_lock_resource *,
-                            mddev->bitmap_info.nodes - 1, GFP_KERNEL);
+                            mddev->bitmap_info.nodes - 1);
        if (!cinfo->other_bitmap_lockres) {
                pr_err("md: can't alloc mem for other bitmap locks\n");
                return 0;
index 968bc83b859755541135eeb8e2e1e64a918bc6e0..0653b5d8545a6c0dd98075b8df5ee2f47b99b613 100644 (file)
@@ -3858,8 +3858,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)
 
        /* FIXME calc properly */
        conf->mirrors = kzalloc_objs(struct raid10_info,
-                                    mddev->raid_disks + max(0, -mddev->delta_disks),
-                                    GFP_KERNEL);
+                                    mddev->raid_disks + max(0, -mddev->delta_disks));
        if (!conf->mirrors)
                goto out;
 
@@ -4282,8 +4281,7 @@ static int raid10_check_reshape(struct mddev *mddev)
                /* allocate new 'mirrors' list */
                conf->mirrors_new =
                        kzalloc_objs(struct raid10_info,
-                                    mddev->raid_disks + mddev->delta_disks,
-                                    GFP_KERNEL);
+                                    mddev->raid_disks + mddev->delta_disks);
                if (!conf->mirrors_new)
                        return -ENOMEM;
        }
index 101c7ccc6fd08bd06a6861f81b3f35113192e349..a10e3822181712a8f02fff097aaf89b197b24106 100644 (file)
@@ -251,14 +251,14 @@ static int tw686x_probe(struct pci_dev *pci_dev,
        sprintf(dev->name, "tw%04X", pci_dev->device);
 
        dev->video_channels = kzalloc_objs(*dev->video_channels,
-                                          max_channels(dev), GFP_KERNEL);
+                                          max_channels(dev));
        if (!dev->video_channels) {
                err = -ENOMEM;
                goto free_dev;
        }
 
        dev->audio_channels = kzalloc_objs(*dev->audio_channels,
-                                          max_channels(dev), GFP_KERNEL);
+                                          max_channels(dev));
        if (!dev->audio_channels) {
                err = -ENOMEM;
                goto free_video;
index 4d3f5f8630305cdf34aeaf9713f1c0adec399a76..3c270ef00752619bb5481dc0e6ec7e0e8e4a9218 100644 (file)
@@ -2450,7 +2450,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
 
        /* Define and configure additional controls from cx2341x module. */
        hdw->mpeg_ctrl_info = kzalloc_objs(*(hdw->mpeg_ctrl_info),
-                                          MPEGDEF_COUNT, GFP_KERNEL);
+                                          MPEGDEF_COUNT);
        if (!hdw->mpeg_ctrl_info) goto fail;
        for (idx = 0; idx < MPEGDEF_COUNT; idx++) {
                cptr = hdw->controls + idx + CTRLDEF_COUNT;
index 1beb9d3f1f1edebbb0212a3e00e63ae3d6eb2339..32e6f60e26c71ed04e729c69d399ecd4052ff770 100644 (file)
@@ -1889,8 +1889,7 @@ v4l2_subdev_init_stream_configs(struct v4l2_subdev_stream_configs *stream_config
 
        if (new_configs.num_configs) {
                new_configs.configs = kvzalloc_objs(*new_configs.configs,
-                                                   new_configs.num_configs,
-                                                   GFP_KERNEL);
+                                                   new_configs.num_configs);
 
                if (!new_configs.configs)
                        return -ENOMEM;
index 1cd061bb89d9fabeb11b3d52adac70c1b9e941da..4a52830026c50cd2fe84d9f72193d8a4adef10be 100644 (file)
@@ -940,7 +940,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card)
                attr_count = attr->count;
 
        msb->attr_group.attrs = kzalloc_objs(*msb->attr_group.attrs,
-                                            attr_count + 1, GFP_KERNEL);
+                                            attr_count + 1);
        if (!msb->attr_group.attrs) {
                rc = -ENOMEM;
                goto out_free_attr;
index d25f3ec1e2aa245cb910075704516c31a9fa6505..c362f09a8c55540f38c9f6174ae9011aae8a9643 100644 (file)
@@ -2428,7 +2428,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
 
        port_info->num_phys = buffer->NumPhys;
        port_info->phy_info = kzalloc_objs(struct mptsas_phyinfo,
-                                          port_info->num_phys, GFP_KERNEL);
+                                          port_info->num_phys);
        if (!port_info->phy_info) {
                error = -ENOMEM;
                goto out_free_consistent;
@@ -2719,7 +2719,7 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info,
        /* save config data */
        port_info->num_phys = (buffer->NumPhys) ? buffer->NumPhys : 1;
        port_info->phy_info = kzalloc_objs(struct mptsas_phyinfo,
-                                          port_info->num_phys, GFP_KERNEL);
+                                          port_info->num_phys);
        if (!port_info->phy_info) {
                error = -ENOMEM;
                goto out_free_consistent;
@@ -3448,7 +3448,7 @@ mptsas_expander_event_add(MPT_ADAPTER *ioc,
        port_info->num_phys = (expander_data->NumPhys) ?
            expander_data->NumPhys : 1;
        port_info->phy_info = kzalloc_objs(struct mptsas_phyinfo,
-                                          port_info->num_phys, GFP_KERNEL);
+                                          port_info->num_phys);
        BUG_ON(!port_info->phy_info);
        memcpy(&sas_address, &expander_data->SASAddress, sizeof(__le64));
        for (i = 0; i < port_info->num_phys; i++) {
index 7e0e7b4fded9c060174135f2e03db898167cf196..b73596a8e021fd930a09ecb2cb309c671b148178 100644 (file)
@@ -628,7 +628,7 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
 
        mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
        mtd->eraseregions = kzalloc_objs(struct mtd_erase_region_info,
-                                        mtd->numeraseregions, GFP_KERNEL);
+                                        mtd->numeraseregions);
        if (!mtd->eraseregions)
                goto setup_err;
 
index 63294a99d8fc2481b2f510aea2e6eee80a08c252..a38aceb6612d037536a67a9627fd80aa204b0d3f 100644 (file)
@@ -777,7 +777,7 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
 
        mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
        mtd->eraseregions = kmalloc_objs(struct mtd_erase_region_info,
-                                        mtd->numeraseregions, GFP_KERNEL);
+                                        mtd->numeraseregions);
        if (!mtd->eraseregions)
                goto setup_err;
 
index a0e7d8a960c5fa92233a841caeb2e9542111bb3e..6b5727eaae69022dd9c67be0442310ed3ce3f4ab 100644 (file)
@@ -186,7 +186,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
 
        mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
        mtd->eraseregions = kmalloc_objs(struct mtd_erase_region_info,
-                                        mtd->numeraseregions, GFP_KERNEL);
+                                        mtd->numeraseregions);
        if (!mtd->eraseregions) {
                kfree(cfi->cmdset_priv);
                kfree(mtd);
index e69f46ff2b1188948698602e9471d6d5fae3fbd1..d08aeac86f9fb28ca86f22bb8428b351180620d6 100644 (file)
@@ -3729,7 +3729,7 @@ static int onenand_probe(struct mtd_info *mtd)
                mtd->numeraseregions = this->dies << 1;
                mtd->eraseregions =
                        kzalloc_objs(struct mtd_erase_region_info,
-                                    this->dies << 1, GFP_KERNEL);
+                                    this->dies << 1);
                if (!mtd->eraseregions)
                        return -ENOMEM;
        }
index 770c26f9c6ceb9257cc88036383c34a8419d320f..38429363251ca7a0690ff3fd369d1ec58a2c51fd 100644 (file)
@@ -5430,7 +5430,7 @@ static int of_get_nand_secure_regions(struct nand_chip *chip)
 
        chip->nr_secure_regions = nr_elem / 2;
        chip->secure_regions = kzalloc_objs(*chip->secure_regions,
-                                           chip->nr_secure_regions, GFP_KERNEL);
+                                           chip->nr_secure_regions);
        if (!chip->secure_regions)
                return -ENOMEM;
 
index ce1e255b707d4c1f3a0f7543d53d19f1435034e1..3833b887c66763ac8ec3c4f9984424681609a490 100644 (file)
@@ -363,7 +363,7 @@ static int sharpsl_parse_mtd_partitions(struct mtd_info *master,
        }
 
        sharpsl_nand_parts = kzalloc_objs(*sharpsl_nand_parts,
-                                         SHARPSL_NAND_PARTS, GFP_KERNEL);
+                                         SHARPSL_NAND_PARTS);
        if (!sharpsl_nand_parts)
                return -ENOMEM;
 
index 906aca08cf5cc491b05f597d46cd43855fd03ae1..c79508b1c43e9720c08c219cf549dec7e40fc2c1 100644 (file)
@@ -331,7 +331,7 @@ static int ucan_alloc_context_array(struct ucan_priv *up)
        ucan_release_context_array(up);
 
        up->context_array = kzalloc_objs(*up->context_array,
-                                        up->device_info.tx_fifo, GFP_KERNEL);
+                                        up->device_info.tx_fifo);
        if (!up->context_array) {
                netdev_err(up->netdev,
                           "Not enough memory to allocate tx contexts\n");
index f241e7df6eb5d64d6b46d5a92267f298822a6ad3..0f84bffc8ef1f188b4962cfe876f3cb5e4de36c2 100644 (file)
@@ -379,7 +379,7 @@ static int mv88e6xxx_region_atu_snapshot(struct devlink *dl,
        int fid = -1, err = 0, count = 0;
 
        table = kzalloc_objs(struct mv88e6xxx_devlink_atu_entry,
-                            mv88e6xxx_num_databases(chip), GFP_KERNEL);
+                            mv88e6xxx_num_databases(chip));
        if (!table)
                return -ENOMEM;
 
@@ -440,7 +440,7 @@ static int mv88e6xxx_region_vtu_snapshot(struct devlink *dl,
        int err;
 
        table = kzalloc_objs(struct mv88e6xxx_devlink_vtu_entry,
-                            mv88e6xxx_max_vid(chip) + 1, GFP_KERNEL);
+                            mv88e6xxx_max_vid(chip) + 1);
        if (!table)
                return -ENOMEM;
 
@@ -522,7 +522,7 @@ static int mv88e6xxx_region_stu_snapshot(struct devlink *dl,
        int err;
 
        table = kzalloc_objs(struct mv88e6xxx_devlink_stu_entry,
-                            mv88e6xxx_max_sid(chip) + 1, GFP_KERNEL);
+                            mv88e6xxx_max_sid(chip) + 1);
        if (!table)
                return -ENOMEM;
 
index 7dd544fe26c6fc00d222c93b199dab3b00ff5bc0..0ae9cb5ea8d1d0c5bbe202cae43cb29e65116e2f 100644 (file)
@@ -636,7 +636,7 @@ int sja1105_vl_gate(struct sja1105_private *priv, int port,
                rule->vl.cycle_time = cycle_time;
                rule->vl.num_entries = num_entries;
                rule->vl.entries = kzalloc_objs(struct action_gate_entry,
-                                               num_entries, GFP_KERNEL);
+                                               num_entries);
                if (!rule->vl.entries) {
                        rc = -ENOMEM;
                        goto out;
index af2f2c7f5de5a84e4399fc9ee2ad2385146e1d3b..705cab7b07273df913c04a3a1f8d81ccde010992 100644 (file)
@@ -416,8 +416,7 @@ static int pdsc_viftypes_init(struct pdsc *pdsc)
        enum pds_core_vif_types vt;
 
        pdsc->viftype_status = kzalloc_objs(*pdsc->viftype_status,
-                                           ARRAY_SIZE(pdsc_viftype_defaults),
-                                           GFP_KERNEL);
+                                           ARRAY_SIZE(pdsc_viftype_defaults));
        if (!pdsc->viftype_status)
                return -ENOMEM;
 
index 8c3dd7331bfd880486811a8a70a93b4a283731a5..19e078479b0d4a9c2b334c7bd4c1c10a940400c6 100644 (file)
@@ -4583,8 +4583,7 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index)
                           index, cos);
 
                        txdata->tx_buf_ring = kzalloc_objs(struct sw_tx_bd,
-                                                          NUM_TX_BD,
-                                                          GFP_KERNEL);
+                                                          NUM_TX_BD);
                        if (!txdata->tx_buf_ring)
                                goto alloc_mem_err;
                        txdata->tx_desc_ring = BNX2X_PCI_ALLOC(&txdata->tx_desc_mapping,
@@ -4752,8 +4751,7 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp)
        for (i = 0; i < bp->fp_array_size; i++) {
                fp[i].tpa_info =
                        kzalloc_objs(struct bnx2x_agg_info,
-                                    ETH_MAX_AGGREGATION_QUEUES_E1H_E2,
-                                    GFP_KERNEL);
+                                    ETH_MAX_AGGREGATION_QUEUES_E1H_E2);
                if (!(fp[i].tpa_info))
                        goto alloc_err;
        }
index b638f94094a96bb8b0335af0234dd289b5c0457a..b8af508f9c9853d7cbcec829d4f4ed5c52be0620 100644 (file)
@@ -1273,7 +1273,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
 
        /* allocate the queue arrays for all VFs */
        bp->vfdb->vfqs = kzalloc_objs(struct bnx2x_vf_queue,
-                                     BNX2X_MAX_NUM_VF_QUEUES, GFP_KERNEL);
+                                     BNX2X_MAX_NUM_VF_QUEUES);
 
        if (!bp->vfdb->vfqs) {
                BNX2X_ERR("failed to allocate vf queue array\n");
index c2f05a9abb88afb33629151f2d8c646fcbc9ea22..e062d5d400da21604204732dd6b601d49a207dda 100644 (file)
@@ -4624,7 +4624,7 @@ static int bnxt_init_ring_grps(struct bnxt *bp, bool irq_re_init)
 
        if (irq_re_init) {
                bp->grp_info = kzalloc_objs(struct bnxt_ring_grp_info,
-                                           bp->cp_nr_rings, GFP_KERNEL);
+                                           bp->cp_nr_rings);
                if (!bp->grp_info)
                        return -ENOMEM;
        }
@@ -5511,7 +5511,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool irq_re_init)
                }
 
                bp->rx_ring = kzalloc_objs(struct bnxt_rx_ring_info,
-                                          bp->rx_nr_rings, GFP_KERNEL);
+                                          bp->rx_nr_rings);
                if (!bp->rx_ring)
                        return -ENOMEM;
 
@@ -5531,7 +5531,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool irq_re_init)
                }
 
                bp->tx_ring = kzalloc_objs(struct bnxt_tx_ring_info,
-                                          bp->tx_nr_rings, GFP_KERNEL);
+                                          bp->tx_nr_rings);
                if (!bp->tx_ring)
                        return -ENOMEM;
 
index 0135c53d4b476da458a1125ce8088be65b137144..53f336db4fcc0619c19d137ca4f5488e98336d7e 100644 (file)
@@ -984,7 +984,7 @@ static int bnxt_ptp_pps_init(struct bnxt *bp)
        pps_info->num_pins = resp->num_pins;
        ptp_info->n_pins = pps_info->num_pins;
        ptp_info->pin_config = kzalloc_objs(*ptp_info->pin_config,
-                                           ptp_info->n_pins, GFP_KERNEL);
+                                           ptp_info->n_pins);
        if (!ptp_info->pin_config) {
                hwrm_req_drop(bp, req);
                return -ENOMEM;
index a8dca32ba8777fdec38076332a614a68150dfc3d..c839dd9804d3f4014ee80cc9bb90294a45d28dfc 100644 (file)
@@ -623,8 +623,7 @@ static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
        d->sbdma_maxdescr = maxdescr;
 
        d->sbdma_dscrtable_unaligned = kzalloc_objs(*d->sbdma_dscrtable,
-                                                   d->sbdma_maxdescr + 1,
-                                                   GFP_KERNEL);
+                                                   d->sbdma_maxdescr + 1);
 
        /*
         * The descriptor table must be aligned to at least 16 bytes or the
index 746c95dc11cd0873f664c3c0b469f15099492fdb..2328fce336447eb4a796f9300ccc0ab536ff0a35 100644 (file)
@@ -8730,7 +8730,7 @@ static int tg3_mem_tx_acquire(struct tg3 *tp)
 
        for (i = 0; i < tp->txq_cnt; i++, tnapi++) {
                tnapi->tx_buffers = kzalloc_objs(struct tg3_tx_ring_info,
-                                                TG3_TX_RING_SIZE, GFP_KERNEL);
+                                                TG3_TX_RING_SIZE);
                if (!tnapi->tx_buffers)
                        goto err_out;
 
index 5743c9a98005deba45274426838da9a1a2c47190..8e19add764db28f18c5905eb49830a3f7341ff4e 100644 (file)
@@ -1458,7 +1458,7 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src,
        if (cfg_flags & BNAD_CF_MSIX) {
                intr_info->intr_type = BNA_INTR_T_MSIX;
                intr_info->idl = kzalloc_objs(struct bna_intr_descr,
-                                             intr_info->num, GFP_KERNEL);
+                                             intr_info->num);
                if (!intr_info->idl)
                        return -ENOMEM;
 
@@ -1483,7 +1483,7 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src,
                intr_info->intr_type = BNA_INTR_T_INTX;
                intr_info->num = 1;
                intr_info->idl = kzalloc_objs(struct bna_intr_descr,
-                                             intr_info->num, GFP_KERNEL);
+                                             intr_info->num);
                if (!intr_info->idl)
                        return -ENOMEM;
 
index 6062497827acb61e970bc3beea75aa4b8bde4fc5..93b06d599eed62c585d40ea27d323446c6921ee5 100644 (file)
@@ -1050,7 +1050,7 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs)
                                [IRQ_NAME_OFF(MAX_IOQ_INTERRUPTS_PER_PF)];
 
                oct->msix_entries = kzalloc_objs(struct msix_entry,
-                                                oct->num_msix_irqs, GFP_KERNEL);
+                                                oct->num_msix_irqs);
                if (!oct->msix_entries) {
                        dev_err(&oct->pci_dev->dev, "Memory Alloc failed...\n");
                        kfree(oct->irq_name_storage);
index 0055ca7236e164a25d13e5e58706b9bf80c6506a..10694d5924ee3dc982459230d80d175f352078b3 100644 (file)
@@ -5028,7 +5028,7 @@ static int adap_init0(struct adapter *adap, int vpd_skip)
        }
 
        adap->sge.ingr_map = kzalloc_objs(*adap->sge.ingr_map,
-                                         adap->sge.ingr_sz, GFP_KERNEL);
+                                         adap->sge.ingr_sz);
        if (!adap->sge.ingr_map) {
                ret = -ENOMEM;
                goto bye;
@@ -6349,8 +6349,7 @@ static int cxgb4_iov_configure(struct pci_dev *pdev, int num_vfs)
                }
                /* Allocate and set up VF Information. */
                adap->vfinfo = kzalloc_objs(struct vf_info,
-                                           pci_sriov_get_totalvfs(pdev),
-                                           GFP_KERNEL);
+                                           pci_sriov_get_totalvfs(pdev));
                if (!adap->vfinfo) {
                        unregister_netdev(adap->port[0]);
                        free_netdev(adap->port[0]);
index b826eb2827aaf7ba3deb377360214e342ccef012..0f67d94e7f3b760f4a2b5768748b09ccf20af449 100644 (file)
@@ -157,12 +157,12 @@ static int cxgb4_mqprio_alloc_hw_resources(struct net_device *dev)
        /* Allocate ETHOFLD hardware queue structures if not done already */
        if (!refcount_read(&adap->tc_mqprio->refcnt)) {
                adap->sge.eohw_rxq = kzalloc_objs(struct sge_ofld_rxq,
-                                                 adap->sge.eoqsets, GFP_KERNEL);
+                                                 adap->sge.eoqsets);
                if (!adap->sge.eohw_rxq)
                        return -ENOMEM;
 
                adap->sge.eohw_txq = kzalloc_objs(struct sge_eohw_txq,
-                                                 adap->sge.eoqsets, GFP_KERNEL);
+                                                 adap->sge.eoqsets);
                if (!adap->sge.eohw_txq) {
                        kfree(adap->sge.eohw_rxq);
                        return -ENOMEM;
index bfc76b5f5350b5fb5049a9e248113e90d75841fe..e839081f9ee4448fe732d58ca07f42dcff99d015 100644 (file)
@@ -2469,7 +2469,7 @@ static int enic_alloc_enic_resources(struct enic *enic)
                goto free_queues;
 
        enic->napi = kzalloc_objs(struct napi_struct,
-                                 enic->wq_avail + enic->rq_avail, GFP_KERNEL);
+                                 enic->wq_avail + enic->rq_avail);
        if (!enic->napi)
                goto free_queues;
 
index eddfde68d503582af1ee831d10608e9881e72cf0..5db04e209dc67b1898a1be1f590ca225809bd243 100644 (file)
@@ -2103,11 +2103,11 @@ int tsnep_enable_xsk(struct tsnep_queue *queue, struct xsk_buff_pool *pool)
                return -EOPNOTSUPP;
 
        queue->rx->page_buffer = kzalloc_objs(*queue->rx->page_buffer,
-                                             TSNEP_RING_SIZE, GFP_KERNEL);
+                                             TSNEP_RING_SIZE);
        if (!queue->rx->page_buffer)
                return -ENOMEM;
        queue->rx->xdp_batch = kzalloc_objs(*queue->rx->xdp_batch,
-                                           TSNEP_RING_SIZE, GFP_KERNEL);
+                                           TSNEP_RING_SIZE);
        if (!queue->rx->xdp_batch) {
                kfree(queue->rx->page_buffer);
                queue->rx->page_buffer = NULL;
index b65bc54ffc03d0cbe7ae02530f12c45ccc6bddb3..8775c931106b4829471ff3ce531c64daab9a5a2c 100644 (file)
@@ -243,8 +243,7 @@ int dpaa2_eth_dl_traps_register(struct dpaa2_eth_priv *priv)
        priv->trap_data = dpaa2_eth_trap_data;
 
        dpaa2_eth_trap_data->trap_items_arr = kzalloc_objs(struct dpaa2_eth_trap_item,
-                                                          ARRAY_SIZE(dpaa2_eth_traps_arr),
-                                                          GFP_KERNEL);
+                                                          ARRAY_SIZE(dpaa2_eth_traps_arr));
        if (!dpaa2_eth_trap_data->trap_items_arr) {
                err = -ENOMEM;
                goto trap_data_free;
index 91adbb5cba92abb25198f919345af44d86c3768c..def2dd231d1fce3d64a8c9894aa2cbd2c570dfc0 100644 (file)
@@ -3421,7 +3421,7 @@ static int dpaa2_switch_probe(struct fsl_mc_device *sw_dev)
        }
 
        ethsw->filter_blocks = kzalloc_objs(*ethsw->filter_blocks,
-                                           ethsw->sw_attr.num_ifs, GFP_KERNEL);
+                                           ethsw->sw_attr.num_ifs);
        if (!ethsw->filter_blocks) {
                err = -ENOMEM;
                goto err_free_fdbs;
index 43b0af59d044ca72d5a0ea23060d2809b139d4b9..a12fd54a475f6cd0516185aa817f2d8c430a0a1d 100644 (file)
@@ -959,7 +959,7 @@ static int enetc_pf_probe(struct pci_dev *pdev,
        pf->total_vfs = pci_sriov_get_totalvfs(pdev);
        if (pf->total_vfs) {
                pf->vf_state = kzalloc_objs(struct enetc_vf_state,
-                                           pf->total_vfs, GFP_KERNEL);
+                                           pf->total_vfs);
                if (!pf->vf_state)
                        goto err_alloc_vf_state;
        }
index c0a495e2a6bde5e730c369185e9937cdf6605813..3271de5844f84b9385c6315d0ee2d1fff4701358 100644 (file)
@@ -1374,7 +1374,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
                tx_queue = priv->tx_queue[i];
                tx_queue->tx_skbuff =
                        kmalloc_objs(*tx_queue->tx_skbuff,
-                                    tx_queue->tx_ring_size, GFP_KERNEL);
+                                    tx_queue->tx_ring_size);
                if (!tx_queue->tx_skbuff)
                        goto cleanup;
 
@@ -1385,8 +1385,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
        for (i = 0; i < priv->num_rx_queues; i++) {
                rx_queue = priv->rx_queue[i];
                rx_queue->rx_buff = kzalloc_objs(*rx_queue->rx_buff,
-                                                rx_queue->rx_ring_size,
-                                                GFP_KERNEL);
+                                                rx_queue->rx_ring_size);
                if (!rx_queue->rx_buff)
                        goto cleanup;
        }
index 6840941181177460bf870a0b95e73f9eb612860b..3607681650ce8a3ba769d3d8f0f9a0325945dfaa 100644 (file)
@@ -2072,7 +2072,7 @@ static int ucc_geth_alloc_tx(struct ucc_geth_private *ugeth)
                /* Setup the skbuff rings */
                ugeth->tx_skbuff[j] =
                        kzalloc_objs(struct sk_buff *,
-                                    ugeth->ug_info->bdRingLenTx[j], GFP_KERNEL);
+                                    ugeth->ug_info->bdRingLenTx[j]);
 
                if (ugeth->tx_skbuff[j] == NULL) {
                        if (netif_msg_ifup(ugeth))
@@ -2130,7 +2130,7 @@ static int ucc_geth_alloc_rx(struct ucc_geth_private *ugeth)
                /* Setup the skbuff rings */
                ugeth->rx_skbuff[j] =
                        kzalloc_objs(struct sk_buff *,
-                                    ugeth->ug_info->bdRingLenRx[j], GFP_KERNEL);
+                                    ugeth->ug_info->bdRingLenRx[j]);
 
                if (ugeth->rx_skbuff[j] == NULL) {
                        if (netif_msg_ifup(ugeth))
index 9d4ef4d42be3961ffc81c45be75a53e0915551d8..9eb4b3614c4f5431038a7f57960c82bb4c6b2ec2 100644 (file)
@@ -152,7 +152,7 @@ static int gve_alloc_flow_rule_caches(struct gve_priv *priv)
 
        flow_rules_cache->rules_cache =
                kvzalloc_objs(*flow_rules_cache->rules_cache,
-                             GVE_FLOW_RULES_CACHE_SIZE, GFP_KERNEL);
+                             GVE_FLOW_RULES_CACHE_SIZE);
        if (!flow_rules_cache->rules_cache) {
                dev_err(&priv->pdev->dev, "Cannot alloc flow rules cache\n");
                return -ENOMEM;
@@ -486,7 +486,7 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
        int err;
 
        priv->msix_vectors = kvzalloc_objs(*priv->msix_vectors,
-                                          num_vecs_requested, GFP_KERNEL);
+                                          num_vecs_requested);
        if (!priv->msix_vectors)
                return -ENOMEM;
        for (i = 0; i < num_vecs_requested; i++)
index 529ab21a3b567cf8336c80f6a09e31032dd83bbd..9031dd619f681dae42182b6711f73635afcd2a22 100644 (file)
@@ -267,7 +267,7 @@ static int gve_tx_qpl_buf_init(struct gve_tx_ring *tx)
        int i;
 
        tx->dqo.tx_qpl_buf_next = kvzalloc_objs(tx->dqo.tx_qpl_buf_next[0],
-                                               num_tx_qpl_bufs, GFP_KERNEL);
+                                               num_tx_qpl_bufs);
        if (!tx->dqo.tx_qpl_buf_next)
                return -ENOMEM;
 
@@ -337,8 +337,7 @@ static int gve_tx_alloc_ring_dqo(struct gve_priv *priv,
 
        tx->dqo.num_pending_packets = min_t(int, num_pending_packets, S16_MAX);
        tx->dqo.pending_packets = kvzalloc_objs(tx->dqo.pending_packets[0],
-                                               tx->dqo.num_pending_packets,
-                                               GFP_KERNEL);
+                                               tx->dqo.num_pending_packets);
        if (!tx->dqo.pending_packets)
                goto err;
 
index dbc6d5c6644c5dede96958a395312257fbc9f378..9cb7ce9fd311c63917e428ea341fefe7cb5327e3 100644 (file)
@@ -1100,7 +1100,7 @@ static struct hns3_enet_ring *hns3_backup_ringparam(struct hns3_nic_priv *priv)
        int i;
 
        tmp_rings = kzalloc_objs(struct hns3_enet_ring,
-                                handle->kinfo.num_tqps * 2, GFP_KERNEL);
+                                handle->kinfo.num_tqps * 2);
        if (!tmp_rings)
                return NULL;
 
index 3c9efe037793433252e079f010b11be4a70bf463..6039fcf3c1dd1a5048254751290c1fa2ee1983b8 100644 (file)
@@ -58,7 +58,7 @@ static int hinic3_init_intr_coalesce(struct net_device *netdev)
        struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
 
        nic_dev->intr_coalesce = kzalloc_objs(*nic_dev->intr_coalesce,
-                                             nic_dev->max_qps, GFP_KERNEL);
+                                             nic_dev->max_qps);
 
        if (!nic_dev->intr_coalesce)
                return -ENOMEM;
index 8a1ad3ed42bd9a6efbbeb047872216319bb67600..cabb8523f246cb9abc6a97489c724c24fd20576f 100644 (file)
@@ -100,7 +100,7 @@ static int hinic3_setup_num_qps(struct net_device *netdev)
        nic_dev->num_qp_irq = 0;
 
        nic_dev->qps_msix_entries = kzalloc_objs(struct msix_entry,
-                                                nic_dev->max_qps, GFP_KERNEL);
+                                                nic_dev->max_qps);
        if (!nic_dev->qps_msix_entries)
                return -ENOMEM;
 
@@ -127,12 +127,12 @@ static int hinic3_alloc_txrxq_resources(struct net_device *netdev,
        int err;
 
        q_params->txqs_res = kzalloc_objs(*q_params->txqs_res,
-                                         q_params->num_qps, GFP_KERNEL);
+                                         q_params->num_qps);
        if (!q_params->txqs_res)
                return -ENOMEM;
 
        q_params->rxqs_res = kzalloc_objs(*q_params->rxqs_res,
-                                         q_params->num_qps, GFP_KERNEL);
+                                         q_params->num_qps);
        if (!q_params->rxqs_res) {
                err = -ENOMEM;
                goto err_free_txqs_res_arr;
index a25fd8799a2fc09433cec9cd2a00d0ab28a7200f..9306bf0020cafe49483066c201825804574be901 100644 (file)
@@ -686,8 +686,7 @@ int hinic3_alloc_txqs_res(struct net_device *netdev, u16 num_sq,
                        goto err_free_tqres;
 
                tqres->bds = kzalloc_objs(*tqres->bds,
-                                         sq_depth * HINIC3_BDS_PER_SQ_WQEBB + HINIC3_MAX_SQ_SGE,
-                                         GFP_KERNEL);
+                                         sq_depth * HINIC3_BDS_PER_SQ_WQEBB + HINIC3_MAX_SQ_SGE);
                if (!tqres->bds) {
                        kfree(tqres->tx_info);
                        goto err_free_tqres;
index 37d8523ac05b9b633c2ea8dfcc63153186f1c8b9..5a510eed335eadc8dded6ce13d0e3c9f52d8e2f8 100644 (file)
@@ -933,13 +933,13 @@ static int init_stats_buffers(struct ibmvnic_adapter *adapter)
 {
        adapter->tx_stats_buffers =
                                kzalloc_objs(struct ibmvnic_tx_queue_stats,
-                                            IBMVNIC_MAX_QUEUES, GFP_KERNEL);
+                                            IBMVNIC_MAX_QUEUES);
        if (!adapter->tx_stats_buffers)
                return -ENOMEM;
 
        adapter->rx_stats_buffers =
                                kzalloc_objs(struct ibmvnic_rx_queue_stats,
-                                            IBMVNIC_MAX_QUEUES, GFP_KERNEL);
+                                            IBMVNIC_MAX_QUEUES);
        if (!adapter->rx_stats_buffers)
                return -ENOMEM;
 
@@ -1124,7 +1124,7 @@ static int init_rx_pools(struct net_device *netdev)
                }
 
                rx_pool->rx_buff = kzalloc_objs(struct ibmvnic_rx_buff,
-                                               rx_pool->size, GFP_KERNEL);
+                                               rx_pool->size);
                if (!rx_pool->rx_buff) {
                        dev_err(dev, "Couldn't alloc rx buffers\n");
                        rc = -ENOMEM;
@@ -4476,7 +4476,7 @@ static int init_sub_crqs(struct ibmvnic_adapter *adapter)
        }
 
        adapter->tx_scrq = kzalloc_objs(*adapter->tx_scrq,
-                                       adapter->req_tx_queues, GFP_KERNEL);
+                                       adapter->req_tx_queues);
        if (!adapter->tx_scrq)
                goto tx_failed;
 
@@ -4487,7 +4487,7 @@ static int init_sub_crqs(struct ibmvnic_adapter *adapter)
        }
 
        adapter->rx_scrq = kzalloc_objs(*adapter->rx_scrq,
-                                       adapter->req_rx_queues, GFP_KERNEL);
+                                       adapter->req_rx_queues);
        if (!adapter->rx_scrq)
                goto rx_failed;
 
index b0ecd3413ffb6b4cff3ce647ce049e8bf01635a3..3d7648a119e56c3b1f6a3f60fa206c37fa0a20f6 100644 (file)
@@ -1323,12 +1323,12 @@ static int e1000_sw_init(struct e1000_adapter *adapter)
 static int e1000_alloc_queues(struct e1000_adapter *adapter)
 {
        adapter->tx_ring = kzalloc_objs(struct e1000_tx_ring,
-                                       adapter->num_tx_queues, GFP_KERNEL);
+                                       adapter->num_tx_queues);
        if (!adapter->tx_ring)
                return -ENOMEM;
 
        adapter->rx_ring = kzalloc_objs(struct e1000_rx_ring,
-                                       adapter->num_rx_queues, GFP_KERNEL);
+                                       adapter->num_rx_queues);
        if (!adapter->rx_ring) {
                kfree(adapter->tx_ring);
                return -ENOMEM;
index edd503b79f986327271c87c8f4034c4c7060371b..fd4b117ed20f628542eb3ca0815808bddbf33070 100644 (file)
@@ -2051,8 +2051,7 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
                if (adapter->flags & FLAG_HAS_MSIX) {
                        adapter->num_vectors = 3; /* RxQ0, TxQ0 and other */
                        adapter->msix_entries = kzalloc_objs(struct msix_entry,
-                                                            adapter->num_vectors,
-                                                            GFP_KERNEL);
+                                                            adapter->num_vectors);
                        if (adapter->msix_entries) {
                                struct e1000_adapter *a = adapter;
 
@@ -2370,8 +2369,7 @@ int e1000e_setup_rx_resources(struct e1000_ring *rx_ring)
        for (i = 0; i < rx_ring->count; i++) {
                buffer_info = &rx_ring->buffer_info[i];
                buffer_info->ps_pages = kzalloc_objs(struct e1000_ps_page,
-                                                    PS_PAGE_BUFFERS,
-                                                    GFP_KERNEL);
+                                                    PS_PAGE_BUFFERS);
                if (!buffer_info->ps_pages)
                        goto err_pages;
        }
index 906b8c01f8bc952f0aea1633a0060d849f333d28..84a97ca8a6d8bac8c717d6feff44250c493ae9a8 100644 (file)
@@ -567,7 +567,7 @@ static int i40e_client_setup_qvlist(struct i40e_info *ldev,
        u32 v_idx, i, reg_idx, reg;
 
        ldev->qvlist_info = kzalloc_flex(*ldev->qvlist_info, qv_info,
-                                        qvlist_info->num_vectors, GFP_KERNEL);
+                                        qvlist_info->num_vectors);
        if (!ldev->qvlist_info)
                return -ENOMEM;
        ldev->qvlist_info->num_vectors = qvlist_info->num_vectors;
index 21c666dbb129d084fd42b8921b010b334b00fcb3..8c27f7ba4adc57f792afacb98e4adb01791937b1 100644 (file)
@@ -2159,7 +2159,7 @@ static int i40e_set_ringparam(struct net_device *netdev,
                            "Changing Rx descriptor count from %d to %d\n",
                            vsi->rx_rings[0]->count, new_rx_count);
                rx_rings = kzalloc_objs(struct i40e_ring,
-                                       vsi->alloc_queue_pairs, GFP_KERNEL);
+                                       vsi->alloc_queue_pairs);
                if (!rx_rings) {
                        err = -ENOMEM;
                        goto free_tx;
index e3517490510f5fc541dfced5f30915a5b2a5823f..404a716db8da71a1fda1359918c3a6bd08d9fd6d 100644 (file)
@@ -1345,7 +1345,7 @@ static int i40e_init_pin_config(struct i40e_pf *pf)
        pf->ptp_caps.n_per_out = 2;
 
        pf->ptp_caps.pin_config = kzalloc_objs(*pf->ptp_caps.pin_config,
-                                              pf->ptp_caps.n_pins, GFP_KERNEL);
+                                              pf->ptp_caps.n_pins);
        if (!pf->ptp_caps.pin_config)
                return -ENOMEM;
 
index 0a0bd9019cfb90f32d7b8681e3a90debea022d6e..2a2e56777f9f7588d64cabaa53d7152f195d4e2b 100644 (file)
@@ -59,8 +59,7 @@ static void ice_devlink_port_options_print(struct ice_pf *pf)
        int status;
 
        options = kzalloc_objs(*options,
-                              ICE_AQC_PORT_OPT_MAX * ICE_MAX_PORT_PER_PCI_DEV,
-                              GFP_KERNEL);
+                              ICE_AQC_PORT_OPT_MAX * ICE_MAX_PORT_PER_PCI_DEV);
        if (!options)
                return;
 
index e01eae07b6ed80ba17fe870fa7654ba7b8dad697..c673094663a343077c3bfc2bda3abac7626a40d7 100644 (file)
@@ -175,7 +175,7 @@ ice_realloc_rx_xdp_bufs(struct ice_rx_ring *rx_ring, bool pool_present)
 {
        if (pool_present) {
                rx_ring->xdp_buf = kzalloc_objs(*rx_ring->xdp_buf,
-                                               rx_ring->count, GFP_KERNEL);
+                                               rx_ring->count);
                if (!rx_ring->xdp_buf)
                        return -ENOMEM;
        } else {
index bb2367ab3279c23ad2401bd5d96fc95f8f699eba..bd4785fb8d3e6e88882a8360297f421f07ea8002 100644 (file)
@@ -432,7 +432,7 @@ int idpf_idc_init_aux_core_dev(struct idpf_adapter *adapter,
 
        privd->mapped_mem_regions =
                kzalloc_objs(struct iidc_rdma_lan_mapped_mem_region,
-                            adapter->hw.num_lan_regs, GFP_KERNEL);
+                            adapter->hw.num_lan_regs);
        if (!privd->mapped_mem_regions) {
                err = -ENOMEM;
                goto err_plug_aux_dev;
index 04fc8d309b0415200dd94bb618234d26a238f008..de3df705a7e6b33412c9769610d29b3cafe2644f 100644 (file)
@@ -360,8 +360,7 @@ int idpf_intr_req(struct idpf_adapter *adapter)
                }
 
                adapter->rdma_msix_entries = kzalloc_objs(struct msix_entry,
-                                                         num_rdma_vecs,
-                                                         GFP_KERNEL);
+                                                         num_rdma_vecs);
                if (!adapter->rdma_msix_entries) {
                        err = -ENOMEM;
                        goto free_irq;
index b3c0ae2ea6a3b71c0bfb3e2a40b0010c0eea601d..05a162094d108b2323dcaddb0aa7474ef45c124c 100644 (file)
@@ -1204,8 +1204,7 @@ static int idpf_qp_enable(const struct idpf_vport *vport,
                goto config;
 
        q_vector->xsksq = kzalloc_objs(*q_vector->xsksq,
-                                      DIV_ROUND_UP(rsrc->num_rxq_grp, rsrc->num_q_vectors),
-                                      GFP_KERNEL);
+                                      DIV_ROUND_UP(rsrc->num_rxq_grp, rsrc->num_q_vectors));
        if (!q_vector->xsksq)
                return -ENOMEM;
 
@@ -1764,8 +1763,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vport,
                        continue;
 
                tx_qgrp->complq = kzalloc_objs(*tx_qgrp->complq,
-                                              IDPF_COMPLQ_PER_GROUP,
-                                              GFP_KERNEL);
+                                              IDPF_COMPLQ_PER_GROUP);
                if (!tx_qgrp->complq)
                        goto err_alloc;
 
@@ -1836,8 +1834,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
                }
 
                rx_qgrp->splitq.bufq_sets = kzalloc_objs(struct idpf_bufq_set,
-                                                        rsrc->num_bufqs_per_qgrp,
-                                                        GFP_KERNEL);
+                                                        rsrc->num_bufqs_per_qgrp);
                if (!rx_qgrp->splitq.bufq_sets) {
                        err = -ENOMEM;
                        goto err_alloc;
@@ -1873,8 +1870,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
                                idpf_queue_set(GEN_CHK, refillq);
                                idpf_queue_set(RFL_GEN_CHK, refillq);
                                refillq->ring = kzalloc_objs(*refillq->ring,
-                                                            refillq->desc_count,
-                                                            GFP_KERNEL);
+                                                            refillq->desc_count);
                                if (!refillq->ring) {
                                        err = -ENOMEM;
                                        goto err_alloc;
@@ -4560,7 +4556,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport,
        user_config = &vport->adapter->vport_config[idx]->user_config;
 
        rsrc->q_vectors = kzalloc_objs(struct idpf_q_vector,
-                                      rsrc->num_q_vectors, GFP_KERNEL);
+                                      rsrc->num_q_vectors);
        if (!rsrc->q_vectors)
                return -ENOMEM;
 
@@ -4603,7 +4599,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport,
                        goto error;
 
                q_vector->complq = kzalloc_objs(*q_vector->complq,
-                                               complqs_per_vector, GFP_KERNEL);
+                                               complqs_per_vector);
                if (!q_vector->complq)
                        goto error;
 
@@ -4611,7 +4607,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport,
                        continue;
 
                q_vector->xsksq = kzalloc_objs(*q_vector->xsksq,
-                                              rxqs_per_vector, GFP_KERNEL);
+                                              rxqs_per_vector);
                if (!q_vector->xsksq)
                        goto error;
        }
index 412f713064068f032c782064ca5221b805af87cf..d5a877e1fef8b271bcd5852c344f975715ade04d 100644 (file)
@@ -3433,12 +3433,12 @@ static int idpf_vport_params_buf_alloc(struct idpf_adapter *adapter)
        u16 num_max_vports = idpf_get_max_vports(adapter);
 
        adapter->vport_params_reqd = kzalloc_objs(*adapter->vport_params_reqd,
-                                                 num_max_vports, GFP_KERNEL);
+                                                 num_max_vports);
        if (!adapter->vport_params_reqd)
                return -ENOMEM;
 
        adapter->vport_params_recvd = kzalloc_objs(*adapter->vport_params_recvd,
-                                                  num_max_vports, GFP_KERNEL);
+                                                  num_max_vports);
        if (!adapter->vport_params_recvd)
                goto err_mem;
 
@@ -3450,7 +3450,7 @@ static int idpf_vport_params_buf_alloc(struct idpf_adapter *adapter)
                return 0;
 
        adapter->vport_config = kzalloc_objs(*adapter->vport_config,
-                                            num_max_vports, GFP_KERNEL);
+                                            num_max_vports);
        if (!adapter->vport_config)
                goto err_mem;
 
@@ -3560,7 +3560,7 @@ restart:
 
        if (!adapter->netdevs) {
                adapter->netdevs = kzalloc_objs(struct net_device *,
-                                               num_max_vports, GFP_KERNEL);
+                                               num_max_vports);
                if (!adapter->netdevs) {
                        err = -ENOMEM;
                        goto err_netdev_alloc;
index 223a10cae4a9390e50b23cf79aca54636f3f8928..ee99fd8fd513789190ecff09e8b9af1d90bc9510 100644 (file)
@@ -3776,8 +3776,7 @@ static int igb_enable_sriov(struct pci_dev *pdev, int num_vfs, bool reinit)
                adapter->vfs_allocated_count = num_vfs;
 
        adapter->vf_data = kzalloc_objs(struct vf_data_storage,
-                                       adapter->vfs_allocated_count,
-                                       GFP_KERNEL);
+                                       adapter->vfs_allocated_count);
 
        /* if allocation failed then we do not support SR-IOV */
        if (!adapter->vf_data) {
@@ -3796,7 +3795,7 @@ static int igb_enable_sriov(struct pci_dev *pdev, int num_vfs, bool reinit)
                              adapter->vfs_allocated_count);
 
        adapter->vf_mac_list = kzalloc_objs(struct vf_mac_filter,
-                                           num_vf_mac_filters, GFP_KERNEL);
+                                           num_vf_mac_filters);
 
        mac_list = adapter->vf_mac_list;
        INIT_LIST_HEAD(&adapter->vf_macs.l);
@@ -4092,7 +4091,7 @@ static int igb_sw_init(struct igb_adapter *adapter)
        adapter->flags |= IGB_FLAG_HAS_MSIX;
 
        adapter->mac_table = kzalloc_objs(struct igb_mac_addr,
-                                         hw->mac.rar_entry_count, GFP_KERNEL);
+                                         hw->mac.rar_entry_count);
        if (!adapter->mac_table)
                return -ENOMEM;
 
index 1e3ad275b88ccd6da0be73faf306efac9e52400d..e4101c59074d685b202fd948e69b22be4bcf35e5 100644 (file)
@@ -6904,7 +6904,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
                adapter->jump_tables[i] = NULL;
 
        adapter->mac_table = kzalloc_objs(struct ixgbe_mac_addr,
-                                         hw->mac.num_rar_entries, GFP_KERNEL);
+                                         hw->mac.num_rar_entries);
        if (!adapter->mac_table)
                return -ENOMEM;
 
index fb61f98b8b3011b11d61a452001208e2b50f130d..79020d9908597b084dfec021813247874116d0f3 100644 (file)
@@ -1013,8 +1013,7 @@ int libie_fwlog_init(struct libie_fwlog *fwlog, struct libie_fwlog_api *api)
                        return status;
 
                fwlog->ring.rings = kzalloc_objs(*fwlog->ring.rings,
-                                                LIBIE_FWLOG_RING_SIZE_DFLT,
-                                                GFP_KERNEL);
+                                                LIBIE_FWLOG_RING_SIZE_DFLT);
                if (!fwlog->ring.rings) {
                        dev_warn(&fwlog->pdev->dev, "Unable to allocate memory for FW log rings\n");
                        return -ENOMEM;
index 29e7786c443471429c1437cecce8d9b298d6aa55..ee623476e5ff1ad10a4149a065773fcd7050d970 100644 (file)
@@ -1950,7 +1950,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
                goto err_free_mem;
 
        qset->sq = kzalloc_objs(struct otx2_snd_queue,
-                               otx2_get_total_tx_queues(pf), GFP_KERNEL);
+                               otx2_get_total_tx_queues(pf));
        if (!qset->sq)
                goto err_free_mem;
 
index 5fd78abccf25dee75d3b5bdeb1b4dd4f7d29dea3..33dea101bc6798d92aaa6d990d37abec9da33e58 100644 (file)
@@ -456,7 +456,7 @@ int prestera_devlink_traps_register(struct prestera_switch *sw)
                return -ENOMEM;
 
        trap_data->trap_items_arr = kzalloc_objs(struct prestera_trap_item,
-                                                traps_count, GFP_KERNEL);
+                                                traps_count);
        if (!trap_data->trap_items_arr) {
                err = -ENOMEM;
                goto err_trap_items_alloc;
index 3aa5765139d8e0a771691ffedd24f7a52c2033fb..de0193d82ec180b04ef8a53166e734eb361ece13 100644 (file)
@@ -2374,7 +2374,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
 
                priv->mfunc.master.vf_admin =
                        kzalloc_objs(struct mlx4_vf_admin_state,
-                                    dev->num_slaves, GFP_KERNEL);
+                                    dev->num_slaves);
                if (!priv->mfunc.master.vf_admin)
                        goto err_comm_admin;
 
@@ -2620,7 +2620,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev)
        int err = 0;
 
        priv->cmd.context = kmalloc_objs(struct mlx4_cmd_context,
-                                        priv->cmd.max_cmds, GFP_KERNEL);
+                                        priv->cmd.max_cmds);
        if (!priv->cmd.context)
                return -ENOMEM;
 
index b9b8142d99a3c58a9ce8e41560a93cd676be07e5..071564c54522edf69723b310b9c74050b397f27a 100644 (file)
@@ -2241,7 +2241,7 @@ static int mlx4_en_copy_priv(struct mlx4_en_priv *dst,
                        continue;
 
                dst->tx_ring[t] = kzalloc_objs(struct mlx4_en_tx_ring *,
-                                              MAX_TX_RINGS, GFP_KERNEL);
+                                              MAX_TX_RINGS);
                if (!dst->tx_ring[t])
                        goto err_free_tx;
 
@@ -3215,7 +3215,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
                        continue;
 
                priv->tx_ring[t] = kzalloc_objs(struct mlx4_en_tx_ring *,
-                                               MAX_TX_RINGS, GFP_KERNEL);
+                                               MAX_TX_RINGS);
                if (!priv->tx_ring[t]) {
                        err = -ENOMEM;
                        goto out;
index 2760db75b617ed879152b38321358a33ddb084af..f1c3da04de7f43d9bc3a9e950187ce2c627d612e 100644 (file)
@@ -1158,8 +1158,7 @@ int mlx4_alloc_eq_table(struct mlx4_dev *dev)
        struct mlx4_priv *priv = mlx4_priv(dev);
 
        priv->eq_table.eq = kzalloc_objs(*priv->eq_table.eq,
-                                        dev->caps.num_eqs - dev->caps.reserved_eqs,
-                                        GFP_KERNEL);
+                                        dev->caps.num_eqs - dev->caps.reserved_eqs);
        if (!priv->eq_table.eq)
                return -ENOMEM;
 
@@ -1178,7 +1177,7 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
        int i;
 
        priv->eq_table.uar_map = kzalloc_objs(*priv->eq_table.uar_map,
-                                             mlx4_num_eq_uar(dev), GFP_KERNEL);
+                                             mlx4_num_eq_uar(dev));
        if (!priv->eq_table.uar_map) {
                err = -ENOMEM;
                goto err_out_free;
index 2964334582eadd50c0d8a5a793700f30db8654e1..82e467c45d231e8e099ab24ae0b2e475e33878d7 100644 (file)
@@ -79,7 +79,7 @@ int mlx4_adev_init(struct mlx4_dev *dev)
                return priv->adev_idx;
 
        priv->adev = kzalloc_objs(struct mlx4_adev *,
-                                 ARRAY_SIZE(mlx4_adev_devices), GFP_KERNEL);
+                                 ARRAY_SIZE(mlx4_adev_devices));
        if (!priv->adev) {
                ida_free(&mlx4_adev_ida, priv->adev_idx);
                return -ENOMEM;
index 436ed587b8b92a80ceb463e65c48af0ce992dc89..807a2f091aa6c134d19fe0e81952b268ed3e4ca7 100644 (file)
@@ -854,8 +854,7 @@ int mlx4_init_qp_table(struct mlx4_dev *dev)
                /* In mfunc, calculate proxy and tunnel qp offsets for the PF here,
                 * since the PF does not call mlx4_slave_caps */
                dev->caps.spec_qps = kzalloc_objs(*dev->caps.spec_qps,
-                                                 dev->caps.num_ports,
-                                                 GFP_KERNEL);
+                                                 dev->caps.num_ports);
                if (!dev->caps.spec_qps) {
                        err = -ENOMEM;
                        goto err_mem;
index cdd9023e860a9b6a30b9c09cdb5fef4f72b7e054..83b88bb96f522195c2ae7c181da977eacf0aa358 100644 (file)
@@ -526,13 +526,11 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
                        &priv->mfunc.master.res_tracker.res_alloc[i];
                res_alloc->quota = kmalloc_objs(int, dev->persist->num_vfs + 1);
                res_alloc->guaranteed = kmalloc_objs(int,
-                                                    dev->persist->num_vfs + 1,
-                                                    GFP_KERNEL);
+                                                    dev->persist->num_vfs + 1);
                if (i == RES_MAC || i == RES_VLAN)
                        res_alloc->allocated =
                                kzalloc_objs(int,
-                                            MLX4_MAX_PORTS * (dev->persist->num_vfs + 1),
-                                            GFP_KERNEL);
+                                            MLX4_MAX_PORTS * (dev->persist->num_vfs + 1));
                else
                        res_alloc->allocated =
                                kzalloc_objs(int, dev->persist->num_vfs + 1);
index 4bfbf52a46b449bd88bad6e6a1544d2ce90f8b33..df2e3ad01819f5e25992083f0c58b2f9eac8e299 100644 (file)
@@ -278,7 +278,7 @@ int mlx5_adev_init(struct mlx5_core_dev *dev)
        struct mlx5_priv *priv = &dev->priv;
 
        priv->adev = kzalloc_objs(struct mlx5_adev *,
-                                 ARRAY_SIZE(mlx5_adev_devices), GFP_KERNEL);
+                                 ARRAY_SIZE(mlx5_adev_devices));
        if (!priv->adev)
                return -ENOMEM;
 
index 1b274217408261cb7a93c5d8fd07ac5c8debba5b..ac4979087e0dd77303d95d74c91bfdb0d9ea4a0b 100644 (file)
@@ -88,8 +88,7 @@ int mlx5e_open_qos_sq(struct mlx5e_priv *priv, struct mlx5e_channels *chs,
                struct mlx5e_sq_stats **stats_list;
 
                stats_list = kvzalloc_objs(*stats_list,
-                                          mlx5e_qos_max_leaf_nodes(priv->mdev),
-                                          GFP_KERNEL);
+                                          mlx5e_qos_max_leaf_nodes(priv->mdev));
                if (!stats_list)
                        return -ENOMEM;
 
index c490a0287bffa7a15d3d94c1a9d901cc6e514624..26178d0bac925ab7ce33620f5a0002b01c712d98 100644 (file)
@@ -917,7 +917,7 @@ esw_qos_create_vport_tc_sched_elements(struct mlx5_vport *vport,
        u32 rate_limit_elem_ix;
 
        vport->qos.sched_nodes = kzalloc_objs(struct mlx5_esw_sched_node *,
-                                             num_tcs, GFP_KERNEL);
+                                             num_tcs);
        if (!vport->qos.sched_nodes) {
                NL_SET_ERR_MSG_MOD(extack,
                                   "Allocating the vport TC scheduling elements failed.");
index d0103b232c0c3bb8e9596505f5db0f39d7f9cb2e..2c3544880a3060d6bfc32e013009f0b994f2054e 100644 (file)
@@ -3375,7 +3375,7 @@ static int init_rdma_transport_rx_root_ns(struct mlx5_flow_steering *steering)
 
        steering->rdma_transport_rx_root_ns =
                        kzalloc_objs(*steering->rdma_transport_rx_root_ns,
-                                    total_vports, GFP_KERNEL);
+                                    total_vports);
        if (!steering->rdma_transport_rx_root_ns)
                return -ENOMEM;
 
@@ -3407,7 +3407,7 @@ static int init_rdma_transport_tx_root_ns(struct mlx5_flow_steering *steering)
 
        steering->rdma_transport_tx_root_ns =
                        kzalloc_objs(*steering->rdma_transport_tx_root_ns,
-                                    total_vports, GFP_KERNEL);
+                                    total_vports);
        if (!steering->rdma_transport_tx_root_ns)
                return -ENOMEM;
 
@@ -3516,7 +3516,7 @@ static int create_fdb_fast_path(struct mlx5_flow_steering *steering)
        int err;
 
        steering->fdb_sub_ns = kzalloc_objs(*steering->fdb_sub_ns,
-                                           FDB_NUM_CHAINS, GFP_KERNEL);
+                                           FDB_NUM_CHAINS);
        if (!steering->fdb_sub_ns)
                return -ENOMEM;
 
index 189d87bd6de473390cf8d006f271fc751020e950..afcdebac9c4fd9d5d7bdde4898dc5a4816ded095 100644 (file)
@@ -314,7 +314,7 @@ static struct mlx5_hwmon *mlx5_hwmon_alloc(struct mlx5_core_dev *mdev)
        hwmon->module_scount = mon_cap ? 1 : 0;
        sensors_count = hwmon->asic_platform_scount + hwmon->module_scount;
        hwmon->temp_channel_desc = kzalloc_objs(*hwmon->temp_channel_desc,
-                                               sensors_count, GFP_KERNEL);
+                                               sensors_count);
        if (!hwmon->temp_channel_desc) {
                err = -ENOMEM;
                goto err_free_hwmon;
index 6ccffd6bc1f34072bf43b6aaef728a6aa5007ff3..bd4e042077afd2b4e55a7ebcbab30ba4286f24d1 100644 (file)
@@ -1083,7 +1083,7 @@ static void mlx5_init_pin_config(struct mlx5_core_dev *mdev)
 
        clock->ptp_info.pin_config =
                        kzalloc_objs(*clock->ptp_info.pin_config,
-                                    clock->ptp_info.n_pins, GFP_KERNEL);
+                                    clock->ptp_info.n_pins);
        if (!clock->ptp_info.pin_config)
                return;
        clock->ptp_info.enable = mlx5_ptp_enable;
index dea21c11ade73f0d2c692e2f10c0c2d95b6a3d6d..6dcd9c2a78aa868f845fea6dc80ea924f4d0447e 100644 (file)
@@ -254,8 +254,7 @@ int mlx5hws_bwc_matcher_create_simple(struct mlx5hws_bwc_matcher *bwc_matcher,
 
        bwc_matcher->size_of_at_array = MLX5HWS_BWC_MATCHER_ATTACH_AT_NUM;
        bwc_matcher->at = kzalloc_objs(*bwc_matcher->at,
-                                      bwc_matcher->size_of_at_array,
-                                      GFP_KERNEL);
+                                      bwc_matcher->size_of_at_array);
        if (!bwc_matcher->at)
                goto free_bwc_matcher_rules;
 
index 367fb62458a5c68af672582a04c56867a59ac2b9..aed009aec4fe8741e6afc42a920b7c558932921b 100644 (file)
@@ -1034,7 +1034,7 @@ static int mlx5hws_send_queue_open(struct mlx5hws_context *ctx,
        queue->used_entries = 0;
 
        queue->completed.entries = kzalloc_objs(queue->completed.entries[0],
-                                               queue->num_entries, GFP_KERNEL);
+                                               queue->num_entries);
        if (!queue->completed.entries)
                return -ENOMEM;
 
@@ -1094,13 +1094,13 @@ static int hws_bwc_send_queues_init(struct mlx5hws_context *ctx)
        ctx->queues += bwc_queues;
 
        ctx->bwc_send_queue_locks = kzalloc_objs(*ctx->bwc_send_queue_locks,
-                                                bwc_queues, GFP_KERNEL);
+                                                bwc_queues);
 
        if (!ctx->bwc_send_queue_locks)
                return -ENOMEM;
 
        ctx->bwc_lock_class_keys = kzalloc_objs(*ctx->bwc_lock_class_keys,
-                                               bwc_queues, GFP_KERNEL);
+                                               bwc_queues);
        if (!ctx->bwc_lock_class_keys)
                goto err_lock_class_keys;
 
index d7c2074e9a895e27d0656b5c061b67c6a6a609d5..7a0a1582239250995455dbf84ca876045f513be5 100644 (file)
@@ -548,7 +548,7 @@ struct mlx5dr_icm_pool *mlx5dr_icm_pool_create(struct mlx5dr_domain *dmn,
        pool->th = max_hot_size;
 
        pool->hot_chunks_arr = kvzalloc_objs(struct mlx5dr_icm_hot_chunk,
-                                            num_of_chunks, GFP_KERNEL);
+                                            num_of_chunks);
        if (!pool->hot_chunks_arr)
                goto free_pool;
 
index 2782e955d3ac326d33806fd55ba8a81f3236e184..d15dcb30368f5fe680c864fd9faec640f39f2b10 100644 (file)
@@ -282,7 +282,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
        }
 
        fs_dr_actions = kzalloc_objs(*fs_dr_actions,
-                                    MLX5_FLOW_CONTEXT_ACTION_MAX, GFP_KERNEL);
+                                    MLX5_FLOW_CONTEXT_ACTION_MAX);
        if (!fs_dr_actions) {
                err = -ENOMEM;
                goto free_actions_alloc;
index 93540e4f3a4b1158cc68b83c5dfc79559d5be123..d76246301f67cd5e245084053953b341b4e5f44d 100644 (file)
@@ -151,7 +151,7 @@ static int mlxsw_ports_init(struct mlxsw_core *mlxsw_core, bool reload)
                mlxsw_core->max_ports = MLXSW_PORT_MAX_PORTS_DEFAULT + 1;
 
        mlxsw_core->ports = kzalloc_objs(struct mlxsw_core_port,
-                                        mlxsw_core->max_ports, GFP_KERNEL);
+                                        mlxsw_core->max_ports);
        if (!mlxsw_core->ports)
                return -ENOMEM;
 
index a937ac667ddd47570caa64a4acbe7792161f3208..ffef5310f8b0563dd8b26c57e2dad686a420b924 100644 (file)
@@ -1245,8 +1245,7 @@ static int mlxsw_env_line_cards_alloc(struct mlxsw_env *env)
        for (i = 0; i < env->num_of_slots; i++) {
                env->line_cards[i] = kzalloc_flex(*env->line_cards[i],
                                                  module_info,
-                                                 env->max_module_count,
-                                                 GFP_KERNEL);
+                                                 env->max_module_count);
                if (!env->line_cards[i])
                        goto kzalloc_err;
 
index f0659616ad9b6d5f72fd83883c1a1296b6f3c71e..f801f04cafb7536f96b8e990eaeb4ddd61c23de5 100644 (file)
@@ -1470,7 +1470,7 @@ static int mlxsw_linecard_types_init(struct mlxsw_core *mlxsw_core,
        }
 
        types_info->ini_files = kmalloc_objs(struct mlxsw_linecard_ini_file *,
-                                            types_info->count, GFP_KERNEL);
+                                            types_info->count);
        if (!types_info->ini_files) {
                err = -ENOMEM;
                goto err_ini_files_alloc;
index 3900a73cfffbc25ccdb190df3f6c715061d64582..c43382cd1f72180e3567638cb452de29ff1160b4 100644 (file)
@@ -432,7 +432,7 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core,
                return 0;
 
        area->tz_module_arr = kzalloc_objs(*area->tz_module_arr,
-                                          area->tz_module_num, GFP_KERNEL);
+                                          area->tz_module_num);
        if (!area->tz_module_arr)
                return -ENOMEM;
 
@@ -522,7 +522,7 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core,
 
        area->tz_gearbox_num = gbox_num;
        area->tz_gearbox_arr = kzalloc_objs(*area->tz_gearbox_arr,
-                                           area->tz_gearbox_num, GFP_KERNEL);
+                                           area->tz_gearbox_num);
        if (!area->tz_gearbox_arr)
                return -ENOMEM;
 
index 6cdbac750cc6f809e05f2a689d9f3369060b85bb..512933dbab9a3e0169caee14f9f9ea2f3fbce61f 100644 (file)
@@ -403,7 +403,7 @@ static int mlxsw_m_linecards_init(struct mlxsw_m *mlxsw_m)
                return -ENOMEM;
 
        mlxsw_m->line_cards = kzalloc_objs(*mlxsw_m->line_cards,
-                                          mlxsw_m->num_of_slots, GFP_KERNEL);
+                                          mlxsw_m->num_of_slots);
        if (!mlxsw_m->line_cards) {
                err = -ENOMEM;
                goto err_kcalloc;
@@ -412,7 +412,7 @@ static int mlxsw_m_linecards_init(struct mlxsw_m *mlxsw_m)
        for (i = 0; i < mlxsw_m->num_of_slots; i++) {
                mlxsw_m->line_cards[i] =
                        kzalloc_flex(*mlxsw_m->line_cards[i], module_to_port,
-                                    mlxsw_m->max_modules_per_slot, GFP_KERNEL);
+                                    mlxsw_m->max_modules_per_slot);
                if (!mlxsw_m->line_cards[i]) {
                        err = -ENOMEM;
                        goto err_kmalloc_array;
index 560f5ee531d205c91fd08f5ac4ffaf1e0cfd4a9b..3a65420fa1ad16fd873f4919bdb983cf47c8874b 100644 (file)
@@ -2020,7 +2020,7 @@ static int mlxsw_sp_port_module_info_init(struct mlxsw_sp *mlxsw_sp)
        int err;
 
        mlxsw_sp->port_mapping = kzalloc_objs(struct mlxsw_sp_port_mapping,
-                                             max_ports, GFP_KERNEL);
+                                             max_ports);
        if (!mlxsw_sp->port_mapping)
                return -ENOMEM;
 
index 814b704de29413b55cb7c85246469dcb9dc1f98b..ffde7c4fe140511e03d1a7eab993aca9d76491ac 100644 (file)
@@ -260,7 +260,7 @@ mlxsw_sp1_mr_tcam_region_init(struct mlxsw_sp *mlxsw_sp,
        mr_tcam_region->parman = parman;
 
        parman_prios = kmalloc_objs(*parman_prios,
-                                   MLXSW_SP_MR_ROUTE_PRIO_MAX + 1, GFP_KERNEL);
+                                   MLXSW_SP_MR_ROUTE_PRIO_MAX + 1);
        if (!parman_prios) {
                err = -ENOMEM;
                goto err_parman_prios_alloc;
index a4df29aab39d38d686cd4c3bcbccda24bac8f07d..73519301b74469f35be4b002e0739c2e3bf06a90 100644 (file)
@@ -366,8 +366,7 @@ static int mlxsw_sp_qdisc_create(struct mlxsw_sp_port *mlxsw_sp_port,
 
        if (ops->num_classes) {
                mlxsw_sp_qdisc->qdiscs = kzalloc_objs(*mlxsw_sp_qdisc->qdiscs,
-                                                     ops->num_classes,
-                                                     GFP_KERNEL);
+                                                     ops->num_classes);
                if (!mlxsw_sp_qdisc->qdiscs)
                        return -ENOMEM;
 
index 143fdd8aae4959e7b2a4e0ef952563ba0cb6d4bb..7bd87d0547d8af40ca8736e97eac9e3d8a069052 100644 (file)
@@ -718,8 +718,7 @@ static int mlxsw_sp_lpm_init(struct mlxsw_sp *mlxsw_sp)
        max_trees = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_LPM_TREES);
        mlxsw_sp->router->lpm.tree_count = max_trees - MLXSW_SP_LPM_TREE_MIN;
        mlxsw_sp->router->lpm.trees = kzalloc_objs(struct mlxsw_sp_lpm_tree,
-                                                  mlxsw_sp->router->lpm.tree_count,
-                                                  GFP_KERNEL);
+                                                  mlxsw_sp->router->lpm.tree_count);
        if (!mlxsw_sp->router->lpm.trees)
                return -ENOMEM;
 
index de9508282841a68c00d8acef569c5c0dc04b5c3a..bc594860e2b5a334b1ea2967b41a8df02584eb7d 100644 (file)
@@ -771,7 +771,7 @@ int nfp_bpf_finalize(struct bpf_verifier_env *env)
        nfp_prog = env->prog->aux->offload->dev_priv;
        nfp_prog->subprog_cnt = env->subprog_cnt;
        nfp_prog->subprog = kzalloc_objs(nfp_prog->subprog[0],
-                                        nfp_prog->subprog_cnt, GFP_KERNEL);
+                                        nfp_prog->subprog_cnt);
        if (!nfp_prog->subprog)
                return -ENOMEM;
 
index ca9e5dab2ec7d1bd88c8ef126ad53ab744fb46df..cc9a5aea6df0b0537c13b4e42fde8c8120748be8 100644 (file)
@@ -558,7 +558,7 @@ int nfp_flower_metadata_init(struct nfp_app *app, u64 host_ctx_count,
        /* Init timestamps for mask id*/
        priv->mask_ids.last_used =
                kmalloc_objs(*priv->mask_ids.last_used,
-                            NFP_FLOWER_MASK_ENTRY_RS, GFP_KERNEL);
+                            NFP_FLOWER_MASK_ENTRY_RS);
        if (!priv->mask_ids.last_used)
                goto err_free_mask_id;
 
index 33ea3a2edeae2f2c7a07a409a20a49da23567aba..42c6dcfb1f0fa5316e2772022423618edbc42e8e 100644 (file)
@@ -2109,26 +2109,22 @@ static int qed_alloc_qm_data(struct qed_hwfn *p_hwfn)
                goto alloc_err;
 
        qm_info->qm_pq_params = kzalloc_objs(*qm_info->qm_pq_params,
-                                            qed_init_qm_get_num_pqs(p_hwfn),
-                                            GFP_KERNEL);
+                                            qed_init_qm_get_num_pqs(p_hwfn));
        if (!qm_info->qm_pq_params)
                goto alloc_err;
 
        qm_info->qm_vport_params = kzalloc_objs(*qm_info->qm_vport_params,
-                                               qed_init_qm_get_num_vports(p_hwfn),
-                                               GFP_KERNEL);
+                                               qed_init_qm_get_num_vports(p_hwfn));
        if (!qm_info->qm_vport_params)
                goto alloc_err;
 
        qm_info->qm_port_params = kzalloc_objs(*qm_info->qm_port_params,
-                                              p_hwfn->cdev->num_ports_in_engine,
-                                              GFP_KERNEL);
+                                              p_hwfn->cdev->num_ports_in_engine);
        if (!qm_info->qm_port_params)
                goto alloc_err;
 
        qm_info->wfq_data = kzalloc_objs(*qm_info->wfq_data,
-                                        qed_init_qm_get_num_vports(p_hwfn),
-                                        GFP_KERNEL);
+                                        qed_init_qm_get_num_vports(p_hwfn));
        if (!qm_info->wfq_data)
                goto alloc_err;
 
index 0101b4a7c56c8bc5b1679107812960c7b5edd6e8..4d1ce9b1a3f2e9d0c81b10ac6c3509a265327b76 100644 (file)
@@ -2760,8 +2760,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn,
                goto err;
 
        iwarp_info->partial_fpdus = kzalloc_objs(*iwarp_info->partial_fpdus,
-                                                (u16)p_hwfn->p_rdma_info->num_qps,
-                                                GFP_KERNEL);
+                                                (u16)p_hwfn->p_rdma_info->num_qps);
        if (!iwarp_info->partial_fpdus) {
                rc = -ENOMEM;
                goto err;
@@ -2781,7 +2780,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn,
         * we allocate enough to take care of all rx packets
         */
        iwarp_info->mpa_bufs = kzalloc_objs(*iwarp_info->mpa_bufs,
-                                           data.input.rx_num_desc, GFP_KERNEL);
+                                           data.input.rx_num_desc);
        if (!iwarp_info->mpa_bufs) {
                rc = -ENOMEM;
                goto err;
index 572feb68d1d2758e89e9d9a5a9730d8371cf0686..52f50c7228ed252c903097d27f882fc3127e08a0 100644 (file)
@@ -2200,8 +2200,7 @@ int qed_ll2_alloc(struct qed_hwfn *p_hwfn)
 
        /* Allocate LL2's set struct */
        p_ll2_connections = kzalloc_objs(struct qed_ll2_info,
-                                        QED_MAX_NUM_OF_LL2_CONNECTIONS,
-                                        GFP_KERNEL);
+                                        QED_MAX_NUM_OF_LL2_CONNECTIONS);
        if (!p_ll2_connections) {
                DP_NOTICE(p_hwfn, "Failed to allocate `struct qed_ll2'\n");
                return -ENOMEM;
index 9a461ab73bf2d5fa46f9c800e77de70e485237d1..7e37fe631a58cbd05749564c0c83804fb531d24f 100644 (file)
@@ -3366,7 +3366,7 @@ int qed_mcp_nvm_info_populate(struct qed_hwfn *p_hwfn)
        }
 
        nvm_info.image_att = kmalloc_objs(struct bist_nvm_image_att,
-                                         nvm_info.num_images, GFP_KERNEL);
+                                         nvm_info.num_images);
        if (!nvm_info.image_att) {
                rc = -ENOMEM;
                goto err0;
index 610afab93b3f72a472f652514bbbd47b3538af28..b29bbfb7748e241f5d5e081451155d536b5a4451 100644 (file)
@@ -119,7 +119,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
        INIT_LIST_HEAD(&p_ooo_info->free_isles_list);
 
        p_ooo_info->p_isles_mem = kzalloc_objs(struct qed_ooo_isle,
-                                              max_num_isles, GFP_KERNEL);
+                                              max_num_isles);
        if (!p_ooo_info->p_isles_mem)
                goto no_isles_mem;
 
@@ -131,7 +131,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
 
        p_ooo_info->p_archipelagos_mem =
                                kzalloc_objs(struct qed_ooo_archipelago,
-                                            max_num_archipelagos, GFP_KERNEL);
+                                            max_num_archipelagos);
        if (!p_ooo_info->p_archipelagos_mem)
                goto no_archipelagos_mem;
 
@@ -140,8 +140,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
 
        p_ooo_info->ooo_history.p_cqes =
                                kzalloc_objs(struct ooo_opaque,
-                                            QED_MAX_NUM_OOO_HISTORY_ENTRIES,
-                                            GFP_KERNEL);
+                                            QED_MAX_NUM_OOO_HISTORY_ENTRIES);
        if (!p_ooo_info->ooo_history.p_cqes)
                goto no_history_mem;
 
index e71eed756091142a44c3a07d448d1b87ae056159..39842eb73bc3356f7b3ac5feb45169a393670dc0 100644 (file)
@@ -971,8 +971,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
 
        if (!edev->coal_entry) {
                edev->coal_entry = kzalloc_objs(*edev->coal_entry,
-                                               QEDE_MAX_RSS_CNT(edev),
-                                               GFP_KERNEL);
+                                               QEDE_MAX_RSS_CNT(edev));
                if (!edev->coal_entry) {
                        DP_ERR(edev, "coalesce entry allocation failed\n");
                        goto err;
index b75b4708c300288d26888c8733afe9abf38fffb1..861a13ad7e1ac50fd1607818d592828c869dba0e 100644 (file)
@@ -2579,7 +2579,7 @@ static int ql_alloc_buffer_queues(struct ql3_adapter *qdev)
                qdev->lrg_buf_q_alloc_size = qdev->lrg_buf_q_size * 2;
 
        qdev->lrg_buf = kmalloc_objs(struct ql_rcv_buf_cb,
-                                    qdev->num_large_buffers, GFP_KERNEL);
+                                    qdev->num_large_buffers);
        if (qdev->lrg_buf == NULL)
                return -ENOMEM;
 
index 86e9cb04cae8021292e5c8173ce88bda32625cfe..9192c5ad5a1696d408f5797f3bd417b2c8102122 100644 (file)
@@ -190,7 +190,7 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
        recv_ctx = adapter->recv_ctx;
 
        rds_ring = kzalloc_objs(struct qlcnic_host_rds_ring,
-                               adapter->max_rds_rings, GFP_KERNEL);
+                               adapter->max_rds_rings);
        if (rds_ring == NULL)
                goto err_out;
 
index 688cb578e8650342a1505f9096e48386ce49c4a5..ff4f7cd20c7916c5e84cdc19d2d909fdafcd0e4a 100644 (file)
@@ -680,7 +680,7 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter)
 
        if (!adapter->msix_entries) {
                adapter->msix_entries = kzalloc_objs(struct msix_entry,
-                                                    num_msix, GFP_KERNEL);
+                                                    num_msix);
                if (!adapter->msix_entries)
                        return -ENOMEM;
        }
@@ -734,7 +734,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
 
        if (!adapter->msix_entries) {
                adapter->msix_entries = kzalloc_objs(struct msix_entry,
-                                                    num_msix, GFP_KERNEL);
+                                                    num_msix);
                if (!adapter->msix_entries)
                        return -ENOMEM;
        }
@@ -1001,7 +1001,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
        }
 
        adapter->eswitch = kzalloc_objs(struct qlcnic_eswitch,
-                                       QLCNIC_NIU_MAX_XG_PORTS, GFP_KERNEL);
+                                       QLCNIC_NIU_MAX_XG_PORTS);
        if (!adapter->eswitch) {
                ret = -ENOMEM;
                goto err_npars;
@@ -2351,7 +2351,7 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter *adapter,
        struct qlcnic_cmd_buffer *cmd_buf_arr;
 
        tx_ring = kzalloc_objs(struct qlcnic_host_tx_ring,
-                              adapter->drv_tx_rings, GFP_KERNEL);
+                              adapter->drv_tx_rings);
        if (tx_ring == NULL)
                return -ENOMEM;
 
index fb689bd4374c7d14bb0fc1197b886e98b9b538e1..84b657fc2e158cea661b711f7e2b044f6afd0161 100644 (file)
@@ -437,7 +437,7 @@ static int ravb_ring_init(struct net_device *ndev, int q)
 
        /* Allocate RX buffers */
        priv->rx_buffers[q] = kzalloc_objs(*priv->rx_buffers[q],
-                                          priv->num_rx_ring[q], GFP_KERNEL);
+                                          priv->num_rx_ring[q]);
        if (!priv->rx_buffers[q])
                goto error;
 
index c3766594d12eaeb467a97345a0a4b454d659fd9f..f4dc3f3f4416c77f23ce95812acad5db2e637b7c 100644 (file)
@@ -935,8 +935,7 @@ int efx_set_channels(struct efx_nic *efx)
 
                /* Allocate array for XDP TX queue lookup. */
                efx->xdp_tx_queues = kzalloc_objs(*efx->xdp_tx_queues,
-                                                 efx->xdp_tx_queue_count,
-                                                 GFP_KERNEL);
+                                                 efx->xdp_tx_queue_count);
                if (!efx->xdp_tx_queues)
                        return -ENOMEM;
        }
index a41a840b3710a7424c656997ef463a8342bcdc5b..3afaec36642f287eda1a4abdf372d207377a6dc4 100644 (file)
@@ -997,7 +997,7 @@ int efx_init_struct(struct efx_nic *efx, struct pci_dev *pci_dev)
        spin_lock_init(&efx->rps_hash_lock);
        /* Failure to allocate is not fatal, but may degrade ARFS performance */
        efx->rps_hash_table = kzalloc_objs(*efx->rps_hash_table,
-                                          EFX_ARFS_HASH_TABLE_SIZE, GFP_KERNEL);
+                                          EFX_ARFS_HASH_TABLE_SIZE);
 #endif
        spin_lock_init(&efx->vf_reps_lock);
        INIT_LIST_HEAD(&efx->vf_reps);
index c514d2c656720d3b23ff0aa23dfb8ebae0d0e84c..9e18aaf44baddeab3e933eb8cad0b07ecb134b16 100644 (file)
@@ -549,8 +549,7 @@ int ef4_probe_tx_queue(struct ef4_tx_queue *tx_queue)
                return -ENOMEM;
 
        tx_queue->cb_page = kzalloc_objs(tx_queue->cb_page[0],
-                                        ef4_tx_cb_page_count(tx_queue),
-                                        GFP_KERNEL);
+                                        ef4_tx_cb_page_count(tx_queue));
        if (!tx_queue->cb_page) {
                rc = -ENOMEM;
                goto fail1;
index 33278d0580aa142ae7d56b9f355fd9e798b3d686..7a8606efd49274210cdd2e655cc322743f6ad598 100644 (file)
@@ -256,11 +256,11 @@ more:
                        goto fail;
                rc = -ENOMEM;
                desc->keys = kzalloc_objs(struct efx_tc_table_field_fmt,
-                                         desc->n_keys, GFP_KERNEL);
+                                         desc->n_keys);
                if (!desc->keys)
                        goto fail;
                desc->resps = kzalloc_objs(struct efx_tc_table_field_fmt,
-                                          desc->n_resps, GFP_KERNEL);
+                                          desc->n_resps);
                if (!desc->resps)
                        goto fail;
        }
index 1ddab2e2263e564fc18bec76b83702facdb25340..1fc3435987715aec6140818609b4c0cc564d55f2 100644 (file)
@@ -967,8 +967,7 @@ int efx_siena_set_channels(struct efx_nic *efx)
 
                /* Allocate array for XDP TX queue lookup. */
                efx->xdp_tx_queues = kzalloc_objs(*efx->xdp_tx_queues,
-                                                 efx->xdp_tx_queue_count,
-                                                 GFP_KERNEL);
+                                                 efx->xdp_tx_queue_count);
                if (!efx->xdp_tx_queues)
                        return -ENOMEM;
        }
index 07e650f2d13ed5b459c26bc00f47250ae029fe85..f91e5f8c0b353d36df8eaab40ebf7ede53ad1c59 100644 (file)
@@ -1024,7 +1024,7 @@ int efx_siena_init_struct(struct efx_nic *efx,
        spin_lock_init(&efx->rps_hash_lock);
        /* Failure to allocate is not fatal, but may degrade ARFS performance */
        efx->rps_hash_table = kzalloc_objs(*efx->rps_hash_table,
-                                          EFX_ARFS_HASH_TABLE_SIZE, GFP_KERNEL);
+                                          EFX_ARFS_HASH_TABLE_SIZE);
 #endif
        efx->mdio.dev = net_dev;
        INIT_WORK(&efx->mac_work, efx_mac_work);
index 6a92543a1c5ebf105a36a1c93608c617749209c0..bcdf8c561579ce500cad924fbbc8af5c25d00ec9 100644 (file)
@@ -41,8 +41,7 @@ int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queue)
                return -ENOMEM;
 
        tx_queue->cb_page = kzalloc_objs(tx_queue->cb_page[0],
-                                        efx_tx_cb_page_count(tx_queue),
-                                        GFP_KERNEL);
+                                        efx_tx_cb_page_count(tx_queue));
        if (!tx_queue->cb_page) {
                rc = -ENOMEM;
                goto fail1;
index f5bdfa0c31a3e4f5ffa72db0aafa28acb2ff95dc..71c96499f6026ae6e11502d55fc32c20d55116ad 100644 (file)
@@ -41,8 +41,7 @@ int efx_probe_tx_queue(struct efx_tx_queue *tx_queue)
                return -ENOMEM;
 
        tx_queue->cb_page = kzalloc_objs(tx_queue->cb_page[0],
-                                        efx_tx_cb_page_count(tx_queue),
-                                        GFP_KERNEL);
+                                        efx_tx_cb_page_count(tx_queue));
        if (!tx_queue->cb_page) {
                rc = -ENOMEM;
                goto fail1;
index 870ab19395d6129abc553db2c181329f1fb1bc85..338a2637b1da96da738a7ac2daded10e1749baf8 100644 (file)
@@ -392,7 +392,7 @@ static int emac_alloc_tx_resources(struct emac_priv *priv)
        struct platform_device *pdev = priv->pdev;
 
        tx_ring->tx_desc_buf = kzalloc_objs(*tx_ring->tx_desc_buf,
-                                           tx_ring->total_cnt, GFP_KERNEL);
+                                           tx_ring->total_cnt);
 
        if (!tx_ring->tx_desc_buf)
                return -ENOMEM;
@@ -420,7 +420,7 @@ static int emac_alloc_rx_resources(struct emac_priv *priv)
        struct platform_device *pdev = priv->pdev;
 
        rx_ring->rx_desc_buf = kzalloc_objs(*rx_ring->rx_desc_buf,
-                                           rx_ring->total_cnt, GFP_KERNEL);
+                                           rx_ring->total_cnt);
        if (!rx_ring->rx_desc_buf)
                return -ENOMEM;
 
index 3b3532cc12d775740430d34b35265b47e7fc649c..edf0799b723640f69bf4eb8f36db74da4a10a6f8 100644 (file)
@@ -2296,7 +2296,7 @@ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv,
        tx_q->priv_data = priv;
 
        tx_q->tx_skbuff_dma = kzalloc_objs(*tx_q->tx_skbuff_dma,
-                                          dma_conf->dma_tx_size, GFP_KERNEL);
+                                          dma_conf->dma_tx_size);
        if (!tx_q->tx_skbuff_dma)
                return -ENOMEM;
 
index aa7c90d191f49052d7627f302cb86f21b803f23b..2a40257ab47cc4d4a98413ba2aa264ea9cf4dd4c 100644 (file)
@@ -141,7 +141,7 @@ static int xlgmac_init_ring(struct xlgmac_pdata *pdata,
 
        /* Array of descriptor data */
        ring->desc_data_head = kzalloc_objs(struct xlgmac_desc_data,
-                                           dma_desc_count, GFP_KERNEL);
+                                           dma_desc_count);
        if (!ring->desc_data_head)
                return -ENOMEM;
 
index f20e06985c5eadb28bebb02624f6a5ada1d3cf98..88669aa53f6512652840248c9aed1929483c7fff 100644 (file)
@@ -2306,7 +2306,7 @@ static struct net_device *gelic_wl_alloc(struct gelic_card *card)
 
        /* allocate scan list */
        wl->networks = kzalloc_objs(struct gelic_wl_scan_info,
-                                   GELIC_WL_BSS_MAX_ENT, GFP_KERNEL);
+                                   GELIC_WL_BSS_MAX_ENT);
 
        if (!wl->networks)
                goto fail_bss;
index b71784bacf73baaba2150de500b5c4e074e44c9e..6d7b6f3b46339b6183b9e541025aa3993cb318dc 100644 (file)
@@ -1632,7 +1632,7 @@ static int velocity_init_rd_ring(struct velocity_info *vptr)
        int ret = -ENOMEM;
 
        vptr->rx.info = kzalloc_objs(struct velocity_rd_info,
-                                    vptr->options.numrx, GFP_KERNEL);
+                                    vptr->options.numrx);
        if (!vptr->rx.info)
                goto out;
 
@@ -1665,8 +1665,7 @@ static int velocity_init_td_ring(struct velocity_info *vptr)
        for (j = 0; j < vptr->tx.numq; j++) {
 
                vptr->tx.infos[j] = kzalloc_objs(struct velocity_td_info,
-                                                vptr->options.numtx,
-                                                GFP_KERNEL);
+                                                vptr->options.numtx);
                if (!vptr->tx.infos[j]) {
                        while (--j >= 0)
                                kfree(vptr->tx.infos[j]);
index c78e0775aeb57d94cdd9b8382f209fa30541279d..bee9e245e7927b4b1e3559c5525d262784b63def 100644 (file)
@@ -2506,7 +2506,7 @@ int wx_sw_init(struct wx *wx)
                        WX_RSS_FIELD_IPV6 | WX_RSS_FIELD_IPV6_TCP;
 
        wx->mac_table = kzalloc_objs(struct wx_mac_addr,
-                                    wx->mac.num_rar_entries, GFP_KERNEL);
+                                    wx->mac.num_rar_entries);
        if (!wx->mac_table) {
                wx_err(wx, "mac_table allocation failed\n");
                kfree(wx->rss_key);
index bc13df81bfa368a9f2c467df28a6c196e1e843a3..e82de0fd3157940f6dacb567608d6550d89b2d81 100644 (file)
@@ -940,8 +940,7 @@ static int nsim_dev_traps_init(struct devlink *devlink)
                return -ENOMEM;
 
        nsim_trap_data->trap_items_arr = kzalloc_objs(struct nsim_trap_item,
-                                                     ARRAY_SIZE(nsim_traps_arr),
-                                                     GFP_KERNEL);
+                                                     ARRAY_SIZE(nsim_traps_arr));
        if (!nsim_trap_data->trap_items_arr) {
                err = -ENOMEM;
                goto err_trap_data_free;
index be0051ff64203535b21115b379cf588719498b2c..98472abdd3920878115eadd8f159f4bf3ad1a720 100644 (file)
@@ -1032,7 +1032,7 @@ static struct dp83640_clock *dp83640_clock_get_bus(struct mii_bus *bus)
                goto out;
 
        clock->caps.pin_config = kzalloc_objs(struct ptp_pin_desc,
-                                             DP83640_N_PINS, GFP_KERNEL);
+                                             DP83640_N_PINS);
        if (!clock->caps.pin_config) {
                kfree(clock);
                clock = NULL;
index 9e24d4ebcb79cc51ec6a4fa2faa3f0b3e1d7a9f4..4eb7716bb9d6c020e396dd091f5cac33c9bda521 100644 (file)
@@ -104,8 +104,7 @@ int phy_led_triggers_register(struct phy_device *phy)
                goto out_free_link;
 
        phy->phy_led_triggers = kzalloc_objs(struct phy_led_trigger,
-                                            phy->phy_num_led_triggers,
-                                            GFP_KERNEL);
+                                            phy->phy_num_led_triggers);
        if (!phy->phy_led_triggers) {
                err = -ENOMEM;
                goto out_unreg_link;
index e923da5c5506c0c85a08c2a9df35d7bb763defaf..4a3c852780f581f019266402164c9853b22f94e5 100644 (file)
@@ -647,8 +647,7 @@ pd692x0_pi_get_pw_limit_ranges(struct pse_controller_dev *pcdev, int id,
 
        pw_table = pd692x0_class_pw_table;
        c33_pw_limit_ranges = kzalloc_objs(*c33_pw_limit_ranges,
-                                          PD692X0_CLASS_PW_TABLE_SIZE,
-                                          GFP_KERNEL);
+                                          PD692X0_CLASS_PW_TABLE_SIZE);
        if (!c33_pw_limit_ranges)
                return -ENOMEM;
 
index 7ec8be82c1c9f0cee15046f077cf2c8b26078342..0c1138407838e626ce975e4b2843e273a0c00c80 100644 (file)
@@ -1216,8 +1216,7 @@ static int ath11k_debugfs_dbr_dbg_init(struct ath11k *ar, int dbr_id)
        dbr_dbg_data->num_ring_debug_entries = ATH11K_DEBUG_DBR_ENTRIES_MAX;
        dbr_dbg_data->dbr_debug_idx = 0;
        dbr_dbg_data->entries = kzalloc_objs(struct ath11k_dbg_dbr_entry,
-                                            ATH11K_DEBUG_DBR_ENTRIES_MAX,
-                                            GFP_KERNEL);
+                                            ATH11K_DEBUG_DBR_ENTRIES_MAX);
        if (!dbr_dbg_data->entries)
                return -ENOMEM;
 
index 715e561bf8ca972a1116a8d0b0d2b7cb91c82e40..1c82d927d27b27e19cc5a8a454679fcb341ddec5 100644 (file)
@@ -408,7 +408,7 @@ static int ath12k_dp_init_bank_profiles(struct ath12k_base *ab)
 
        dp->num_bank_profiles = num_tcl_banks;
        dp->bank_profiles = kmalloc_objs(struct ath12k_dp_tx_bank_profile,
-                                        num_tcl_banks, GFP_KERNEL);
+                                        num_tcl_banks);
        if (!dp->bank_profiles)
                return -ENOMEM;
 
index 7b945a010ea17effd9b0f05940e502b7063bcbf9..05c9c07591fcb191e4f0643642e231c74c4c7ab6 100644 (file)
@@ -920,7 +920,7 @@ ath5k_desc_alloc(struct ath5k_hw *ah)
                ds, ah->desc_len, (unsigned long long)ah->desc_daddr);
 
        bf = kzalloc_objs(struct ath5k_buf,
-                         1 + ATH_TXBUF + ATH_RXBUF + ATH_BCBUF, GFP_KERNEL);
+                         1 + ATH_TXBUF + ATH_RXBUF + ATH_BCBUF);
        if (bf == NULL) {
                ATH5K_ERR(ah, "can't allocate bufptr\n");
                ret = -ENOMEM;
index 9e4983d31628426117c669ab8340a2a0f1bb0139..e163706f8728ccc9c0af5cc6bad2f10df5f3b187 100644 (file)
@@ -728,7 +728,7 @@ ath5k_eeprom_convert_pcal_info_5111(struct ath5k_hw *ah, int mode,
                /* Allocate pd_curves for this cal pier */
                chinfo[pier].pd_curves =
                        kzalloc_objs(struct ath5k_pdgain_info,
-                                    AR5K_EEPROM_N_PD_CURVES, GFP_KERNEL);
+                                    AR5K_EEPROM_N_PD_CURVES);
 
                if (!chinfo[pier].pd_curves)
                        goto err_out;
@@ -916,8 +916,7 @@ ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode,
                /* Allocate pd_curves for this cal pier */
                chinfo[pier].pd_curves =
                                kzalloc_objs(struct ath5k_pdgain_info,
-                                            AR5K_EEPROM_N_PD_CURVES,
-                                            GFP_KERNEL);
+                                            AR5K_EEPROM_N_PD_CURVES);
 
                if (!chinfo[pier].pd_curves)
                        goto err_out;
@@ -1206,8 +1205,7 @@ ath5k_eeprom_convert_pcal_info_2413(struct ath5k_hw *ah, int mode,
                /* Allocate pd_curves for this cal pier */
                chinfo[pier].pd_curves =
                                kzalloc_objs(struct ath5k_pdgain_info,
-                                            AR5K_EEPROM_N_PD_CURVES,
-                                            GFP_KERNEL);
+                                            AR5K_EEPROM_N_PD_CURVES);
 
                if (!chinfo[pier].pd_curves)
                        goto err_out;
index 1e796087435d319fa5886d1b86ed3e63f2a436f8..b8cb736a71852f599cce6a13ba370b873a248767 100644 (file)
@@ -2442,7 +2442,7 @@ int wil6210_debugfs_init(struct wil6210_priv *wil)
                return -ENODEV;
 
        wil->dbg_data.data_arr = kzalloc_objs(struct wil_debugfs_iomem_data,
-                                             dbg_off_count, GFP_KERNEL);
+                                             dbg_off_count);
        if (!wil->dbg_data.data_arr) {
                debugfs_remove_recursive(dbg);
                wil->debug = NULL;
index 22811359d89d2938b13697dced70bcd1ab086d25..3ad99124d52279cbe9be0c0c5c2b01884f839d5d 100644 (file)
@@ -366,7 +366,7 @@ void b43legacy_debugfs_add_device(struct b43legacy_wldev *dev)
        e->dev = dev;
        log = &e->txstatlog;
        log->log = kzalloc_objs(struct b43legacy_txstatus,
-                               B43legacy_NR_LOGGED_TXSTATUS, GFP_KERNEL);
+                               B43legacy_NR_LOGGED_TXSTATUS);
        if (!log->log) {
                b43legacyerr(dev->wl, "debugfs: add device txstatus OOM\n");
                kfree(e);
index aba1168ab728e407f91bc1bc5f1479f5b90e5547..6b3e0b2bbca7d8e87dd111f49dd9780bedb83112 100644 (file)
@@ -3270,7 +3270,7 @@ static int b43legacy_wireless_core_init(struct b43legacy_wldev *dev)
        if ((phy->type == B43legacy_PHYTYPE_B) ||
            (phy->type == B43legacy_PHYTYPE_G)) {
                phy->_lo_pairs = kzalloc_objs(struct b43legacy_lopair,
-                                             B43legacy_LO_COUNT, GFP_KERNEL);
+                                             B43legacy_LO_COUNT);
                if (!phy->_lo_pairs)
                        return -ENOMEM;
        }
index a88abe390aeeb8236c0c316412709d63b23bafa1..ba1ce1552e0f43aaffeb9e6b8337bf05ca9c130c 100644 (file)
@@ -1589,7 +1589,7 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
        msgbuf->max_flowrings = if_msgbuf->max_flowrings;
        msgbuf->flowring_dma_handle =
                kzalloc_objs(*msgbuf->flowring_dma_handle,
-                            msgbuf->max_flowrings, GFP_KERNEL);
+                            msgbuf->max_flowrings);
        if (!msgbuf->flowring_dma_handle)
                goto fail;
 
index 8837f44fd06bb86c359ff192a508c607604eb276..248a051da52d3edec1965e73ade4b2f78305cdb9 100644 (file)
@@ -1886,7 +1886,7 @@ static int ipw2100_wdev_init(struct net_device *dev)
                bg_band->band = NL80211_BAND_2GHZ;
                bg_band->n_channels = geo->bg_channels;
                bg_band->channels = kzalloc_objs(struct ieee80211_channel,
-                                                geo->bg_channels, GFP_KERNEL);
+                                                geo->bg_channels);
                if (!bg_band->channels) {
                        ipw2100_down(priv);
                        return -ENOMEM;
@@ -4408,7 +4408,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
        }
 
        priv->tx_buffers = kmalloc_objs(struct ipw2100_tx_packet,
-                                       TX_PENDED_QUEUE_LENGTH, GFP_KERNEL);
+                                       TX_PENDED_QUEUE_LENGTH);
        if (!priv->tx_buffers) {
                bd_queue_free(priv, &priv->tx_queue);
                return -ENOMEM;
@@ -4552,7 +4552,7 @@ static int ipw2100_rx_allocate(struct ipw2100_priv *priv)
         * allocate packets
         */
        priv->rx_buffers = kmalloc_objs(struct ipw2100_rx_packet,
-                                       RX_QUEUE_LENGTH, GFP_KERNEL);
+                                       RX_QUEUE_LENGTH);
        if (!priv->rx_buffers) {
                IPW_DEBUG_INFO("can't allocate rx packet buffer table\n");
 
index e045208e2531a4bfa730946a3e218d195304e7b0..dd64d21174e3e9a301cb2f67cc74af6e9d3cd439 100644 (file)
@@ -11278,7 +11278,7 @@ static int ipw_wdev_init(struct net_device *dev)
                bg_band->band = NL80211_BAND_2GHZ;
                bg_band->n_channels = geo->bg_channels;
                bg_band->channels = kzalloc_objs(struct ieee80211_channel,
-                                                geo->bg_channels, GFP_KERNEL);
+                                                geo->bg_channels);
                if (!bg_band->channels) {
                        rc = -ENOMEM;
                        goto out;
@@ -11316,7 +11316,7 @@ static int ipw_wdev_init(struct net_device *dev)
                a_band->band = NL80211_BAND_5GHZ;
                a_band->n_channels = geo->a_channels;
                a_band->channels = kzalloc_objs(struct ieee80211_channel,
-                                               geo->a_channels, GFP_KERNEL);
+                                               geo->a_channels);
                if (!a_band->channels) {
                        rc = -ENOMEM;
                        goto out;
index 9bfdf033463b9c5e4c00bba34d0c5bc7f253757b..fc9cf0531024a8a68596abac60490cd1ddba5035 100644 (file)
@@ -596,10 +596,9 @@ void iwl_tt_initialize(struct iwl_priv *priv)
        if (priv->lib->adv_thermal_throttle) {
                IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n");
                tt->restriction = kzalloc_objs(struct iwl_tt_restriction,
-                                              IWL_TI_STATE_MAX, GFP_KERNEL);
+                                              IWL_TI_STATE_MAX);
                tt->transaction = kzalloc_objs(struct iwl_tt_trans,
-                                              IWL_TI_STATE_MAX * (IWL_TI_STATE_MAX - 1),
-                                              GFP_KERNEL);
+                                              IWL_TI_STATE_MAX * (IWL_TI_STATE_MAX - 1));
                if (!tt->restriction || !tt->transaction) {
                        IWL_ERR(priv, "Fallback to Legacy Throttling\n");
                        priv->thermal_throttle.advanced_tt = false;
index fb63c8ba800ae655161824faa0d5d381aac4f15d..d39dd36b08e3927632e561e90b4068c1097c81c1 100644 (file)
@@ -132,7 +132,7 @@ int iwl_mld_low_latency_init(struct iwl_mld *mld)
        unsigned long ts = jiffies;
 
        ll->pkts_counters = kzalloc_objs(*ll->pkts_counters,
-                                        mld->trans->info.num_rxqs, GFP_KERNEL);
+                                        mld->trans->info.num_rxqs);
        if (!ll->pkts_counters)
                return -ENOMEM;
 
index 6679be028a6b003a228895a36c7e1995b3824e66..a1a4cf3ab3d311872dc94967b90befcb686569ed 100644 (file)
@@ -2084,8 +2084,7 @@ void iwl_mld_handle_channel_survey_notif(struct iwl_mld *mld,
                }
 
                mld->channel_survey = kzalloc_flex(*mld->channel_survey,
-                                                  channels, n_channels,
-                                                  GFP_KERNEL);
+                                                  channels, n_channels);
 
                if (!mld->channel_survey)
                        return;
index 3b8ff0744e7c5912fd5f4ba7e0b35585e6e97264..6b7a89e050e6725fa994cfba4e75d18afe76acd9 100644 (file)
@@ -695,8 +695,7 @@ static void iwl_mld_alloc_mpdu_counters(struct iwl_mld *mld,
                return;
 
        mld_sta->mpdu_counters = kzalloc_objs(*mld_sta->mpdu_counters,
-                                             mld->trans->info.num_rxqs,
-                                             GFP_KERNEL);
+                                             mld->trans->info.num_rxqs);
        if (!mld_sta->mpdu_counters)
                return;
 
index aeaa1d4b312d87fe7f9a6ac0d9b2e5f55a0741f7..090791fe06384e1970fde68e78078f1dc24c50d7 100644 (file)
@@ -4349,8 +4349,7 @@ static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
 
                        WARN_ON(rcu_access_pointer(mvmsta->ptk_pn[keyidx]));
                        ptk_pn = kzalloc_flex(*ptk_pn, q,
-                                             mvm->trans->info.num_rxqs,
-                                             GFP_KERNEL);
+                                             mvm->trans->info.num_rxqs);
                        if (!ptk_pn) {
                                ret = -ENOMEM;
                                break;
index 966558885ea6e04f030e100476e746b359cbd5f3..79829f775c89bfb06c192e43d35ca0765b8e12de 100644 (file)
@@ -3604,7 +3604,7 @@ void iwl_mvm_rx_channel_survey_notif(struct iwl_mvm *mvm,
                }
 
                mvm->acs_survey = kzalloc_flex(*mvm->acs_survey, channels,
-                                              n_channels, GFP_KERNEL);
+                                              n_channels);
 
                if (!mvm->acs_survey)
                        return;
index 7c662d5f2b72f4bfc5e0a6c06f93ce7ce2df165a..fe263cdc2e4f41e8b0641270f52b4bff52946b3c 100644 (file)
@@ -775,11 +775,10 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans)
 
        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);
+                                          RX_POOL_SIZE(trans_pcie->num_rx_bufs));
        trans_pcie->global_table =
                kzalloc_objs(trans_pcie->global_table[0],
-                            RX_POOL_SIZE(trans_pcie->num_rx_bufs), GFP_KERNEL);
+                            RX_POOL_SIZE(trans_pcie->num_rx_bufs));
        if (!trans_pcie->rxq || !trans_pcie->rx_pool ||
            !trans_pcie->global_table) {
                ret = -ENOMEM;
index d7979d75b073b8a56fe33db315a7b3365b7f91e7..fdb3ba4f63c016bae805679f856600a2c7daf427 100644 (file)
@@ -836,7 +836,7 @@ static int iwl_pcie_tx_alloc(struct iwl_trans *trans)
 
        trans_pcie->txq_memory =
                kzalloc_objs(struct iwl_txq,
-                            trans->mac_cfg->base->num_of_queues, GFP_KERNEL);
+                            trans->mac_cfg->base->num_of_queues);
        if (!trans_pcie->txq_memory) {
                IWL_ERR(trans, "Not enough memory for txq\n");
                ret = -ENOMEM;
index 148c110c5a2bcfc72a0e13506d4ab68ea030b48b..95580921d933827c5eac55b79404e26bd7a57ba4 100644 (file)
@@ -159,7 +159,7 @@ static int p54_generate_band(struct ieee80211_hw *dev,
                goto err_out;
 
        tmp->channels = kzalloc_objs(struct ieee80211_channel,
-                                    list->band_channel_num[band], GFP_KERNEL);
+                                    list->band_channel_num[band]);
        if (!tmp->channels)
                goto err_out;
 
index 63d9ccc5a81c3472cfba25482a022ed271de5fe8..43704106cd8041af39cc78f31adf5faf7627f023 100644 (file)
@@ -4678,8 +4678,7 @@ int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter)
         */
        adapter->num_in_chan_stats = 2 * (n_channels_bg + n_channels_a);
        adapter->chan_stats = kzalloc_objs(*adapter->chan_stats,
-                                          adapter->num_in_chan_stats,
-                                          GFP_KERNEL);
+                                          adapter->num_in_chan_stats);
 
        if (!adapter->chan_stats)
                return -ENOMEM;
index 1bb30fbab12b6d9903c0a1c3581f89885ea2c944..29e0f274575e5aebdb5318ade023a10a2816c7c9 100644 (file)
@@ -390,7 +390,7 @@ int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter)
 
        /* Allocate and initialize struct cmd_ctrl_node */
        cmd_array = kzalloc_objs(struct cmd_ctrl_node,
-                                MWIFIEX_NUM_OF_CMD_BUFFER, GFP_KERNEL);
+                                MWIFIEX_NUM_OF_CMD_BUFFER);
        if (!cmd_array)
                return -ENOMEM;
 
index 4e511f8700a8abc1bb70acd441377d2f1362d24c..97c0ec3b822e700b38760e9c79a0afbecf5ada79 100644 (file)
@@ -1510,7 +1510,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
        }
 
        scan_chan_list = kzalloc_objs(struct mwifiex_chan_scan_param_set,
-                                     MWIFIEX_USER_SCAN_CHAN_MAX, GFP_KERNEL);
+                                     MWIFIEX_USER_SCAN_CHAN_MAX);
        if (!scan_chan_list) {
                kfree(scan_cfg_out);
                ret = -ENOMEM;
index 1b3fcc2b335533ef9e7de417057ee08556aa705e..d9c4dd6beaecf24c4fc6b46b2fda58118a3c7634 100644 (file)
@@ -1253,7 +1253,7 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac,
 
        mac_info->n_if_comb = resp_info->n_iface_combinations;
        mac_info->if_comb = kzalloc_objs(*mac->macinfo.if_comb,
-                                        mac->macinfo.n_if_comb, GFP_KERNEL);
+                                        mac->macinfo.n_if_comb);
 
        if (!mac->macinfo.if_comb)
                return -ENOMEM;
index d839824b4e8ddd2d5fc6e168a3b1a7df95030e84..e1bb4707183caeda8f86617ae34ea73b61c9f105 100644 (file)
@@ -3498,7 +3498,7 @@ nvme_fc_alloc_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
 
        ret = -ENOMEM;
        ctrl->queues = kzalloc_objs(struct nvme_fc_queue,
-                                   ctrl->ctrl.queue_count, GFP_KERNEL);
+                                   ctrl->ctrl.queue_count);
        if (!ctrl->queues)
                goto out_free_ida;
 
index 31006ce56832929e77c28129c515e9ea5b31693d..4e9db96ebfecd796244e5dc67c23e1abb1a14974 100644 (file)
@@ -503,7 +503,7 @@ static inline int nvmet_pci_epf_transfer(struct nvmet_pci_epf_ctrl *ctrl,
 static int nvmet_pci_epf_alloc_irq_vectors(struct nvmet_pci_epf_ctrl *ctrl)
 {
        ctrl->irq_vectors = kzalloc_objs(struct nvmet_pci_epf_irq_vector,
-                                        ctrl->nr_queues, GFP_KERNEL);
+                                        ctrl->nr_queues);
        if (!ctrl->irq_vectors)
                return -ENOMEM;
 
index cf629665db8e3763029ac3f0a2cddbab7532d113..035c996e3ca993fd98d3db05d7d93417f5f84f3a 100644 (file)
@@ -928,7 +928,7 @@ void *iosapic_register(unsigned long hpa, void __iomem *vaddr)
        DBG_IRT("iosapic_register: num vectors = %d\n", isi->isi_num_vectors);
 
        vip = isi->isi_vector = kzalloc_objs(struct vector_info,
-                                            isi->isi_num_vectors, GFP_KERNEL);
+                                            isi->isi_num_vectors);
        if (vip == NULL) {
                kfree(isi);
                return NULL;
index b7556663223a2179fbdd22db85f7528c00cc6a06..3281357185d1f6e30492675b54031b91ffeef497 100644 (file)
@@ -73,8 +73,7 @@ static int wbrf_record(struct acpi_device *adev, uint8_t action, struct wbrf_ran
        num_of_elements = 2 * num_of_ranges + 2;
 
        union acpi_object *tmp __free(kfree) = kzalloc_objs(*tmp,
-                                                           num_of_elements,
-                                                           GFP_KERNEL);
+                                                           num_of_elements);
        if (!tmp)
                return -ENOMEM;
 
index cdaa366b5e1136ca1917bf2247f9b77e03f759a8..4eefbade2f5eea08b39ca11f83a3c47796eae1c8 100644 (file)
@@ -657,8 +657,7 @@ static int dell_wmi_input_setup(struct wmi_device *wdev)
        }
 
        keymap = kzalloc_objs(struct key_entry,
-                             dmi_results.keymap_size + ARRAY_SIZE(dell_wmi_keymap_type_0000) + ARRAY_SIZE(dell_wmi_keymap_type_0010) + ARRAY_SIZE(dell_wmi_keymap_type_0011) + ARRAY_SIZE(dell_wmi_keymap_type_0012) + 1,
-                             GFP_KERNEL);
+                             dmi_results.keymap_size + ARRAY_SIZE(dell_wmi_keymap_type_0000) + ARRAY_SIZE(dell_wmi_keymap_type_0010) + ARRAY_SIZE(dell_wmi_keymap_type_0011) + ARRAY_SIZE(dell_wmi_keymap_type_0012) + 1);
        if (!keymap) {
                kfree(dmi_results.keymap);
                err = -ENOMEM;
index 40fe2c4adedbfce2e7acdd1d67cd7ad0fc7e2941..ed099a431ea4df6babdbaa281b53dad5294d3b74 100644 (file)
@@ -315,7 +315,7 @@ static int dell_privacy_wmi_probe(struct wmi_device *wdev, const void *context)
 
        /* remap the wmi keymap event to new keymap */
        keymap = kzalloc_objs(struct key_entry,
-                             ARRAY_SIZE(dell_wmi_keymap_type_0012), GFP_KERNEL);
+                             ARRAY_SIZE(dell_wmi_keymap_type_0012));
        if (!keymap)
                return -ENOMEM;
 
index c7c55f8fe0a0aa1490622cf3b2237f8ea7ebc8e5..09996fbdc7074073c7bb74f0708fd21fc21626fe 100644 (file)
@@ -120,8 +120,7 @@ int alloc_enum_data(void)
        wmi_priv.enumeration_instances_count =
                get_instance_count(DELL_WMI_BIOS_ENUMERATION_ATTRIBUTE_GUID);
        wmi_priv.enumeration_data = kzalloc_objs(struct enumeration_data,
-                                                wmi_priv.enumeration_instances_count,
-                                                GFP_KERNEL);
+                                                wmi_priv.enumeration_instances_count);
        if (!wmi_priv.enumeration_data) {
                wmi_priv.enumeration_instances_count = 0;
                ret = -ENOMEM;
index f00a1cbac2f9ec66198c9c9e1db253e8607e5bc3..ab5c24722475acffb48169d9b4bac967af9a4be4 100644 (file)
@@ -124,8 +124,7 @@ int alloc_int_data(void)
 
        wmi_priv.integer_instances_count = get_instance_count(DELL_WMI_BIOS_INTEGER_ATTRIBUTE_GUID);
        wmi_priv.integer_data = kzalloc_objs(struct integer_data,
-                                            wmi_priv.integer_instances_count,
-                                            GFP_KERNEL);
+                                            wmi_priv.integer_instances_count);
        if (!wmi_priv.integer_data) {
                wmi_priv.integer_instances_count = 0;
                ret = -ENOMEM;
index 44ecdcb82d84e0c99ccacb9e679f4fd239ee20d7..be939b731063b951b4aca07d545514d974974d7e 100644 (file)
@@ -144,7 +144,7 @@ int alloc_po_data(void)
 
        wmi_priv.po_instances_count = get_instance_count(DELL_WMI_BIOS_PASSOBJ_ATTRIBUTE_GUID);
        wmi_priv.po_data = kzalloc_objs(struct po_data,
-                                       wmi_priv.po_instances_count, GFP_KERNEL);
+                                       wmi_priv.po_instances_count);
        if (!wmi_priv.po_data) {
                wmi_priv.po_instances_count = 0;
                ret = -ENOMEM;
index 9e11c00ad859624ebc70b3e5311141f30759fda8..41e19f0391b2006f3393dc1cc685404be711c295 100644 (file)
@@ -109,8 +109,7 @@ int alloc_str_data(void)
 
        wmi_priv.str_instances_count = get_instance_count(DELL_WMI_BIOS_STRING_ATTRIBUTE_GUID);
        wmi_priv.str_data = kzalloc_objs(struct str_data,
-                                        wmi_priv.str_instances_count,
-                                        GFP_KERNEL);
+                                        wmi_priv.str_instances_count);
        if (!wmi_priv.str_data) {
                wmi_priv.str_instances_count = 0;
                ret = -ENOMEM;
index 4a09fd32ebc649de9fab823b476fc3ad1856a774..470b9f44ed7aaaadc458b8eb5e9e8e0b62da8291 100644 (file)
@@ -95,8 +95,7 @@ int hp_alloc_enumeration_data(void)
                hp_get_instance_count(HP_WMI_BIOS_ENUMERATION_GUID);
 
        bioscfg_drv.enumeration_data = kzalloc_objs(*bioscfg_drv.enumeration_data,
-                                                   bioscfg_drv.enumeration_instances_count,
-                                                   GFP_KERNEL);
+                                                   bioscfg_drv.enumeration_instances_count);
        if (!bioscfg_drv.enumeration_data) {
                bioscfg_drv.enumeration_instances_count = 0;
                return -ENOMEM;
index 84d522f2b491975f2f086307fb01fcc26b583086..d96e160953e39335f5abc6d5593f90277b7bd83f 100644 (file)
@@ -110,8 +110,7 @@ int hp_alloc_integer_data(void)
 {
        bioscfg_drv.integer_instances_count = hp_get_instance_count(HP_WMI_BIOS_INTEGER_GUID);
        bioscfg_drv.integer_data = kzalloc_objs(*bioscfg_drv.integer_data,
-                                               bioscfg_drv.integer_instances_count,
-                                               GFP_KERNEL);
+                                               bioscfg_drv.integer_instances_count);
 
        if (!bioscfg_drv.integer_data) {
                bioscfg_drv.integer_instances_count = 0;
index 592328280a818e8d3bee8a208cacb2177b122517..f09489a085c86073cd9b66b72078cc5ea37dd580 100644 (file)
@@ -99,8 +99,7 @@ int hp_alloc_ordered_list_data(void)
        bioscfg_drv.ordered_list_instances_count =
                hp_get_instance_count(HP_WMI_BIOS_ORDERED_LIST_GUID);
        bioscfg_drv.ordered_list_data = kzalloc_objs(*bioscfg_drv.ordered_list_data,
-                                                    bioscfg_drv.ordered_list_instances_count,
-                                                    GFP_KERNEL);
+                                                    bioscfg_drv.ordered_list_instances_count);
        if (!bioscfg_drv.ordered_list_data) {
                bioscfg_drv.ordered_list_instances_count = 0;
                return -ENOMEM;
index dc7107ff010bb4bfd40ab1a7c272d48699be5535..4d79eb8056a5d87c2a16db48fad512ec1d046c1c 100644 (file)
@@ -186,8 +186,7 @@ int hp_alloc_password_data(void)
 {
        bioscfg_drv.password_instances_count = hp_get_instance_count(HP_WMI_BIOS_PASSWORD_GUID);
        bioscfg_drv.password_data = kzalloc_objs(*bioscfg_drv.password_data,
-                                                bioscfg_drv.password_instances_count,
-                                                GFP_KERNEL);
+                                                bioscfg_drv.password_instances_count);
        if (!bioscfg_drv.password_data) {
                bioscfg_drv.password_instances_count = 0;
                return -ENOMEM;
index f0ce4f3e7f200eaaad981530e9c352dd382603fc..fe5a9a3a4ef1740f5d2949849694433be47c38d4 100644 (file)
@@ -102,8 +102,7 @@ int hp_alloc_string_data(void)
 {
        bioscfg_drv.string_instances_count = hp_get_instance_count(HP_WMI_BIOS_STRING_GUID);
        bioscfg_drv.string_data = kzalloc_objs(*bioscfg_drv.string_data,
-                                              bioscfg_drv.string_instances_count,
-                                              GFP_KERNEL);
+                                              bioscfg_drv.string_instances_count);
        if (!bioscfg_drv.string_data) {
                bioscfg_drv.string_instances_count = 0;
                return -ENOMEM;
index fb26e5a26ffa3ab1c0f39083b05c76d2ca19b78d..88822023a14902595817bee89a819f413c90d04f 100644 (file)
@@ -92,7 +92,7 @@ static acpi_status parse_package(struct wwan_sar_context *context, union acpi_ob
                return AE_ERROR;
 
        data->device_mode_info = kmalloc_objs(struct wwan_device_mode_info,
-                                             data->total_dev_mode, GFP_KERNEL);
+                                             data->total_dev_mode);
        if (!data->device_mode_info)
                return AE_ERROR;
 
index a38c278a792b3bc6e9ada0a5cf67aa6541172e13..b8cdaa233ea9ceec1101603b34ada9bc7a67fece 100644 (file)
@@ -1820,7 +1820,7 @@ int tpmi_sst_init(void)
        }
 
        isst_common.sst_inst = kzalloc_objs(*isst_common.sst_inst,
-                                           topology_max_packages(), GFP_KERNEL);
+                                           topology_max_packages());
        if (!isst_common.sst_inst) {
                ret = -ENOMEM;
                goto init_done;
index 57c8856fc468341cefd2565ee15a48c7252b78de..833052dc34d2d70d2a94e900878ba062a1086e9d 100644 (file)
@@ -222,8 +222,7 @@ static int __init tpmi_init(void)
                return ret;
 
        tpmi_power_domain_mask = kzalloc_objs(*tpmi_power_domain_mask,
-                                             size_mul(topology_max_packages(), MAX_POWER_DOMAINS),
-                                             GFP_KERNEL);
+                                             size_mul(topology_max_packages(), MAX_POWER_DOMAINS));
        if (!tpmi_power_domain_mask)
                return -ENOMEM;
 
index b9adb34502bdac2a3bc8b775228626f2ceb4a967..a8c50b323a9e6f3c5d2f3d5a84752f09639a9fd2 100644 (file)
@@ -388,7 +388,7 @@ static int uv_ports_init(void)
        }
        for (j = 0; j < uv_bios_obj_cnt; j++) {
                uv_hubs[j]->ports = kzalloc_objs(*uv_hubs[j]->ports,
-                                                hub_buf[j].ports, GFP_KERNEL);
+                                                hub_buf[j].ports);
                if (!uv_hubs[j]->ports) {
                        ret = -ENOMEM;
                        j--;
index b65bb4f4b92a6aa0b3bd6ce94579c400dfdd14d6..9197fa20d93fbc4ba8089a21cd3c41607410a137 100644 (file)
@@ -530,7 +530,7 @@ struct powercap_zone *powercap_register_zone(
        if (!power_zone->name)
                goto err_name_alloc;
        power_zone->constraints = kzalloc_objs(*power_zone->constraints,
-                                              nr_constraints, GFP_KERNEL);
+                                              nr_constraints);
        if (!power_zone->constraints)
                goto err_const_alloc;
 
index ef4df1792ece49c43b263063a5d2b5588c993c8c..1eebc26021871d3dc573da488fe7bf9613a0b863 100644 (file)
@@ -2445,8 +2445,7 @@ static int __allocate_component_cfg(struct mpam_component *comp)
                                continue;
 
                        mbwu_state = kzalloc_objs(*ris->mbwu_state,
-                                                 ris->props.num_mbwu_mon,
-                                                 GFP_KERNEL);
+                                                 ris->props.num_mbwu_mon);
                        if (!mbwu_state) {
                                __destroy_component_cfg(comp);
                                return -ENOMEM;
index c1f3ee5eda5a533560fe925856580531ebf42686..023ea279361f65131c2f2458673a967b039424a0 100644 (file)
@@ -1628,7 +1628,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
                        * sizeof(struct zcrypt_device_status_ext);
 
                device_status = kvzalloc_objs(struct zcrypt_device_status_ext,
-                                             MAX_ZDEV_ENTRIES_EXT, GFP_KERNEL);
+                                             MAX_ZDEV_ENTRIES_EXT);
                if (!device_status)
                        return -ENOMEM;
                zcrypt_device_status_mask_ext(device_status,
index 2e8119ce4411cb29bf9e6280bd0d72d03327ac8f..df9492247631fe4e7592b3c12e2d741cfaad8310 100644 (file)
@@ -493,7 +493,7 @@ int aac_get_containers(struct aac_dev *dev)
                fsa_dev_ptr = dev->fsa_dev;
 
                dev->fsa_dev = kzalloc_objs(*fsa_dev_ptr,
-                                           maximum_num_containers, GFP_KERNEL);
+                                           maximum_num_containers);
 
                kfree(fsa_dev_ptr);
                fsa_dev_ptr = NULL;
index faab6fd9bc2949bc4b46b581d39e0f7e0ddf09fb..fd18d4d3d219b449f37345b91fb03e0c482487b4 100644 (file)
@@ -2477,8 +2477,7 @@ static int beiscsi_alloc_mem(struct beiscsi_hba *phba)
        /* Allocate memory for wrb_context */
        phwi_ctrlr = phba->phwi_ctrlr;
        phwi_ctrlr->wrb_context = kzalloc_objs(struct hwi_wrb_context,
-                                              phba->params.cxns_per_ctrl,
-                                              GFP_KERNEL);
+                                              phba->params.cxns_per_ctrl);
        if (!phwi_ctrlr->wrb_context) {
                kfree(phba->phwi_ctrlr);
                return -ENOMEM;
@@ -2626,8 +2625,7 @@ static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
        /* Allocate memory for WRBQ */
        phwi_ctxt = phwi_ctrlr->phwi_ctxt;
        phwi_ctxt->be_wrbq = kzalloc_objs(struct be_queue_info,
-                                         phba->params.cxns_per_ctrl,
-                                         GFP_KERNEL);
+                                         phba->params.cxns_per_ctrl);
        if (!phwi_ctxt->be_wrbq) {
                beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                            "BM_%d : WRBQ Mem Alloc Failed\n");
@@ -2638,8 +2636,7 @@ static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
                pwrb_context = &phwi_ctrlr->wrb_context[index];
                pwrb_context->pwrb_handle_base =
                                kzalloc_objs(struct wrb_handle *,
-                                            phba->params.wrbs_per_cxn,
-                                            GFP_KERNEL);
+                                            phba->params.wrbs_per_cxn);
                if (!pwrb_context->pwrb_handle_base) {
                        beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                                    "BM_%d : Mem Alloc Failed. Failing to load\n");
@@ -2647,8 +2644,7 @@ static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
                }
                pwrb_context->pwrb_handle_basestd =
                                kzalloc_objs(struct wrb_handle *,
-                                            phba->params.wrbs_per_cxn,
-                                            GFP_KERNEL);
+                                            phba->params.wrbs_per_cxn);
                if (!pwrb_context->pwrb_handle_basestd) {
                        beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                                    "BM_%d : Mem Alloc Failed. Failing to load\n");
@@ -3897,8 +3893,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
        mem_descr_sglh += HWI_MEM_SGLH;
        if (1 == mem_descr_sglh->num_elements) {
                phba->io_sgl_hndl_base = kzalloc_objs(struct sgl_handle *,
-                                                     phba->params.ios_per_ctrl,
-                                                     GFP_KERNEL);
+                                                     phba->params.ios_per_ctrl);
                if (!phba->io_sgl_hndl_base) {
                        beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                                    "BM_%d : Mem Alloc Failed. Failing to load\n");
@@ -3906,8 +3901,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
                }
                phba->eh_sgl_hndl_base =
                        kzalloc_objs(struct sgl_handle *,
-                                    phba->params.icds_per_ctrl - phba->params.ios_per_ctrl,
-                                    GFP_KERNEL);
+                                    phba->params.icds_per_ctrl - phba->params.ios_per_ctrl);
                if (!phba->eh_sgl_hndl_base) {
                        kfree(phba->io_sgl_hndl_base);
                        beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4025,7 +4019,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
                }
        }
        phba->ep_array = kzalloc_objs(struct iscsi_endpoint *,
-                                     phba->params.cxns_per_ctrl, GFP_KERNEL);
+                                     phba->params.cxns_per_ctrl);
        if (!phba->ep_array) {
                ret = -ENOMEM;
 
@@ -4033,7 +4027,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
        }
 
        phba->conn_table = kzalloc_objs(struct beiscsi_conn *,
-                                       phba->params.cxns_per_ctrl, GFP_KERNEL);
+                                       phba->params.cxns_per_ctrl);
        if (!phba->conn_table) {
                kfree(phba->ep_array);
                phba->ep_array = NULL;
index 4769e39a8b645c488bc048f5922e3dfb58c2fc1b..aa6007a218682718fa5bd41af9da13185e65dc01 100644 (file)
@@ -279,7 +279,7 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize,
 
                        flq = wrm->q_arr[q->un.iq.flq_idx];
                        flq->un.fl.bufs = kzalloc_objs(struct csio_dma_buf,
-                                                      flq->credits, GFP_KERNEL);
+                                                      flq->credits);
                        if (!flq->un.fl.bufs) {
                                csio_err(hw,
                                         "Failed to allocate FL queue bufs"
index a895ff0d15bad4529d99572088e0803a7c520f77..0a35f19537680b5094c356acbff2519252c2a325 100644 (file)
@@ -802,7 +802,7 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
        /* allocate the request table */
        a->req_table =
                kzalloc_objs(struct esas2r_request *,
-                            num_requests + num_ae_requests + 1, GFP_KERNEL);
+                            num_requests + num_ae_requests + 1);
 
        if (a->req_table == NULL) {
                esas2r_log(ESAS2R_LOG_CRIT,
index adb3b7d8c6fb37ca70affd2c9d8e15c09ff240f1..a1b116cd4723d57cacd043350afd1e8177d15b7e 100644 (file)
@@ -2206,7 +2206,7 @@ static int hpsa_allocate_ioaccel2_sg_chain_blocks(struct ctlr_info *h)
        for (i = 0; i < h->nr_cmds; i++) {
                h->ioaccel2_cmd_sg_list[i] =
                        kmalloc_objs(*h->ioaccel2_cmd_sg_list[i],
-                                    h->maxsgentries, GFP_KERNEL);
+                                    h->maxsgentries);
                if (!h->ioaccel2_cmd_sg_list[i])
                        goto clean;
        }
@@ -2244,7 +2244,7 @@ static int hpsa_alloc_sg_chain_blocks(struct ctlr_info *h)
 
        for (i = 0; i < h->nr_cmds; i++) {
                h->cmd_sg_list[i] = kmalloc_objs(*h->cmd_sg_list[i],
-                                                h->chainsize, GFP_KERNEL);
+                                                h->chainsize);
                if (!h->cmd_sg_list[i])
                        goto clean;
 
index 5d5d9f97904be5aa2610b7f3b09651f4b1dc86d7..a20fce04fe79b6fe177c13470c6d3c4e27d36ddc 100644 (file)
@@ -6210,7 +6210,7 @@ static int ibmvfc_alloc_mem(struct ibmvfc_host *vhost)
                goto free_login_buffer;
 
        vhost->trace = kzalloc_objs(struct ibmvfc_trace_entry,
-                                   IBMVFC_NUM_TRACE_ENTRIES, GFP_KERNEL);
+                                   IBMVFC_NUM_TRACE_ENTRIES);
        atomic_set(&vhost->trace_index, -1);
 
        if (!vhost->trace)
index 03f78c07f87f50975ff26f87a8644b5428faae7b..d207e5e81afe0ad1bdcab74d8c7806e1c517f7e8 100644 (file)
@@ -8860,7 +8860,7 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
                return -ENOMEM;
 
        ioa_cfg->ipr_cmnd_list = kzalloc_objs(struct ipr_cmnd *,
-                                             IPR_NUM_CMD_BLKS, GFP_KERNEL);
+                                             IPR_NUM_CMD_BLKS);
        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) {
@@ -8965,8 +8965,7 @@ static int ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg)
 
        ENTER;
        ioa_cfg->res_entries = kzalloc_objs(struct ipr_resource_entry,
-                                           ioa_cfg->max_devs_supported,
-                                           GFP_KERNEL);
+                                           ioa_cfg->max_devs_supported);
 
        if (!ioa_cfg->res_entries)
                goto out;
@@ -9028,7 +9027,7 @@ static int ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg)
        }
 
        ioa_cfg->trace = kzalloc_objs(struct ipr_trace_entry,
-                                     IPR_NUM_TRACE_ENTRIES, GFP_KERNEL);
+                                     IPR_NUM_TRACE_ENTRIES);
 
        if (!ioa_cfg->trace)
                goto out_free_hostrcb_dma;
index 1d9b3fcaa27ec2525de5817e32e2d7a4287b1941..052023fc173326c1040ab5f8a02ae50809df2d95 100644 (file)
@@ -6211,8 +6211,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
                                    &lpfc_debugfs_op_slow_ring_trc);
                if (!phba->slow_ring_trc) {
                        phba->slow_ring_trc = kzalloc_objs(struct lpfc_debugfs_trc,
-                                                          lpfc_debugfs_max_slow_ring_trc,
-                                                          GFP_KERNEL);
+                                                          lpfc_debugfs_max_slow_ring_trc);
                        if (!phba->slow_ring_trc) {
                                lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
                                                 "0416 Cannot create debugfs "
index a25a78a5332d66874cdaf16819193e141198d35b..94ad253d65a04339efe3dbb6879398cf65776fd9 100644 (file)
@@ -7771,8 +7771,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
 
        if (!phba->sli.sli3_ring)
                phba->sli.sli3_ring = kzalloc_objs(struct lpfc_sli_ring,
-                                                  LPFC_SLI3_MAX_RING,
-                                                  GFP_KERNEL);
+                                                  LPFC_SLI3_MAX_RING);
        if (!phba->sli.sli3_ring)
                return -ENOMEM;
 
@@ -8355,8 +8354,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
        }
 
        phba->sli4_hba.hba_eq_hdl = kzalloc_objs(struct lpfc_hba_eq_hdl,
-                                                phba->cfg_irq_chann,
-                                                GFP_KERNEL);
+                                                phba->cfg_irq_chann);
        if (!phba->sli4_hba.hba_eq_hdl) {
                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                "2572 Failed allocate memory for "
@@ -8366,8 +8364,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
        }
 
        phba->sli4_hba.cpu_map = kzalloc_objs(struct lpfc_vector_map_info,
-                                             phba->sli4_hba.num_possible_cpu,
-                                             GFP_KERNEL);
+                                             phba->sli4_hba.num_possible_cpu);
        if (!phba->sli4_hba.cpu_map) {
                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                "3327 Failed allocate memory for msi-x "
@@ -8385,8 +8382,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
        }
 
        phba->sli4_hba.idle_stat = kzalloc_objs(*phba->sli4_hba.idle_stat,
-                                               phba->sli4_hba.num_possible_cpu,
-                                               GFP_KERNEL);
+                                               phba->sli4_hba.num_possible_cpu);
        if (!phba->sli4_hba.idle_stat) {
                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                "3390 Failed allocation for idle_stat\n");
@@ -10440,8 +10436,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
 
        if (!phba->sli4_hba.hdwq) {
                phba->sli4_hba.hdwq = kzalloc_objs(struct lpfc_sli4_hdw_queue,
-                                                  phba->cfg_hdw_queue,
-                                                  GFP_KERNEL);
+                                                  phba->cfg_hdw_queue);
                if (!phba->sli4_hba.hdwq) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                        "6427 Failed allocate memory for "
@@ -10471,8 +10466,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
        if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) {
                if (phba->nvmet_support) {
                        phba->sli4_hba.nvmet_cqset = kzalloc_objs(struct lpfc_queue *,
-                                                                 phba->cfg_nvmet_mrq,
-                                                                 GFP_KERNEL);
+                                                                 phba->cfg_nvmet_mrq);
                        if (!phba->sli4_hba.nvmet_cqset) {
                                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                        "3121 Fail allocate memory for "
@@ -10480,8 +10474,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
                                goto out_error;
                        }
                        phba->sli4_hba.nvmet_mrq_hdr = kzalloc_objs(struct lpfc_queue *,
-                                                                   phba->cfg_nvmet_mrq,
-                                                                   GFP_KERNEL);
+                                                                   phba->cfg_nvmet_mrq);
                        if (!phba->sli4_hba.nvmet_mrq_hdr) {
                                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                        "3122 Fail allocate memory for "
@@ -10489,8 +10482,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
                                goto out_error;
                        }
                        phba->sli4_hba.nvmet_mrq_data = kzalloc_objs(struct lpfc_queue *,
-                                                                    phba->cfg_nvmet_mrq,
-                                                                    GFP_KERNEL);
+                                                                    phba->cfg_nvmet_mrq);
                        if (!phba->sli4_hba.nvmet_mrq_data) {
                                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                        "3124 Fail allocate memory for "
@@ -11376,8 +11368,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
        if (phba->sli4_hba.cq_max) {
                kfree(phba->sli4_hba.cq_lookup);
                phba->sli4_hba.cq_lookup = kzalloc_objs(struct lpfc_queue *,
-                                                       (phba->sli4_hba.cq_max + 1),
-                                                       GFP_KERNEL);
+                                                       (phba->sli4_hba.cq_max + 1));
                if (!phba->sli4_hba.cq_lookup) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                        "0549 Failed setup of CQ Lookup table: "
index ea5f24e28ef058bd31e67e12682de659adbf5726..debd9317103a7592867367d39072a8721d3dabb1 100644 (file)
@@ -1508,8 +1508,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba)
                        phba->sli4_hba.nvmet_xri_cnt);
 
        phba->sli4_hba.nvmet_ctx_info = kzalloc_objs(struct lpfc_nvmet_ctx_info,
-                                                    phba->sli4_hba.num_possible_cpu * phba->cfg_nvmet_mrq,
-                                                    GFP_KERNEL);
+                                                    phba->sli4_hba.num_possible_cpu * phba->cfg_nvmet_mrq);
        if (!phba->sli4_hba.nvmet_ctx_info) {
                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
                                "6419 Failed allocate memory for "
index 74b92a56099ac4c5b60a5de6733587e7b9de0ee2..de2bd860b9d7cf5db372c4a74a18f756472eace1 100644 (file)
@@ -463,7 +463,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat
         * XXX FIXME: Use DMA consistent routines
         */
                dma_cmd_space = kmalloc_objs(struct dbdma_cmd,
-                                           host->sg_tablesize + 2, GFP_KERNEL);
+                                           host->sg_tablesize + 2);
        if (!dma_cmd_space) {
                printk(KERN_ERR "mac53c94: couldn't allocate dma "
                       "command space for %pOF\n", node);
index c98064200390a36a9dd2910d56a12af01d99d7a3..ac71ea4898b22879d536ee6bf94652cd67b9727f 100644 (file)
@@ -6376,7 +6376,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
        if (instance->adapter_type >= VENTURA_SERIES) {
                fusion->stream_detect_by_ld =
                        kzalloc_objs(struct LD_STREAM_DETECT *,
-                                    MAX_LOGICAL_DRIVES_EXT, GFP_KERNEL);
+                                    MAX_LOGICAL_DRIVES_EXT);
                if (!fusion->stream_detect_by_ld) {
                        dev_err(&instance->pdev->dev,
                                "unable to allocate stream detection for pool of LDs\n");
index 07bdb95dd7e239bc25e44ca4a72b3ca75c8a09c2..81150bef11457eb91b2b1f740a48b61088b6a4bc 100644 (file)
@@ -2111,8 +2111,7 @@ static int mpi3mr_alloc_op_reply_q_segments(struct mpi3mr_ioc *mrioc, u16 qidx)
            op_reply_q->segment_qd);
 
        op_reply_q->q_segments = kzalloc_objs(struct segments,
-                                             op_reply_q->num_segments,
-                                             GFP_KERNEL);
+                                             op_reply_q->num_segments);
        if (!op_reply_q->q_segments)
                return -ENOMEM;
 
@@ -2170,7 +2169,7 @@ static int mpi3mr_alloc_op_req_q_segments(struct mpi3mr_ioc *mrioc, u16 qidx)
            op_req_q->segment_qd);
 
        op_req_q->q_segments = kzalloc_objs(struct segments,
-                                           op_req_q->num_segments, GFP_KERNEL);
+                                           op_req_q->num_segments);
        if (!op_req_q->q_segments)
                return -ENOMEM;
 
index dc23efc797414e9358afe2cb0677d0ac68ac9423..240f67a8e2e3b6cfc3b6893b321f3cf5f87f4381 100644 (file)
@@ -2116,7 +2116,7 @@ int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle)
                goto out_fail;
        }
        sas_expander->phy = kzalloc_objs(struct mpi3mr_sas_phy,
-                                        sas_expander->num_phys, GFP_KERNEL);
+                                        sas_expander->num_phys);
        if (!sas_expander->phy) {
                rc = -1;
                goto out_fail;
index 06ad016e367e1f5c7aa1d754c9e52e31f169168d..79052f2accbd346eb576b07bad4173e96bfa9092 100644 (file)
@@ -3462,8 +3462,7 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 
        if (iopoll_q_count) {
                ioc->io_uring_poll_queues = kzalloc_objs(struct io_uring_poll_queue,
-                                                        iopoll_q_count,
-                                                        GFP_KERNEL);
+                                                        iopoll_q_count);
                if (!ioc->io_uring_poll_queues)
                        iopoll_q_count = 0;
        }
@@ -3728,8 +3727,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
                 * MPT3_SUP_REPLY_POST_HOST_INDEX_REG_OFFSET from previous one.
                 */
                ioc->replyPostRegisterIndex = kzalloc_objs(resource_size_t *,
-                                                          ioc->combined_reply_index_count,
-                                                          GFP_KERNEL);
+                                                          ioc->combined_reply_index_count);
                if (!ioc->replyPostRegisterIndex) {
                        ioc_err(ioc,
                            "allocation for replyPostRegisterIndex failed!\n");
@@ -6562,7 +6560,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
 
        /* initialize hi-priority queue smid's */
        ioc->hpr_lookup = kzalloc_objs(struct request_tracker,
-                                      ioc->hi_priority_depth, GFP_KERNEL);
+                                      ioc->hi_priority_depth);
        if (!ioc->hpr_lookup) {
                ioc_err(ioc, "hpr_lookup: kcalloc failed\n");
                goto out;
@@ -6575,7 +6573,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
 
        /* initialize internal queue smid's */
        ioc->internal_lookup = kzalloc_objs(struct request_tracker,
-                                           ioc->internal_depth, GFP_KERNEL);
+                                           ioc->internal_depth);
        if (!ioc->internal_lookup) {
                ioc_err(ioc, "internal_lookup: kcalloc failed\n");
                goto out;
@@ -8430,8 +8428,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
 
        if (ioc->is_warpdrive) {
                ioc->reply_post_host_index = kzalloc_objs(resource_size_t *,
-                                                         ioc->cpu_msix_table_sz,
-                                                         GFP_KERNEL);
+                                                         ioc->cpu_msix_table_sz);
                if (!ioc->reply_post_host_index) {
                        ioc_info(ioc, "Allocation for reply_post_host_index failed!!!\n");
                        r = -ENOMEM;
@@ -8521,7 +8518,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
                goto out_free_resources;
 
        ioc->pfacts = kzalloc_objs(struct mpt3sas_port_facts,
-                                  ioc->facts.NumberOfPorts, GFP_KERNEL);
+                                  ioc->facts.NumberOfPorts);
        if (!ioc->pfacts) {
                r = -ENOMEM;
                goto out_free_resources;
index b2c9a3b0236a100046f99f9a689dcf322cb91649..8bb947004885bf4e3c52de314a249f2417275527 100644 (file)
@@ -1332,7 +1332,7 @@ _ctl_eventenable(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
        ioc->event_context = 0;
        ioc->aen_event_read_flag = 0;
        ioc->event_log = kzalloc_objs(struct MPT3_IOCTL_EVENTS,
-                                     MPT3SAS_CTL_EVENT_LOG_SIZE, GFP_KERNEL);
+                                     MPT3SAS_CTL_EVENT_LOG_SIZE);
        if (!ioc->event_log) {
                pr_err("failure at %s:%d/%s()!\n",
                    __FILE__, __LINE__, __func__);
index 3b6e17e0dbfa5edd59901b41c82af7ab94a3cb7e..6ff78855729424aeb7b767ad340b79a97bdd002d 100644 (file)
@@ -7028,8 +7028,7 @@ _scsih_sas_host_add(struct MPT3SAS_ADAPTER *ioc)
        ioc->sas_hba.nr_phys_allocated = max_t(u8,
            MPT_MAX_HBA_NUM_PHYS, num_phys);
        ioc->sas_hba.phy = kzalloc_objs(struct _sas_phy,
-                                       ioc->sas_hba.nr_phys_allocated,
-                                       GFP_KERNEL);
+                                       ioc->sas_hba.nr_phys_allocated);
        if (!ioc->sas_hba.phy) {
                ioc_err(ioc, "failure at %s:%d/%s()!\n",
                        __FILE__, __LINE__, __func__);
@@ -7283,7 +7282,7 @@ _scsih_expander_add(struct MPT3SAS_ADAPTER *ioc, u16 handle)
                goto out_fail;
        }
        sas_expander->phy = kzalloc_objs(struct _sas_phy,
-                                        sas_expander->num_phys, GFP_KERNEL);
+                                        sas_expander->num_phys);
        if (!sas_expander->phy) {
                ioc_err(ioc, "failure at %s:%d/%s()!\n",
                        __FILE__, __LINE__, __func__);
index ce76c9dd61713af4ef6b8965f76942689e909c18..942a99393204988946bd13d00e6de7ba3f4ff7c2 100644 (file)
@@ -4386,7 +4386,7 @@ static int pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance)
 
        pinstance->res_entries =
                        kzalloc_objs(struct pmcraid_resource_entry,
-                                    PMCRAID_MAX_RESOURCES, GFP_KERNEL);
+                                    PMCRAID_MAX_RESOURCES);
 
        if (NULL == pinstance->res_entries) {
                pmcraid_err("failed to allocate memory for resource table\n");
index d5e0b3d653f5c7ef921ace9887a3a04ee9cf8270..227ff7bd1bdc9b574e852723e1f4303f9df2211c 100644 (file)
@@ -411,7 +411,7 @@ static int qedi_alloc_fp(struct qedi_ctx *qedi)
        int ret = 0;
 
        qedi->fp_array = kzalloc_objs(struct qedi_fastpath,
-                                     MIN_NUM_CPUS_MSIX(qedi), GFP_KERNEL);
+                                     MIN_NUM_CPUS_MSIX(qedi));
        if (!qedi->fp_array) {
                QEDI_ERR(&qedi->dbg_ctx,
                         "fastpath fp array allocation failed.\n");
@@ -419,7 +419,7 @@ static int qedi_alloc_fp(struct qedi_ctx *qedi)
        }
 
        qedi->sb_array = kzalloc_objs(struct qed_sb_info,
-                                     MIN_NUM_CPUS_MSIX(qedi), GFP_KERNEL);
+                                     MIN_NUM_CPUS_MSIX(qedi));
        if (!qedi->sb_array) {
                QEDI_ERR(&qedi->dbg_ctx,
                         "fastpath sb array allocation failed.\n");
@@ -499,8 +499,7 @@ static int qedi_setup_cid_que(struct qedi_ctx *qedi)
                return -ENOMEM;
 
        qedi->cid_que.conn_cid_tbl = kmalloc_objs(struct qedi_conn *,
-                                                 qedi->max_active_conns,
-                                                 GFP_KERNEL);
+                                                 qedi->max_active_conns);
        if (!qedi->cid_que.conn_cid_tbl) {
                kfree(qedi->cid_que.cid_que_base);
                qedi->cid_que.cid_que_base = NULL;
@@ -1895,7 +1894,7 @@ struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid)
 static int qedi_alloc_itt(struct qedi_ctx *qedi)
 {
        qedi->itt_map = kzalloc_objs(struct qedi_itt_map,
-                                    MAX_ISCSI_TASK_ENTRIES, GFP_KERNEL);
+                                    MAX_ISCSI_TASK_ENTRIES);
        if (!qedi->itt_map) {
                QEDI_ERR(&qedi->dbg_ctx,
                         "Unable to allocate itt map array memory\n");
index 2493b720822299ac8f33781f32e1a97495669e24..730c42b1a7b9d7179b7c60d5c658962488f09759 100644 (file)
@@ -4042,8 +4042,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
                 */
                req->num_outstanding_cmds = MIN_OUTSTANDING_COMMANDS;
                req->outstanding_cmds = kzalloc_objs(srb_t *,
-                                                    req->num_outstanding_cmds,
-                                                    GFP_KERNEL);
+                                                    req->num_outstanding_cmds);
 
                if (!req->outstanding_cmds) {
                        ql_log(ql_log_fatal, NULL, 0x0126,
index 8dff710073586d85b0a4faee79eaf35350159780..72b1c28e4dae02181bd08b0794eb3402103a29c3 100644 (file)
@@ -463,7 +463,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req,
 
        if ((ql2xmqsupport || ql2xnvmeenable) && ha->max_qpairs) {
                ha->queue_pair_map = kzalloc_objs(struct qla_qpair *,
-                                                 ha->max_qpairs, GFP_KERNEL);
+                                                 ha->max_qpairs);
                if (!ha->queue_pair_map) {
                        ql_log(ql_log_fatal, vha, 0x0180,
                            "Unable to allocate memory for queue pair ptrs.\n");
@@ -4150,7 +4150,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
 
        if (QLA_TGT_MODE_ENABLED() || EDIF_CAP(ha)) {
                ha->vp_map = kzalloc_objs(struct qla_vp_map,
-                                         MAX_MULTI_ID_FABRIC, GFP_KERNEL);
+                                         MAX_MULTI_ID_FABRIC);
                if (!ha->vp_map)
                        goto fail;
        }
@@ -4376,7 +4376,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
        /* Allocate memory for NVRAM data for vports */
        if (ha->nvram_npiv_size) {
                ha->npiv_info = kzalloc_objs(struct qla_npiv_entry,
-                                            ha->nvram_npiv_size, GFP_KERNEL);
+                                            ha->nvram_npiv_size);
                if (!ha->npiv_info) {
                        ql_log_pci(ql_log_fatal, ha->pdev, 0x002d,
                            "Failed to allocate memory for npiv_info.\n");
index 5c25381ef8002aeabf17f7af78c7b5bdaeb320ce..b4ed991976d065ec190ef0bed225ccf403e8e6c8 100644 (file)
@@ -1253,7 +1253,7 @@ static inline int pqi_report_phys_luns(struct pqi_ctrl_info *ctrl_info, void **b
        num_physicals = get_unaligned_be32(&rpl_8byte_wwid_list->header.list_length) / sizeof(rpl_8byte_wwid_list->lun_entries[0]);
 
        rpl_16byte_wwid_list = kmalloc_flex(*rpl_16byte_wwid_list, lun_entries,
-                                           num_physicals, GFP_KERNEL);
+                                           num_physicals);
        if (!rpl_16byte_wwid_list) {
                rc = -ENOMEM;
                goto out_free_rpl_list;
@@ -5206,8 +5206,7 @@ static int pqi_alloc_io_resources(struct pqi_ctrl_info *ctrl_info)
        struct pqi_io_request *io_request;
 
        ctrl_info->io_request_pool = kzalloc_objs(ctrl_info->io_request_pool[0],
-                                                 ctrl_info->max_io_slots,
-                                                 GFP_KERNEL);
+                                                 ctrl_info->max_io_slots);
 
        if (!ctrl_info->io_request_pool) {
                dev_err(&ctrl_info->pci_dev->dev,
index a85b9ecf1a0521139f19b1555022901c310e82c8..3d8f5a81eff19511d80e33c76f54972691ccf530 100644 (file)
@@ -1231,8 +1231,7 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
        int maxport, pn, nports = 0;
        unsigned int m_port;
        struct sdw_port_config *pconfig __free(kfree) = kzalloc_objs(*pconfig,
-                                                                    ctrl->nports,
-                                                                    GFP_KERNEL);
+                                                                    ctrl->nports);
        if (!pconfig)
                return -ENOMEM;
 
index 5d180b0f8e4cdbd5eb682958627fdf0630130f33..33b7a63979d669ae2541defdb8c9a5e0789b4e8f 100644 (file)
@@ -552,7 +552,7 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
        }
 
        gbpsy->props_raw = kzalloc_objs(*gbpsy->props_raw,
-                                       gbpsy->properties_count, GFP_KERNEL);
+                                       gbpsy->properties_count);
        if (!gbpsy->props_raw) {
                ret = -ENOMEM;
                goto out_put_operation;
@@ -942,7 +942,7 @@ static int gb_power_supplies_setup(struct gb_power_supplies *supplies)
                goto out;
 
        supplies->supply = kzalloc_objs(struct gb_power_supply,
-                                       supplies->supplies_count, GFP_KERNEL);
+                                       supplies->supplies_count);
 
        if (!supplies->supply) {
                ret = -ENOMEM;
index c934da53f4a324767658374b83ec2c942b610434..ba61cc28fac1aa7e0536171981b674d9b1000c81 100644 (file)
@@ -306,7 +306,7 @@ static int atomisp_csi2_add_gpio_mappings(struct acpi_device *adev)
 
        /* Max num GPIOs we've seen plus a terminator */
        int3472 = kzalloc_flex(*int3472, gpios.table,
-                              INT3472_MAX_SENSOR_GPIOS + 1, GFP_KERNEL);
+                              INT3472_MAX_SENSOR_GPIOS + 1);
        if (!int3472)
                return -ENOMEM;
 
index ee7ea04c4fc5ada9829e52356e1e2896876b50d1..6cda5925fa45ed6546d791e7aafdcd15485c694c 100644 (file)
@@ -4531,16 +4531,14 @@ static int load_video_binaries(struct ia_css_pipe *pipe)
                        return err;
                mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
                mycs->yuv_scaler_binary = kzalloc_objs(struct ia_css_binary,
-                                                      cas_scaler_descr.num_stage,
-                                                      GFP_KERNEL);
+                                                      cas_scaler_descr.num_stage);
                if (!mycs->yuv_scaler_binary) {
                        mycs->num_yuv_scaler = 0;
                        err = -ENOMEM;
                        return err;
                }
                mycs->is_output_stage = kzalloc_objs(bool,
-                                                    cas_scaler_descr.num_stage,
-                                                    GFP_KERNEL);
+                                                    cas_scaler_descr.num_stage);
                if (!mycs->is_output_stage) {
                        err = -ENOMEM;
                        return err;
@@ -5112,16 +5110,14 @@ static int load_primary_binaries(
                }
                mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
                mycs->yuv_scaler_binary = kzalloc_objs(struct ia_css_binary,
-                                                      cas_scaler_descr.num_stage,
-                                                      GFP_KERNEL);
+                                                      cas_scaler_descr.num_stage);
                if (!mycs->yuv_scaler_binary) {
                        err = -ENOMEM;
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
                mycs->is_output_stage = kzalloc_objs(bool,
-                                                    cas_scaler_descr.num_stage,
-                                                    GFP_KERNEL);
+                                                    cas_scaler_descr.num_stage);
                if (!mycs->is_output_stage) {
                        err = -ENOMEM;
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -5973,7 +5969,7 @@ ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pipe,
        descr->num_stage = num_stages;
 
        descr->in_info = kmalloc_objs(struct ia_css_frame_info,
-                                     descr->num_stage, GFP_KERNEL);
+                                     descr->num_stage);
        if (!descr->in_info) {
                err = -ENOMEM;
                goto ERR;
@@ -6145,15 +6141,13 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
                mycs->num_output = cas_scaler_descr.num_output_stage;
                mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
                mycs->yuv_scaler_binary = kzalloc_objs(struct ia_css_binary,
-                                                      cas_scaler_descr.num_stage,
-                                                      GFP_KERNEL);
+                                                      cas_scaler_descr.num_stage);
                if (!mycs->yuv_scaler_binary) {
                        err = -ENOMEM;
                        goto ERR;
                }
                mycs->is_output_stage = kzalloc_objs(bool,
-                                                    cas_scaler_descr.num_stage,
-                                                    GFP_KERNEL);
+                                                    cas_scaler_descr.num_stage);
                if (!mycs->is_output_stage) {
                        err = -ENOMEM;
                        goto ERR;
index af1f8ead24620c47d7c84f300eef441f419a1add..0efc5646242af884c6a02d00965f098de5b326e6 100644 (file)
@@ -417,8 +417,7 @@ static int qcomtee_object_invoke(struct tee_context *ctx,
 
        /* +1 for ending QCOMTEE_ARG_TYPE_INV. */
        struct qcomtee_arg *u __free(kfree) = kzalloc_objs(*u,
-                                                          arg->num_params + 1,
-                                                          GFP_KERNEL);
+                                                          arg->num_params + 1);
        if (!u)
                return -ENOMEM;
 
index 3b85f077c364552b291d87f223f3d581834f811e..32bf5ab44f4a21960df0fe5db22bd51de05a909c 100644 (file)
@@ -372,7 +372,7 @@ static int allocate_idle_time(struct cpufreq_cooling_device *cpufreq_cdev)
        unsigned int num_cpus = cpumask_weight(cpufreq_cdev->policy->related_cpus);
 
        cpufreq_cdev->idle_time = kzalloc_objs(*cpufreq_cdev->idle_time,
-                                              num_cpus, GFP_KERNEL);
+                                              num_cpus);
        if (!cpufreq_cdev->idle_time)
                return -ENOMEM;
 
index 6742eaf0a447ec68fdf29e6163d953cf423791ca..d200734625ee867a4c2d1f3f26244f9631174c8b 100644 (file)
@@ -391,7 +391,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv)
 
        if (priv->odvp_attrs == NULL) {
                priv->odvp_attrs = kzalloc_objs(struct odvp_attr,
-                                               priv->odvp_count, GFP_KERNEL);
+                                               priv->odvp_count);
                if (!priv->odvp_attrs) {
                        ret = -ENOMEM;
                        goto out_err;
index 4c8888fb0a8bad52789b9b5d551f2546b9a29362..965700ee69626a6a1a5c513a087a17b8f708f7af 100644 (file)
@@ -134,8 +134,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
                int34x_zone->aux_trip_nr = trip_cnt;
 
        zone_trips = kzalloc_objs(*zone_trips,
-                                 trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT,
-                                 GFP_KERNEL);
+                                 trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT);
        if (!zone_trips) {
                ret = -ENOMEM;
                goto err_trips_alloc;
index 7af160ceb634e145ca4f52e4264c367e7d381d41..3c339242f52d4cd2b70b080ebf1e90f58fe67605 100644 (file)
@@ -391,8 +391,7 @@ static int tt_zone_register_tz(struct tt_thermal_zone *tt_zone)
                return -EINVAL;
 
        struct thermal_trip *trips __free(kfree) = kzalloc_objs(*trips,
-                                                               tt_zone->num_trips,
-                                                               GFP_KERNEL);
+                                                               tt_zone->num_trips);
        if (!trips)
                return -ENOMEM;
 
index 7c4cf6d02ece89b8b62031f34d106f1e90f3f07e..d0a070c237049056097ac0e6ae76c8875ae4052a 100644 (file)
@@ -1118,7 +1118,7 @@ static int __init sunsab_init(void)
 
        if (num_channels) {
                sunsab_ports = kzalloc_objs(struct uart_sunsab_port,
-                                           num_channels, GFP_KERNEL);
+                                           num_channels);
                if (!sunsab_ports)
                        return -ENOMEM;
 
index 06e892beda88e1ec18b65c1204a8cc8fd32c51a1..183a25f65ac8971aa3a896e6c9b9a1e2ccf8c7a9 100644 (file)
@@ -1629,8 +1629,7 @@ configfs_attach_gadget_strings(struct gadget_info *gi)
        if (!nlangs)
                return NULL;
 
-       gadget_strings = kzalloc_objs(struct usb_gadget_strings *, nlangs + 1,
-                                     GFP_KERNEL)/* including NULL terminator */;
+       gadget_strings = kzalloc_objs(struct usb_gadget_strings *, nlangs + 1)/* including NULL terminator */;
        if (!gadget_strings)
                return ERR_PTR(-ENOMEM);
 
@@ -1646,7 +1645,7 @@ configfs_attach_gadget_strings(struct gadget_info *gi)
                }
 
                stringtab = kzalloc_objs(struct usb_string,
-                                        language->nstrings + 1, GFP_KERNEL);
+                                        language->nstrings + 1);
                if (!stringtab) {
                        us = ERR_PTR(-ENOMEM);
                        goto cleanup;
index 4c663431e99f25745d68cf909da210565a62aac4..b5f0defde95d6a8893cacf0b5619d3b6c6166dad 100644 (file)
@@ -2855,7 +2855,7 @@ static struct usb_function *f_midi2_alloc(struct usb_function_instance *fi)
        }
 
        midi2->string_defs = kzalloc_objs(*midi2->string_defs,
-                                         midi2->total_blocks + 1, GFP_KERNEL);
+                                         midi2->total_blocks + 1);
        if (!midi2->string_defs) {
                do_f_midi2_free(midi2, opts);
                return ERR_PTR(-ENOMEM);
index 36d2fedbda115ffa0d7a0df20ad22e384662ab4a..e53f2927b5398501cd3d865b1c669f57e9761508 100644 (file)
@@ -1210,7 +1210,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
                prm->srate = params->c_srates[0];
 
                prm->reqs = kzalloc_objs(struct usb_request *,
-                                        params->req_number, GFP_KERNEL);
+                                        params->req_number);
                if (!prm->reqs) {
                        err = -ENOMEM;
                        goto fail;
@@ -1234,7 +1234,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
                prm->srate = params->p_srates[0];
 
                prm->reqs = kzalloc_objs(struct usb_request *,
-                                        params->req_number, GFP_KERNEL);
+                                        params->req_number);
                if (!prm->reqs) {
                        err = -ENOMEM;
                        goto fail;
index fbb83c84beee1c371eabe33104eef2eb4c3cb739..6c52c6f59d693c2008d4615e742ab0d2edfe1f07 100644 (file)
@@ -2573,14 +2573,14 @@ int isp1760_hcd_register(struct isp1760_hcd *priv, struct resource *mem,
        priv->hcd = hcd;
 
        priv->atl_slots = kzalloc_objs(struct isp1760_slotinfo,
-                                      mem_layout->slot_num, GFP_KERNEL);
+                                      mem_layout->slot_num);
        if (!priv->atl_slots) {
                ret = -ENOMEM;
                goto put_hcd;
        }
 
        priv->int_slots = kzalloc_objs(struct isp1760_slotinfo,
-                                      mem_layout->slot_num, GFP_KERNEL);
+                                      mem_layout->slot_num);
        if (!priv->int_slots) {
                ret = -ENOMEM;
                goto free_atl_slots;
index 7622bc0426cdb0c0d660c5e6347bbf229f6787e7..8770de01a384ddb3dccc98565fc36e1584b5e7a6 100644 (file)
@@ -1120,8 +1120,7 @@ static int ms_lib_alloc_writebuf(struct us_data *us)
                                            info->MS_Lib.BytesPerSector,
                                            GFP_KERNEL);
        info->MS_Lib.blkext = kmalloc_objs(struct ms_lib_type_extdat,
-                                          info->MS_Lib.PagesPerBlock,
-                                          GFP_KERNEL);
+                                          info->MS_Lib.PagesPerBlock);
 
        if ((info->MS_Lib.blkpag == NULL) || (info->MS_Lib.blkext == NULL)) {
                ms_lib_free_writebuf(us);
index 8425ad23b961657dbc86b4f027a6e398b7c5e4e3..ad0d5fbbbca84877ec1ad275e1a64129e0dea7dc 100644 (file)
@@ -3810,7 +3810,7 @@ static void allocate_irqs(struct mlx5_vdpa_net *ndev)
                return;
 
        ndev->irqp.entries = kzalloc_objs(*ndev->irqp.entries,
-                                         ndev->mvdev.max_vqs, GFP_KERNEL);
+                                         ndev->mvdev.max_vqs);
        if (!ndev->irqp.entries)
                return;
 
index 5fbecb95f7ffb5d13b31ef72f274799f9febff82..8cb1cc2ea1391aab8365882f780200e7d1dab339 100644 (file)
@@ -255,7 +255,7 @@ struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *dev_attr,
                goto err_iommu;
 
        vdpasim->iommu_pt = kmalloc_objs(*vdpasim->iommu_pt,
-                                        vdpasim->dev_attr.nas, GFP_KERNEL);
+                                        vdpasim->dev_attr.nas);
        if (!vdpasim->iommu_pt)
                goto err_iommu;
 
index 7c05df14bd4caa3932188e40caa85e658d4a77fb..1c22880e722675e9144401d47e87c3e8967bc192 100644 (file)
@@ -1947,8 +1947,7 @@ static int vhost_scsi_setup_vq_cmds(struct vhost_virtqueue *vq, int max_cmds)
 
                if (vs->inline_sg_cnt) {
                        tv_cmd->sgl = kzalloc_objs(struct scatterlist,
-                                                  vs->inline_sg_cnt,
-                                                  GFP_KERNEL);
+                                                  vs->inline_sg_cnt);
                        if (!tv_cmd->sgl) {
                                pr_err("Unable to allocate tv_cmd->sgl\n");
                                goto out;
@@ -1958,8 +1957,7 @@ static int vhost_scsi_setup_vq_cmds(struct vhost_virtqueue *vq, int max_cmds)
                if (vhost_has_feature(vq, VIRTIO_SCSI_F_T10_PI) &&
                    vs->inline_sg_cnt) {
                        tv_cmd->prot_sgl = kzalloc_objs(struct scatterlist,
-                                                       vs->inline_sg_cnt,
-                                                       GFP_KERNEL);
+                                                       vs->inline_sg_cnt);
                        if (!tv_cmd->prot_sgl) {
                                pr_err("Unable to allocate tv_cmd->prot_sgl\n");
                                goto out;
index 34b4b982dbbd3598a25954e039629c844a0f670e..c91300a73f50239dc59e5b6e3c2a4fd4ef457afc 100644 (file)
@@ -295,8 +295,7 @@ static int ne_setup_cpu_pool(const char *ne_cpu_list)
        ne_cpu_pool.nr_parent_vm_cores = nr_cpu_ids / ne_cpu_pool.nr_threads_per_core;
 
        ne_cpu_pool.avail_threads_per_core = kzalloc_objs(*ne_cpu_pool.avail_threads_per_core,
-                                                         ne_cpu_pool.nr_parent_vm_cores,
-                                                         GFP_KERNEL);
+                                                         ne_cpu_pool.nr_parent_vm_cores);
        if (!ne_cpu_pool.avail_threads_per_core) {
                rc = -ENOMEM;
 
@@ -942,7 +941,7 @@ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave,
        }
 
        phys_contig_mem_regions.regions = kzalloc_objs(*phys_contig_mem_regions.regions,
-                                                      max_nr_pages, GFP_KERNEL);
+                                                      max_nr_pages);
        if (!phys_contig_mem_regions.regions) {
                rc = -ENOMEM;
 
@@ -1628,8 +1627,7 @@ static int ne_create_vm_ioctl(struct ne_pci_dev *ne_pci_dev, u64 __user *slot_ui
        mutex_unlock(&ne_cpu_pool.mutex);
 
        ne_enclave->threads_per_core = kzalloc_objs(*ne_enclave->threads_per_core,
-                                                   ne_enclave->nr_parent_vm_cores,
-                                                   GFP_KERNEL);
+                                                   ne_enclave->nr_parent_vm_cores);
        if (!ne_enclave->threads_per_core) {
                rc = -ENOMEM;
 
index 679e807c36635ad8114f12784741d9fd973f98a5..bc9a41662efc4c635a4f4af38fb03f4273dafbd3 100644 (file)
@@ -2293,8 +2293,7 @@ void __init xen_init_IRQ(void)
                                  xen_evtchn_cpu_prepare, xen_evtchn_cpu_dead);
 
        evtchn_to_irq = kzalloc_objs(*evtchn_to_irq,
-                                    EVTCHN_ROW(xen_evtchn_max_channels()),
-                                    GFP_KERNEL);
+                                    EVTCHN_ROW(xen_evtchn_max_channels()));
        BUG_ON(!evtchn_to_irq);
 
        /* No event channels are 'live' right now. */
index 4a6f4325ad048f524b84c0b144a4bd90e830d934..83b0df46089412ba579315f6ca5c52af7b5b77a7 100644 (file)
@@ -535,7 +535,7 @@ static struct gntdev_dmabuf *dmabuf_imp_alloc_storage(int count)
                goto fail_no_free;
 
        gntdev_dmabuf->u.imp.refs = kzalloc_objs(gntdev_dmabuf->u.imp.refs[0],
-                                                count, GFP_KERNEL);
+                                                count);
        if (!gntdev_dmabuf->u.imp.refs)
                goto fail;
 
index a395b382c6497a36086c9fde9fc5eac513109a14..31903bfdce9f93a289671993086352d9056c3fc9 100644 (file)
@@ -142,7 +142,7 @@ xen_copy_pss_data(struct acpi_processor *_pr,
                     sizeof(struct acpi_processor_px));
 
        dst_states = kzalloc_objs(struct xen_processor_px,
-                                 _pr->performance->state_count, GFP_KERNEL);
+                                 _pr->performance->state_count);
        if (!dst_states)
                return ERR_PTR(-ENOMEM);
 
index f693b963a2e88e14ac3f82ac87bbdf24fd93aa45..9c7d8af6e6a19f9b8ba51bcb6c871b31ffc2e169 100644 (file)
@@ -254,7 +254,7 @@ static int backend_map(struct xen_front_pgdir_shbuf *buf)
                return -ENOMEM;
 
        buf->backend_map_handles = kzalloc_objs(*buf->backend_map_handles,
-                                               buf->num_pages, GFP_KERNEL);
+                                               buf->num_pages);
        if (!buf->backend_map_handles) {
                kfree(map_ops);
                return -ENOMEM;
index 322a80b43f32a14ca039286091a03582c2e532c9..5540ae1cad599aab3f8349fa6986413a1ae6bff6 100644 (file)
@@ -229,7 +229,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
 
                _debug("unmarshall FID array");
                call->request = kzalloc_objs(struct afs_callback_break,
-                                            call->count, GFP_KERNEL);
+                                            call->count);
                if (!call->request)
                        return -ENOMEM;
 
@@ -589,7 +589,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call)
 
                _debug("unmarshall FID array");
                call->request = kzalloc_objs(struct afs_callback_break,
-                                            call->count, GFP_KERNEL);
+                                            call->count);
                if (!call->request)
                        return -ENOMEM;
 
index e778a575e1ca93dd615d399c15ded6b2ec78c25a..78caef3f13388c5f604e4970bc0874de168b57f3 100644 (file)
@@ -835,7 +835,7 @@ static struct inode *afs_do_lookup(struct inode *dir, struct dentry *dentry)
        /* Need space for examining all the selected files */
        if (op->nr_files > 2) {
                op->more_files = kvzalloc_objs(struct afs_vnode_param,
-                                              op->nr_files - 2, GFP_KERNEL);
+                                              op->nr_files - 2);
                if (!op->more_files) {
                        afs_op_nomem(op);
                        goto out_op;
index 69e80c5b661024157ccc9b53301db2c229ce68ac..490b433e4395b9ac22f78f937a717272595d504e 100644 (file)
@@ -47,8 +47,7 @@ static bool afs_start_fs_iteration(struct afs_operation *op,
        read_unlock(&op->volume->servers_lock);
 
        op->server_states = kzalloc_objs(op->server_states[0],
-                                        op->server_list->nr_servers,
-                                        GFP_KERNEL);
+                                        op->server_list->nr_servers);
        if (!op->server_states) {
                afs_op_nomem(op);
                trace_afs_rotate(op, afs_rotate_trace_nomem, 0);
index 2e113f81a2d847dbc2d6f8cc7329f64cf75bff90..27d361c7adc4d82fa67d2eb331e58bd80562d0bf 100644 (file)
@@ -647,7 +647,7 @@ static int extent_fiemap(struct btrfs_inode *inode,
 
        cache.entries_size = PAGE_SIZE / sizeof(struct btrfs_fiemap_entry);
        cache.entries = kmalloc_objs(struct btrfs_fiemap_entry,
-                                    cache.entries_size, GFP_KERNEL);
+                                    cache.entries_size);
        backref_ctx = btrfs_alloc_backref_share_check_ctx();
        path = btrfs_alloc_path();
        if (!cache.entries || !backref_ctx || !path) {
index 865dc30002cdb9c9dd0995767fc02a0e3b122a83..81022d912abbc2660060c42ada7dbece05338e89 100644 (file)
@@ -374,7 +374,7 @@ static int init_scrub_stripe(struct btrfs_fs_info *fs_info,
                goto error;
 
        stripe->sectors = kzalloc_objs(struct scrub_sector_verification,
-                                      stripe->nr_sectors, GFP_KERNEL);
+                                      stripe->nr_sectors);
        if (!stripe->sectors)
                goto error;
 
@@ -2474,8 +2474,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
                ASSERT(sctx->raid56_data_stripes == NULL);
 
                sctx->raid56_data_stripes = kzalloc_objs(struct scrub_stripe,
-                                                        nr_data_stripes(map),
-                                                        GFP_KERNEL);
+                                                        nr_data_stripes(map));
                if (!sctx->raid56_data_stripes) {
                        ret = -ENOMEM;
                        goto out;
index 7b2ea38b62dd12409abd96740807bea10d6daf31..904a2f57f86dc4cd90062836f4f797bdfe25baed 100644 (file)
@@ -8098,8 +8098,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen
                }
                send_buf_num_pages = sctx->send_max_size >> PAGE_SHIFT;
                sctx->send_buf_pages = kzalloc_objs(*sctx->send_buf_pages,
-                                                   send_buf_num_pages,
-                                                   GFP_KERNEL);
+                                                   send_buf_num_pages);
                if (!sctx->send_buf_pages) {
                        ret = -ENOMEM;
                        goto out;
@@ -8118,8 +8117,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen
        }
 
        sctx->clone_roots = kvzalloc_objs(*sctx->clone_roots,
-                                         arg->clone_sources_count + 1,
-                                         GFP_KERNEL);
+                                         arg->clone_sources_count + 1);
        if (!sctx->clone_roots) {
                ret = -ENOMEM;
                goto out;
index 8933f05f51443fcf5d6c6ab398dab045e3970131..23b6d00643c9d1bf192adc24426f5f85f67922ba 100644 (file)
@@ -4231,7 +4231,7 @@ static void handle_session(struct ceph_mds_session *session,
                }
 
                cap_auths = kzalloc_objs(struct ceph_mds_cap_auth,
-                                        cap_auths_num, GFP_KERNEL);
+                                        cap_auths_num);
                if (!cap_auths) {
                        pr_err_client(cl, "No memory for cap_auths\n");
                        return;
index 0facb0e77e339f3daf742608642e062f084ea360..a0ce9226bc0292ef9c778d62a6d7d00670608f36 100644 (file)
@@ -138,8 +138,7 @@ int __init z_erofs_gbuf_init(void)
        if (z_erofs_rsv_nrpages) {
                z_erofs_rsvbuf = &z_erofs_gbufpool[total - 1];
                z_erofs_rsvbuf->pages = kzalloc_objs(*z_erofs_rsvbuf->pages,
-                                                    z_erofs_rsv_nrpages,
-                                                    GFP_KERNEL);
+                                                    z_erofs_rsv_nrpages);
                if (!z_erofs_rsvbuf->pages) {
                        z_erofs_rsvbuf = NULL;
                        z_erofs_rsv_nrpages = 0;
index b6d59385e13d355ea205e7a6399fbcb9a7f97eb4..20e9fdaf4301b61c9d54401ed95067db6b6b8173 100644 (file)
@@ -3816,8 +3816,7 @@ int ext4_mb_init(struct super_block *sb)
        sbi->s_mb_nr_global_goals = umin(num_possible_cpus(),
                                         DIV_ROUND_UP(sbi->s_groups_count, 4));
        sbi->s_mb_last_groups = kzalloc_objs(ext4_group_t,
-                                            sbi->s_mb_nr_global_goals,
-                                            GFP_KERNEL);
+                                            sbi->s_mb_nr_global_goals);
        if (sbi->s_mb_last_groups == NULL) {
                ret = -ENOMEM;
                goto out;
index a17f0f59015161c02f80081e7ae5bc9b1aa6893a..50b4cb3aea87c7fc46b8b5483162bce84573b483 100644 (file)
@@ -334,8 +334,7 @@ static int zisofs_read_folio(struct file *file, struct folio *folio)
                pcount = 1;
        }
        pages = kzalloc_objs(*pages,
-                            max_t(unsigned int, zisofs_pages_per_cblock, 1),
-                            GFP_KERNEL);
+                            max_t(unsigned int, zisofs_pages_per_cblock, 1));
        if (!pages) {
                folio_unlock(folio);
                return -ENOMEM;
index ff469d44b92fe9b086dc99e0da0dbfd90d43b3c1..c3ce2c868f7a33476d5cde4f1af7c7ed9c6c6c41 100644 (file)
@@ -563,7 +563,7 @@ int jffs2_do_fill_super(struct super_block *sb, struct fs_context *fc)
 
        c->inocache_hashsize = calculate_inocache_hashsize(c->flash_size);
        c->inocache_list = kzalloc_objs(struct jffs2_inode_cache *,
-                                       c->inocache_hashsize, GFP_KERNEL);
+                                       c->inocache_hashsize);
        if (!c->inocache_list) {
                ret = -ENOMEM;
                goto out_wbuf;
index 7f317ffa17c20bf948c106aa658360a061b991da..176873f45677e20c5bf80c03b904712bccd8bf37 100644 (file)
@@ -379,8 +379,7 @@ static __be32 decode_rc_list(struct xdr_stream *xdr,
                if (unlikely(p == NULL))
                        goto out;
                rc_list->rcl_refcalls = kmalloc_objs(*rc_list->rcl_refcalls,
-                                                    rc_list->rcl_nrefcalls,
-                                                    GFP_KERNEL);
+                                                    rc_list->rcl_nrefcalls);
                if (unlikely(rc_list->rcl_refcalls == NULL))
                        goto out;
                for (i = 0; i < rc_list->rcl_nrefcalls; i++) {
@@ -420,7 +419,7 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
        args->csa_rclists = NULL;
        if (args->csa_nrclists) {
                args->csa_rclists = kmalloc_objs(*args->csa_rclists,
-                                                args->csa_nrclists, GFP_KERNEL);
+                                                args->csa_nrclists);
                if (unlikely(args->csa_rclists == NULL))
                        return htonl(NFS4ERR_RESOURCE);
 
index cf40ced95305edc2e6c8bca295d440c8e60980b9..122fb3f14ffb8bb7cc6eec2e27817950e512b968 100644 (file)
@@ -1603,8 +1603,7 @@ int nfs4_delegation_hash_alloc(struct nfs_server *server)
        delegation_buckets = roundup_pow_of_two(nfs_delegation_watermark / 16);
        server->delegation_hash_mask = delegation_buckets - 1;
        server->delegation_hash_table = kmalloc_objs(*server->delegation_hash_table,
-                                                    delegation_buckets,
-                                                    GFP_KERNEL);
+                                                    delegation_buckets);
        if (!server->delegation_hash_table)
                return -ENOMEM;
        for (i = 0; i < delegation_buckets; i++)
index e8441fae01bfcd8520a7186a35933250c1d2aee4..8fdbba7cad96443d92cc7fdeea6158c4cc681be1 100644 (file)
@@ -480,7 +480,7 @@ fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc)
                return 0;
 
        fsloc->locations = kzalloc_objs(struct nfsd4_fs_location,
-                                       fsloc->locations_count, GFP_KERNEL);
+                                       fsloc->locations_count);
        if (!fsloc->locations)
                return -ENOMEM;
        for (i=0; i < fsloc->locations_count; i++) {
index f72bffca6e0ef18a3892132c3ff5b6eb438e86d5..b4bf85f96f6ec081a1ec97d637d1e50fa8496f39 100644 (file)
@@ -479,7 +479,7 @@ nfs4_legacy_state_init(struct net *net)
        int i;
 
        nn->reclaim_str_hashtbl = kmalloc_objs(struct list_head,
-                                              CLIENT_HASH_SIZE, GFP_KERNEL);
+                                              CLIENT_HASH_SIZE);
        if (!nn->reclaim_str_hashtbl)
                return -ENOMEM;
 
@@ -1356,7 +1356,7 @@ nfs4_cld_state_init(struct net *net)
        int i;
 
        nn->reclaim_str_hashtbl = kmalloc_objs(struct list_head,
-                                              CLIENT_HASH_SIZE, GFP_KERNEL);
+                                              CLIENT_HASH_SIZE);
        if (!nn->reclaim_str_hashtbl)
                return -ENOMEM;
 
index 74f50670cbe7820fbca5268d17ea046bea3d948e..6b9c399b89dfb71a52b9c97f0efe9a1dea0558a6 100644 (file)
@@ -2358,7 +2358,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name,
        if (clp->cl_name.data == NULL)
                goto err_no_name;
        clp->cl_ownerstr_hashtbl = kmalloc_objs(struct list_head,
-                                               OWNER_HASH_SIZE, GFP_KERNEL);
+                                               OWNER_HASH_SIZE);
        if (!clp->cl_ownerstr_hashtbl)
                goto err_no_hashtbl;
        clp->cl_callback_wq = alloc_ordered_workqueue("nfsd4_callbacks", 0);
@@ -8966,7 +8966,7 @@ static int nfs4_state_create_net(struct net *net)
        if (!nn->unconf_id_hashtbl)
                goto err_unconf_id;
        nn->sessionid_hashtbl = kmalloc_objs(struct list_head,
-                                            SESSION_HASH_SIZE, GFP_KERNEL);
+                                            SESSION_HASH_SIZE);
        if (!nn->sessionid_hashtbl)
                goto err_sessionid;
 
index 7930c886dbf5e1cacdc15e7a7d617037727c6878..ed97494abf60fabd0c6c7ce8a35a7ab476dccf7d 100644 (file)
@@ -230,7 +230,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
 
        /* allocate workspace instead of using stack VLA */
        prz->ecc_info.par = kmalloc_objs(*prz->ecc_info.par,
-                                        prz->ecc_info.ecc_size, GFP_KERNEL);
+                                        prz->ecc_info.ecc_size);
        if (!prz->ecc_info.par) {
                pr_err("cannot allocate ECC parity workspace\n");
                return -ENOMEM;
index 77f36d68621bac3933e915e420d7a7734d92ac4a..c79304012b08c3e807ed71590c6339e2b22d225d 100644 (file)
@@ -2806,7 +2806,7 @@ static int allocate_mr_list(struct smbdirect_socket *sc)
                }
 
                mr->sgt.sgl = kzalloc_objs(struct scatterlist,
-                                          sp->max_frmr_depth, GFP_KERNEL);
+                                          sp->max_frmr_depth);
                if (!mr->sgt.sgl) {
                        ret = -ENOMEM;
                        log_rdma_mr(ERR, "failed to allocate sgl\n");
index 8b45020b4a13bad1a4fe045bb19cf4be0f132b2d..d83594ce91d234562fb572f20decec0255a4bf4f 100644 (file)
@@ -104,8 +104,7 @@ static struct meta_index *empty_meta_index(struct inode *inode, int offset,
                 * if a 'large' file is read.
                 */
                msblk->meta_index = kzalloc_objs(*(msblk->meta_index),
-                                                SQUASHFS_META_SLOTS,
-                                                GFP_KERNEL);
+                                                SQUASHFS_META_SLOTS);
                if (msblk->meta_index == NULL) {
                        ERROR("Failed to allocate meta_index\n");
                        goto failed;
index ccbf16f50ba5b2a9796426c22abe905da90e2645..27f463fd1d89e8ae4844cd70c291d737aee1589e 100644 (file)
@@ -1757,7 +1757,7 @@ static noinline int udf_process_sequence(
        data.size_part_descs = PART_DESC_ALLOC_STEP;
        data.num_part_descs = 0;
        data.part_descs_loc = kzalloc_objs(*data.part_descs_loc,
-                                          data.size_part_descs, GFP_KERNEL);
+                                          data.size_part_descs);
        if (!data.part_descs_loc)
                return -ENOMEM;
 
index 2d14fb6d0ed01fab03ce71361fdbebf48d331a88..0378e83b40993e7b1f250459d766fa93ff248713 100644 (file)
@@ -6077,7 +6077,7 @@ static int bpf_prog_bind_map(union bpf_attr *attr)
                }
 
        used_maps_new = kmalloc_objs(used_maps_new[0],
-                                    prog->aux->used_map_cnt + 1, GFP_KERNEL);
+                                    prog->aux->used_map_cnt + 1);
        if (!used_maps_new) {
                ret = -ENOMEM;
                goto out_unlock;
index 6c44fbdcfa4de122d5b707a3844c02859c622de1..789add0c185a0ff67aeb5497e3de33380ad6b8e3 100644 (file)
@@ -186,7 +186,7 @@ static __init bool
 bp_slots_histogram_alloc(struct bp_slots_histogram *hist, enum bp_type_idx type)
 {
        hist->count = kzalloc_objs(*hist->count,
-                                  hw_breakpoint_slots_cached(type), GFP_KERNEL);
+                                  hw_breakpoint_slots_cached(type));
        return hist->count;
 }
 
index 776a226fc2375f76c695fdbf0cfe39e7c49e9c2b..e618bcf75e2d89f39866d4d523eb7568cbd9602c 100644 (file)
@@ -611,7 +611,7 @@ static void torture_ww_mutex_init(void)
        ww_mutex_init(&torture_ww_mutex_2, &torture_ww_class);
 
        ww_acquire_ctxs = kmalloc_objs(*ww_acquire_ctxs,
-                                      cxt.nrealwriters_stress, GFP_KERNEL);
+                                      cxt.nrealwriters_stress);
        if (!ww_acquire_ctxs)
                VERBOSE_TOROUT_STRING("ww_acquire_ctx: Out of memory");
 }
@@ -1129,7 +1129,7 @@ static int call_rcu_chain_init(void)
        if (call_rcu_chains <= 0)
                return 0;
        call_rcu_chain_list = kzalloc_objs(*call_rcu_chain_list,
-                                          call_rcu_chains, GFP_KERNEL);
+                                          call_rcu_chains);
        if (!call_rcu_chain_list)
                return -ENOMEM;
        for (i = 0; i < call_rcu_chains; i++) {
@@ -1322,8 +1322,7 @@ static int __init lock_torture_init(void)
 
                if (nreaders_stress) {
                        cxt.lrsa = kmalloc_objs(*cxt.lrsa,
-                                               cxt.nrealreaders_stress,
-                                               GFP_KERNEL);
+                                               cxt.nrealreaders_stress);
                        if (cxt.lrsa == NULL) {
                                VERBOSE_TOROUT_STRING("cxt.lrsa: Out of memory");
                                firsterr = -ENOMEM;
@@ -1371,7 +1370,7 @@ static int __init lock_torture_init(void)
 
        if (nwriters_stress) {
                writer_tasks = kzalloc_objs(writer_tasks[0],
-                                           cxt.nrealwriters_stress, GFP_KERNEL);
+                                           cxt.nrealwriters_stress);
                if (writer_tasks == NULL) {
                        TOROUT_ERRSTRING("writer_tasks: Out of memory");
                        firsterr = -ENOMEM;
@@ -1385,7 +1384,7 @@ static int __init lock_torture_init(void)
 
        if (cxt.cur_ops->readlock) {
                reader_tasks = kzalloc_objs(reader_tasks[0],
-                                           cxt.nrealreaders_stress, GFP_KERNEL);
+                                           cxt.nrealreaders_stress);
                if (reader_tasks == NULL) {
                        TOROUT_ERRSTRING("reader_tasks: Out of memory");
                        kfree(writer_tasks);
index 16adcbecf8756ae34cf5ec2b02dd82a183488cce..4ac2b134a9833a729a0e203ec29815ae714b3633 100644 (file)
@@ -909,7 +909,7 @@ kfree_scale_init(void)
                        kfree_by_call_rcu);
 
        kfree_reader_tasks = kzalloc_objs(kfree_reader_tasks[0],
-                                         kfree_nrealthreads, GFP_KERNEL);
+                                         kfree_nrealthreads);
        if (kfree_reader_tasks == NULL) {
                firsterr = -ENOMEM;
                goto unwind;
@@ -1156,7 +1156,7 @@ rcu_scale_init(void)
                        goto unwind;
                }
                writer_freelists = kzalloc_objs(writer_freelists[0],
-                                               nrealwriters, GFP_KERNEL);
+                                               nrealwriters);
        }
        if (!writer_tasks || !writer_durations || !writer_n_durations || !writer_done ||
            (gp_async && !writer_freelists)) {
@@ -1178,8 +1178,7 @@ rcu_scale_init(void)
                        init_llist_head(&wflp->ws_lhg);
                        init_llist_head(&wflp->ws_lhp);
                        wflp->ws_mblocks = kzalloc_objs(wflp->ws_mblocks[0],
-                                                       gp_async_max,
-                                                       GFP_KERNEL);
+                                                       gp_async_max);
                        if (!wflp->ws_mblocks) {
                                firsterr = -ENOMEM;
                                goto unwind;
index 9279bb57586b1557a190ea8b246c813df098d012..8a9282a0245cc71fdf0549c989c16762affab213 100644 (file)
@@ -4549,7 +4549,7 @@ rcu_torture_init(void)
        rcu_torture_write_types();
        if (nrealfakewriters > 0) {
                fakewriter_tasks = kzalloc_objs(fakewriter_tasks[0],
-                                               nrealfakewriters, GFP_KERNEL);
+                                               nrealfakewriters);
                if (fakewriter_tasks == NULL) {
                        TOROUT_ERRSTRING("out of memory");
                        firsterr = -ENOMEM;
@@ -4564,7 +4564,7 @@ rcu_torture_init(void)
        }
        reader_tasks = kzalloc_objs(reader_tasks[0], nrealreaders);
        rcu_torture_reader_mbchk = kzalloc_objs(*rcu_torture_reader_mbchk,
-                                               nrealreaders, GFP_KERNEL);
+                                               nrealreaders);
        if (!reader_tasks || !rcu_torture_reader_mbchk) {
                TOROUT_ERRSTRING("out of memory");
                firsterr = -ENOMEM;
index d9ccf18eb03523ce298400538e55e91d9cb0908e..2b55e6acf3c16590ce1b75317a24c50970a5b8a5 100644 (file)
@@ -260,7 +260,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
        lim = rcu_task_enqueue_lim;
 
        rtp->rtpcp_array = kzalloc_objs(struct rcu_tasks_percpu *,
-                                       num_possible_cpus(), GFP_KERNEL);
+                                       num_possible_cpus());
        BUG_ON(!rtp->rtpcp_array);
 
        for_each_possible_cpu(cpu) {
index cd630772e164e63c021b056097e5bf425b2c69fa..c5a3b0bac7c3d22b00335e5f9ff50cb9d22dc2ef 100644 (file)
@@ -665,7 +665,7 @@ void scx_idle_init_masks(void)
 
        /* Allocate per-node idle cpumasks */
        scx_idle_node_masks = kzalloc_objs(*scx_idle_node_masks,
-                                          num_possible_nodes(), GFP_KERNEL);
+                                          num_possible_nodes());
        BUG_ON(!scx_idle_node_masks);
 
        for_each_node(i) {
index a8421f3025cd998be8e720071b4cdad6e51073d6..c1ed0d5e8de6bd28cd7078a56fa0f0c0cadc15aa 100644 (file)
@@ -2002,7 +2002,7 @@ static int __init tmigr_init(void)
        tmigr_crossnode_level = cpulvl;
 
        tmigr_level_list = kzalloc_objs(struct list_head,
-                                       tmigr_hierarchy_levels, GFP_KERNEL);
+                                       tmigr_hierarchy_levels);
        if (!tmigr_level_list)
                goto err;
 
index 7303491e299dba4515c073b99679d7b7b8258cc3..8bb95b2a6fcfe84bf9c785d30171c83bc118ec85 100644 (file)
@@ -999,8 +999,7 @@ static struct synth_event *alloc_synth_event(const char *name, int n_fields,
 
        if (n_dynamic_fields) {
                event->dynamic_fields = kzalloc_objs(*event->dynamic_fields,
-                                                    n_dynamic_fields,
-                                                    GFP_KERNEL);
+                                                    n_dynamic_fields);
                if (!event->dynamic_fields) {
                        free_synth_event(event);
                        event = ERR_PTR(-ENOMEM);
index 6ecae3e6d10a2c25f81fcd7d9477018917d09173..37317b81fcdab739e277a5da75ed07fa7794b6dd 100644 (file)
@@ -1338,7 +1338,7 @@ void __init init_ftrace_syscalls(void)
 
        if (!IS_ENABLED(CONFIG_HAVE_SPARSE_SYSCALL_NR)) {
                syscalls_metadata = kzalloc_objs(*syscalls_metadata,
-                                                NR_syscalls, GFP_KERNEL);
+                                                NR_syscalls);
                if (!syscalls_metadata) {
                        WARN_ON(1);
                        return;
index bb42a4c35dd3e3e052b91672de10594b91518832..0bed462e9b2a2406da03caa02e7a8f5d60485a5e 100644 (file)
@@ -795,7 +795,7 @@ static int insert_extent(struct uid_gid_map *map, struct uid_gid_extent *extent)
 
                /* Allocate memory for 340 mappings. */
                forward = kmalloc_objs(struct uid_gid_extent,
-                                      UID_GID_MAP_MAX_EXTENTS, GFP_KERNEL);
+                                      UID_GID_MAP_MAX_EXTENTS);
                if (!forward)
                        return -ENOMEM;
 
index e00cb6758c3153cc711d0e0fce9f99a10696efbd..23c7105a3f9f539395c42feda0462e177c2d0478 100644 (file)
@@ -611,7 +611,7 @@ const struct objagg_stats *objagg_stats_get(struct objagg *objagg)
        int i;
 
        objagg_stats = kzalloc_flex(*objagg_stats, stats_info,
-                                   objagg->obj_count, GFP_KERNEL);
+                                   objagg->obj_count);
        if (!objagg_stats)
                return ERR_PTR(-ENOMEM);
 
@@ -1011,7 +1011,7 @@ objagg_hints_stats_get(struct objagg_hints *objagg_hints)
        int i;
 
        objagg_stats = kzalloc_flex(*objagg_stats, stats_info,
-                                   objagg_hints->node_count, GFP_KERNEL);
+                                   objagg_hints->node_count);
        if (!objagg_stats)
                return ERR_PTR(-ENOMEM);
 
index 06fc95861dd4a8635e8a36d8ea70d157057e4b90..25fb44ccf99d0cc5835481e201c1823d8465fd97 100644 (file)
@@ -91,7 +91,7 @@ static int damon_stat_sort_regions(struct damon_ctx *c,
        damon_for_each_target(t, c) {
                /* there is only one target */
                region_pointers = kmalloc_objs(*region_pointers,
-                                              damon_nr_regions(t), GFP_KERNEL);
+                                              damon_nr_regions(t));
                if (!region_pointers)
                        return -ENOMEM;
                damon_for_each_region(r, t) {
index 8dcd4a01684e9b79ac32e2d86666d7edad0e8976..f9ec5e795b34b6f7c1f42a927fdc1c57c24f20a0 100644 (file)
@@ -49,7 +49,7 @@ static void damon_sysfs_test_add_targets(struct kunit *test)
                kunit_skip(test, "sysfs_targets alloc fail");
        sysfs_targets->nr = 1;
        sysfs_targets->targets_arr = kmalloc_objs(*sysfs_targets->targets_arr,
-                                                 1, GFP_KERNEL);
+                                                 1);
        if (!sysfs_targets->targets_arr) {
                kfree(sysfs_targets);
                kunit_skip(test, "targets_arr alloc fail");
index a5f0b74b59f3a195db90a4409d9f757d0c9e9984..e0c7020b12f5fc30fce1d13805cf324fb588f754 100644 (file)
@@ -1134,7 +1134,7 @@ static int br_mdb_config_src_list_init(struct nlattr *src_list,
        }
 
        cfg->src_entries = kzalloc_objs(struct br_mdb_src_entry,
-                                       cfg->num_src_entries, GFP_KERNEL);
+                                       cfg->num_src_entries);
        if (!cfg->src_entries)
                return -ENOMEM;
 
index 16a1949dbed1c7badd7dfaa170b3d20403847140..8c9aad776bf43f9979692429982687226ff12612 100644 (file)
@@ -242,8 +242,7 @@ net_devmem_bind_dmabuf(struct net_device *dev,
 
        if (direction == DMA_TO_DEVICE) {
                binding->tx_vec = kvmalloc_objs(struct net_iov *,
-                                               dmabuf->size / PAGE_SIZE,
-                                               GFP_KERNEL);
+                                               dmabuf->size / PAGE_SIZE);
                if (!binding->tx_vec) {
                        err = -ENOMEM;
                        goto err_unmap;
@@ -290,8 +289,7 @@ net_devmem_bind_dmabuf(struct net_device *dev,
                }
 
                owner->area.niovs = kvmalloc_objs(*owner->area.niovs,
-                                                 owner->area.num_niovs,
-                                                 GFP_KERNEL);
+                                                 owner->area.num_niovs);
                if (!owner->area.niovs) {
                        err = -ENOMEM;
                        goto err_free_chunks;
index 3fb181a3f3c0de274d43da663e9739f288d81f78..a05aa075de1a5b72967a7e09aa34b3fec13cdf37 100644 (file)
@@ -169,7 +169,7 @@ static int __init cipso_v4_cache_init(void)
        u32 iter;
 
        cipso_v4_cache = kzalloc_objs(struct cipso_v4_map_cache_bkt,
-                                     CIPSO_V4_CACHE_BUCKETS, GFP_KERNEL);
+                                     CIPSO_V4_CACHE_BUCKETS);
        if (!cipso_v4_cache)
                return -ENOMEM;
 
index 8f4190c7c9ab27cde8bdd740f12cd0732c708251..537bb6c315d2e25916984623e7e28169b9fa9196 100644 (file)
@@ -2755,7 +2755,7 @@ static __net_init int devinet_init_net(struct net *net)
 
        err = -ENOMEM;
        net->ipv4.inet_addr_lst = kmalloc_objs(struct hlist_head,
-                                              IN4_ADDR_HSIZE, GFP_KERNEL);
+                                              IN4_ADDR_HSIZE);
        if (!net->ipv4.inet_addr_lst)
                goto err_alloc_hash;
 
index defe6b30f18ff279fe97b1648a976cf5a25ee1d4..1aa2b05ee8de856d187b198beb9af699921caa49 100644 (file)
@@ -714,7 +714,7 @@ static int nh_notifier_grp_hw_stats_init(struct nh_notifier_info *info,
        info->id = nh->id;
        info->type = NH_NOTIFIER_INFO_TYPE_GRP_HW_STATS;
        info->nh_grp_hw_stats = kzalloc_flex(*info->nh_grp_hw_stats, stats,
-                                            nhg->num_nh, GFP_KERNEL);
+                                            nhg->num_nh);
        if (!info->nh_grp_hw_stats)
                return -ENOMEM;
 
index 9716e98b929145a45bb8ceb8b3bcaccfd5a6a224..9944ed923ddfd10f9adf6ad788c0740daeaf2adb 100644 (file)
@@ -762,8 +762,7 @@ udp_tunnel_nic_alloc(const struct udp_tunnel_nic_info *info,
 
        for (i = 0; i < n_tables; i++) {
                utn->entries[i] = kzalloc_objs(*utn->entries[i],
-                                              info->tables[i].n_entries,
-                                              GFP_KERNEL);
+                                              info->tables[i].n_entries);
                if (!utn->entries[i])
                        goto err_free_prev_entries;
        }
index 9f48b0f210e6e8a442cd8bc716260d63549170a7..0e55f139e05d5bb3d788242bc0dc46c5948bb493 100644 (file)
@@ -7398,7 +7398,7 @@ static int __net_init addrconf_init_net(struct net *net)
        spin_lock_init(&net->ipv6.addrconf_hash_lock);
        INIT_DEFERRABLE_WORK(&net->ipv6.addr_chk_work, addrconf_verify_work);
        net->ipv6.inet6_addr_lst = kzalloc_objs(struct hlist_head,
-                                               IN6_ADDR_HSIZE, GFP_KERNEL);
+                                               IN6_ADDR_HSIZE);
        if (!net->ipv6.inet6_addr_lst)
                goto err_alloc_addr;
 
index ff39220fef8a8809343a21db10b942eecc66c8dc..c6a34334e657e28bd956bc1e2c56fae2c5bb5f5b 100644 (file)
@@ -134,7 +134,7 @@ static int __init calipso_cache_init(void)
        u32 iter;
 
        calipso_cache = kzalloc_objs(struct calipso_map_cache_bkt,
-                                    CALIPSO_CACHE_BUCKETS, GFP_KERNEL);
+                                    CALIPSO_CACHE_BUCKETS);
        if (!calipso_cache)
                return -ENOMEM;
 
index 8b76525c56ee762e9ee1e404efe13eed4eab5fd1..b92b4a5c2636d8f819fbe45ee4dc34665e4ee6e4 100644 (file)
@@ -3941,7 +3941,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
        if (beacon->mbssid_ies && beacon->mbssid_ies->cnt) {
                new_beacon->mbssid_ies =
                        kzalloc_flex(*new_beacon->mbssid_ies, elem,
-                                    beacon->mbssid_ies->cnt, GFP_KERNEL);
+                                    beacon->mbssid_ies->cnt);
                if (!new_beacon->mbssid_ies) {
                        kfree(new_beacon);
                        return NULL;
@@ -3950,7 +3950,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
                if (beacon->rnr_ies && beacon->rnr_ies->cnt) {
                        new_beacon->rnr_ies =
                                kzalloc_flex(*new_beacon->rnr_ies, elem,
-                                            beacon->rnr_ies->cnt, GFP_KERNEL);
+                                            beacon->rnr_ies->cnt);
                        if (!new_beacon->rnr_ies) {
                                kfree(new_beacon->mbssid_ies);
                                kfree(new_beacon);
index 9825d7c70cbc224e13ffd25c7848f2e7ce38b7e8..616f86b1a7e4b5cc2f6a9b6fa8d8b10d0c7f9792 100644 (file)
@@ -1360,7 +1360,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 
 
        local->int_scan_req = kzalloc_flex(*local->int_scan_req, channels,
-                                          channels, GFP_KERNEL);
+                                          channels);
        if (!local->int_scan_req)
                return -ENOMEM;
 
index 06dece1fb9ee5640dfab499cc5a3fc8934977eef..020863047562d37987ca0fe52227423665bb4cbd 100644 (file)
@@ -294,7 +294,7 @@ static int ip_vs_mh_reassign(struct ip_vs_mh_state *s,
 
        if (svc->num_dests >= 1) {
                s->dest_setup = kzalloc_objs(struct ip_vs_mh_dest_setup,
-                                            svc->num_dests, GFP_KERNEL);
+                                            svc->num_dests);
                if (!s->dest_setup)
                        return -ENOMEM;
        }
index 06bd4d6eefeb895320bf37c73d8fab5e5b0477c8..fd7f7e4e2a432a2b114740e8cd0ba554f5804685 100644 (file)
@@ -4316,7 +4316,7 @@ static int nf_tables_newrule(struct sk_buff *skb, const struct nfnl_info *info,
        size = 0;
        if (nla[NFTA_RULE_EXPRESSIONS]) {
                expr_info = kvmalloc_objs(struct nft_expr_info,
-                                         NFT_RULE_MAXEXPRS, GFP_KERNEL);
+                                         NFT_RULE_MAXEXPRS);
                if (!expr_info)
                        return -ENOMEM;
 
index dbc54a3b70743a5384417ebbedfd9efb4a1d1536..d658b1478fa0536534bef975b53d1daa0696baaa 100644 (file)
@@ -193,7 +193,7 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,
                return -EOVERFLOW;
 
        expect_policy = kzalloc_objs(struct nf_conntrack_expect_policy,
-                                    class_max, GFP_KERNEL);
+                                    class_max);
        if (expect_policy == NULL)
                return -ENOMEM;
 
index 0926a9ccfa2d56d947376fcb90ba5fe8a2e9f97e..cf6cd4ccfa2029d9a45e35d6780520290690732d 100644 (file)
@@ -1096,8 +1096,7 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt,
 
                q->num_direct_qdiscs = dev->real_num_tx_queues;
                q->direct_qdiscs = kzalloc_objs(*q->direct_qdiscs,
-                                               q->num_direct_qdiscs,
-                                               GFP_KERNEL);
+                                               q->num_direct_qdiscs);
                if (!q->direct_qdiscs)
                        return -ENOMEM;
        }
index c9f999ae10e08d243336d05e35aa1b5eeb45f920..59c92b46945c521b9fbf0f9eb0cff4254fa083aa 100644 (file)
@@ -756,11 +756,11 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
        if (!link->wr_rx_ibs)
                goto no_mem_wr_tx_ibs;
        link->wr_tx_rdmas = kzalloc_objs(link->wr_tx_rdmas[0],
-                                        link->max_send_wr, GFP_KERNEL);
+                                        link->max_send_wr);
        if (!link->wr_tx_rdmas)
                goto no_mem_wr_rx_ibs;
        link->wr_tx_rdma_sges = kzalloc_objs(link->wr_tx_rdma_sges[0],
-                                            link->max_send_wr, GFP_KERNEL);
+                                            link->max_send_wr);
        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);
@@ -775,11 +775,11 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
        if (!link->wr_tx_mask)
                goto no_mem_wr_rx_sges;
        link->wr_tx_pends = kzalloc_objs(link->wr_tx_pends[0],
-                                        link->max_send_wr, GFP_KERNEL);
+                                        link->max_send_wr);
        if (!link->wr_tx_pends)
                goto no_mem_wr_tx_mask;
        link->wr_tx_compl = kzalloc_objs(link->wr_tx_compl[0],
-                                        link->max_send_wr, GFP_KERNEL);
+                                        link->max_send_wr);
        if (!link->wr_tx_compl)
                goto no_mem_wr_tx_pends;
 
index 5ea834414ed5da622357d85d8af915c76d81180f..3756a93dc63aabc814f7edd31e8c0b6fafa02ce7 100644 (file)
@@ -3803,7 +3803,7 @@ static int __net_init unix_net_init(struct net *net)
                goto err_proc;
 
        net->unx.table.buckets = kvmalloc_objs(struct hlist_head,
-                                              UNIX_HASH_SIZE, GFP_KERNEL);
+                                              UNIX_HASH_SIZE);
        if (!net->unx.table.buckets)
                goto free_locks;
 
index bd53317e44ef7b20473bcc7d3dee4b91e74c1442..4b0645d563447bf24f823d1735ab991a526af37b 100644 (file)
@@ -1001,7 +1001,7 @@ int wiphy_register(struct wiphy *wiphy)
                int idx;
 
                wiphy->radio_cfg = kzalloc_objs(*wiphy->radio_cfg,
-                                               wiphy->n_radio, GFP_KERNEL);
+                                               wiphy->n_radio);
                if (!wiphy->radio_cfg)
                        return -ENOMEM;
                /*
index 2ea72c64b405a0877a2f4101731427aff18aaded..b94231c8441c4829784ed727a4a2897bbc62b001 100644 (file)
@@ -14308,7 +14308,7 @@ static int nl80211_set_cqm_rssi(struct genl_info *info,
 
        if (n_thresholds) {
                cqm_config = kzalloc_flex(*cqm_config, rssi_thresholds,
-                                         n_thresholds, GFP_KERNEL);
+                                         n_thresholds);
                if (!cqm_config)
                        return -ENOMEM;
 
@@ -15051,7 +15051,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
                        return -EINVAL;
 
                new_triggers.patterns = kzalloc_objs(new_triggers.patterns[0],
-                                                    n_patterns, GFP_KERNEL);
+                                                    n_patterns);
                if (!new_triggers.patterns)
                        return -ENOMEM;
 
index 281e7af2c50b32b54eedebf478441f26aa19925a..37b7a68b89b3d3bfc67605d5cc4bca8a9e4df093 100644 (file)
@@ -420,7 +420,7 @@ static int xp_init_dma_info(struct xsk_buff_pool *pool, struct xsk_dma_map *dma_
        }
 
        pool->dma_pages = kvzalloc_objs(*pool->dma_pages,
-                                       dma_map->dma_pages_cnt, GFP_KERNEL);
+                                       dma_map->dma_pages_cnt);
        if (!pool->dma_pages)
                return -ENOMEM;
 
index 5c9e56e525f2578a3c125715332561dbf062d84e..050a82101ca5180e5caea1bb7efe7ed830ba3b33 100644 (file)
@@ -2527,7 +2527,7 @@ static int iptfs_user_init(struct net *net, struct xfrm_state *x,
        /* saved array is for saving 1..N seq nums from wantseq */
        if (xc->reorder_win_size) {
                xtfs->w_saved = kzalloc_objs(*xtfs->w_saved,
-                                            xc->reorder_win_size, GFP_KERNEL);
+                                            xc->reorder_win_size);
                if (!xtfs->w_saved) {
                        NL_SET_ERR_MSG(extack, "Cannot alloc reorder window");
                        return -ENOMEM;
@@ -2659,8 +2659,7 @@ static int iptfs_clone_state(struct xfrm_state *x, struct xfrm_state *orig)
        xtfs->ra_newskb = NULL;
        if (xtfs->cfg.reorder_win_size) {
                xtfs->w_saved = kzalloc_objs(*xtfs->w_saved,
-                                            xtfs->cfg.reorder_win_size,
-                                            GFP_KERNEL);
+                                            xtfs->cfg.reorder_win_size);
                if (!xtfs->w_saved) {
                        kfree_sensitive(xtfs);
                        return -ENOMEM;
index d4af5f0e7d6c4e84efce3fb1ccc2c3345d7f9281..aff61643415dec87dc33dd93964b29041ddc3b63 100644 (file)
@@ -139,8 +139,7 @@ int __init ima_init_crypto(void)
                ima_hash_algo_idx = NR_BANKS(ima_tpm_chip) + ima_extra_slots++;
 
        ima_algo_array = kzalloc_objs(*ima_algo_array,
-                                     NR_BANKS(ima_tpm_chip) + ima_extra_slots,
-                                     GFP_KERNEL);
+                                     NR_BANKS(ima_tpm_chip) + ima_extra_slots);
        if (!ima_algo_array) {
                rc = -ENOMEM;
                goto out;
index 67a903081699158127f4f6cdc13700ffc91fd283..824c3f89615185e89496021aa8c88069281926db 100644 (file)
@@ -166,7 +166,7 @@ int cond_init_bool_indexes(struct policydb *p)
 {
        kfree(p->bool_val_to_struct);
        p->bool_val_to_struct = kmalloc_objs(*p->bool_val_to_struct,
-                                            p->p_bools.nprim, GFP_KERNEL);
+                                            p->p_bools.nprim);
        if (!p->bool_val_to_struct)
                return -ENOMEM;
 
@@ -710,7 +710,7 @@ static int duplicate_policydb_bools(struct policydb *newdb,
        int rc;
 
        cond_bool_array = kmalloc_objs(*orig->bool_val_to_struct,
-                                      orig->p_bools.nprim, GFP_KERNEL);
+                                      orig->p_bools.nprim);
        if (!cond_bool_array)
                return -ENOMEM;
 
index d3b410d04c2591ec797d66535391e441806634b1..738fd47f33e688934085563c1ce167bb73c3492a 100644 (file)
@@ -739,22 +739,22 @@ static int policydb_index(struct policydb *p)
        symtab_hash_eval(p->symtab);
 
        p->class_val_to_struct = kzalloc_objs(*p->class_val_to_struct,
-                                             p->p_classes.nprim, GFP_KERNEL);
+                                             p->p_classes.nprim);
        if (!p->class_val_to_struct)
                return -ENOMEM;
 
        p->role_val_to_struct = kzalloc_objs(*p->role_val_to_struct,
-                                            p->p_roles.nprim, GFP_KERNEL);
+                                            p->p_roles.nprim);
        if (!p->role_val_to_struct)
                return -ENOMEM;
 
        p->user_val_to_struct = kzalloc_objs(*p->user_val_to_struct,
-                                            p->p_users.nprim, GFP_KERNEL);
+                                            p->p_users.nprim);
        if (!p->user_val_to_struct)
                return -ENOMEM;
 
        p->type_val_to_struct = kvzalloc_objs(*p->type_val_to_struct,
-                                             p->p_types.nprim, GFP_KERNEL);
+                                             p->p_types.nprim);
        if (!p->type_val_to_struct)
                return -ENOMEM;
 
@@ -2724,7 +2724,7 @@ int policydb_read(struct policydb *p, struct policy_file *fp)
 
        rc = -ENOMEM;
        p->type_attr_map_array = kvzalloc_objs(*p->type_attr_map_array,
-                                              p->p_types.nprim, GFP_KERNEL);
+                                              p->p_types.nprim);
        if (!p->type_attr_map_array)
                goto bad;
 
index b19b8756638df981a5dbd73f72cb73a0a0727140..c4b82e29ab0566712018aca19fef9677f2e1a4cf 100644 (file)
@@ -214,7 +214,7 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
                info->nr_voices = rec->nr_voices;
                if (info->nr_voices > 0) {
                        info->ch = kzalloc_objs(struct seq_oss_chinfo,
-                                               info->nr_voices, GFP_KERNEL);
+                                               info->nr_voices);
                        if (!info->ch) {
                                rec->oper.close(&info->arg);
                                module_put(rec->oper.owner);
index f33c08e7c659f936651d13edc47c0fe1bd16c308..e97721f80f65e948b5da2b1afffaa520eee9b161 100644 (file)
@@ -1736,8 +1736,7 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
                                                          queue_size * 3 / 2);
                        s->ctx_data.tx.cache.pos = 0;
                        s->ctx_data.tx.cache.descs = kzalloc_objs(*s->ctx_data.tx.cache.descs,
-                                                                 s->ctx_data.tx.cache.size,
-                                                                 GFP_KERNEL);
+                                                                 s->ctx_data.tx.cache.size);
                        if (!s->ctx_data.tx.cache.descs) {
                                err = -ENOMEM;
                                goto err_context;
@@ -1758,7 +1757,7 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
                };
 
                s->ctx_data.rx.seq.descs = kzalloc_objs(*s->ctx_data.rx.seq.descs,
-                                                       queue_size, GFP_KERNEL);
+                                                       queue_size);
                if (!s->ctx_data.rx.seq.descs) {
                        err = -ENOMEM;
                        goto err_context;
index 77845b709e12f51f8554f7f911289356fabcd9cd..08e0556bf16103db6348aff51757b2120b4b3afc 100644 (file)
@@ -1807,7 +1807,7 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
                goto __err_gpr;
 
        controls = kzalloc_objs(struct snd_emu10k1_fx8010_control_gpr,
-                               SND_EMU10K1_GPR_CONTROLS, GFP_KERNEL);
+                               SND_EMU10K1_GPR_CONTROLS);
        if (!controls)
                goto __err_ctrls;
 
index 9d86793f1958da056b23dc745b3d26f1d5fa05d8..78b21fbfad50e03ce04dab8201752024fcad3c1e 100644 (file)
@@ -1262,7 +1262,7 @@ static struct pcmdevice_config_info *pcmdevice_add_config(void *ctxt,
        config_offset += 4;
 
        bk_da = cfg_info->blk_data = kzalloc_objs(struct pcmdevice_block_data *,
-                                                 cfg_info->nblocks, GFP_KERNEL);
+                                                 cfg_info->nblocks);
        if (!bk_da) {
                *status = -ENOMEM;
                goto out;
index 460fae51c2f52f8b443114b759b22bad8513db2d..c969eb38704e6f2c00bc2053041d7cbce00e72f8 100644 (file)
@@ -218,7 +218,7 @@ static struct tasdevice_config_info *tasdevice_add_config(
         * these firmwares.
         */
        bk_da = cfg_info->blk_data = kzalloc_objs(struct tasdev_blk_data *,
-                                                 cfg_info->nblocks, GFP_KERNEL);
+                                                 cfg_info->nblocks);
        if (!bk_da) {
                *status = -ENOMEM;
                goto out;
@@ -805,7 +805,7 @@ static int fw_parse_variable_header_kernel(
        }
 
        tas_fmw->programs = kzalloc_objs(struct tasdevice_prog,
-                                        tas_fmw->nr_programs, GFP_KERNEL);
+                                        tas_fmw->nr_programs);
        if (!tas_fmw->programs) {
                offset = -ENOMEM;
                goto out;
@@ -844,7 +844,7 @@ static int fw_parse_variable_header_kernel(
        }
 
        tas_fmw->configs = kzalloc_objs(struct tasdevice_config,
-                                       tas_fmw->nr_configurations, GFP_KERNEL);
+                                       tas_fmw->nr_configurations);
        if (!tas_fmw->configs) {
                offset = -ENOMEM;
                goto out;
@@ -1346,7 +1346,7 @@ static int fw_parse_configuration_data(
                goto out;
        }
        tas_fmw->configs = kzalloc_objs(struct tasdevice_config,
-                                       tas_fmw->nr_configurations, GFP_KERNEL);
+                                       tas_fmw->nr_configurations);
        if (!tas_fmw->configs) {
                offset = -ENOMEM;
                goto out;
@@ -2141,8 +2141,7 @@ static int fw_parse_calibration_data(struct tasdevice_priv *tas_priv,
        }
 
        tas_fmw->calibrations = kzalloc_objs(struct tasdevice_calibration,
-                                            tas_fmw->nr_calibrations,
-                                            GFP_KERNEL);
+                                            tas_fmw->nr_calibrations);
        if (!tas_fmw->calibrations) {
                offset = -ENOMEM;
                goto out;
index e87ad2f65e5d8b7937aa4554252668e3795beeae..e732fac9b8ca053cd37f8545fb1bba0021cb9e4e 100644 (file)
@@ -318,8 +318,7 @@ audioreach_get_module_priv_data(const struct snd_soc_tplg_private *private)
                        struct audioreach_module_priv_data *pdata;
 
                        pdata = kzalloc_flex(*pdata, data,
-                                            le32_to_cpu(mod_array->size),
-                                            GFP_KERNEL);
+                                            le32_to_cpu(mod_array->size));
                        if (!pdata)
                                return ERR_PTR(-ENOMEM);
 
index 1630a10c7ea3bd20c14fb54197e4d310da34a9fd..2768ba5bfc9f87d682d491bc14d06ca0bf06d7bd 100644 (file)
@@ -3333,8 +3333,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_card *card)
 
                if (w->num_kcontrols) {
                        w->kcontrols = kzalloc_objs(struct snd_kcontrol *,
-                                                   w->num_kcontrols,
-                                                   GFP_KERNEL);
+                                                   w->num_kcontrols);
                        if (!w->kcontrols) {
                                snd_soc_dapm_mutex_unlock(card);
                                return -ENOMEM;
index f82b080de4a910cfb17c7940a99cca7fed961d18..fc3ead77e5ea61222d10665c297d9b8a8ab82aba 100644 (file)
@@ -477,7 +477,7 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
 
        /* allocate memory for the pipeline data */
        trigger_list = kzalloc_flex(*trigger_list, pipeline_instance_ids,
-                                   pipeline_list->count, GFP_KERNEL);
+                                   pipeline_list->count);
        if (!trigger_list)
                return -ENOMEM;
 
@@ -932,8 +932,7 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm
 
                /* allocate memory for max number of pipeline IDs */
                pipeline_list->pipelines = kzalloc_objs(*pipeline_list->pipelines,
-                                                       ipc4_data->max_num_pipelines,
-                                                       GFP_KERNEL);
+                                                       ipc4_data->max_num_pipelines);
                if (!pipeline_list->pipelines) {
                        sof_ipc4_pcm_free(sdev, spcm);
                        return -ENOMEM;
index 8371e54314b453c5efb7d891066506d40d7b026f..db077e9d56445ae8d65abaa3e8b1db16a03ad6b1 100644 (file)
@@ -437,8 +437,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
 
        if (available_fmt->num_input_formats) {
                in_format = kzalloc_objs(*in_format,
-                                        available_fmt->num_input_formats,
-                                        GFP_KERNEL);
+                                        available_fmt->num_input_formats);
                if (!in_format)
                        return -ENOMEM;
                available_fmt->input_pin_fmts = in_format;
@@ -459,8 +458,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
 
        if (available_fmt->num_output_formats) {
                out_format = kzalloc_objs(*out_format,
-                                         available_fmt->num_output_formats,
-                                         GFP_KERNEL);
+                                         available_fmt->num_output_formats);
                if (!out_format) {
                        ret = -ENOMEM;
                        goto err_in;
index dacbdf8cd39a40b6e1a496f75aa37dd9e50a4f58..258997240a0ad0d6b8dc959b0307bdbfda0648f8 100644 (file)
@@ -273,7 +273,7 @@ snd_emux_create_effect(struct snd_emux_port *p)
 {
        int i;
        p->effect = kzalloc_objs(struct snd_emux_effect_table,
-                                p->chset.max_channels, GFP_KERNEL);
+                                p->chset.max_channels);
        if (p->effect) {
                for (i = 0; i < p->chset.max_channels; i++)
                        p->chset.channels[i].private = p->effect + i;
index 57b803e0c986a6ed36c47adee65547516e574846..01e6063c220756cb4bd6e8c8396665aceeb5f2b0 100644 (file)
@@ -1433,8 +1433,7 @@ static int prepare_qmi_response(struct snd_usb_substream *subs,
                uadev[card_num].num_intf =
                        subs->dev->config->desc.bNumInterfaces;
                uadev[card_num].info = kzalloc_objs(struct intf_info,
-                                                   uadev[card_num].num_intf,
-                                                   GFP_KERNEL);
+                                                   uadev[card_num].num_intf);
                if (!uadev[card_num].info) {
                        ret = -ENOMEM;
                        goto unmap_er;
index 8a8807cbc80cd7fda6e9c9301baede43281699ee..bc03f71bf16e3372832c096e1f0cee09c14cff18 100644 (file)
@@ -268,7 +268,7 @@ int xen_snd_front_evtchnl_create_all(struct xen_snd_front_info *front_info,
 
        front_info->evt_pairs =
                        kzalloc_objs(struct xen_snd_front_evtchnl_pair,
-                                    num_streams, GFP_KERNEL);
+                                    num_streams);
        if (!front_info->evt_pairs)
                return -ENOMEM;