From nobody Fri Apr 17 07:44:07 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 748203FFD for ; Sun, 22 Feb 2026 07:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771746377; cv=none; b=uy0XBsXyHknkPhfA4sBy26oKAoRpLcSxdY0yqLUa3Pcyeiq+55C/SV67jQQk/zdvQvjYnvdYwNZj+6fhvaFccQd9YkLmxQgCt72CXx37GwYOvpvHU9qmsmqznxp65WVUbqZybywnSayyYkqjn/yTo3Lrq1LSpu2EQOiqqb5r0cI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771746377; c=relaxed/simple; bh=O7fJnePs6Yc/1ZjblKehaI03iSgqHXTOQoSUf4rlXTs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=J5oOPsUXRl2xhfpm9o/VgjDnMgQn50o0uHnSFjFJvbonrO7OJn/UYI6nzfBmLdF3vmnXuT2usn/nEZc2qltXISTmU5cFxqNfIK0WS4z5WlNqgo+GtQiD+BWies2f3ykr0r4a2/kxDvDq8mUb6OMETc1vy8VewB9uOIu+k6/uoKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UPiTVR7t; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UPiTVR7t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB338C116D0; Sun, 22 Feb 2026 07:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771746377; bh=O7fJnePs6Yc/1ZjblKehaI03iSgqHXTOQoSUf4rlXTs=; h=From:To:Cc:Subject:Date:From; b=UPiTVR7tHUxIChl27s5/bs/ZS8uj4WQYzojuZXawjjHK/UpOrOULNrpTt49aUY1FP GEwbtQVhfxAaM20Pf1bx47Xe6deVm78Nx7tpgmX47nXnb9046D8Vb4DCASYNyQd1Vb 0x+c4rFUdEagrSSJKdBVfQ/IcwVRXdwdEoi89C1j2B7XQisv5j8Uhb/U/lwUORcmjZ T+R1dLYcnMg6X3uYiXzzIY/hyCu944Gt9Bzg4TB6WNzDBlwoP2pNADwAdywoLBjucE aTSs3O2wDboVHTfQU0K0s6LiMSqkv10wmG5gXVLwmUYjx1EK7+aN+gYUs8GE/2esu+ /HiqQcF+e44Zg== From: Kees Cook To: Linus Torvalds Cc: Kees Cook , Eric Biggers , Julia Lawall , linux-kernel@vger.kernel.org Subject: [PATCH] Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses Date: Sat, 21 Feb 2026 23:46:04 -0800 Message-Id: <20260222074559.work.599-kees@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=323097; i=kees@kernel.org; h=from:subject:message-id; bh=O7fJnePs6Yc/1ZjblKehaI03iSgqHXTOQoSUf4rlXTs=; b=owGbwMvMwCVmps19z/KJym7G02pJDJmztlhfdpM2mFBWW3v+oUz1E7uLFQdCtt9gSZCpm9+s2 rA4bNeXjlIWBjEuBlkxRZYgO/c4F4+37eHucxVh5rAygQxh4OIUgImIHmFk6D729v66fa+Njk0O 2xx5tE6w6aj9wgOeM+aI2NkuqnrlGcfw332Pn0rV0/hzb892n3ufVbx/9ePdCmvv8pw7vWryXPb lDzkB X-Developer-Key: i=kees@kernel.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D {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=3Dpatch COCCI=3Dgfp.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.fc= 42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01 Signed-off-by: Kees Cook --- kernel/rcu/tasks.h | 2 +- mm/damon/tests/sysfs-kunit.h | 2 +- arch/arm/probes/kprobes/test-core.c | 2 +- arch/mips/kernel/smp-cps.c | 5 ++-- arch/powerpc/kvm/e500_mmu.c | 9 +++---- arch/powerpc/perf/imc-pmu.c | 3 +-- arch/powerpc/platforms/cell/spufs/file.c | 2 +- arch/powerpc/platforms/powernv/opal-async.c | 2 +- .../pseries/papr_platform_attributes.c | 3 +-- arch/riscv/kernel/module.c | 2 +- arch/riscv/kvm/vcpu_sbi_fwft.c | 2 +- arch/s390/kernel/perf_pai.c | 3 +-- arch/um/drivers/ubd_kern.c | 4 +-- arch/um/drivers/vfio_kern.c | 2 +- arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/uncore_discovery.c | 3 +-- arch/x86/kvm/vmx/tdx.c | 2 +- block/blk-crypto-fallback.c | 2 +- block/blk-zoned.c | 2 +- drivers/accel/habanalabs/common/context.c | 3 +-- drivers/accel/habanalabs/common/device.c | 11 +++----- drivers/accel/habanalabs/common/hw_queue.c | 2 +- drivers/accel/habanalabs/common/hwmon.c | 2 +- drivers/accel/habanalabs/gaudi/gaudi.c | 2 +- drivers/accel/habanalabs/gaudi2/gaudi2.c | 11 +++----- drivers/accel/habanalabs/goya/goya.c | 2 +- drivers/accel/rocket/rocket_job.c | 3 +-- drivers/acpi/acpi_video.c | 5 ++-- drivers/acpi/riscv/irq.c | 4 +-- drivers/acpi/x86/s2idle.c | 5 ++-- drivers/android/binder.c | 2 +- drivers/android/binder_alloc.c | 2 +- drivers/atm/eni.c | 3 +-- drivers/base/cacheinfo.c | 2 +- drivers/block/rnbd/rnbd-clt.c | 2 +- drivers/block/xen-blkfront.c | 5 ++-- drivers/bus/mhi/ep/main.c | 4 +-- drivers/bus/mhi/ep/ring.c | 2 +- drivers/clk/aspeed/clk-ast2600.c | 2 +- drivers/clk/clk-clps711x.c | 2 +- drivers/clk/clk-npcm7xx.c | 2 +- drivers/clocksource/ingenic-sysost.c | 2 +- drivers/comedi/drivers/ni_tio.c | 2 +- .../intel/qat/qat_common/adf_telemetry.c | 2 +- .../crypto/intel/qat/qat_common/qat_uclo.c | 6 ++--- drivers/edac/edac_device.c | 2 +- drivers/edac/sb_edac.c | 2 +- drivers/extcon/extcon.c | 3 +-- drivers/firewire/core-iso.c | 6 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 5 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 12 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- .../dc/resource/dcn20/dcn20_resource.c | 2 +- .../dc/resource/dcn21/dcn21_resource.c | 2 +- .../dc/resource/dcn30/dcn30_resource.c | 3 +-- .../dc/resource/dcn31/dcn31_resource.c | 3 +-- .../dc/resource/dcn314/dcn314_resource.c | 3 +-- .../dc/resource/dcn32/dcn32_resource.c | 3 +-- .../amd/display/modules/color/color_gamma.c | 9 +++---- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 +- .../gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 2 +- .../powerplay/hwmgr/process_pptables_v1_0.c | 15 +++++------ .../amd/pm/powerplay/hwmgr/processpptables.c | 4 +-- .../powerplay/hwmgr/vega10_processpptables.c | 12 ++++----- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 3 +-- drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +-- drivers/gpu/drm/drm_atomic.c | 5 ++-- drivers/gpu/drm/drm_buddy.c | 2 +- drivers/gpu/drm/drm_client_modeset.c | 3 +-- drivers/gpu/drm/drm_crtc.c | 3 +-- drivers/gpu/drm/drm_crtc_helper.c | 6 ++--- .../i915/display/intel_display_power_map.c | 2 +- drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +-- .../gpu/drm/i915/gt/uc/intel_guc_capture.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_sched.c | 6 ++--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- drivers/gpu/drm/panthor/panthor_mmu.c | 5 ++-- drivers/gpu/drm/qxl/qxl_display.c | 3 +-- drivers/gpu/drm/radeon/ci_dpm.c | 2 +- drivers/gpu/drm/radeon/kv_dpm.c | 2 +- drivers/gpu/drm/radeon/ni_dpm.c | 3 +-- drivers/gpu/drm/radeon/r600_dpm.c | 5 ++-- drivers/gpu/drm/radeon/radeon_atombios.c | 14 ++++------ drivers/gpu/drm/radeon/rs780_dpm.c | 3 +-- drivers/gpu/drm/radeon/rv6xx_dpm.c | 3 +-- drivers/gpu/drm/radeon/rv770_dpm.c | 3 +-- drivers/gpu/drm/radeon/si_dpm.c | 2 +- drivers/gpu/drm/radeon/sumo_dpm.c | 2 +- drivers/gpu/drm/radeon/trinity_dpm.c | 2 +- drivers/gpu/drm/v3d/v3d_submit.c | 6 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 3 +-- drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 2 +- drivers/hid/hid-core.c | 3 +-- drivers/hv/connection.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/coretemp.c | 2 +- drivers/iio/adc/ti-tsc2046.c | 6 ++--- drivers/iio/dac/ad5360.c | 2 +- drivers/iio/industrialio-core.c | 2 +- drivers/iio/industrialio-event.c | 2 +- drivers/infiniband/core/cache.c | 2 +- drivers/infiniband/core/cma.c | 3 +-- drivers/infiniband/core/device.c | 2 +- drivers/infiniband/core/iwpm_util.c | 4 +-- drivers/infiniband/core/sysfs.c | 8 +++--- drivers/infiniband/core/uverbs_uapi.c | 2 +- drivers/infiniband/hw/bnxt_re/qplib_res.c | 2 +- drivers/infiniband/hw/cxgb4/device.c | 3 +-- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hfi1/affinity.c | 3 +-- drivers/infiniband/hw/hfi1/pio.c | 4 +-- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 3 +-- drivers/infiniband/hw/hns/hns_roce_hem.c | 6 ++--- drivers/infiniband/hw/hns/hns_roce_mr.c | 3 +-- drivers/infiniband/hw/mana/main.c | 2 +- drivers/infiniband/hw/mlx4/mad.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx5/macsec.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 3 +-- drivers/infiniband/hw/mthca/mthca_cmd.c | 2 +- drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +- drivers/infiniband/hw/usnic/usnic_uiom.c | 3 +-- .../infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- drivers/infiniband/ulp/iser/iser_initiator.c | 2 +- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/iommu/amd/init.c | 8 +++--- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 +-- .../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 2 +- drivers/iommu/iova.c | 2 +- drivers/irqchip/irq-mtk-sysirq.c | 2 +- drivers/irqchip/irq-riscv-imsic-state.c | 2 +- drivers/irqchip/irq-stm32-exti.c | 2 +- drivers/md/dm-crypt.c | 2 +- drivers/md/dm-integrity.c | 4 +-- drivers/md/dm-pcache/cache.c | 2 +- drivers/md/dm-pcache/cache_key.c | 2 +- drivers/md/dm-stats.c | 2 +- drivers/md/md-cluster.c | 2 +- drivers/md/raid10.c | 6 ++--- drivers/media/pci/tw686x/tw686x-core.c | 4 +-- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 2 +- drivers/media/v4l2-core/v4l2-subdev.c | 3 +-- drivers/memstick/core/mspro_block.c | 2 +- drivers/message/fusion/mptsas.c | 6 ++--- drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- drivers/mtd/chips/cfi_cmdset_0002.c | 2 +- drivers/mtd/chips/cfi_cmdset_0020.c | 2 +- drivers/mtd/nand/onenand/onenand_base.c | 2 +- drivers/mtd/nand/raw/nand_base.c | 2 +- drivers/mtd/parsers/sharpslpart.c | 2 +- drivers/net/can/usb/ucan.c | 2 +- drivers/net/dsa/mv88e6xxx/devlink.c | 6 ++--- drivers/net/dsa/sja1105/sja1105_vl.c | 2 +- drivers/net/ethernet/amd/pds_core/core.c | 3 +-- .../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 6 ++--- .../net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 2 +- drivers/net/ethernet/broadcom/sb1250-mac.c | 3 +-- drivers/net/ethernet/broadcom/tg3.c | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 4 +-- .../net/ethernet/cavium/liquidio/lio_core.c | 2 +- .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++-- .../ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c | 4 +-- drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- drivers/net/ethernet/engleder/tsnep_main.c | 4 +-- .../freescale/dpaa2/dpaa2-eth-devlink.c | 3 +-- .../ethernet/freescale/dpaa2/dpaa2-switch.c | 2 +- .../net/ethernet/freescale/enetc/enetc_pf.c | 2 +- drivers/net/ethernet/freescale/gianfar.c | 5 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 4 +-- drivers/net/ethernet/google/gve/gve_main.c | 4 +-- drivers/net/ethernet/google/gve/gve_tx_dqo.c | 5 ++-- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- .../net/ethernet/huawei/hinic3/hinic3_main.c | 2 +- .../huawei/hinic3/hinic3_netdev_ops.c | 6 ++--- .../net/ethernet/huawei/hinic3/hinic3_tx.c | 3 +-- drivers/net/ethernet/ibm/ibmvnic.c | 10 +++---- drivers/net/ethernet/intel/e1000/e1000_main.c | 4 +-- drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++--- drivers/net/ethernet/intel/i40e/i40e_client.c | 2 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 2 +- drivers/net/ethernet/intel/ice/devlink/port.c | 3 +-- drivers/net/ethernet/intel/ice/ice_xsk.c | 2 +- drivers/net/ethernet/intel/idpf/idpf_idc.c | 2 +- drivers/net/ethernet/intel/idpf/idpf_lib.c | 3 +-- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 18 +++++-------- .../net/ethernet/intel/idpf/idpf_virtchnl.c | 8 +++--- drivers/net/ethernet/intel/igb/igb_main.c | 7 +++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/libie/fwlog.c | 3 +-- .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- .../marvell/prestera/prestera_devlink.c | 2 +- drivers/net/ethernet/mellanox/mlx4/cmd.c | 4 +-- .../net/ethernet/mellanox/mlx4/en_netdev.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/eq.c | 5 ++-- drivers/net/ethernet/mellanox/mlx4/intf.c | 2 +- drivers/net/ethernet/mellanox/mlx4/qp.c | 3 +-- .../ethernet/mellanox/mlx4/resource_tracker.c | 6 ++--- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en/qos.c | 3 +-- .../net/ethernet/mellanox/mlx5/core/esw/qos.c | 2 +- .../net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++--- .../net/ethernet/mellanox/mlx5/core/hwmon.c | 2 +- .../ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- .../mellanox/mlx5/core/steering/hws/bwc.c | 3 +-- .../mellanox/mlx5/core/steering/hws/send.c | 6 ++--- .../mlx5/core/steering/sws/dr_icm_pool.c | 2 +- .../mellanox/mlx5/core/steering/sws/fs_dr.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +- .../net/ethernet/mellanox/mlxsw/core_env.c | 3 +-- .../ethernet/mellanox/mlxsw/core_linecards.c | 2 +- .../ethernet/mellanox/mlxsw/core_thermal.c | 4 +-- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 4 +-- .../net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- .../mellanox/mlxsw/spectrum1_mr_tcam.c | 2 +- .../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 3 +-- .../ethernet/mellanox/mlxsw/spectrum_router.c | 3 +-- .../net/ethernet/netronome/nfp/bpf/verifier.c | 2 +- .../ethernet/netronome/nfp/flower/metadata.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 +++------ drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 5 ++-- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 3 +-- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_ooo.c | 7 +++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 3 +-- drivers/net/ethernet/qlogic/qla3xxx.c | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_init.c | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_main.c | 8 +++--- drivers/net/ethernet/renesas/ravb_main.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 3 +-- drivers/net/ethernet/sfc/efx_common.c | 2 +- drivers/net/ethernet/sfc/falcon/tx.c | 3 +-- drivers/net/ethernet/sfc/mae.c | 4 +-- drivers/net/ethernet/sfc/siena/efx_channels.c | 3 +-- drivers/net/ethernet/sfc/siena/efx_common.c | 2 +- drivers/net/ethernet/sfc/siena/tx_common.c | 3 +-- drivers/net/ethernet/sfc/tx_common.c | 3 +-- drivers/net/ethernet/spacemit/k1_emac.c | 4 +-- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- .../net/ethernet/synopsys/dwc-xlgmac-desc.c | 2 +- .../net/ethernet/toshiba/ps3_gelic_wireless.c | 2 +- drivers/net/ethernet/via/via-velocity.c | 5 ++-- drivers/net/ethernet/wangxun/libwx/wx_hw.c | 2 +- drivers/net/netdevsim/dev.c | 3 +-- drivers/net/phy/dp83640.c | 2 +- drivers/net/phy/phy_led_triggers.c | 3 +-- drivers/net/pse-pd/pd692x0.c | 3 +-- drivers/net/wireless/ath/ath11k/debugfs.c | 3 +-- drivers/net/wireless/ath/ath12k/dp.c | 2 +- drivers/net/wireless/ath/ath5k/base.c | 2 +- drivers/net/wireless/ath/ath5k/eeprom.c | 8 +++--- drivers/net/wireless/ath/wil6210/debugfs.c | 2 +- .../net/wireless/broadcom/b43legacy/debugfs.c | 2 +- .../net/wireless/broadcom/b43legacy/main.c | 2 +- .../broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 6 ++--- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 4 +-- drivers/net/wireless/intel/iwlwifi/dvm/tt.c | 5 ++-- .../wireless/intel/iwlwifi/mld/low_latency.c | 2 +- drivers/net/wireless/intel/iwlwifi/mld/scan.c | 3 +-- drivers/net/wireless/intel/iwlwifi/mld/sta.c | 3 +-- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +-- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- .../wireless/intel/iwlwifi/pcie/gen1_2/rx.c | 5 ++-- .../wireless/intel/iwlwifi/pcie/gen1_2/tx.c | 2 +- drivers/net/wireless/intersil/p54/eeprom.c | 2 +- .../net/wireless/marvell/mwifiex/cfg80211.c | 3 +-- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 2 +- drivers/net/wireless/marvell/mwifiex/scan.c | 2 +- .../net/wireless/quantenna/qtnfmac/commands.c | 2 +- drivers/nvme/host/fc.c | 2 +- drivers/nvme/target/pci-epf.c | 2 +- drivers/parisc/iosapic.c | 2 +- drivers/platform/x86/amd/wbrf.c | 3 +-- drivers/platform/x86/dell/dell-wmi-base.c | 3 +-- drivers/platform/x86/dell/dell-wmi-privacy.c | 2 +- .../dell/dell-wmi-sysman/enum-attributes.c | 3 +-- .../x86/dell/dell-wmi-sysman/int-attributes.c | 3 +-- .../dell/dell-wmi-sysman/passobj-attributes.c | 2 +- .../dell/dell-wmi-sysman/string-attributes.c | 3 +-- .../x86/hp/hp-bioscfg/enum-attributes.c | 3 +-- .../x86/hp/hp-bioscfg/int-attributes.c | 3 +-- .../x86/hp/hp-bioscfg/order-list-attributes.c | 3 +-- .../x86/hp/hp-bioscfg/passwdobj-attributes.c | 3 +-- .../x86/hp/hp-bioscfg/string-attributes.c | 3 +-- .../platform/x86/intel/int1092/intel_sar.c | 2 +- .../intel/speed_select_if/isst_tpmi_core.c | 2 +- .../platform/x86/intel/tpmi_power_domains.c | 3 +-- drivers/platform/x86/uv_sysfs.c | 2 +- drivers/powercap/powercap_sys.c | 2 +- drivers/resctrl/mpam_devices.c | 3 +-- drivers/s390/crypto/zcrypt_api.c | 2 +- drivers/scsi/aacraid/aachba.c | 2 +- drivers/scsi/be2iscsi/be_main.c | 22 ++++++--------- drivers/scsi/csiostor/csio_wr.c | 2 +- drivers/scsi/esas2r/esas2r_init.c | 2 +- drivers/scsi/hpsa.c | 4 +-- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ipr.c | 7 +++-- drivers/scsi/lpfc/lpfc_debugfs.c | 3 +-- drivers/scsi/lpfc/lpfc_init.c | 27 +++++++------------ drivers/scsi/lpfc/lpfc_nvmet.c | 3 +-- drivers/scsi/mac53c94.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 5 ++-- drivers/scsi/mpi3mr/mpi3mr_transport.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 15 +++++------ drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 5 ++-- drivers/scsi/pmcraid.c | 2 +- drivers/scsi/qedi/qedi_main.c | 9 +++---- drivers/scsi/qla2xxx/qla_init.c | 3 +-- drivers/scsi/qla2xxx/qla_os.c | 6 ++--- drivers/scsi/smartpqi/smartpqi_init.c | 5 ++-- drivers/soundwire/qcom.c | 3 +-- drivers/staging/greybus/power_supply.c | 4 +-- .../media/atomisp/pci/atomisp_csi2_bridge.c | 2 +- drivers/staging/media/atomisp/pci/sh_css.c | 20 +++++--------- drivers/tee/qcomtee/call.c | 3 +-- drivers/thermal/cpufreq_cooling.c | 2 +- .../intel/int340x_thermal/int3400_thermal.c | 2 +- .../int340x_thermal/int340x_thermal_zone.c | 3 +-- drivers/thermal/testing/zone.c | 3 +-- drivers/tty/serial/sunsab.c | 2 +- drivers/usb/gadget/configfs.c | 5 ++-- drivers/usb/gadget/function/f_midi2.c | 2 +- drivers/usb/gadget/function/u_audio.c | 4 +-- drivers/usb/isp1760/isp1760-hcd.c | 4 +-- drivers/usb/storage/ene_ub6250.c | 3 +-- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- drivers/vhost/scsi.c | 6 ++--- drivers/virt/nitro_enclaves/ne_misc_dev.c | 8 +++--- drivers/xen/events/events_base.c | 3 +-- drivers/xen/gntdev-dmabuf.c | 2 +- drivers/xen/xen-acpi-processor.c | 2 +- drivers/xen/xen-front-pgdir-shbuf.c | 2 +- fs/afs/cmservice.c | 4 +-- fs/afs/dir.c | 2 +- fs/afs/rotate.c | 3 +-- fs/btrfs/fiemap.c | 2 +- fs/btrfs/scrub.c | 5 ++-- fs/btrfs/send.c | 6 ++--- fs/ceph/mds_client.c | 2 +- fs/erofs/zutil.c | 3 +-- fs/ext4/mballoc.c | 3 +-- fs/isofs/compress.c | 3 +-- fs/jffs2/fs.c | 2 +- fs/nfs/callback_xdr.c | 5 ++-- fs/nfs/delegation.c | 3 +-- fs/nfsd/export.c | 2 +- fs/nfsd/nfs4recover.c | 4 +-- fs/nfsd/nfs4state.c | 4 +-- fs/pstore/ram_core.c | 2 +- fs/smb/client/smbdirect.c | 2 +- fs/squashfs/file.c | 3 +-- fs/udf/super.c | 2 +- kernel/bpf/syscall.c | 2 +- kernel/events/hw_breakpoint.c | 2 +- kernel/locking/locktorture.c | 11 ++++---- kernel/rcu/rcuscale.c | 7 +++-- kernel/rcu/rcutorture.c | 4 +-- kernel/sched/ext_idle.c | 2 +- kernel/time/timer_migration.c | 2 +- kernel/trace/trace_events_synth.c | 3 +-- kernel/trace/trace_syscalls.c | 2 +- kernel/user_namespace.c | 2 +- lib/objagg.c | 4 +-- mm/damon/stat.c | 2 +- net/bridge/br_mdb.c | 2 +- net/core/devmem.c | 6 ++--- net/ipv4/cipso_ipv4.c | 2 +- net/ipv4/devinet.c | 2 +- net/ipv4/nexthop.c | 2 +- net/ipv4/udp_tunnel_nic.c | 3 +-- net/ipv6/addrconf.c | 2 +- net/ipv6/calipso.c | 2 +- net/mac80211/cfg.c | 4 +-- net/mac80211/main.c | 2 +- net/netfilter/ipvs/ip_vs_mh.c | 2 +- net/netfilter/nf_tables_api.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 2 +- net/sched/sch_htb.c | 3 +-- net/smc/smc_wr.c | 8 +++--- net/unix/af_unix.c | 2 +- net/wireless/core.c | 2 +- net/wireless/nl80211.c | 4 +-- net/xdp/xsk_buff_pool.c | 2 +- net/xfrm/xfrm_iptfs.c | 5 ++-- security/integrity/ima/ima_crypto.c | 3 +-- security/selinux/ss/conditional.c | 4 +-- security/selinux/ss/policydb.c | 10 +++---- sound/core/seq/oss/seq_oss_synth.c | 2 +- sound/firewire/amdtp-stream.c | 5 ++-- sound/pci/emu10k1/emufx.c | 2 +- sound/soc/codecs/pcm6240.c | 2 +- sound/soc/codecs/tas2781-fmwlib.c | 11 ++++---- sound/soc/qcom/qdsp6/topology.c | 3 +-- sound/soc/soc-dapm.c | 3 +-- sound/soc/sof/ipc4-pcm.c | 5 ++-- sound/soc/sof/ipc4-topology.c | 6 ++--- sound/synth/emux/emux_effect.c | 2 +- sound/usb/qcom/qc_audio_offload.c | 3 +-- sound/xen/xen_snd_front_evtchnl.c | 2 +- 415 files changed, 612 insertions(+), 833 deletions(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index d9ccf18eb035..2b55e6acf3c1 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -260,7 +260,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp) lim =3D rcu_task_enqueue_lim; =20 rtp->rtpcp_array =3D kzalloc_objs(struct rcu_tasks_percpu *, - num_possible_cpus(), GFP_KERNEL); + num_possible_cpus()); BUG_ON(!rtp->rtpcp_array); =20 for_each_possible_cpu(cpu) { diff --git a/mm/damon/tests/sysfs-kunit.h b/mm/damon/tests/sysfs-kunit.h index 8dcd4a01684e..f9ec5e795b34 100644 --- a/mm/damon/tests/sysfs-kunit.h +++ b/mm/damon/tests/sysfs-kunit.h @@ -49,7 +49,7 @@ static void damon_sysfs_test_add_targets(struct kunit *te= st) kunit_skip(test, "sysfs_targets alloc fail"); sysfs_targets->nr =3D 1; sysfs_targets->targets_arr =3D 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"); diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/= test-core.c index ef93f2f1db62..7a2baa135f0f 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c @@ -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 =3D kmalloc_objs(struct coverage_entry, - MAX_COVERAGE_ENTRIES, GFP_KERNEL); + MAX_COVERAGE_ENTRIES); coverage.num_entries =3D 0; coverage.nesting =3D 0; return table_iter(table, coverage_start_fn, &coverage); diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 70a846c5ddba..b01ebaace48e 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -342,7 +342,7 @@ static void __init cps_prepare_cpus(unsigned int max_cp= us) /* Allocate cluster boot configuration structs */ nclusters =3D mips_cps_numclusters(); mips_cps_cluster_bootcfg =3D kzalloc_objs(*mips_cps_cluster_bootcfg, - nclusters, GFP_KERNEL); + nclusters); if (!mips_cps_cluster_bootcfg) goto err_out; =20 @@ -368,8 +368,7 @@ static void __init cps_prepare_cpus(unsigned int max_cp= us) int v; core_vpes =3D core_vpe_count(cl, c); core_bootcfg[c].vpe_config =3D kzalloc_objs(*core_bootcfg[c].vpe_config, - core_vpes, - GFP_KERNEL); + core_vpes); for (v =3D 0; v < core_vpes; v++) cpumask_set_cpu(nvpe++, &mips_cps_cluster_bootcfg[cl].cpumask); if (!core_bootcfg[c].vpe_config) diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c index 13bcadccb2b7..48580c85f23b 100644 --- a/arch/powerpc/kvm/e500_mmu.c +++ b/arch/powerpc/kvm/e500_mmu.c @@ -913,8 +913,7 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_= e500) vcpu_e500->gtlb_params[1].sets =3D 1; =20 vcpu_e500->gtlb_arch =3D 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; =20 @@ -922,14 +921,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcp= u_e500) vcpu_e500->gtlb_offset[1] =3D KVM_E500_TLB0_SIZE; =20 vcpu_e500->gtlb_priv[0] =3D 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; =20 vcpu_e500->gtlb_priv[1] =3D 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; =20 diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index db98e9af8812..c1563b4eaa94 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -1699,8 +1699,7 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, stru= ct device_node *parent, /* Needed for hotplug/migration */ if (!per_nest_pmu_arr) { per_nest_pmu_arr =3D kzalloc_objs(struct imc_pmu *, - get_max_nest_dev() + 1, - GFP_KERNEL); + get_max_nest_dev() + 1); if (!per_nest_pmu_arr) goto err; } diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platfo= rms/cell/spufs/file.c index d4665daa34c2..10fa9b844fcc 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -2282,7 +2282,7 @@ static int spufs_switch_log_open(struct inode *inode,= struct file *file) } =20 ctx->switch_log =3D kmalloc_flex(*ctx->switch_log, log, - SWITCH_LOG_BUFSIZE, GFP_KERNEL); + SWITCH_LOG_BUFSIZE); =20 if (!ctx->switch_log) { rc =3D -ENOMEM; diff --git a/arch/powerpc/platforms/powernv/opal-async.c b/arch/powerpc/pla= tforms/powernv/opal-async.c index 2cacfe5407c9..6560c024bfd2 100644 --- a/arch/powerpc/platforms/powernv/opal-async.c +++ b/arch/powerpc/platforms/powernv/opal-async.c @@ -266,7 +266,7 @@ int __init opal_async_comp_init(void) =20 opal_max_async_tokens =3D be32_to_cpup(async); opal_async_tokens =3D kzalloc_objs(*opal_async_tokens, - opal_max_async_tokens, GFP_KERNEL); + opal_max_async_tokens); if (!opal_async_tokens) { err =3D -ENOMEM; goto out_opal_node; diff --git a/arch/powerpc/platforms/pseries/papr_platform_attributes.c b/ar= ch/powerpc/platforms/pseries/papr_platform_attributes.c index 38b417c158ba..c6159870de0e 100644 --- a/arch/powerpc/platforms/pseries/papr_platform_attributes.c +++ b/arch/powerpc/platforms/pseries/papr_platform_attributes.c @@ -314,8 +314,7 @@ static int __init papr_init(void) /* Allocate the groups before registering */ for (idx =3D 0; idx < num_attrs; idx++) { papr_groups[idx].pg.attrs =3D 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; =20 diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index cc2f980700f3..1961135689db 100644 --- a/arch/riscv/kernel/module.c +++ b/arch/riscv/kernel/module.c @@ -754,7 +754,7 @@ initialize_relocation_hashtable(unsigned int num_reloca= tions, =20 /* Number of relocations may be large, so kvmalloc it */ *relocation_hashtable =3D kvmalloc_objs(**relocation_hashtable, - hashtable_size, GFP_KERNEL); + hashtable_size); if (!*relocation_hashtable) return 0; =20 diff --git a/arch/riscv/kvm/vcpu_sbi_fwft.c b/arch/riscv/kvm/vcpu_sbi_fwft.c index 14cea431b863..2eab15339694 100644 --- a/arch/riscv/kvm/vcpu_sbi_fwft.c +++ b/arch/riscv/kvm/vcpu_sbi_fwft.c @@ -353,7 +353,7 @@ static int kvm_sbi_ext_fwft_init(struct kvm_vcpu *vcpu) int i; =20 fwft->configs =3D kzalloc_objs(struct kvm_sbi_fwft_config, - ARRAY_SIZE(features), GFP_KERNEL); + ARRAY_SIZE(features)); if (!fwft->configs) return -ENOMEM; =20 diff --git a/arch/s390/kernel/perf_pai.c b/arch/s390/kernel/perf_pai.c index 8fd3e47307a3..86f71a3d1ef2 100644 --- a/arch/s390/kernel/perf_pai.c +++ b/arch/s390/kernel/perf_pai.c @@ -282,8 +282,7 @@ static int pai_alloc_cpu(struct perf_event *event, int = cpu) need_paiext_cb =3D true; } cpump->save =3D 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); diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 42f392e6add3..012b2bcaa8a0 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -1070,7 +1070,7 @@ static int __init ubd_init(void) return -1; =20 irq_req_buffer =3D kmalloc_objs(struct io_thread_req *, - UBD_REQ_BUFFER_SIZE, GFP_KERNEL); + UBD_REQ_BUFFER_SIZE); irq_remainder =3D 0; =20 if (irq_req_buffer =3D=3D NULL) { @@ -1078,7 +1078,7 @@ static int __init ubd_init(void) return -ENOMEM; } io_req_buffer =3D kmalloc_objs(struct io_thread_req *, - UBD_REQ_BUFFER_SIZE, GFP_KERNEL); + UBD_REQ_BUFFER_SIZE); =20 io_remainder =3D 0; =20 diff --git a/arch/um/drivers/vfio_kern.c b/arch/um/drivers/vfio_kern.c index 7b6492174da0..e6dab473cde4 100644 --- a/arch/um/drivers/vfio_kern.c +++ b/arch/um/drivers/vfio_kern.c @@ -515,7 +515,7 @@ static void uml_vfio_open_device(struct uml_vfio_device= *dev) } =20 dev->intr_ctx =3D 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); diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 41f571040145..cf3a4fe06ff2 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -7379,7 +7379,7 @@ static __always_inline int intel_pmu_init_hybrid(enum= hybrid_pmu_type pmus) =20 x86_pmu.num_hybrid_pmus =3D hweight_long(pmus_mask); x86_pmu.hybrid_pmu =3D 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; =20 diff --git a/arch/x86/events/intel/uncore_discovery.c b/arch/x86/events/int= el/uncore_discovery.c index c8bf3983accf..12e259a988dd 100644 --- a/arch/x86/events/intel/uncore_discovery.c +++ b/arch/x86/events/intel/uncore_discovery.c @@ -745,8 +745,7 @@ intel_uncore_generic_init_uncores(enum uncore_access_ty= pe type_id, int num_extra int i =3D 0; =20 uncores =3D 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; =20 diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index d22cabe119b1..c5065f84b78b 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -2407,7 +2407,7 @@ static int __tdx_td_init(struct kvm *kvm, struct td_p= arams *td_params, /* TDVPS =3D TDVPR(4K page) + TDCX(multiple 4K pages), -1 for TDVPR. */ kvm_tdx->td.tdcx_nr_pages =3D tdx_sysinfo->td_ctrl.tdvps_base_size / PAGE= _SIZE - 1; tdcs_pages =3D 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; =20 diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index 24b8b1c40e25..61f595410832 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -574,7 +574,7 @@ static int blk_crypto_fallback_init(void) goto fail_destroy_profile; =20 blk_crypto_keyslots =3D kzalloc_objs(blk_crypto_keyslots[0], - blk_crypto_num_keyslots, GFP_KERNEL); + blk_crypto_num_keyslots); if (!blk_crypto_keyslots) goto fail_free_wq; =20 diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 54ee346ddb5a..9d1dd6ccfad7 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1805,7 +1805,7 @@ static int disk_alloc_zone_resources(struct gendisk *= disk, =20 disk->zone_wplugs_hash =3D 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; =20 diff --git a/drivers/accel/habanalabs/common/context.c b/drivers/accel/haba= nalabs/common/context.c index 276c97aba992..69c68b187bb7 100644 --- a/drivers/accel/habanalabs/common/context.c +++ b/drivers/accel/habanalabs/common/context.c @@ -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 =3D 0; ctx->cs_pending =3D 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; =20 diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/haban= alabs/common/device.c index d4c3473fb64f..09b27bac3a31 100644 --- a/drivers/accel/habanalabs/common/device.c +++ b/drivers/accel/habanalabs/common/device.c @@ -893,8 +893,7 @@ static int device_early_init(struct hl_device *hdev) =20 if (hdev->asic_prop.completion_queues_count) { hdev->cq_wq =3D kzalloc_objs(struct workqueue_struct *, - hdev->asic_prop.completion_queues_count, - GFP_KERNEL); + hdev->asic_prop.completion_queues_count); if (!hdev->cq_wq) { rc =3D -ENOMEM; goto asid_fini; @@ -2159,8 +2158,7 @@ int hl_device_init(struct hl_device *hdev) =20 if (user_interrupt_cnt) { hdev->user_interrupt =3D kzalloc_objs(*hdev->user_interrupt, - user_interrupt_cnt, - GFP_KERNEL); + user_interrupt_cnt); if (!hdev->user_interrupt) { rc =3D -ENOMEM; goto early_fini; @@ -2227,7 +2225,7 @@ int hl_device_init(struct hl_device *hdev) */ if (cq_cnt) { hdev->completion_queue =3D kzalloc_objs(*hdev->completion_queue, - cq_cnt, GFP_KERNEL); + cq_cnt); =20 if (!hdev->completion_queue) { dev_err(hdev->dev, @@ -2249,8 +2247,7 @@ int hl_device_init(struct hl_device *hdev) } =20 hdev->shadow_cs_queue =3D 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 =3D -ENOMEM; goto cq_fini; diff --git a/drivers/accel/habanalabs/common/hw_queue.c b/drivers/accel/hab= analabs/common/hw_queue.c index f0ab99dd74d6..4232f374dfc3 100644 --- a/drivers/accel/habanalabs/common/hw_queue.c +++ b/drivers/accel/habanalabs/common/hw_queue.c @@ -1083,7 +1083,7 @@ int hl_hw_queues_create(struct hl_device *hdev) int i, rc, q_ready_cnt; =20 hdev->kernel_queues =3D kzalloc_objs(*hdev->kernel_queues, - asic->max_queues, GFP_KERNEL); + asic->max_queues); =20 if (!hdev->kernel_queues) { dev_err(hdev->dev, "Not enough memory for H/W queues\n"); diff --git a/drivers/accel/habanalabs/common/hwmon.c b/drivers/accel/habana= labs/common/hwmon.c index 3c0f405a5148..768604d2392d 100644 --- a/drivers/accel/habanalabs/common/hwmon.c +++ b/drivers/accel/habanalabs/common/hwmon.c @@ -196,7 +196,7 @@ int hl_build_hwmon_channel_info(struct hl_device *hdev,= struct cpucp_sensor *sen } =20 channels_info =3D kzalloc_objs(struct hwmon_channel_info *, - num_active_sensor_types + 1, GFP_KERNEL); + num_active_sensor_types + 1); if (!channels_info) { rc =3D -ENOMEM; goto channels_info_array_err; diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanal= abs/gaudi/gaudi.c index 76fdf3b77b87..5ddb38aaff7a 100644 --- a/drivers/accel/habanalabs/gaudi/gaudi.c +++ b/drivers/accel/habanalabs/gaudi/gaudi.c @@ -540,7 +540,7 @@ static int gaudi_set_fixed_properties(struct hl_device = *hdev) =20 prop->max_queues =3D GAUDI_QUEUE_ID_SIZE; prop->hw_queues_props =3D kzalloc_objs(struct hw_queue_properties, - prop->max_queues, GFP_KERNEL); + prop->max_queues); =20 if (!prop->hw_queues_props) return -ENOMEM; diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/haban= alabs/gaudi2/gaudi2.c index 91f46719931c..5d9c6f0698b7 100644 --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c @@ -2763,7 +2763,7 @@ static int gaudi2_set_fixed_properties(struct hl_devi= ce *hdev) =20 prop->max_queues =3D GAUDI2_QUEUE_ID_SIZE; prop->hw_queues_props =3D kzalloc_objs(struct hw_queue_properties, - prop->max_queues, GFP_KERNEL); + prop->max_queues); =20 if (!prop->hw_queues_props) return -ENOMEM; @@ -3944,8 +3944,7 @@ static int gaudi2_special_blocks_config(struct hl_dev= ice *hdev) prop->glbl_err_max_cause_num =3D GAUDI2_GLBL_ERR_MAX_CAUSE_NUM; prop->num_of_special_blocks =3D ARRAY_SIZE(gaudi2_special_blocks); prop->special_blocks =3D kmalloc_objs(*prop->special_blocks, - prop->num_of_special_blocks, - GFP_KERNEL); + prop->num_of_special_blocks); if (!prop->special_blocks) return -ENOMEM; =20 @@ -3960,8 +3959,7 @@ static int gaudi2_special_blocks_config(struct hl_dev= ice *hdev) if (ARRAY_SIZE(gaudi2_iterator_skip_block_types)) { prop->skip_special_blocks_cfg.block_types =3D 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 =3D -ENOMEM; goto free_special_blocks; @@ -3977,8 +3975,7 @@ static int gaudi2_special_blocks_config(struct hl_dev= ice *hdev) if (ARRAY_SIZE(gaudi2_iterator_skip_block_ranges)) { prop->skip_special_blocks_cfg.block_ranges =3D 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 =3D -ENOMEM; goto free_skip_special_blocks_types; diff --git a/drivers/accel/habanalabs/goya/goya.c b/drivers/accel/habanalab= s/goya/goya.c index f94a331f4c32..bf12702e0a69 100644 --- a/drivers/accel/habanalabs/goya/goya.c +++ b/drivers/accel/habanalabs/goya/goya.c @@ -364,7 +364,7 @@ int goya_set_fixed_properties(struct hl_device *hdev) =20 prop->max_queues =3D GOYA_QUEUE_ID_SIZE; prop->hw_queues_props =3D kzalloc_objs(struct hw_queue_properties, - prop->max_queues, GFP_KERNEL); + prop->max_queues); =20 if (!prop->hw_queues_props) return -ENOMEM; diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocke= t_job.c index 755971c13caf..ac51bff39833 100644 --- a/drivers/accel/rocket/rocket_job.c +++ b/drivers/accel/rocket/rocket_job.c @@ -497,8 +497,7 @@ int rocket_job_open(struct rocket_file_priv *rocket_pri= v) { struct rocket_device *rdev =3D rocket_priv->rdev; struct drm_gpu_scheduler **scheds =3D kmalloc_objs(*scheds, - rdev->num_cores, - GFP_KERNEL); + rdev->num_cores); unsigned int core; int ret; =20 diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 5f4751478752..3fa28f1abca3 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -837,8 +837,7 @@ int acpi_video_get_levels(struct acpi_device *device, * special levels (see below) */ br->levels =3D kmalloc_objs(*br->levels, - obj->package.count + ACPI_VIDEO_FIRST_LEVEL, - GFP_KERNEL); + obj->package.count + ACPI_VIDEO_FIRST_LEVEL); if (!br->levels) { result =3D -ENOMEM; goto out_free; @@ -1331,7 +1330,7 @@ static int acpi_video_device_enumerate(struct acpi_vi= deo_bus *video) dod->package.count); =20 active_list =3D kzalloc_objs(struct acpi_video_enumerated_device, - 1 + dod->package.count, GFP_KERNEL); + 1 + dod->package.count); if (!active_list) { status =3D -ENOMEM; goto out; diff --git a/drivers/acpi/riscv/irq.c b/drivers/acpi/riscv/irq.c index afffde4cfe7a..9b88d0993e88 100644 --- a/drivers/acpi/riscv/irq.c +++ b/drivers/acpi/riscv/irq.c @@ -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 =3D 1; dep_devices.handles =3D 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 =3D riscv_acpi_get_gsi_handle(entry->source_index); dep_devices.count =3D 1; dep_devices.handles =3D kzalloc_objs(*dep_devices.handles, - 1, GFP_KERNEL); + 1); if (!dep_devices.handles) { acpi_handle_err(handle, "failed to allocate memory\n"); continue; diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 82075543a1ed..b6b1dd76a06b 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -130,8 +130,7 @@ static void lpi_device_get_constraints_amd(void) } =20 lpi_constraints_table =3D kzalloc_objs(*lpi_constraints_table, - package->package.count, - GFP_KERNEL); + package->package.count); =20 if (!lpi_constraints_table) goto free_acpi_buffer; @@ -210,7 +209,7 @@ static void lpi_device_get_constraints(void) return; =20 lpi_constraints_table =3D kzalloc_objs(*lpi_constraints_table, - out_obj->package.count, GFP_KERNEL); + out_obj->package.count); if (!lpi_constraints_table) goto free_acpi_buffer; =20 diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 0dccb4526a7c..21f91d9f2fbc 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -5903,7 +5903,7 @@ static long binder_ioctl(struct file *filp, unsigned = int cmd, unsigned long arg) } =20 target_procs =3D kzalloc_objs(struct binder_proc *, - target_procs_count, GFP_KERNEL); + target_procs_count); =20 if (!target_procs) { mutex_unlock(&binder_procs_lock); diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 4dd3415d8fdb..241f16a9b63d 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -917,7 +917,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *allo= c, alloc->vm_start =3D vma->vm_start; =20 alloc->pages =3D kvzalloc_objs(alloc->pages[0], - alloc->buffer_size / PAGE_SIZE, GFP_KERNEL); + alloc->buffer_size / PAGE_SIZE); if (!alloc->pages) { ret =3D -ENOMEM; failure_string =3D "alloc page array"; diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index d155f9dab44c..12cb3aa588bc 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c @@ -1846,8 +1846,7 @@ static int eni_start(struct atm_dev *dev) buffer_mem =3D eni_dev->mem - (buf - eni_dev->ram); eni_dev->free_list_size =3D buffer_mem/MID_MIN_BUF_SIZE/2; eni_dev->free_list =3D 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); diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index eb16451ba0a3..391ac5e3d2f5 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c @@ -884,7 +884,7 @@ static int cpu_cache_sysfs_init(unsigned int cpu) =20 /* Allocate all required memory */ per_cpu_index_dev(cpu) =3D kzalloc_objs(struct device *, - cache_leaves(cpu), GFP_KERNEL); + cache_leaves(cpu)); if (unlikely(per_cpu_index_dev(cpu) =3D=3D NULL)) goto err_out; =20 diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c index c60dafbe79e8..4d6725a0035e 100644 --- a/drivers/block/rnbd/rnbd-clt.c +++ b/drivers/block/rnbd/rnbd-clt.c @@ -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 =3D kzalloc_objs(*dev->hw_queues, - nr_cpu_ids + nr_poll_queues, GFP_KERNEL); + nr_cpu_ids + nr_poll_queues); if (!dev->hw_queues) { ret =3D -ENOMEM; goto out_alloc; diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8fc7fc3bf867..f765970578f9 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -2209,12 +2209,11 @@ static int blkfront_setup_indirect(struct blkfront_= ring_info *rinfo) rinfo->shadow[i].grants_used =3D kvzalloc_objs(rinfo->shadow[i].grants_used[0], grants); rinfo->shadow[i].sg =3D kvzalloc_objs(rinfo->shadow[i].sg[0], - psegs, GFP_KERNEL); + psegs); if (info->max_indirect_segments) rinfo->shadow[i].indirect_grants =3D kvzalloc_objs(rinfo->shadow[i].indirect_grants[0], - INDIRECT_GREFS(grants), - GFP_KERNEL); + INDIRECT_GREFS(grants)); if ((rinfo->shadow[i].grants_used =3D=3D NULL) || (rinfo->shadow[i].sg =3D=3D NULL) || (info->max_indirect_segments && diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c index 879b8b706428..e3d0a3cbaf94 100644 --- a/drivers/bus/mhi/ep/main.c +++ b/drivers/bus/mhi/ep/main.c @@ -1137,7 +1137,7 @@ int mhi_ep_power_up(struct mhi_ep_cntrl *mhi_cntrl) mhi_ep_mmio_init(mhi_cntrl); =20 mhi_cntrl->mhi_event =3D kzalloc_objs(*mhi_cntrl->mhi_event, - mhi_cntrl->event_rings, GFP_KERNEL); + mhi_cntrl->event_rings); if (!mhi_cntrl->mhi_event) return -ENOMEM; =20 @@ -1400,7 +1400,7 @@ static int mhi_ep_chan_init(struct mhi_ep_cntrl *mhi_= cntrl, * only the defined channels */ mhi_cntrl->mhi_chan =3D kzalloc_objs(*mhi_cntrl->mhi_chan, - mhi_cntrl->max_chan, GFP_KERNEL); + mhi_cntrl->max_chan); if (!mhi_cntrl->mhi_chan) return -ENOMEM; =20 diff --git a/drivers/bus/mhi/ep/ring.c b/drivers/bus/mhi/ep/ring.c index ee5b7f4755c5..9375b16ff2a5 100644 --- a/drivers/bus/mhi/ep/ring.c +++ b/drivers/bus/mhi/ep/ring.c @@ -206,7 +206,7 @@ int mhi_ep_ring_start(struct mhi_ep_cntrl *mhi_cntrl, s= truct mhi_ep_ring *ring, =20 /* Allocate ring cache memory for holding the copy of host ring */ ring->ring_cache =3D kzalloc_objs(struct mhi_ring_element, - ring->ring_size, GFP_KERNEL); + ring->ring_size); if (!ring->ring_cache) return -ENOMEM; =20 diff --git a/drivers/clk/aspeed/clk-ast2600.c b/drivers/clk/aspeed/clk-ast2= 600.c index bc9a5b81009d..873879e5ad9b 100644 --- a/drivers/clk/aspeed/clk-ast2600.c +++ b/drivers/clk/aspeed/clk-ast2600.c @@ -839,7 +839,7 @@ static void __init aspeed_g6_cc_init(struct device_node= *np) soc_rev =3D (readl(scu_g6_base + ASPEED_G6_SILICON_REV) & CHIP_REVISION_I= D) >> 16; =20 aspeed_g6_clk_data =3D 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 =3D ASPEED_G6_NUM_CLKS; diff --git a/drivers/clk/clk-clps711x.c b/drivers/clk/clk-clps711x.c index babe42e59533..27a57a9b3cb3 100644 --- a/drivers/clk/clk-clps711x.c +++ b/drivers/clk/clk-clps711x.c @@ -54,7 +54,7 @@ static void __init clps711x_clk_init_dt(struct device_nod= e *np) BUG_ON(!base); =20 clps711x_clk =3D kzalloc_flex(*clps711x_clk, clk_data.hws, - CLPS711X_CLK_MAX, GFP_KERNEL); + CLPS711X_CLK_MAX); BUG_ON(!clps711x_clk); =20 spin_lock_init(&clps711x_clk->lock); diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index 2cd1ae4f152d..79eca6ee3120 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c @@ -422,7 +422,7 @@ static void __init npcm7xx_clk_init(struct device_node = *clk_np) goto npcm7xx_init_error; =20 npcm7xx_clk_data =3D kzalloc_flex(*npcm7xx_clk_data, hws, - NPCM7XX_NUM_CLOCKS, GFP_KERNEL); + NPCM7XX_NUM_CLOCKS); if (!npcm7xx_clk_data) goto npcm7xx_init_np_err; =20 diff --git a/drivers/clocksource/ingenic-sysost.c b/drivers/clocksource/ing= enic-sysost.c index d967972c1fdc..026615bbe921 100644 --- a/drivers/clocksource/ingenic-sysost.c +++ b/drivers/clocksource/ingenic-sysost.c @@ -459,7 +459,7 @@ static int __init ingenic_ost_probe(struct device_node = *np) ost->soc_info =3D id->data; =20 ost->clocks =3D kzalloc_flex(*ost->clocks, hws, - ost->soc_info->num_channels, GFP_KERNEL); + ost->soc_info->num_channels); if (!ost->clocks) { ret =3D -ENOMEM; goto err_clk_disable; diff --git a/drivers/comedi/drivers/ni_tio.c b/drivers/comedi/drivers/ni_ti= o.c index d6e7e2006981..519359a870a7 100644 --- a/drivers/comedi/drivers/ni_tio.c +++ b/drivers/comedi/drivers/ni_tio.c @@ -1795,7 +1795,7 @@ ni_gpct_device_construct(struct comedi_device *dev, =20 counter_dev->counters =3D kzalloc_objs(*counter, num_counters); counter_dev->regs =3D 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); diff --git a/drivers/crypto/intel/qat/qat_common/adf_telemetry.c b/drivers/= crypto/intel/qat/qat_common/adf_telemetry.c index a745c1ca4048..8c575113cbcd 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_telemetry.c +++ b/drivers/crypto/intel/qat/qat_common/adf_telemetry.c @@ -76,7 +76,7 @@ static int adf_tl_alloc_mem(struct adf_accel_dev *accel_d= ev) goto err_free_tl; =20 telemetry->regs_hist_buff =3D 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; =20 diff --git a/drivers/crypto/intel/qat/qat_common/qat_uclo.c b/drivers/crypt= o/intel/qat/qat_common/qat_uclo.c index 30f83f06d185..e61a367b0d17 100644 --- a/drivers/crypto/intel/qat/qat_common/qat_uclo.c +++ b/drivers/crypto/intel/qat/qat_common/qat_uclo.c @@ -1200,8 +1200,7 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader= _handle *handle, =20 if (suof_handle->img_table.num_simgs !=3D 0) { suof_img_hdr =3D 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 =3D 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 =3D sobj_hdr->num_chunks; =20 mobj_hdr =3D 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; =20 diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 0c5ad5a55453..cf0d3c2dfc04 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -78,7 +78,7 @@ edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_nam= e, unsigned nr_instance dev_ctl->instances =3D dev_inst; =20 dev_blk =3D kzalloc_objs(struct edac_device_block, - nr_instances * nr_blocks, GFP_KERNEL); + nr_instances * nr_blocks); if (!dev_blk) goto free; =20 diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index fc434739b3c3..09d4e816404b 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c @@ -776,7 +776,7 @@ static struct sbridge_dev *alloc_sbridge_dev(int seg, u= 8 bus, enum domain dom, return NULL; =20 sbridge_dev->pdev =3D 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; diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index b2c6a1660c51..d9e9815a5f96 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -1208,8 +1208,7 @@ static int extcon_alloc_groups(struct extcon_dev *ede= v) return 0; =20 edev->extcon_dev_type.groups =3D kzalloc_objs(*edev->extcon_dev_type.grou= ps, - edev->max_supported + 2, - GFP_KERNEL); + edev->max_supported + 2); if (!edev->extcon_dev_type.groups) return -ENOMEM; =20 diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c index 21c61405f794..d2b40a1a565e 100644 --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c @@ -31,8 +31,7 @@ int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count) { struct page **page_array __free(kfree) =3D kzalloc_objs(page_array[0], - page_count, - GFP_KERNEL); + page_count); =20 if (!page_array) return -ENOMEM; @@ -58,8 +57,7 @@ int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, s= truct fw_card *card, enum dma_data_direction direction) { dma_addr_t *dma_addrs __free(kfree) =3D kzalloc_objs(dma_addrs[0], - buffer->page_count, - GFP_KERNEL); + buffer->page_count); int i; =20 if (!dma_addrs) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_discovery.c index 04b45242dc76..af3d2fd61cf3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -1179,8 +1179,7 @@ static int amdgpu_discovery_sysfs_ips(struct amdgpu_d= evice *adev, */ ip_hw_instance =3D 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; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_gmc.c index d9b2252db00e..5179fa008626 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -1728,8 +1728,7 @@ int amdgpu_gmc_init_mem_ranges(struct amdgpu_device *= adev) bool valid; =20 adev->gmc.mem_partitions =3D kzalloc_objs(struct amdgpu_mem_partition_inf= o, - AMDGPU_MAX_MEM_RANGES, - GFP_KERNEL); + AMDGPU_MAX_MEM_RANGES); if (!adev->gmc.mem_partitions) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_irq.c index 49eedfbfb5e8..254a4e983f40 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -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 =3D 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; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_pmu.c index ad5d2fcd03d7..60bbe00e8024 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c @@ -452,8 +452,7 @@ static int amdgpu_pmu_alloc_pmu_attrs( return -ENOMEM; =20 fmt_attr_group->attrs =3D kzalloc_objs(*fmt_attr_group->attrs, - config->num_formats + 1, - GFP_KERNEL); + config->num_formats + 1); =20 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; =20 evt_attr_group->attrs =3D kzalloc_objs(*evt_attr_group->attrs, - config->num_events + 1, GFP_KERNEL); + config->num_events + 1); =20 if (!evt_attr_group->attrs) goto err_evt_attr_grp; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_ras.c index eb3e62eb7b20..c0336ca9bf6a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3239,7 +3239,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *ad= ev, if (from_rom) { err_data.err_addr =3D 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; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_ttm.c index d319c37e0d4e..eeaa56c8d129 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1881,8 +1881,7 @@ static int amdgpu_ttm_pools_init(struct amdgpu_device= *adev) return 0; =20 adev->mman.ttm_pools =3D 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; =20 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_umc.c index 8da772ec4b40..4df0f9d5ad11 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c @@ -59,7 +59,7 @@ int amdgpu_umc_page_retirement_mca(struct amdgpu_device *= adev, =20 err_data.err_addr =3D 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, =20 err_data->err_addr =3D kzalloc_objs(struct eeprom_table_record, - adev->umc.max_ras_err_cnt_per_query, GFP_KERNEL); + adev->umc.max_ras_err_cnt_per_query); =20 /* 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 =3D kzalloc_objs(struct eeprom_table_record, - adev->umc.max_ras_err_cnt_per_query, - GFP_KERNEL); + adev->umc.max_ras_err_cnt_per_query); =20 /* 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 =3D kzalloc_objs(struct eeprom_table_record, - adev->umc.max_ras_err_cnt_per_query, - GFP_KERNEL); + adev->umc.max_ras_err_cnt_per_query); =20 /* 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; =20 err_data.err_addr =3D 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; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd= /amdgpu/amdgpu_vkms.c index 2c19b65de840..5cef8cd14148 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c @@ -500,8 +500,7 @@ static int amdgpu_vkms_sw_init(struct amdgpu_ip_block *= ip_block) struct amdgpu_device *adev =3D ip_block->adev; =20 adev->amdgpu_vkms_output =3D 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; =20 diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd= /amdkfd/kfd_chardev.c index d0f7bd2a3481..09dabb3b3297 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -781,7 +781,7 @@ static int kfd_ioctl_get_process_apertures_new(struct f= ile *filp, * the amount of memory allocated by user */ pa =3D kzalloc_objs(struct kfd_process_device_apertures, - args->num_of_nodes, GFP_KERNEL); + args->num_of_nodes); if (!pa) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/driver= s/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index 212f613fad1e..b96fbc03c371 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -959,7 +959,7 @@ void amdgpu_dm_crtc_secure_display_create_contexts(stru= ct amdgpu_device *adev) int i; =20 crtc_ctx =3D kzalloc_objs(struct secure_display_crtc_context, - adev->mode_info.num_crtc, GFP_KERNEL); + adev->mode_info.num_crtc); =20 if (!crtc_ctx) { adev->dm.secure_display_ctx.crtc_ctx =3D NULL; diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c= b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c index 13ac1980a376..8b555187ac75 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c @@ -2131,7 +2131,7 @@ enum dc_status dcn20_validate_bandwidth(struct dc *dc= , struct dc_state *context, display_e2e_pipe_params_st *pipes; =20 pipes =3D 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; =20 diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c= b/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c index e83b8cea1e73..0f4307f8f3dd 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c @@ -931,7 +931,7 @@ static enum dc_status dcn21_validate_bandwidth(struct d= c *dc, struct dc_state *c display_e2e_pipe_params_st *pipes; =20 pipes =3D 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; =20 diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c= b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c index df0ff1580acc..2fa86b9587ed 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c @@ -2045,8 +2045,7 @@ enum dc_status dcn30_validate_bandwidth(struct dc *dc, int vlevel =3D 0; int pipe_cnt =3D 0; display_e2e_pipe_params_st *pipes =3D kzalloc_objs(display_e2e_pipe_param= s_st, - dc->res_pool->pipe_count, - GFP_KERNEL); + dc->res_pool->pipe_count); DC_LOGGER_INIT(dc->ctx->logger); =20 BW_VAL_TRACE_COUNT(); diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c= b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c index 41877105f498..2055f1f8af65 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c @@ -1768,8 +1768,7 @@ enum dc_status dcn31_validate_bandwidth(struct dc *dc, int vlevel =3D 0; int pipe_cnt =3D 0; display_e2e_pipe_params_st *pipes =3D kzalloc_objs(display_e2e_pipe_param= s_st, - dc->res_pool->pipe_count, - GFP_KERNEL); + dc->res_pool->pipe_count); DC_LOGGER_INIT(dc->ctx->logger); =20 BW_VAL_TRACE_COUNT(); diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource= .c b/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c index 2ddc1c10e68c..1939f720ba29 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c @@ -1706,8 +1706,7 @@ enum dc_status dcn314_validate_bandwidth(struct dc *d= c, int vlevel =3D 0; int pipe_cnt =3D 0; display_e2e_pipe_params_st *pipes =3D kzalloc_objs(display_e2e_pipe_param= s_st, - dc->res_pool->pipe_count, - GFP_KERNEL); + dc->res_pool->pipe_count); DC_LOGGER_INIT(dc->ctx->logger); =20 BW_VAL_TRACE_COUNT(); diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c= b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c index f23b7338f759..7ebb7d1193af 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c @@ -1751,8 +1751,7 @@ static bool dml1_validate(struct dc *dc, struct dc_st= ate *context, enum dc_valid int vlevel =3D 0; int pipe_cnt =3D 0; display_e2e_pipe_params_st *pipes =3D kzalloc_objs(display_e2e_pipe_param= s_st, - dc->res_pool->pipe_count, - GFP_KERNEL); + dc->res_pool->pipe_count); =20 /* To handle Freesync properly, setting FreeSync DML parameters * to its default state for the first stage of validation diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/driv= ers/gpu/drm/amd/display/modules/color/color_gamma.c index 31271fe2a10e..2639163b8ba2 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1715,14 +1715,12 @@ bool mod_color_calculate_degamma_params(struct dc_c= olor_caps *dc_caps, =20 if (map_user_ramp && ramp && ramp->type =3D=3D GAMMA_RGB_256) { rgb_user =3D kvzalloc_objs(*rgb_user, - ramp->num_entries + _EXTRA_POINTS, - GFP_KERNEL); + ramp->num_entries + _EXTRA_POINTS); if (!rgb_user) goto rgb_user_alloc_fail; =20 axis_x =3D kvzalloc_objs(*axis_x, - ramp->num_entries + _EXTRA_POINTS, - GFP_KERNEL); + ramp->num_entries + _EXTRA_POINTS); if (!axis_x) goto axis_x_alloc_fail; =20 @@ -1940,8 +1938,7 @@ bool mod_color_calculate_regamma_params(struct dc_tra= nsfer_func *output_tf, if (ramp && ramp->type !=3D GAMMA_CS_TFM_1D && (map_user_ramp || ramp->type !=3D GAMMA_RGB_256)) { rgb_user =3D kvzalloc_objs(*rgb_user, - ramp->num_entries + _EXTRA_POINTS, - GFP_KERNEL); + ramp->num_entries + _EXTRA_POINTS); if (!rgb_user) goto rgb_user_alloc_fail; =20 diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c b/drivers/gpu/drm/a= md/pm/legacy-dpm/kv_dpm.c index 7a0d6e05e83b..cdf3f8e6ec2f 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c @@ -2725,7 +2725,7 @@ static int kv_parse_power_table(struct amdgpu_device = *adev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 adev->pm.dpm.ps =3D kzalloc_objs(struct amdgpu_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!adev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c b/drivers/gpu/d= rm/amd/pm/legacy-dpm/legacy_dpm.c index 72752ddf72a4..6362a14b1a6e 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c @@ -303,7 +303,7 @@ int amdgpu_parse_extended_power_table(struct amdgpu_dev= ice *adev) =20 adev->pm.dpm.dyn_state.phase_shedding_limits_table.entries =3D 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; =20 diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/a= md/pm/legacy-dpm/si_dpm.c index 6edefa6ee006..61b1c5aa74cb 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c @@ -7342,7 +7342,7 @@ static int si_parse_power_table(struct amdgpu_device = *adev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 adev->pm.dpm.ps =3D kzalloc_objs(struct amdgpu_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!adev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c= b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c index 5de17e3bb7d7..6fcca65bd7d4 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c @@ -371,7 +371,7 @@ static int get_mclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 mclk_table =3D kzalloc_flex(*mclk_table, entries, - mclk_dep_table->ucNumEntries, GFP_KERNEL); + mclk_dep_table->ucNumEntries); if (!mclk_table) return -ENOMEM; =20 @@ -415,7 +415,7 @@ static int get_sclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 sclk_table =3D kzalloc_flex(*sclk_table, entries, - tonga_table->ucNumEntries, GFP_KERNEL); + tonga_table->ucNumEntries); if (!sclk_table) return -ENOMEM; =20 @@ -444,8 +444,7 @@ static int get_sclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 sclk_table =3D kzalloc_flex(*sclk_table, entries, - polaris_table->ucNumEntries, - GFP_KERNEL); + polaris_table->ucNumEntries); if (!sclk_table) return -ENOMEM; =20 @@ -492,8 +491,7 @@ static int get_pcie_table( "Invalid PowerPlay Table!", return -1); =20 pcie_table =3D kzalloc_flex(*pcie_table, entries, - atom_pcie_table->ucNumEntries, - GFP_KERNEL); + atom_pcie_table->ucNumEntries); if (!pcie_table) return -ENOMEM; =20 @@ -529,8 +527,7 @@ static int get_pcie_table( "Invalid PowerPlay Table!", return -1); =20 pcie_table =3D kzalloc_flex(*pcie_table, entries, - atom_pcie_table->ucNumEntries, - GFP_KERNEL); + atom_pcie_table->ucNumEntries); if (!pcie_table) return -ENOMEM; =20 @@ -725,7 +722,7 @@ static int get_mm_clock_voltage_table( PP_ASSERT_WITH_CODE((0 !=3D mm_dependency_table->ucNumEntries), "Invalid PowerPlay Table!", return -1); mm_table =3D kzalloc_flex(*mm_table, entries, - mm_dependency_table->ucNumEntries, GFP_KERNEL); + mm_dependency_table->ucNumEntries); if (!mm_table) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c b/dri= vers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c index a5fb0e883676..59af3314ffc4 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c @@ -1483,7 +1483,7 @@ static int get_cac_leakage_table(struct pp_hwmgr *hwm= gr, return -EINVAL; =20 cac_leakage_table =3D kzalloc_flex(*cac_leakage_table, entries, - table->ucNumEntries, GFP_KERNEL); + table->ucNumEntries); if (!cac_leakage_table) return -ENOMEM; =20 @@ -1621,7 +1621,7 @@ static int init_phase_shedding_table(struct pp_hwmgr = *hwmgr, =20 =20 table =3D kzalloc_flex(*table, entries, - ptable->ucNumEntries, GFP_KERNEL); + ptable->ucNumEntries); if (!table) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.= c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c index 77067e1315d2..052d139584fd 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c @@ -351,7 +351,7 @@ static int get_mm_clock_voltage_table( "Invalid PowerPlay Table!", return -1); =20 mm_table =3D kzalloc_flex(*mm_table, entries, - mm_dependency_table->ucNumEntries, GFP_KERNEL); + mm_dependency_table->ucNumEntries); if (!mm_table) return -ENOMEM; =20 @@ -574,7 +574,7 @@ static int get_socclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 clk_table =3D kzalloc_flex(*clk_table, entries, - clk_dep_table->ucNumEntries, GFP_KERNEL); + clk_dep_table->ucNumEntries); if (!clk_table) return -ENOMEM; =20 @@ -604,7 +604,7 @@ static int get_mclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 mclk_table =3D kzalloc_flex(*mclk_table, entries, - mclk_dep_table->ucNumEntries, GFP_KERNEL); + mclk_dep_table->ucNumEntries); if (!mclk_table) return -ENOMEM; =20 @@ -641,7 +641,7 @@ static int get_gfxclk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 clk_table =3D kzalloc_flex(*clk_table, entries, - clk_dep_table->ucNumEntries, GFP_KERNEL); + clk_dep_table->ucNumEntries); if (!clk_table) return -ENOMEM; =20 @@ -703,7 +703,7 @@ static int get_pix_clk_voltage_dependency_table( "Invalid PowerPlay Table!", return -1); =20 clk_table =3D kzalloc_flex(*clk_table, entries, - clk_dep_table->ucNumEntries, GFP_KERNEL); + clk_dep_table->ucNumEntries); if (!clk_table) return -ENOMEM; =20 @@ -794,7 +794,7 @@ static int get_pcie_table(struct pp_hwmgr *hwmgr, return 0); =20 pcie_table =3D kzalloc_flex(*pcie_table, entries, - atom_pcie_table->ucNumEntries, GFP_KERNEL); + atom_pcie_table->ucNumEntries); if (!pcie_table) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers= /gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c index f4f8b2132edd..af0482c9caa7 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c @@ -2400,8 +2400,7 @@ static int smu_v13_0_7_get_power_profile_mode(struct = smu_context *smu, char *buf return -EINVAL; =20 activity_monitor_external =3D kzalloc_objs(*activity_monitor_external, - PP_SMC_POWER_PROFILE_COUNT, - GFP_KERNEL); + PP_SMC_POWER_PROFILE_COUNT); if (!activity_monitor_external) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/dr= m/display/drm_dp_mst_topology.c index 953228cc46cb..170113520a43 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -4605,8 +4605,7 @@ int drm_dp_mst_atomic_setup_commit(struct drm_atomic_= state *state) =20 num_commit_deps =3D hweight32(mst_state->pending_crtc_mask); mst_state->commit_deps =3D 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 =3D num_commit_deps; diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 664c72087da6..f2cd2e25f009 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -136,12 +136,11 @@ drm_atomic_state_init(struct drm_device *dev, struct = drm_atomic_state *state) if (!state->crtcs) goto fail; state->planes =3D 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 =3D kzalloc_objs(*state->colorops, - dev->mode_config.num_colorop, GFP_KERNEL); + dev->mode_config.num_colorop); if (!state->colorops) goto fail; =20 diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 2d14660f3d45..dbf984f8e301 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/drm/drm_buddy.c @@ -326,7 +326,7 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 = chunk_size) =20 for_each_free_tree(i) { mm->free_trees[i] =3D kmalloc_objs(struct rb_root, - mm->max_order + 1, GFP_KERNEL); + mm->max_order + 1); if (!mm->free_trees[i]) goto out_free_tree; =20 diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_cli= ent_modeset.c index 65fbdf3a04f9..262b1b8773c5 100644 --- a/drivers/gpu/drm/drm_client_modeset.c +++ b/drivers/gpu/drm/drm_client_modeset.c @@ -59,8 +59,7 @@ int drm_client_modeset_create(struct drm_client_dev *clie= nt) =20 for (modeset =3D client->modesets; modeset->crtc; modeset++) { modeset->connectors =3D kzalloc_objs(*modeset->connectors, - max_connector_count, - GFP_KERNEL); + max_connector_count); if (!modeset->connectors) goto err_free; } diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 6d0bf06b4d31..90684f30a048 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -846,8 +846,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, } =20 connector_set =3D kmalloc_objs(struct drm_connector *, - crtc_req->count_connectors, - GFP_KERNEL); + crtc_req->count_connectors); if (!connector_set) { ret =3D -ENOMEM; goto out; diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_h= elper.c index 75b3cf9c1a32..5de9aaa5ba04 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -603,14 +603,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *s= et, * connector data. */ save_encoder_crtcs =3D kzalloc_objs(struct drm_crtc *, - dev->mode_config.num_encoder, - GFP_KERNEL); + dev->mode_config.num_encoder); if (!save_encoder_crtcs) return -ENOMEM; =20 save_connector_encoders =3D 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; diff --git a/drivers/gpu/drm/i915/display/intel_display_power_map.c b/drive= rs/gpu/drm/i915/display/intel_display_power_map.c index 28b15d9ee45e..c559ff000e67 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power_map.c +++ b/drivers/gpu/drm/i915/display/intel_display_power_map.c @@ -1824,7 +1824,7 @@ __set_power_wells(struct i915_power_domains *power_do= mains, power_domains->power_well_count =3D power_well_count; power_domains->power_wells =3D kzalloc_objs(*power_domains->power_wells, - power_well_count, GFP_KERNEL); + power_well_count); if (!power_domains->power_wells) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i9= 15/display/intel_hdcp.c index 7c276b7cc929..555d35bae887 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -2328,8 +2328,7 @@ static int initialize_hdcp_port_data(struct intel_con= nector *connector, =20 if (!data->streams) data->streams =3D 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; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/d= rm/i915/gt/uc/intel_guc_capture.c index 77bd4152a6c1..865b61057566 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c @@ -990,8 +990,7 @@ guc_capture_alloc_one_node(struct intel_guc *guc) =20 for (i =3D 0; i < GUC_CAPTURE_LIST_TYPE_MAX; ++i) { new->reginfo[i].regs =3D 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); diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c b/drivers/gpu/drm/nouv= eau/nouveau_sched.c index 9bd3dc16a467..5546be488795 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sched.c +++ b/drivers/gpu/drm/nouveau/nouveau_sched.c @@ -70,16 +70,14 @@ nouveau_job_init(struct nouveau_job *job, } =20 job->out_sync.objs =3D kzalloc_objs(*job->out_sync.objs, - job->out_sync.count, - GFP_KERNEL); + job->out_sync.count); if (!job->out_sync.objs) { ret =3D -ENOMEM; goto err_free_out_sync; } =20 job->out_sync.chains =3D kzalloc_objs(*job->out_sync.chains, - job->out_sync.count, - GFP_KERNEL); + job->out_sync.count); if (!job->out_sync.chains) { ret =3D -ENOMEM; goto err_free_objs; diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/oma= pdrm/omap_dmm_tiler.c index 18054952337f..a2c702b831a7 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -886,7 +886,7 @@ static int omap_dmm_probe(struct platform_device *dev) =20 /* alloc engines */ omap_dmm->engines =3D kzalloc_objs(*omap_dmm->engines, - omap_dmm->num_engines, GFP_KERNEL); + omap_dmm->num_engines); if (!omap_dmm->engines) { ret =3D -ENOMEM; goto fail; diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/pantho= r/panthor_mmu.c index c5ebe68d5a97..41604a7aaf85 100644 --- a/drivers/gpu/drm/panthor/panthor_mmu.c +++ b/drivers/gpu/drm/panthor/panthor_mmu.c @@ -1258,7 +1258,7 @@ static int panthor_vm_prepare_map_op_ctx(struct panth= or_vm_op_ctx *op_ctx, ((ALIGN(va + size, 1ull << 21) - ALIGN_DOWN(va, 1ull << 21)) >> 21); =20 op_ctx->rsvd_page_tables.pages =3D kzalloc_objs(*op_ctx->rsvd_page_tables= .pages, - pt_count, GFP_KERNEL); + pt_count); if (!op_ctx->rsvd_page_tables.pages) { ret =3D -ENOMEM; goto err_cleanup; @@ -1312,8 +1312,7 @@ static int panthor_vm_prepare_unmap_op_ctx(struct pan= thor_vm_op_ctx *op_ctx, =20 if (pt_count) { op_ctx->rsvd_page_tables.pages =3D kzalloc_objs(*op_ctx->rsvd_page_table= s.pages, - pt_count, - GFP_KERNEL); + pt_count); if (!op_ctx->rsvd_page_tables.pages) { ret =3D -ENOMEM; goto err_cleanup; diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_di= splay.c index 8b2b6c54e86a..75d47e6b9142 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -59,8 +59,7 @@ static int qxl_alloc_client_monitors_config(struct qxl_de= vice *qdev, } if (!qdev->client_monitors_config) { qdev->client_monitors_config =3D kzalloc_flex(*qdev->client_monitors_con= fig, - heads, count, - GFP_KERNEL); + heads, count); if (!qdev->client_monitors_config) return -ENOMEM; } diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dp= m.c index 0041623b5add..22321eb95b7d 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -5518,7 +5518,7 @@ static int ci_parse_power_table(struct radeon_device = *rdev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!rdev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dp= m.c index 1544c24f4647..1693b36fc52d 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c @@ -2458,7 +2458,7 @@ static int kv_parse_power_table(struct radeon_device = *rdev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!rdev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dp= m.c index 1bcf92f90843..8059e019d4fc 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -4001,8 +4001,7 @@ static int ni_parse_power_table(struct radeon_device = *rdev) power_info =3D (union power_info *)(mode_info->atom_context->bios + data_= offset); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - power_info->pplib.ucNumStates, - GFP_KERNEL); + power_info->pplib.ucNumStates); if (!rdev->pm.dpm.ps) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/radeon/r600_dpm.c b/drivers/gpu/drm/radeon/r60= 0_dpm.c index b4324793c9ff..83f1ae31cbdb 100644 --- a/drivers/gpu/drm/radeon/r600_dpm.c +++ b/drivers/gpu/drm/radeon/r600_dpm.c @@ -822,8 +822,7 @@ static int r600_parse_clk_voltage_dep_table(struct rade= on_clock_voltage_dependen ATOM_PPLIB_Clock_Voltage_Dependency_Record *entry; =20 radeon_table->entries =3D kzalloc_objs(struct radeon_clock_voltage_depend= ency_entry, - atom_table->ucNumEntries, - GFP_KERNEL); + atom_table->ucNumEntries); if (!radeon_table->entries) return -ENOMEM; =20 @@ -989,7 +988,7 @@ int r600_parse_extended_power_table(struct radeon_devic= e *rdev) =20 rdev->pm.dpm.dyn_state.phase_shedding_limits_table.entries =3D 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; diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/rad= eon/radeon_atombios.c index 2f2b3b716d3d..3dd9724b331d 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -2118,7 +2118,7 @@ static int radeon_atombios_parse_power_table_1_3(stru= ct radeon_device *rdev) if (num_modes =3D=3D 0) return state_index; rdev->pm.power_state =3D 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(stru= ct radeon_device *rdev) if (power_info->pplib.ucNumStates =3D=3D 0) return state_index; rdev->pm.power_state =3D 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(stru= ct radeon_device *rdev) power_info->pplib.ucNonClockSize)); rdev->pm.power_state[i].clock_info =3D kzalloc_objs(struct radeon_pm_clock_info, - (power_info->pplib.ucStateEntrySize - 1) ? (power_info->pplib.ucS= tateEntrySize - 1) : 1, - GFP_KERNEL); + (power_info->pplib.ucStateEntrySize - 1) ? (power_info->pplib.ucS= tateEntrySize - 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 =3D=3D 0) return state_index; rdev->pm.power_state =3D 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 =3D (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 =3D 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) { diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs= 780_dpm.c index af0a032e3ded..64bb4cafb8b5 100644 --- a/drivers/gpu/drm/radeon/rs780_dpm.c +++ b/drivers/gpu/drm/radeon/rs780_dpm.c @@ -805,8 +805,7 @@ static int rs780_parse_power_table(struct radeon_device= *rdev) power_info =3D (union power_info *)(mode_info->atom_context->bios + data_= offset); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - power_info->pplib.ucNumStates, - GFP_KERNEL); + power_info->pplib.ucNumStates); if (!rdev->pm.dpm.ps) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c b/drivers/gpu/drm/radeon/rv= 6xx_dpm.c index 3cb8842fce65..c734370e5336 100644 --- a/drivers/gpu/drm/radeon/rv6xx_dpm.c +++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c @@ -1888,8 +1888,7 @@ static int rv6xx_parse_power_table(struct radeon_devi= ce *rdev) power_info =3D (union power_info *)(mode_info->atom_context->bios + data_= offset); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - power_info->pplib.ucNumStates, - GFP_KERNEL); + power_info->pplib.ucNumStates); if (!rdev->pm.dpm.ps) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv= 770_dpm.c index 4d6ed9668ad1..5f5cf5dd1d58 100644 --- a/drivers/gpu/drm/radeon/rv770_dpm.c +++ b/drivers/gpu/drm/radeon/rv770_dpm.c @@ -2284,8 +2284,7 @@ int rv7xx_parse_power_table(struct radeon_device *rde= v) power_info =3D (union power_info *)(mode_info->atom_context->bios + data_= offset); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - power_info->pplib.ucNumStates, - GFP_KERNEL); + power_info->pplib.ucNumStates); if (!rdev->pm.dpm.ps) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dp= m.c index 6613957fff06..b4aa49b1ac63 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -6779,7 +6779,7 @@ static int si_parse_power_table(struct radeon_device = *rdev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!rdev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sum= o_dpm.c index 5f14adeee13e..acee6c82e9f0 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -1480,7 +1480,7 @@ static int sumo_parse_power_table(struct radeon_devic= e *rdev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!rdev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/= trinity_dpm.c index 34b7beb9cf9a..566615c877cc 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c @@ -1711,7 +1711,7 @@ static int trinity_parse_power_table(struct radeon_de= vice *rdev) le16_to_cpu(power_info->pplib.usNonClockInfoArrayOffset)); =20 rdev->pm.dpm.ps =3D kzalloc_objs(struct radeon_ps, - state_array->ucNumEntries, GFP_KERNEL); + state_array->ucNumEntries); if (!rdev->pm.dpm.ps) return -ENOMEM; power_state_offset =3D (u8 *)state_array->states; diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers/gpu/drm/v3d/v3d_sub= mit.c index 091f5c7e9730..18f2bf1fe89f 100644 --- a/drivers/gpu/drm/v3d/v3d_submit.c +++ b/drivers/gpu/drm/v3d/v3d_submit.c @@ -485,7 +485,7 @@ v3d_get_cpu_timestamp_query_params(struct drm_file *fil= e_priv, job->job_type =3D V3D_CPU_JOB_TYPE_TIMESTAMP_QUERY; =20 query_info->queries =3D kvmalloc_objs(struct v3d_timestamp_query, - timestamp.count, GFP_KERNEL); + timestamp.count); if (!query_info->queries) return -ENOMEM; =20 @@ -543,7 +543,7 @@ v3d_get_cpu_reset_timestamp_params(struct drm_file *fil= e_priv, job->job_type =3D V3D_CPU_JOB_TYPE_RESET_TIMESTAMP_QUERY; =20 query_info->queries =3D kvmalloc_objs(struct v3d_timestamp_query, - reset.count, GFP_KERNEL); + reset.count); if (!query_info->queries) return -ENOMEM; =20 @@ -599,7 +599,7 @@ v3d_get_cpu_copy_query_results_params(struct drm_file *= file_priv, job->job_type =3D V3D_CPU_JOB_TYPE_COPY_TIMESTAMP_QUERY; =20 query_info->queries =3D kvmalloc_objs(struct v3d_timestamp_query, - copy.count, GFP_KERNEL); + copy.count); if (!query_info->queries) return -ENOMEM; =20 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/v= mwgfx_msg.c index 84237edf1ac0..fd77ab6568cb 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c @@ -982,8 +982,7 @@ int vmw_mksstat_add_ioctl(struct drm_device *dev, void = *data, =20 /* Allocate statically-sized temp arrays for pages -- too big to keep in = frame */ pages_stat =3D (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)); =20 if (!pages_stat) goto err_nomem; diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/= xen/xen_drm_front_evtchnl.c index 88cc85395791..a4888277164d 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c +++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c @@ -213,7 +213,7 @@ int xen_drm_front_evtchnl_create_all(struct xen_drm_fro= nt_info *front_info) =20 front_info->evt_pairs =3D kzalloc_objs(struct xen_drm_front_evtchnl_pair, - cfg->num_connectors, GFP_KERNEL); + cfg->num_connectors); if (!front_info->evt_pairs) { ret =3D -ENOMEM; goto fail; diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index ef307c4c575e..840a60113868 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1320,8 +1320,7 @@ int hid_open_report(struct hid_device *device) end =3D start + size; =20 device->collection =3D kzalloc_objs(struct hid_collection, - HID_DEFAULT_NUM_COLLECTIONS, - GFP_KERNEL); + HID_DEFAULT_NUM_COLLECTIONS); if (!device->collection) { ret =3D -ENOMEM; goto err; diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 16b9959dba7e..b5b322ce16df 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -314,7 +314,7 @@ int vmbus_connect(void) version >> 16, version & 0xFFFF); =20 vmbus_connection.channels =3D kzalloc_objs(struct vmbus_channel *, - MAX_CHANNEL_RELIDS, GFP_KERNEL); + MAX_CHANNEL_RELIDS); if (vmbus_connection.channels =3D=3D NULL) { ret =3D -ENOMEM; goto cleanup; diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_me= ter.c index 2da06524bdb3..1e3fab5f7946 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -246,7 +246,7 @@ static int read_domain_devices(struct acpi_power_meter_= resource *resource) goto end; =20 resource->domain_devices =3D kzalloc_objs(struct acpi_device *, - pss->package.count, GFP_KERNEL); + pss->package.count); if (!resource->domain_devices) { res =3D -ENOMEM; goto end; diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 55f54bd556a4..6a0d94711ead 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -493,7 +493,7 @@ init_temp_data(struct platform_data *pdata, unsigned in= t cpu, int pkg_flag) */ pdata->nr_cores =3D NUM_REAL_CORES; pdata->core_data =3D kzalloc_objs(struct temp_data *, - pdata->nr_cores, GFP_KERNEL); + pdata->nr_cores); if (!pdata->core_data) return NULL; } diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c index 14d95d63f277..aba4b10a17ac 100644 --- a/drivers/iio/adc/ti-tsc2046.c +++ b/drivers/iio/adc/ti-tsc2046.c @@ -291,14 +291,12 @@ static int tsc2046_adc_read_one(struct tsc2046_adc_pr= iv *priv, int ch_idx, return -ENOSPC; =20 struct tsc2046_adc_atom *tx_buf __free(kfree) =3D kzalloc_objs(*tx_buf, - max_count, - GFP_KERNEL); + max_count); if (!tx_buf) return -ENOMEM; =20 struct tsc2046_adc_atom *rx_buf __free(kfree) =3D kzalloc_objs(*rx_buf, - max_count, - GFP_KERNEL); + max_count); if (!rx_buf) return -ENOMEM; =20 diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c index f95983f81f63..bd32fa57b1d7 100644 --- a/drivers/iio/dac/ad5360.c +++ b/drivers/iio/dac/ad5360.c @@ -440,7 +440,7 @@ static int ad5360_alloc_channels(struct iio_dev *indio_= dev) unsigned int i; =20 channels =3D kzalloc_objs(struct iio_chan_spec, - st->chip_info->num_channels, GFP_KERNEL); + st->chip_info->num_channels); =20 if (!channels) return -ENOMEM; diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-cor= e.c index d4a9dd889eef..22eefd048ba9 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -1587,7 +1587,7 @@ static int iio_device_register_sysfs(struct iio_dev *= indio_dev) =20 iio_dev_opaque->chan_attr_group.attrs =3D kzalloc_objs(iio_dev_opaque->chan_attr_group.attrs[0], - attrcount + 1, GFP_KERNEL); + attrcount + 1); if (iio_dev_opaque->chan_attr_group.attrs =3D=3D NULL) { ret =3D -ENOMEM; goto error_clear_attrs; diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-ev= ent.c index d71cb9fd09a3..4149efcd5539 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -607,7 +607,7 @@ int iio_device_register_eventset(struct iio_dev *indio_= dev) =20 ev_int->group.name =3D iio_event_group_name; ev_int->group.attrs =3D kzalloc_objs(ev_int->group.attrs[0], - attrcount + 1, GFP_KERNEL); + attrcount + 1); if (ev_int->group.attrs =3D=3D NULL) { ret =3D -ENOMEM; goto error_free_setup_event_lines; diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cach= e.c index 21b7753eedad..b415d4aad04f 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -1472,7 +1472,7 @@ ib_cache_update(struct ib_device *device, u32 port, b= ool update_gids, =20 if (update_pkeys) { pkey_cache =3D kmalloc_flex(*pkey_cache, table, - tprops->pkey_tbl_len, GFP_KERNEL); + tprops->pkey_tbl_len); if (!pkey_cache) { ret =3D -ENOMEM; goto err; diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index d892a597ac2b..e54c07c74575 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -5376,8 +5376,7 @@ static int cma_add_one(struct ib_device *device) =20 cma_dev->device =3D device; cma_dev->default_gid_type =3D kzalloc_objs(*cma_dev->default_gid_type, - device->phys_port_cnt, - GFP_KERNEL); + device->phys_port_cnt); if (!cma_dev->default_gid_type) { ret =3D -ENOMEM; goto free_cma_dev; diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/dev= ice.c index 358ffe6756a4..1b5f1ee0a557 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -812,7 +812,7 @@ static int alloc_port_data(struct ib_device *device) * empty slots at the beginning. */ pdata_rcu =3D 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; /* diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/= iwpm_util.c index 7817b7dab7f9..990cf928b32a 100644 --- a/drivers/infiniband/core/iwpm_util.c +++ b/drivers/infiniband/core/iwpm_util.c @@ -59,12 +59,12 @@ static struct iwpm_admin_data iwpm_admin; int iwpm_init(u8 nl_client) { iwpm_hash_bucket =3D kzalloc_objs(struct hlist_head, - IWPM_MAPINFO_HASH_SIZE, GFP_KERNEL); + IWPM_MAPINFO_HASH_SIZE); if (!iwpm_hash_bucket) return -ENOMEM; =20 iwpm_reminfo_bucket =3D 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; diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysf= s.c index 7f565613b5cf..69df8b703cbd 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -859,7 +859,7 @@ alloc_hw_stats_device(struct ib_device *ibdev) if (!data) goto err_free_stats; data->group.attrs =3D kzalloc_objs(*data->group.attrs, - stats->num_counters + 2, GFP_KERNEL); + stats->num_counters + 2); if (!data->group.attrs) goto err_free_data; =20 @@ -1090,8 +1090,7 @@ static int setup_gid_attrs(struct ib_port *port, int ret; =20 gid_attr_group =3D 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 =3D port; @@ -1155,8 +1154,7 @@ static struct ib_port *setup_port(struct ib_core_devi= ce *coredev, int port_num, int ret; =20 p =3D 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 =3D device; diff --git a/drivers/infiniband/core/uverbs_uapi.c b/drivers/infiniband/cor= e/uverbs_uapi.c index 7ed69890d87a..31b248295854 100644 --- a/drivers/infiniband/core/uverbs_uapi.c +++ b/drivers/infiniband/core/uverbs_uapi.c @@ -446,7 +446,7 @@ static int uapi_finalize(struct uverbs_api *uapi) uapi->num_write =3D max_write + 1; uapi->num_write_ex =3D max_write_ex + 1; data =3D 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; =20 diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband= /hw/bnxt_re/qplib_res.c index 2f907246478f..341bae3d8a1d 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c @@ -873,7 +873,7 @@ int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, st= ruct net_device *netdev) /* Allocate one extra to hold the QP1 entries */ rcfw->qp_tbl_size =3D max_t(u32, BNXT_RE_MAX_QPC_COUNT + 1, dev_attr->max= _qp); rcfw->qp_tbl =3D kzalloc_objs(struct bnxt_qplib_qp_node, - rcfw->qp_tbl_size, GFP_KERNEL); + rcfw->qp_tbl_size); if (!rcfw->qp_tbl) return -ENOMEM; =20 diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/c= xgb4/device.c index 505bf009941e..102c5646b9ed 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c @@ -882,8 +882,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev) =20 if (c4iw_wr_log) { rdev->wr_log =3D 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 =3D 1 << c4iw_wr_log_size_order; atomic_set(&rdev->wr_log_idx, 0); diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4= /qp.c index 0a2d9eb72511..d9a86e4c5461 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -2551,7 +2551,7 @@ static int alloc_srq_queue(struct c4iw_srq *srq, stru= ct c4iw_dev_ucontext *uctx, if (!wq->sw_rq) goto err_put_qpid; wq->pending_wrs =3D kzalloc_objs(*srq->wq.pending_wrs, - srq->wq.size, GFP_KERNEL); + srq->wq.size); if (!wq->pending_wrs) goto err_free_sw_rq; } diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/= hfi1/affinity.c index a684e25482b2..2b20907c9c12 100644 --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c @@ -407,8 +407,7 @@ static int _dev_comp_vect_mappings_create(struct hfi1_d= evdata *dd, } =20 dd->comp_vect_mappings =3D kzalloc_objs(*dd->comp_vect_mappings, - dd->comp_vect_possible_cpus, - GFP_KERNEL); + dd->comp_vect_possible_cpus); if (!dd->comp_vect_mappings) { ret =3D -ENOMEM; goto fail; diff --git a/drivers/infiniband/hw/hfi1/pio.c b/drivers/infiniband/hw/hfi1/= pio.c index bc61a13c336a..51afaac88c72 100644 --- a/drivers/infiniband/hw/hfi1/pio.c +++ b/drivers/infiniband/hw/hfi1/pio.c @@ -408,7 +408,7 @@ int init_send_contexts(struct hfi1_devdata *dd) dd->hw_to_sw =3D kmalloc_array(TXE_NUM_CONTEXTS, sizeof(u8), GFP_KERNEL); dd->send_contexts =3D 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; =20 dd->cr_base =3D kzalloc_objs(struct credit_return_base, - node_affinity.num_possible_nodes, GFP_KERNEL); + node_affinity.num_possible_nodes); if (!dd->cr_base) { ret =3D -ENOMEM; goto done; diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.c b/drivers/infiniband= /hw/hfi1/user_exp_rcv.c index a092c92953de..5b01070ed66f 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c @@ -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 =3D 0; fd->invalid_tids =3D 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 =3D NULL; diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/= hw/hns/hns_roce_hem.c index 9b60392afa39..4eaaedcc7652 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.c +++ b/drivers/infiniband/hw/hns/hns_roce_hem.c @@ -778,8 +778,7 @@ int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev, goto err_kcalloc_bt_l1; =20 table->bt_l1_dma_addr =3D kzalloc_objs(*table->bt_l1_dma_addr, - num_bt_l1, - GFP_KERNEL); + num_bt_l1); =20 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; =20 table->bt_l0_dma_addr =3D 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; } diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/h= w/hns/hns_roce_mr.c index 741e4f3c557f..896af1828a38 100644 --- a/drivers/infiniband/hw/hns/hns_roce_mr.c +++ b/drivers/infiniband/hw/hns/hns_roce_mr.c @@ -459,8 +459,7 @@ int hns_roce_map_mr_sg(struct ib_mr *ibmr, struct scatt= erlist *sg, int sg_nents, =20 mr->npages =3D 0; mr->page_list =3D 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; =20 diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana= /main.c index 3d6a9c427269..8d99cd00f002 100644 --- a/drivers/infiniband/hw/mana/main.c +++ b/drivers/infiniband/hw/mana/main.c @@ -794,7 +794,7 @@ int mana_ib_create_eqs(struct mana_ib_dev *mdev) return err; =20 mdev->eqs =3D kzalloc_objs(struct gdma_queue *, - mdev->ib_dev.num_comp_vectors, GFP_KERNEL); + mdev->ib_dev.num_comp_vectors); if (!mdev->eqs) { err =3D -ENOMEM; goto destroy_fatal_eq; diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/= mad.c index e5e7ecd14284..9aa6817aaf16 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -2158,7 +2158,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev= *dev, int i; =20 ctx->tun =3D 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; =20 diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4= /main.c index 6ee12aab1259..63360c5a73c7 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -2426,7 +2426,7 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, s= truct mlx4_ib_dev *ibdev) int i, j, eq =3D 0, total_eqs =3D 0; =20 ibdev->eq_table =3D kzalloc_objs(ibdev->eq_table[0], - dev->caps.num_comp_vectors, GFP_KERNEL); + dev->caps.num_comp_vectors); if (!ibdev->eq_table) return; =20 diff --git a/drivers/infiniband/hw/mlx5/macsec.c b/drivers/infiniband/hw/ml= x5/macsec.c index b52abe8c47c4..b44832025ab7 100644 --- a/drivers/infiniband/hw/mlx5/macsec.c +++ b/drivers/infiniband/hw/mlx5/macsec.c @@ -181,7 +181,7 @@ int mlx5r_macsec_init_gids_and_devlist(struct mlx5_ib_d= ev *dev) max_gids =3D MLX5_CAP_ROCE(dev->mdev, roce_address_table_size); for (i =3D 0; i < dev->num_ports; i++) { dev->port[i].reserved_gids =3D kzalloc_objs(*dev->port[i].reserved_gids, - max_gids, GFP_KERNEL); + max_gids); if (!dev->port[i].reserved_gids) goto err; =20 diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5= /main.c index ba89b03d36f9..635002e684a5 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -5205,8 +5205,7 @@ static struct ib_device *mlx5_ib_add_sub_dev(struct i= b_device *parent, return ERR_PTR(-ENOMEM); =20 mplane->port =3D kzalloc_objs(*mplane->port, - mparent->num_plane * mparent->num_ports, - GFP_KERNEL); + mparent->num_plane * mparent->num_ports); if (!mplane->port) { ret =3D -ENOMEM; goto fail_kcalloc; diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/h= w/mthca/mthca_cmd.c index 1c51814d5354..c50a50be6c61 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -560,7 +560,7 @@ int mthca_cmd_use_events(struct mthca_dev *dev) int i; =20 dev->cmd.context =3D kmalloc_objs(struct mthca_cmd_context, - dev->cmd.max_cmds, GFP_KERNEL); + dev->cmd.max_cmds); if (!dev->cmd.context) return -ENOMEM; =20 diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniba= nd/hw/mthca/mthca_memfree.c index e4380d7f2327..9c5eb03f354d 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -718,7 +718,7 @@ int mthca_init_db_tab(struct mthca_dev *dev) dev->db_tab->min_group2 =3D dev->db_tab->npages - 1; =20 dev->db_tab->page =3D 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; diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/= hw/usnic/usnic_uiom.c index e94aa9608465..691c64a73516 100644 --- a/drivers/infiniband/hw/usnic/usnic_uiom.c +++ b/drivers/infiniband/hw/usnic/usnic_uiom.c @@ -150,8 +150,7 @@ static int usnic_uiom_get_pages(unsigned long addr, siz= e_t size, int writable, =20 while (ret) { chunk =3D 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 =3D -ENOMEM; goto out; diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infin= iband/hw/vmw_pvrdma/pvrdma_main.c index f27c28d934ae..cc889b4889d8 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c @@ -272,7 +272,7 @@ static int pvrdma_register_device(struct pvrdma_dev *de= v) ib_set_device_ops(&dev->ib_dev, &pvrdma_dev_srq_ops); =20 dev->srq_tbl =3D 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; } diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infinib= and/ulp/iser/iser_initiator.c index 0ae0f7722e0f..12a2d12fef07 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -241,7 +241,7 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_co= nn, =20 iser_conn->num_rx_descs =3D session->cmds_max; iser_conn->rx_descs =3D 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; =20 diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/u= lp/isert/ib_isert.c index 233adb1fe9ac..348005e71891 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -153,7 +153,7 @@ isert_alloc_rx_descriptors(struct isert_conn *isert_con= n) int i, j; =20 isert_conn->rx_descs =3D 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; =20 diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ul= p/rtrs/rtrs-clt.c index f1c3b4d14324..3362362f9e2e 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -1871,7 +1871,7 @@ static int rtrs_rdma_conn_established(struct rtrs_clt= _con *con, =20 if (!clt_path->rbufs) { clt_path->rbufs =3D kzalloc_objs(*clt_path->rbufs, - queue_depth, GFP_KERNEL); + queue_depth); if (!clt_path->rbufs) return -ENOMEM; } diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index a05aed1fe5e9..f3fd7f39efb4 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -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 =3D kvzalloc_objs(*pci_seg->rlookup_table, - pci_seg->last_bdf + 1, - GFP_KERNEL); + pci_seg->last_bdf + 1); if (pci_seg->rlookup_table =3D=3D NULL) return -ENOMEM; =20 @@ -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 =3D 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 =3D=3D NULL) return -ENOMEM; =20 @@ -696,7 +694,7 @@ static int __init alloc_alias_table(struct amd_iommu_pc= i_seg *pci_seg) int i; =20 pci_seg->alias_table =3D 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; =20 diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/ar= m/arm-smmu-v3/arm-smmu-v3.c index d60ba624105c..4d00d796f078 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -1515,8 +1515,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_smmu_m= aster *master) DIV_ROUND_UP(max_contexts, CTXDESC_L2_ENTRIES); =20 cd_table->l2.l2ptrs =3D 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; =20 diff --git a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c b/drivers/iommu= /arm/arm-smmu-v3/tegra241-cmdqv.c index 8dcde926794d..6fe5563eaf9e 100644 --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c @@ -743,7 +743,7 @@ static int tegra241_cmdqv_init_vintf(struct tegra241_cm= dqv *cmdqv, u16 max_idx, vintf->base =3D cmdqv->base + TEGRA241_VINTF(idx); =20 vintf->lvcmdqs =3D 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; diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index ac9d6a4c1432..f9cd18316d16 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -716,7 +716,7 @@ int iova_domain_init_rcaches(struct iova_domain *iovad) int i, ret; =20 iovad->rcaches =3D kzalloc_objs(struct iova_rcache, - IOVA_RANGE_CACHE_MAX_SIZE, GFP_KERNEL); + IOVA_RANGE_CACHE_MAX_SIZE); if (!iovad->rcaches) return -ENOMEM; =20 diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sys= irq.c index d057209e1d15..50f88293b4cc 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c @@ -155,7 +155,7 @@ static int __init mtk_sysirq_of_init(struct device_node= *node, } =20 chip_data->intpol_bases =3D kzalloc_objs(*chip_data->intpol_bases, - nr_intpol_bases, GFP_KERNEL); + nr_intpol_bases); if (!chip_data->intpol_bases) { ret =3D -ENOMEM; goto out_free_intpol_words; diff --git a/drivers/irqchip/irq-riscv-imsic-state.c b/drivers/irqchip/irq-= riscv-imsic-state.c index 61f46fd800fc..e3ed874d89e7 100644 --- a/drivers/irqchip/irq-riscv-imsic-state.c +++ b/drivers/irqchip/irq-riscv-imsic-state.c @@ -513,7 +513,7 @@ static int __init imsic_local_init(void) =20 /* Allocate vector array */ lpriv->vectors =3D kzalloc_objs(*lpriv->vectors, - global->nr_ids + 1, GFP_KERNEL); + global->nr_ids + 1); if (!lpriv->vectors) goto fail_local_cleanup; =20 diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-e= xti.c index 983b944ea292..5fdf335acb46 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -275,7 +275,7 @@ stm32_exti_host_data *stm32_exti_host_init(const struct= stm32_exti_drv_data *dd, =20 host_data->drv_data =3D dd; host_data->chips_data =3D kzalloc_objs(struct stm32_exti_chip_data, - dd->bank_nr, GFP_KERNEL); + dd->bank_nr); if (!host_data->chips_data) goto free_host_data; =20 diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 00d36d4aca52..54823341c9fd 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2335,7 +2335,7 @@ static int crypt_alloc_tfms_skcipher(struct crypt_con= fig *cc, char *ciphermode) int err; =20 cc->cipher_tfm.tfms =3D kzalloc_objs(struct crypto_skcipher *, - cc->tfms_count, GFP_KERNEL); + cc->tfms_count); if (!cc->cipher_tfm.tfms) return -ENOMEM; =20 diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index a52ee38dc30c..06e805902151 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -4500,7 +4500,7 @@ static int create_journal(struct dm_integrity_c *ic, = char **error) } =20 sg =3D kvmalloc_objs(struct scatterlist, - ic->journal_pages + 1, GFP_KERNEL); + ic->journal_pages + 1); if (!sg) { *error =3D "Unable to allocate sg list"; r =3D -ENOMEM; @@ -5271,7 +5271,7 @@ static int dm_integrity_ctr(struct dm_target *ti, uns= igned int argc, char **argv goto bad; } ic->bbs =3D kvmalloc_objs(struct bitmap_block_status, - ic->n_bitmap_blocks, GFP_KERNEL); + ic->n_bitmap_blocks); if (!ic->bbs) { ti->error =3D "Could not allocate memory for bitmap"; r =3D -ENOMEM; diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c index a616255b83e2..bb1ada31e483 100644 --- a/drivers/md/dm-pcache/cache.c +++ b/drivers/md/dm-pcache/cache.c @@ -139,7 +139,7 @@ static int cache_init(struct dm_pcache *pcache) int ret; =20 cache->segments =3D kvzalloc_objs(struct pcache_cache_segment, - cache_dev->seg_num, GFP_KERNEL); + cache_dev->seg_num); if (!cache->segments) { ret =3D -ENOMEM; goto err; diff --git a/drivers/md/dm-pcache/cache_key.c b/drivers/md/dm-pcache/cache_= key.c index 3de356abf952..e068e878231b 100644 --- a/drivers/md/dm-pcache/cache_key.c +++ b/drivers/md/dm-pcache/cache_key.c @@ -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 =3D kvzalloc_objs(struct pcache_cache_subtree, - cache_tree->n_subtrees, GFP_KERNEL); + cache_tree->n_subtrees); if (!cache_tree->subtrees) { ret =3D -ENOMEM; goto key_pool_exit; diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c index b26656dea4ec..c53cf07ab7b0 100644 --- a/drivers/md/dm-stats.c +++ b/drivers/md/dm-stats.c @@ -972,7 +972,7 @@ static int parse_histogram(const char *h, unsigned int = *n_histogram_entries, (*n_histogram_entries)++; =20 *histogram_boundaries =3D kmalloc_objs(unsigned long long, - *n_histogram_entries, GFP_KERNEL); + *n_histogram_entries); if (!*histogram_boundaries) return -ENOMEM; =20 diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 856e4b3c2bde..24dac6f09da8 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -1544,7 +1544,7 @@ static int lock_all_bitmaps(struct mddev *mddev) =20 cinfo->other_bitmap_lockres =3D 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; diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 968bc83b8597..0653b5d8545a 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3858,8 +3858,7 @@ static struct r10conf *setup_conf(struct mddev *mddev) =20 /* FIXME calc properly */ conf->mirrors =3D 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; =20 @@ -4282,8 +4281,7 @@ static int raid10_check_reshape(struct mddev *mddev) /* allocate new 'mirrors' list */ conf->mirrors_new =3D 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; } diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw6= 86x/tw686x-core.c index 101c7ccc6fd0..a10e38221817 100644 --- a/drivers/media/pci/tw686x/tw686x-core.c +++ b/drivers/media/pci/tw686x/tw686x-core.c @@ -251,14 +251,14 @@ static int tw686x_probe(struct pci_dev *pci_dev, sprintf(dev->name, "tw%04X", pci_dev->device); =20 dev->video_channels =3D kzalloc_objs(*dev->video_channels, - max_channels(dev), GFP_KERNEL); + max_channels(dev)); if (!dev->video_channels) { err =3D -ENOMEM; goto free_dev; } =20 dev->audio_channels =3D kzalloc_objs(*dev->audio_channels, - max_channels(dev), GFP_KERNEL); + max_channels(dev)); if (!dev->audio_channels) { err =3D -ENOMEM; goto free_video; diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pv= rusb2/pvrusb2-hdw.c index 4d3f5f863030..3c270ef00752 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -2450,7 +2450,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface= *intf, =20 /* Define and configure additional controls from cx2341x module. */ hdw->mpeg_ctrl_info =3D kzalloc_objs(*(hdw->mpeg_ctrl_info), - MPEGDEF_COUNT, GFP_KERNEL); + MPEGDEF_COUNT); if (!hdw->mpeg_ctrl_info) goto fail; for (idx =3D 0; idx < MPEGDEF_COUNT; idx++) { cptr =3D hdw->controls + idx + CTRLDEF_COUNT; diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-cor= e/v4l2-subdev.c index 1beb9d3f1f1e..32e6f60e26c7 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -1889,8 +1889,7 @@ v4l2_subdev_init_stream_configs(struct v4l2_subdev_st= ream_configs *stream_config =20 if (new_configs.num_configs) { new_configs.configs =3D kvzalloc_objs(*new_configs.configs, - new_configs.num_configs, - GFP_KERNEL); + new_configs.num_configs); =20 if (!new_configs.configs) return -ENOMEM; diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/ms= pro_block.c index 1cd061bb89d9..4a52830026c5 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c @@ -940,7 +940,7 @@ static int mspro_block_read_attributes(struct memstick_= dev *card) attr_count =3D attr->count; =20 msb->attr_group.attrs =3D kzalloc_objs(*msb->attr_group.attrs, - attr_count + 1, GFP_KERNEL); + attr_count + 1); if (!msb->attr_group.attrs) { rc =3D -ENOMEM; goto out_free_attr; diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsa= s.c index d25f3ec1e2aa..c362f09a8c55 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -2428,7 +2428,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsa= s_portinfo *port_info) =20 port_info->num_phys =3D buffer->NumPhys; port_info->phy_info =3D kzalloc_objs(struct mptsas_phyinfo, - port_info->num_phys, GFP_KERNEL); + port_info->num_phys); if (!port_info->phy_info) { error =3D -ENOMEM; goto out_free_consistent; @@ -2719,7 +2719,7 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mpts= as_portinfo *port_info, /* save config data */ port_info->num_phys =3D (buffer->NumPhys) ? buffer->NumPhys : 1; port_info->phy_info =3D kzalloc_objs(struct mptsas_phyinfo, - port_info->num_phys, GFP_KERNEL); + port_info->num_phys); if (!port_info->phy_info) { error =3D -ENOMEM; goto out_free_consistent; @@ -3448,7 +3448,7 @@ mptsas_expander_event_add(MPT_ADAPTER *ioc, port_info->num_phys =3D (expander_data->NumPhys) ? expander_data->NumPhys : 1; port_info->phy_info =3D 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 =3D 0; i < port_info->num_phys; i++) { diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cm= dset_0001.c index 7e0e7b4fded9..b73596a8e021 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -628,7 +628,7 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_i= nfo *mtd) =20 mtd->numeraseregions =3D cfi->cfiq->NumEraseRegions * cfi->numchips; mtd->eraseregions =3D kzalloc_objs(struct mtd_erase_region_info, - mtd->numeraseregions, GFP_KERNEL); + mtd->numeraseregions); if (!mtd->eraseregions) goto setup_err; =20 diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cm= dset_0002.c index 63294a99d8fc..a38aceb6612d 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -777,7 +777,7 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_inf= o *mtd) =20 mtd->numeraseregions =3D cfi->cfiq->NumEraseRegions * cfi->numchips; mtd->eraseregions =3D kmalloc_objs(struct mtd_erase_region_info, - mtd->numeraseregions, GFP_KERNEL); + mtd->numeraseregions); if (!mtd->eraseregions) goto setup_err; =20 diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cm= dset_0020.c index a0e7d8a960c5..6b5727eaae69 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -186,7 +186,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info = *map) =20 mtd->numeraseregions =3D cfi->cfiq->NumEraseRegions * cfi->numchips; mtd->eraseregions =3D kmalloc_objs(struct mtd_erase_region_info, - mtd->numeraseregions, GFP_KERNEL); + mtd->numeraseregions); if (!mtd->eraseregions) { kfree(cfi->cmdset_priv); kfree(mtd); diff --git a/drivers/mtd/nand/onenand/onenand_base.c b/drivers/mtd/nand/one= nand/onenand_base.c index e69f46ff2b11..d08aeac86f9f 100644 --- a/drivers/mtd/nand/onenand/onenand_base.c +++ b/drivers/mtd/nand/onenand/onenand_base.c @@ -3729,7 +3729,7 @@ static int onenand_probe(struct mtd_info *mtd) mtd->numeraseregions =3D this->dies << 1; mtd->eraseregions =3D kzalloc_objs(struct mtd_erase_region_info, - this->dies << 1, GFP_KERNEL); + this->dies << 1); if (!mtd->eraseregions) return -ENOMEM; } diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_b= ase.c index 770c26f9c6ce..38429363251c 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -5430,7 +5430,7 @@ static int of_get_nand_secure_regions(struct nand_chi= p *chip) =20 chip->nr_secure_regions =3D nr_elem / 2; chip->secure_regions =3D kzalloc_objs(*chip->secure_regions, - chip->nr_secure_regions, GFP_KERNEL); + chip->nr_secure_regions); if (!chip->secure_regions) return -ENOMEM; =20 diff --git a/drivers/mtd/parsers/sharpslpart.c b/drivers/mtd/parsers/sharps= lpart.c index ce1e255b707d..3833b887c667 100644 --- a/drivers/mtd/parsers/sharpslpart.c +++ b/drivers/mtd/parsers/sharpslpart.c @@ -363,7 +363,7 @@ static int sharpsl_parse_mtd_partitions(struct mtd_info= *master, } =20 sharpsl_nand_parts =3D kzalloc_objs(*sharpsl_nand_parts, - SHARPSL_NAND_PARTS, GFP_KERNEL); + SHARPSL_NAND_PARTS); if (!sharpsl_nand_parts) return -ENOMEM; =20 diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c index 906aca08cf5c..c79508b1c43e 100644 --- a/drivers/net/can/usb/ucan.c +++ b/drivers/net/can/usb/ucan.c @@ -331,7 +331,7 @@ static int ucan_alloc_context_array(struct ucan_priv *u= p) ucan_release_context_array(up); =20 up->context_array =3D 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"); diff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xx= x/devlink.c index f241e7df6eb5..0f84bffc8ef1 100644 --- a/drivers/net/dsa/mv88e6xxx/devlink.c +++ b/drivers/net/dsa/mv88e6xxx/devlink.c @@ -379,7 +379,7 @@ static int mv88e6xxx_region_atu_snapshot(struct devlink= *dl, int fid =3D -1, err =3D 0, count =3D 0; =20 table =3D kzalloc_objs(struct mv88e6xxx_devlink_atu_entry, - mv88e6xxx_num_databases(chip), GFP_KERNEL); + mv88e6xxx_num_databases(chip)); if (!table) return -ENOMEM; =20 @@ -440,7 +440,7 @@ static int mv88e6xxx_region_vtu_snapshot(struct devlink= *dl, int err; =20 table =3D kzalloc_objs(struct mv88e6xxx_devlink_vtu_entry, - mv88e6xxx_max_vid(chip) + 1, GFP_KERNEL); + mv88e6xxx_max_vid(chip) + 1); if (!table) return -ENOMEM; =20 @@ -522,7 +522,7 @@ static int mv88e6xxx_region_stu_snapshot(struct devlink= *dl, int err; =20 table =3D kzalloc_objs(struct mv88e6xxx_devlink_stu_entry, - mv88e6xxx_max_sid(chip) + 1, GFP_KERNEL); + mv88e6xxx_max_sid(chip) + 1); if (!table) return -ENOMEM; =20 diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c b/drivers/net/dsa/sja1105= /sja1105_vl.c index 7dd544fe26c6..0ae9cb5ea8d1 100644 --- a/drivers/net/dsa/sja1105/sja1105_vl.c +++ b/drivers/net/dsa/sja1105/sja1105_vl.c @@ -636,7 +636,7 @@ int sja1105_vl_gate(struct sja1105_private *priv, int p= ort, rule->vl.cycle_time =3D cycle_time; rule->vl.num_entries =3D num_entries; rule->vl.entries =3D kzalloc_objs(struct action_gate_entry, - num_entries, GFP_KERNEL); + num_entries); if (!rule->vl.entries) { rc =3D -ENOMEM; goto out; diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/etherne= t/amd/pds_core/core.c index af2f2c7f5de5..705cab7b0727 100644 --- a/drivers/net/ethernet/amd/pds_core/core.c +++ b/drivers/net/ethernet/amd/pds_core/core.c @@ -416,8 +416,7 @@ static int pdsc_viftypes_init(struct pdsc *pdsc) enum pds_core_vif_types vt; =20 pdsc->viftype_status =3D kzalloc_objs(*pdsc->viftype_status, - ARRAY_SIZE(pdsc_viftype_defaults), - GFP_KERNEL); + ARRAY_SIZE(pdsc_viftype_defaults)); if (!pdsc->viftype_status) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/= ethernet/broadcom/bnx2x/bnx2x_cmn.c index 8c3dd7331bfd..19e078479b0d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -4583,8 +4583,7 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, in= t index) index, cos); =20 txdata->tx_buf_ring =3D 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 =3D BNX2X_PCI_ALLOC(&txdata->tx_desc_mapping, @@ -4752,8 +4751,7 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp) for (i =3D 0; i < bp->fp_array_size; i++) { fp[i].tpa_info =3D 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; } diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/ne= t/ethernet/broadcom/bnx2x/bnx2x_sriov.c index b638f94094a9..b8af508f9c98 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -1273,7 +1273,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode= _param, =20 /* allocate the queue arrays for all VFs */ bp->vfdb->vfqs =3D kzalloc_objs(struct bnx2x_vf_queue, - BNX2X_MAX_NUM_VF_QUEUES, GFP_KERNEL); + BNX2X_MAX_NUM_VF_QUEUES); =20 if (!bp->vfdb->vfqs) { BNX2X_ERR("failed to allocate vf queue array\n"); diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethern= et/broadcom/bnxt/bnxt.c index c2f05a9abb88..e062d5d400da 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4624,7 +4624,7 @@ static int bnxt_init_ring_grps(struct bnxt *bp, bool = irq_re_init) =20 if (irq_re_init) { bp->grp_info =3D 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_r= e_init) } =20 bp->rx_ring =3D kzalloc_objs(struct bnxt_rx_ring_info, - bp->rx_nr_rings, GFP_KERNEL); + bp->rx_nr_rings); if (!bp->rx_ring) return -ENOMEM; =20 @@ -5531,7 +5531,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool irq_r= e_init) } =20 bp->tx_ring =3D kzalloc_objs(struct bnxt_tx_ring_info, - bp->tx_nr_rings, GFP_KERNEL); + bp->tx_nr_rings); if (!bp->tx_ring) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/et= hernet/broadcom/bnxt/bnxt_ptp.c index 0135c53d4b47..53f336db4fcc 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c @@ -984,7 +984,7 @@ static int bnxt_ptp_pps_init(struct bnxt *bp) pps_info->num_pins =3D resp->num_pins; ptp_info->n_pins =3D pps_info->num_pins; ptp_info->pin_config =3D 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; diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ether= net/broadcom/sb1250-mac.c index a8dca32ba877..c839dd9804d3 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c @@ -623,8 +623,7 @@ static void sbdma_initctx(struct sbmacdma *d, struct sb= mac_softc *s, int chan, d->sbdma_maxdescr =3D maxdescr; =20 d->sbdma_dscrtable_unaligned =3D kzalloc_objs(*d->sbdma_dscrtable, - d->sbdma_maxdescr + 1, - GFP_KERNEL); + d->sbdma_maxdescr + 1); =20 /* * The descriptor table must be aligned to at least 16 bytes or the diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/bro= adcom/tg3.c index 746c95dc11cd..2328fce33644 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -8730,7 +8730,7 @@ static int tg3_mem_tx_acquire(struct tg3 *tp) =20 for (i =3D 0; i < tp->txq_cnt; i++, tnapi++) { tnapi->tx_buffers =3D kzalloc_objs(struct tg3_tx_ring_info, - TG3_TX_RING_SIZE, GFP_KERNEL); + TG3_TX_RING_SIZE); if (!tnapi->tx_buffers) goto err_out; =20 diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet= /brocade/bna/bnad.c index 5743c9a98005..8e19add764db 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c @@ -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 =3D BNA_INTR_T_MSIX; intr_info->idl =3D kzalloc_objs(struct bna_intr_descr, - intr_info->num, GFP_KERNEL); + intr_info->num); if (!intr_info->idl) return -ENOMEM; =20 @@ -1483,7 +1483,7 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr= _source src, intr_info->intr_type =3D BNA_INTR_T_INTX; intr_info->num =3D 1; intr_info->idl =3D kzalloc_objs(struct bna_intr_descr, - intr_info->num, GFP_KERNEL); + intr_info->num); if (!intr_info->idl) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/= ethernet/cavium/liquidio/lio_core.c index 6062497827ac..93b06d599eed 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_core.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c @@ -1050,7 +1050,7 @@ int octeon_setup_interrupt(struct octeon_device *oct,= u32 num_ioqs) [IRQ_NAME_OFF(MAX_IOQ_INTERRUPTS_PER_PF)]; =20 oct->msix_entries =3D 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); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/= ethernet/chelsio/cxgb4/cxgb4_main.c index 0055ca7236e1..10694d5924ee 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -5028,7 +5028,7 @@ static int adap_init0(struct adapter *adap, int vpd_s= kip) } =20 adap->sge.ingr_map =3D kzalloc_objs(*adap->sge.ingr_map, - adap->sge.ingr_sz, GFP_KERNEL); + adap->sge.ingr_sz); if (!adap->sge.ingr_map) { ret =3D -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 =3D 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]); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c b/drivers= /net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c index b826eb2827aa..0f67d94e7f3b 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c @@ -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 =3D kzalloc_objs(struct sge_ofld_rxq, - adap->sge.eoqsets, GFP_KERNEL); + adap->sge.eoqsets); if (!adap->sge.eohw_rxq) return -ENOMEM; =20 adap->sge.eohw_txq =3D 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; diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethe= rnet/cisco/enic/enic_main.c index bfc76b5f5350..e839081f9ee4 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -2469,7 +2469,7 @@ static int enic_alloc_enic_resources(struct enic *eni= c) goto free_queues; =20 enic->napi =3D 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; =20 diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ether= net/engleder/tsnep_main.c index eddfde68d503..5db04e209dc6 100644 --- a/drivers/net/ethernet/engleder/tsnep_main.c +++ b/drivers/net/ethernet/engleder/tsnep_main.c @@ -2103,11 +2103,11 @@ int tsnep_enable_xsk(struct tsnep_queue *queue, str= uct xsk_buff_pool *pool) return -EOPNOTSUPP; =20 queue->rx->page_buffer =3D 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 =3D 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 =3D NULL; diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c b/dri= vers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c index b65bc54ffc03..8775c931106b 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c @@ -243,8 +243,7 @@ int dpaa2_eth_dl_traps_register(struct dpaa2_eth_priv *= priv) priv->trap_data =3D dpaa2_eth_trap_data; =20 dpaa2_eth_trap_data->trap_items_arr =3D kzalloc_objs(struct dpaa2_eth_tra= p_item, - ARRAY_SIZE(dpaa2_eth_traps_arr), - GFP_KERNEL); + ARRAY_SIZE(dpaa2_eth_traps_arr)); if (!dpaa2_eth_trap_data->trap_items_arr) { err =3D -ENOMEM; goto trap_data_free; diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/= net/ethernet/freescale/dpaa2/dpaa2-switch.c index 91adbb5cba92..def2dd231d1f 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c @@ -3421,7 +3421,7 @@ static int dpaa2_switch_probe(struct fsl_mc_device *s= w_dev) } =20 ethsw->filter_blocks =3D kzalloc_objs(*ethsw->filter_blocks, - ethsw->sw_attr.num_ifs, GFP_KERNEL); + ethsw->sw_attr.num_ifs); if (!ethsw->filter_blocks) { err =3D -ENOMEM; goto err_free_fdbs; diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/= ethernet/freescale/enetc/enetc_pf.c index 43b0af59d044..a12fd54a475f 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -959,7 +959,7 @@ static int enetc_pf_probe(struct pci_dev *pdev, pf->total_vfs =3D pci_sriov_get_totalvfs(pdev); if (pf->total_vfs) { pf->vf_state =3D kzalloc_objs(struct enetc_vf_state, - pf->total_vfs, GFP_KERNEL); + pf->total_vfs); if (!pf->vf_state) goto err_alloc_vf_state; } diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/etherne= t/freescale/gianfar.c index c0a495e2a6bd..3271de5844f8 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1374,7 +1374,7 @@ static int gfar_alloc_skb_resources(struct net_device= *ndev) tx_queue =3D priv->tx_queue[i]; tx_queue->tx_skbuff =3D 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; =20 @@ -1385,8 +1385,7 @@ static int gfar_alloc_skb_resources(struct net_device= *ndev) for (i =3D 0; i < priv->num_rx_queues; i++) { rx_queue =3D priv->rx_queue[i]; rx_queue->rx_buff =3D 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; } diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethern= et/freescale/ucc_geth.c index 684094118117..3607681650ce 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -2072,7 +2072,7 @@ static int ucc_geth_alloc_tx(struct ucc_geth_private = *ugeth) /* Setup the skbuff rings */ ugeth->tx_skbuff[j] =3D kzalloc_objs(struct sk_buff *, - ugeth->ug_info->bdRingLenTx[j], GFP_KERNEL); + ugeth->ug_info->bdRingLenTx[j]); =20 if (ugeth->tx_skbuff[j] =3D=3D 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] =3D kzalloc_objs(struct sk_buff *, - ugeth->ug_info->bdRingLenRx[j], GFP_KERNEL); + ugeth->ug_info->bdRingLenRx[j]); =20 if (ugeth->rx_skbuff[j] =3D=3D NULL) { if (netif_msg_ifup(ugeth)) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ether= net/google/gve/gve_main.c index 9d4ef4d42be3..9eb4b3614c4f 100644 --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -152,7 +152,7 @@ static int gve_alloc_flow_rule_caches(struct gve_priv *= priv) =20 flow_rules_cache->rules_cache =3D 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 *pri= v) int err; =20 priv->msix_vectors =3D kvzalloc_objs(*priv->msix_vectors, - num_vecs_requested, GFP_KERNEL); + num_vecs_requested); if (!priv->msix_vectors) return -ENOMEM; for (i =3D 0; i < num_vecs_requested; i++) diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/eth= ernet/google/gve/gve_tx_dqo.c index 529ab21a3b56..9031dd619f68 100644 --- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c +++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c @@ -267,7 +267,7 @@ static int gve_tx_qpl_buf_init(struct gve_tx_ring *tx) int i; =20 tx->dqo.tx_qpl_buf_next =3D 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; =20 @@ -337,8 +337,7 @@ static int gve_tx_alloc_ring_dqo(struct gve_priv *priv, =20 tx->dqo.num_pending_packets =3D min_t(int, num_pending_packets, S16_MAX); tx->dqo.pending_packets =3D 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; =20 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/n= et/ethernet/hisilicon/hns3/hns3_ethtool.c index dbc6d5c6644c..9cb7ce9fd311 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1100,7 +1100,7 @@ static struct hns3_enet_ring *hns3_backup_ringparam(s= truct hns3_nic_priv *priv) int i; =20 tmp_rings =3D kzalloc_objs(struct hns3_enet_ring, - handle->kinfo.num_tqps * 2, GFP_KERNEL); + handle->kinfo.num_tqps * 2); if (!tmp_rings) return NULL; =20 diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c b/drivers/net= /ethernet/huawei/hinic3/hinic3_main.c index 3c9efe037793..6039fcf3c1dd 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c @@ -58,7 +58,7 @@ static int hinic3_init_intr_coalesce(struct net_device *n= etdev) struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev); =20 nic_dev->intr_coalesce =3D kzalloc_objs(*nic_dev->intr_coalesce, - nic_dev->max_qps, GFP_KERNEL); + nic_dev->max_qps); =20 if (!nic_dev->intr_coalesce) return -ENOMEM; diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c b/drive= rs/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c index 8a1ad3ed42bd..cabb8523f246 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c @@ -100,7 +100,7 @@ static int hinic3_setup_num_qps(struct net_device *netd= ev) nic_dev->num_qp_irq =3D 0; =20 nic_dev->qps_msix_entries =3D kzalloc_objs(struct msix_entry, - nic_dev->max_qps, GFP_KERNEL); + nic_dev->max_qps); if (!nic_dev->qps_msix_entries) return -ENOMEM; =20 @@ -127,12 +127,12 @@ static int hinic3_alloc_txrxq_resources(struct net_de= vice *netdev, int err; =20 q_params->txqs_res =3D kzalloc_objs(*q_params->txqs_res, - q_params->num_qps, GFP_KERNEL); + q_params->num_qps); if (!q_params->txqs_res) return -ENOMEM; =20 q_params->rxqs_res =3D kzalloc_objs(*q_params->rxqs_res, - q_params->num_qps, GFP_KERNEL); + q_params->num_qps); if (!q_params->rxqs_res) { err =3D -ENOMEM; goto err_free_txqs_res_arr; diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/e= thernet/huawei/hinic3/hinic3_tx.c index a25fd8799a2f..9306bf0020ca 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c @@ -686,8 +686,7 @@ int hinic3_alloc_txqs_res(struct net_device *netdev, u1= 6 num_sq, goto err_free_tqres; =20 tqres->bds =3D 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; diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/= ibmvnic.c index 37d8523ac05b..5a510eed335e 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -933,13 +933,13 @@ static int init_stats_buffers(struct ibmvnic_adapter = *adapter) { adapter->tx_stats_buffers =3D kzalloc_objs(struct ibmvnic_tx_queue_stats, - IBMVNIC_MAX_QUEUES, GFP_KERNEL); + IBMVNIC_MAX_QUEUES); if (!adapter->tx_stats_buffers) return -ENOMEM; =20 adapter->rx_stats_buffers =3D kzalloc_objs(struct ibmvnic_rx_queue_stats, - IBMVNIC_MAX_QUEUES, GFP_KERNEL); + IBMVNIC_MAX_QUEUES); if (!adapter->rx_stats_buffers) return -ENOMEM; =20 @@ -1124,7 +1124,7 @@ static int init_rx_pools(struct net_device *netdev) } =20 rx_pool->rx_buff =3D 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 =3D -ENOMEM; @@ -4476,7 +4476,7 @@ static int init_sub_crqs(struct ibmvnic_adapter *adap= ter) } =20 adapter->tx_scrq =3D kzalloc_objs(*adapter->tx_scrq, - adapter->req_tx_queues, GFP_KERNEL); + adapter->req_tx_queues); if (!adapter->tx_scrq) goto tx_failed; =20 @@ -4487,7 +4487,7 @@ static int init_sub_crqs(struct ibmvnic_adapter *adap= ter) } =20 adapter->rx_scrq =3D kzalloc_objs(*adapter->rx_scrq, - adapter->req_rx_queues, GFP_KERNEL); + adapter->req_rx_queues); if (!adapter->rx_scrq) goto rx_failed; =20 diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/et= hernet/intel/e1000/e1000_main.c index b0ecd3413ffb..3d7648a119e5 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -1323,12 +1323,12 @@ static int e1000_sw_init(struct e1000_adapter *adap= ter) static int e1000_alloc_queues(struct e1000_adapter *adapter) { adapter->tx_ring =3D kzalloc_objs(struct e1000_tx_ring, - adapter->num_tx_queues, GFP_KERNEL); + adapter->num_tx_queues); if (!adapter->tx_ring) return -ENOMEM; =20 adapter->rx_ring =3D 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; diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ether= net/intel/e1000e/netdev.c index edd503b79f98..fd4b117ed20f 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -2051,8 +2051,7 @@ void e1000e_set_interrupt_capability(struct e1000_ada= pter *adapter) if (adapter->flags & FLAG_HAS_MSIX) { adapter->num_vectors =3D 3; /* RxQ0, TxQ0 and other */ adapter->msix_entries =3D kzalloc_objs(struct msix_entry, - adapter->num_vectors, - GFP_KERNEL); + adapter->num_vectors); if (adapter->msix_entries) { struct e1000_adapter *a =3D adapter; =20 @@ -2370,8 +2369,7 @@ int e1000e_setup_rx_resources(struct e1000_ring *rx_r= ing) for (i =3D 0; i < rx_ring->count; i++) { buffer_info =3D &rx_ring->buffer_info[i]; buffer_info->ps_pages =3D kzalloc_objs(struct e1000_ps_page, - PS_PAGE_BUFFERS, - GFP_KERNEL); + PS_PAGE_BUFFERS); if (!buffer_info->ps_pages) goto err_pages; } diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/et= hernet/intel/i40e/i40e_client.c index 906b8c01f8bc..84a97ca8a6d8 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_client.c +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c @@ -567,7 +567,7 @@ static int i40e_client_setup_qvlist(struct i40e_info *l= dev, u32 v_idx, i, reg_idx, reg; =20 ldev->qvlist_info =3D 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 =3D qvlist_info->num_vectors; diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/e= thernet/intel/i40e/i40e_ethtool.c index 21c666dbb129..8c27f7ba4adc 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -2159,7 +2159,7 @@ static int i40e_set_ringparam(struct net_device *netd= ev, "Changing Rx descriptor count from %d to %d\n", vsi->rx_rings[0]->count, new_rx_count); rx_rings =3D kzalloc_objs(struct i40e_ring, - vsi->alloc_queue_pairs, GFP_KERNEL); + vsi->alloc_queue_pairs); if (!rx_rings) { err =3D -ENOMEM; goto free_tx; diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ether= net/intel/i40e/i40e_ptp.c index e3517490510f..404a716db8da 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c @@ -1345,7 +1345,7 @@ static int i40e_init_pin_config(struct i40e_pf *pf) pf->ptp_caps.n_per_out =3D 2; =20 pf->ptp_caps.pin_config =3D 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; =20 diff --git a/drivers/net/ethernet/intel/ice/devlink/port.c b/drivers/net/et= hernet/intel/ice/devlink/port.c index 0a0bd9019cfb..2a2e56777f9f 100644 --- a/drivers/net/ethernet/intel/ice/devlink/port.c +++ b/drivers/net/ethernet/intel/ice/devlink/port.c @@ -59,8 +59,7 @@ static void ice_devlink_port_options_print(struct ice_pf = *pf) int status; =20 options =3D 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; =20 diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/etherne= t/intel/ice/ice_xsk.c index e01eae07b6ed..c673094663a3 100644 --- a/drivers/net/ethernet/intel/ice/ice_xsk.c +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c @@ -175,7 +175,7 @@ ice_realloc_rx_xdp_bufs(struct ice_rx_ring *rx_ring, bo= ol pool_present) { if (pool_present) { rx_ring->xdp_buf =3D kzalloc_objs(*rx_ring->xdp_buf, - rx_ring->count, GFP_KERNEL); + rx_ring->count); if (!rx_ring->xdp_buf) return -ENOMEM; } else { diff --git a/drivers/net/ethernet/intel/idpf/idpf_idc.c b/drivers/net/ether= net/intel/idpf/idpf_idc.c index bb2367ab3279..bd4785fb8d3e 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_idc.c +++ b/drivers/net/ethernet/intel/idpf/idpf_idc.c @@ -432,7 +432,7 @@ int idpf_idc_init_aux_core_dev(struct idpf_adapter *ada= pter, =20 privd->mapped_mem_regions =3D 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 =3D -ENOMEM; goto err_plug_aux_dev; diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ether= net/intel/idpf/idpf_lib.c index 04fc8d309b04..de3df705a7e6 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_lib.c +++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c @@ -360,8 +360,7 @@ int idpf_intr_req(struct idpf_adapter *adapter) } =20 adapter->rdma_msix_entries =3D kzalloc_objs(struct msix_entry, - num_rdma_vecs, - GFP_KERNEL); + num_rdma_vecs); if (!adapter->rdma_msix_entries) { err =3D -ENOMEM; goto free_irq; diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethe= rnet/intel/idpf/idpf_txrx.c index b3c0ae2ea6a3..05a162094d10 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c @@ -1204,8 +1204,7 @@ static int idpf_qp_enable(const struct idpf_vport *vp= ort, goto config; =20 q_vector->xsksq =3D 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; =20 @@ -1764,8 +1763,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vp= ort, continue; =20 tx_qgrp->complq =3D kzalloc_objs(*tx_qgrp->complq, - IDPF_COMPLQ_PER_GROUP, - GFP_KERNEL); + IDPF_COMPLQ_PER_GROUP); if (!tx_qgrp->complq) goto err_alloc; =20 @@ -1836,8 +1834,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vp= ort, } =20 rx_qgrp->splitq.bufq_sets =3D 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 =3D -ENOMEM; goto err_alloc; @@ -1873,8 +1870,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vp= ort, idpf_queue_set(GEN_CHK, refillq); idpf_queue_set(RFL_GEN_CHK, refillq); refillq->ring =3D kzalloc_objs(*refillq->ring, - refillq->desc_count, - GFP_KERNEL); + refillq->desc_count); if (!refillq->ring) { err =3D -ENOMEM; goto err_alloc; @@ -4560,7 +4556,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport, user_config =3D &vport->adapter->vport_config[idx]->user_config; =20 rsrc->q_vectors =3D kzalloc_objs(struct idpf_q_vector, - rsrc->num_q_vectors, GFP_KERNEL); + rsrc->num_q_vectors); if (!rsrc->q_vectors) return -ENOMEM; =20 @@ -4603,7 +4599,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport, goto error; =20 q_vector->complq =3D kzalloc_objs(*q_vector->complq, - complqs_per_vector, GFP_KERNEL); + complqs_per_vector); if (!q_vector->complq) goto error; =20 @@ -4611,7 +4607,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport, continue; =20 q_vector->xsksq =3D kzalloc_objs(*q_vector->xsksq, - rxqs_per_vector, GFP_KERNEL); + rxqs_per_vector); if (!q_vector->xsksq) goto error; } diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/= ethernet/intel/idpf/idpf_virtchnl.c index 412f71306406..d5a877e1fef8 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c @@ -3433,12 +3433,12 @@ static int idpf_vport_params_buf_alloc(struct idpf_= adapter *adapter) u16 num_max_vports =3D idpf_get_max_vports(adapter); =20 adapter->vport_params_reqd =3D kzalloc_objs(*adapter->vport_params_reqd, - num_max_vports, GFP_KERNEL); + num_max_vports); if (!adapter->vport_params_reqd) return -ENOMEM; =20 adapter->vport_params_recvd =3D kzalloc_objs(*adapter->vport_params_recvd, - num_max_vports, GFP_KERNEL); + num_max_vports); if (!adapter->vport_params_recvd) goto err_mem; =20 @@ -3450,7 +3450,7 @@ static int idpf_vport_params_buf_alloc(struct idpf_ad= apter *adapter) return 0; =20 adapter->vport_config =3D kzalloc_objs(*adapter->vport_config, - num_max_vports, GFP_KERNEL); + num_max_vports); if (!adapter->vport_config) goto err_mem; =20 @@ -3560,7 +3560,7 @@ int idpf_vc_core_init(struct idpf_adapter *adapter) =20 if (!adapter->netdevs) { adapter->netdevs =3D kzalloc_objs(struct net_device *, - num_max_vports, GFP_KERNEL); + num_max_vports); if (!adapter->netdevs) { err =3D -ENOMEM; goto err_netdev_alloc; diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethern= et/intel/igb/igb_main.c index 223a10cae4a9..ee99fd8fd513 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -3776,8 +3776,7 @@ static int igb_enable_sriov(struct pci_dev *pdev, int= num_vfs, bool reinit) adapter->vfs_allocated_count =3D num_vfs; =20 adapter->vf_data =3D kzalloc_objs(struct vf_data_storage, - adapter->vfs_allocated_count, - GFP_KERNEL); + adapter->vfs_allocated_count); =20 /* 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); =20 adapter->vf_mac_list =3D kzalloc_objs(struct vf_mac_filter, - num_vf_mac_filters, GFP_KERNEL); + num_vf_mac_filters); =20 mac_list =3D 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 |=3D IGB_FLAG_HAS_MSIX; =20 adapter->mac_table =3D kzalloc_objs(struct igb_mac_addr, - hw->mac.rar_entry_count, GFP_KERNEL); + hw->mac.rar_entry_count); if (!adapter->mac_table) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/et= hernet/intel/ixgbe/ixgbe_main.c index 1e3ad275b88c..e4101c59074d 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6904,7 +6904,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapte= r, adapter->jump_tables[i] =3D NULL; =20 adapter->mac_table =3D kzalloc_objs(struct ixgbe_mac_addr, - hw->mac.num_rar_entries, GFP_KERNEL); + hw->mac.num_rar_entries); if (!adapter->mac_table) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/intel/libie/fwlog.c b/drivers/net/etherne= t/intel/libie/fwlog.c index fb61f98b8b30..79020d990859 100644 --- a/drivers/net/ethernet/intel/libie/fwlog.c +++ b/drivers/net/ethernet/intel/libie/fwlog.c @@ -1013,8 +1013,7 @@ int libie_fwlog_init(struct libie_fwlog *fwlog, struc= t libie_fwlog_api *api) return status; =20 fwlog->ring.rings =3D 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; diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers= /net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 29e7786c4434..ee623476e5ff 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1950,7 +1950,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf) goto err_free_mem; =20 qset->sq =3D 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; =20 diff --git a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c b/dri= vers/net/ethernet/marvell/prestera/prestera_devlink.c index 5fd78abccf25..33dea101bc67 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_devlink.c @@ -456,7 +456,7 @@ int prestera_devlink_traps_register(struct prestera_swi= tch *sw) return -ENOMEM; =20 trap_data->trap_items_arr =3D kzalloc_objs(struct prestera_trap_item, - traps_count, GFP_KERNEL); + traps_count); if (!trap_data->trap_items_arr) { err =3D -ENOMEM; goto err_trap_items_alloc; diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/etherne= t/mellanox/mlx4/cmd.c index 3aa5765139d8..de0193d82ec1 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c @@ -2374,7 +2374,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev) =20 priv->mfunc.master.vf_admin =3D 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; =20 @@ -2620,7 +2620,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) int err =3D 0; =20 priv->cmd.context =3D kmalloc_objs(struct mlx4_cmd_context, - priv->cmd.max_cmds, GFP_KERNEL); + priv->cmd.max_cmds); if (!priv->cmd.context) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/e= thernet/mellanox/mlx4/en_netdev.c index b9b8142d99a3..071564c54522 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -2241,7 +2241,7 @@ static int mlx4_en_copy_priv(struct mlx4_en_priv *dst, continue; =20 dst->tx_ring[t] =3D kzalloc_objs(struct mlx4_en_tx_ring *, - MAX_TX_RINGS, GFP_KERNEL); + MAX_TX_RINGS); if (!dst->tx_ring[t]) goto err_free_tx; =20 @@ -3215,7 +3215,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int= port, continue; =20 priv->tx_ring[t] =3D kzalloc_objs(struct mlx4_en_tx_ring *, - MAX_TX_RINGS, GFP_KERNEL); + MAX_TX_RINGS); if (!priv->tx_ring[t]) { err =3D -ENOMEM; goto out; diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet= /mellanox/mlx4/eq.c index 2760db75b617..f1c3da04de7f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -1158,8 +1158,7 @@ int mlx4_alloc_eq_table(struct mlx4_dev *dev) struct mlx4_priv *priv =3D mlx4_priv(dev); =20 priv->eq_table.eq =3D 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; =20 @@ -1178,7 +1177,7 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) int i; =20 priv->eq_table.uar_map =3D 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 =3D -ENOMEM; goto err_out_free; diff --git a/drivers/net/ethernet/mellanox/mlx4/intf.c b/drivers/net/ethern= et/mellanox/mlx4/intf.c index 2964334582ea..82e467c45d23 100644 --- a/drivers/net/ethernet/mellanox/mlx4/intf.c +++ b/drivers/net/ethernet/mellanox/mlx4/intf.c @@ -79,7 +79,7 @@ int mlx4_adev_init(struct mlx4_dev *dev) return priv->adev_idx; =20 priv->adev =3D 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; diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet= /mellanox/mlx4/qp.c index 436ed587b8b9..807a2f091aa6 100644 --- a/drivers/net/ethernet/mellanox/mlx4/qp.c +++ b/drivers/net/ethernet/mellanox/mlx4/qp.c @@ -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 =3D kzalloc_objs(*dev->caps.spec_qps, - dev->caps.num_ports, - GFP_KERNEL); + dev->caps.num_ports); if (!dev->caps.spec_qps) { err =3D -ENOMEM; goto err_mem; diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/driver= s/net/ethernet/mellanox/mlx4/resource_tracker.c index cdd9023e860a..83b88bb96f52 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -526,13 +526,11 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev) &priv->mfunc.master.res_tracker.res_alloc[i]; res_alloc->quota =3D kmalloc_objs(int, dev->persist->num_vfs + 1); res_alloc->guaranteed =3D kmalloc_objs(int, - dev->persist->num_vfs + 1, - GFP_KERNEL); + dev->persist->num_vfs + 1); if (i =3D=3D RES_MAC || i =3D=3D RES_VLAN) res_alloc->allocated =3D 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 =3D kzalloc_objs(int, dev->persist->num_vfs + 1); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/et= hernet/mellanox/mlx5/core/dev.c index 4bfbf52a46b4..df2e3ad01819 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c @@ -278,7 +278,7 @@ int mlx5_adev_init(struct mlx5_core_dev *dev) struct mlx5_priv *priv =3D &dev->priv; =20 priv->adev =3D kzalloc_objs(struct mlx5_adev *, - ARRAY_SIZE(mlx5_adev_devices), GFP_KERNEL); + ARRAY_SIZE(mlx5_adev_devices)); if (!priv->adev) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c b/drivers/net= /ethernet/mellanox/mlx5/core/en/qos.c index 1b2742174082..ac4979087e0d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c @@ -88,8 +88,7 @@ int mlx5e_open_qos_sq(struct mlx5e_priv *priv, struct mlx= 5e_channels *chs, struct mlx5e_sq_stats **stats_list; =20 stats_list =3D 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; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/esw/qos.c index c490a0287bff..26178d0bac92 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c @@ -917,7 +917,7 @@ esw_qos_create_vport_tc_sched_elements(struct mlx5_vpor= t *vport, u32 rate_limit_elem_ix; =20 vport->qos.sched_nodes =3D 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."); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/fs_core.c index d0103b232c0c..2c3544880a30 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -3375,7 +3375,7 @@ static int init_rdma_transport_rx_root_ns(struct mlx5= _flow_steering *steering) =20 steering->rdma_transport_rx_root_ns =3D kzalloc_objs(*steering->rdma_transport_rx_root_ns, - total_vports, GFP_KERNEL); + total_vports); if (!steering->rdma_transport_rx_root_ns) return -ENOMEM; =20 @@ -3407,7 +3407,7 @@ static int init_rdma_transport_tx_root_ns(struct mlx5= _flow_steering *steering) =20 steering->rdma_transport_tx_root_ns =3D kzalloc_objs(*steering->rdma_transport_tx_root_ns, - total_vports, GFP_KERNEL); + total_vports); if (!steering->rdma_transport_tx_root_ns) return -ENOMEM; =20 @@ -3516,7 +3516,7 @@ static int create_fdb_fast_path(struct mlx5_flow_stee= ring *steering) int err; =20 steering->fdb_sub_ns =3D kzalloc_objs(*steering->fdb_sub_ns, - FDB_NUM_CHAINS, GFP_KERNEL); + FDB_NUM_CHAINS); if (!steering->fdb_sub_ns) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/hwmon.c b/drivers/net/= ethernet/mellanox/mlx5/core/hwmon.c index 189d87bd6de4..afcdebac9c4f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/hwmon.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/hwmon.c @@ -314,7 +314,7 @@ static struct mlx5_hwmon *mlx5_hwmon_alloc(struct mlx5_= core_dev *mdev) hwmon->module_scount =3D mon_cap ? 1 : 0; sensors_count =3D hwmon->asic_platform_scount + hwmon->module_scount; hwmon->temp_channel_desc =3D kzalloc_objs(*hwmon->temp_channel_desc, - sensors_count, GFP_KERNEL); + sensors_count); if (!hwmon->temp_channel_desc) { err =3D -ENOMEM; goto err_free_hwmon; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/= net/ethernet/mellanox/mlx5/core/lib/clock.c index 6ccffd6bc1f3..bd4e042077af 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c @@ -1083,7 +1083,7 @@ static void mlx5_init_pin_config(struct mlx5_core_dev= *mdev) =20 clock->ptp_info.pin_config =3D 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 =3D mlx5_ptp_enable; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c b/d= rivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c index dea21c11ade7..6dcd9c2a78aa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c @@ -254,8 +254,7 @@ int mlx5hws_bwc_matcher_create_simple(struct mlx5hws_bw= c_matcher *bwc_matcher, =20 bwc_matcher->size_of_at_array =3D MLX5HWS_BWC_MATCHER_ATTACH_AT_NUM; bwc_matcher->at =3D 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; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c b/= drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c index 367fb62458a5..aed009aec4fe 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c @@ -1034,7 +1034,7 @@ static int mlx5hws_send_queue_open(struct mlx5hws_con= text *ctx, queue->used_entries =3D 0; =20 queue->completed.entries =3D kzalloc_objs(queue->completed.entries[0], - queue->num_entries, GFP_KERNEL); + queue->num_entries); if (!queue->completed.entries) return -ENOMEM; =20 @@ -1094,13 +1094,13 @@ static int hws_bwc_send_queues_init(struct mlx5hws_= context *ctx) ctx->queues +=3D bwc_queues; =20 ctx->bwc_send_queue_locks =3D kzalloc_objs(*ctx->bwc_send_queue_locks, - bwc_queues, GFP_KERNEL); + bwc_queues); =20 if (!ctx->bwc_send_queue_locks) return -ENOMEM; =20 ctx->bwc_lock_class_keys =3D kzalloc_objs(*ctx->bwc_lock_class_keys, - bwc_queues, GFP_KERNEL); + bwc_queues); if (!ctx->bwc_lock_class_keys) goto err_lock_class_keys; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_po= ol.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c index d7c2074e9a89..7a0a15822392 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c @@ -548,7 +548,7 @@ struct mlx5dr_icm_pool *mlx5dr_icm_pool_create(struct m= lx5dr_domain *dmn, pool->th =3D max_hot_size; =20 pool->hot_chunks_arr =3D kvzalloc_objs(struct mlx5dr_icm_hot_chunk, - num_of_chunks, GFP_KERNEL); + num_of_chunks); if (!pool->hot_chunks_arr) goto free_pool; =20 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c b= /drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c index 2782e955d3ac..d15dcb30368f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c @@ -282,7 +282,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root= _namespace *ns, } =20 fs_dr_actions =3D kzalloc_objs(*fs_dr_actions, - MLX5_FLOW_CONTEXT_ACTION_MAX, GFP_KERNEL); + MLX5_FLOW_CONTEXT_ACTION_MAX); if (!fs_dr_actions) { err =3D -ENOMEM; goto free_actions_alloc; diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ether= net/mellanox/mlxsw/core.c index 93540e4f3a4b..d76246301f67 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -151,7 +151,7 @@ static int mlxsw_ports_init(struct mlxsw_core *mlxsw_co= re, bool reload) mlxsw_core->max_ports =3D MLXSW_PORT_MAX_PORTS_DEFAULT + 1; =20 mlxsw_core->ports =3D kzalloc_objs(struct mlxsw_core_port, - mlxsw_core->max_ports, GFP_KERNEL); + mlxsw_core->max_ports); if (!mlxsw_core->ports) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_env.c b/drivers/net/e= thernet/mellanox/mlxsw/core_env.c index a937ac667ddd..ffef5310f8b0 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_env.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_env.c @@ -1245,8 +1245,7 @@ static int mlxsw_env_line_cards_alloc(struct mlxsw_en= v *env) for (i =3D 0; i < env->num_of_slots; i++) { env->line_cards[i] =3D 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; =20 diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c b/drivers= /net/ethernet/mellanox/mlxsw/core_linecards.c index f0659616ad9b..f801f04cafb7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_linecards.c @@ -1470,7 +1470,7 @@ static int mlxsw_linecard_types_init(struct mlxsw_cor= e *mlxsw_core, } =20 types_info->ini_files =3D kmalloc_objs(struct mlxsw_linecard_ini_file *, - types_info->count, GFP_KERNEL); + types_info->count); if (!types_info->ini_files) { err =3D -ENOMEM; goto err_ini_files_alloc; diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/n= et/ethernet/mellanox/mlxsw/core_thermal.c index 3900a73cfffb..c43382cd1f72 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -432,7 +432,7 @@ mlxsw_thermal_modules_init(struct device *dev, struct m= lxsw_core *core, return 0; =20 area->tz_module_arr =3D kzalloc_objs(*area->tz_module_arr, - area->tz_module_num, GFP_KERNEL); + area->tz_module_num); if (!area->tz_module_arr) return -ENOMEM; =20 @@ -522,7 +522,7 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct= mlxsw_core *core, =20 area->tz_gearbox_num =3D gbox_num; area->tz_gearbox_arr =3D kzalloc_objs(*area->tz_gearbox_arr, - area->tz_gearbox_num, GFP_KERNEL); + area->tz_gearbox_num); if (!area->tz_gearbox_arr) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/et= hernet/mellanox/mlxsw/minimal.c index 6cdbac750cc6..512933dbab9a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -403,7 +403,7 @@ static int mlxsw_m_linecards_init(struct mlxsw_m *mlxsw= _m) return -ENOMEM; =20 mlxsw_m->line_cards =3D kzalloc_objs(*mlxsw_m->line_cards, - mlxsw_m->num_of_slots, GFP_KERNEL); + mlxsw_m->num_of_slots); if (!mlxsw_m->line_cards) { err =3D -ENOMEM; goto err_kcalloc; @@ -412,7 +412,7 @@ static int mlxsw_m_linecards_init(struct mlxsw_m *mlxsw= _m) for (i =3D 0; i < mlxsw_m->num_of_slots; i++) { mlxsw_m->line_cards[i] =3D 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 =3D -ENOMEM; goto err_kmalloc_array; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/e= thernet/mellanox/mlxsw/spectrum.c index 560f5ee531d2..3a65420fa1ad 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -2020,7 +2020,7 @@ static int mlxsw_sp_port_module_info_init(struct mlxs= w_sp *mlxsw_sp) int err; =20 mlxsw_sp->port_mapping =3D kzalloc_objs(struct mlxsw_sp_port_mapping, - max_ports, GFP_KERNEL); + max_ports); if (!mlxsw_sp->port_mapping) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum1_mr_tcam.c b/driv= ers/net/ethernet/mellanox/mlxsw/spectrum1_mr_tcam.c index 814b704de294..ffde7c4fe140 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum1_mr_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum1_mr_tcam.c @@ -260,7 +260,7 @@ mlxsw_sp1_mr_tcam_region_init(struct mlxsw_sp *mlxsw_sp, mr_tcam_region->parman =3D parman; =20 parman_prios =3D kmalloc_objs(*parman_prios, - MLXSW_SP_MR_ROUTE_PRIO_MAX + 1, GFP_KERNEL); + MLXSW_SP_MR_ROUTE_PRIO_MAX + 1); if (!parman_prios) { err =3D -ENOMEM; goto err_parman_prios_alloc; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c b/drivers= /net/ethernet/mellanox/mlxsw/spectrum_qdisc.c index a4df29aab39d..73519301b744 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c @@ -366,8 +366,7 @@ static int mlxsw_sp_qdisc_create(struct mlxsw_sp_port *= mlxsw_sp_port, =20 if (ops->num_classes) { mlxsw_sp_qdisc->qdiscs =3D kzalloc_objs(*mlxsw_sp_qdisc->qdiscs, - ops->num_classes, - GFP_KERNEL); + ops->num_classes); if (!mlxsw_sp_qdisc->qdiscs) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/driver= s/net/ethernet/mellanox/mlxsw/spectrum_router.c index 143fdd8aae49..7bd87d0547d8 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -718,8 +718,7 @@ static int mlxsw_sp_lpm_init(struct mlxsw_sp *mlxsw_sp) max_trees =3D MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_LPM_TREES); mlxsw_sp->router->lpm.tree_count =3D max_trees - MLXSW_SP_LPM_TREE_MIN; mlxsw_sp->router->lpm.trees =3D 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; =20 diff --git a/drivers/net/ethernet/netronome/nfp/bpf/verifier.c b/drivers/ne= t/ethernet/netronome/nfp/bpf/verifier.c index de9508282841..bc594860e2b5 100644 --- a/drivers/net/ethernet/netronome/nfp/bpf/verifier.c +++ b/drivers/net/ethernet/netronome/nfp/bpf/verifier.c @@ -771,7 +771,7 @@ int nfp_bpf_finalize(struct bpf_verifier_env *env) nfp_prog =3D env->prog->aux->offload->dev_priv; nfp_prog->subprog_cnt =3D env->subprog_cnt; nfp_prog->subprog =3D kzalloc_objs(nfp_prog->subprog[0], - nfp_prog->subprog_cnt, GFP_KERNEL); + nfp_prog->subprog_cnt); if (!nfp_prog->subprog) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/netronome/nfp/flower/metadata.c b/drivers= /net/ethernet/netronome/nfp/flower/metadata.c index ca9e5dab2ec7..cc9a5aea6df0 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/metadata.c +++ b/drivers/net/ethernet/netronome/nfp/flower/metadata.c @@ -558,7 +558,7 @@ int nfp_flower_metadata_init(struct nfp_app *app, u64 h= ost_ctx_count, /* Init timestamps for mask id*/ priv->mask_ids.last_used =3D 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; =20 diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethern= et/qlogic/qed/qed_dev.c index 33ea3a2edeae..42c6dcfb1f0f 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -2109,26 +2109,22 @@ static int qed_alloc_qm_data(struct qed_hwfn *p_hwf= n) goto alloc_err; =20 qm_info->qm_pq_params =3D 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; =20 qm_info->qm_vport_params =3D 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; =20 qm_info->qm_port_params =3D 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; =20 qm_info->wfq_data =3D 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; =20 diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethe= rnet/qlogic/qed/qed_iwarp.c index 0101b4a7c56c..4d1ce9b1a3f2 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c @@ -2760,8 +2760,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, goto err; =20 iwarp_info->partial_fpdus =3D 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 =3D -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 =3D kzalloc_objs(*iwarp_info->mpa_bufs, - data.input.rx_num_desc, GFP_KERNEL); + data.input.rx_num_desc); if (!iwarp_info->mpa_bufs) { rc =3D -ENOMEM; goto err; diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethern= et/qlogic/qed/qed_ll2.c index 572feb68d1d2..52f50c7228ed 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -2200,8 +2200,7 @@ int qed_ll2_alloc(struct qed_hwfn *p_hwfn) =20 /* Allocate LL2's set struct */ p_ll2_connections =3D 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; diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethern= et/qlogic/qed/qed_mcp.c index 9a461ab73bf2..7e37fe631a58 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c @@ -3366,7 +3366,7 @@ int qed_mcp_nvm_info_populate(struct qed_hwfn *p_hwfn) } =20 nvm_info.image_att =3D kmalloc_objs(struct bist_nvm_image_att, - nvm_info.num_images, GFP_KERNEL); + nvm_info.num_images); if (!nvm_info.image_att) { rc =3D -ENOMEM; goto err0; diff --git a/drivers/net/ethernet/qlogic/qed/qed_ooo.c b/drivers/net/ethern= et/qlogic/qed/qed_ooo.c index 610afab93b3f..b29bbfb7748e 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ooo.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ooo.c @@ -119,7 +119,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn) INIT_LIST_HEAD(&p_ooo_info->free_isles_list); =20 p_ooo_info->p_isles_mem =3D 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; =20 @@ -131,7 +131,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn) =20 p_ooo_info->p_archipelagos_mem =3D 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; =20 @@ -140,8 +140,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn) =20 p_ooo_info->ooo_history.p_cqes =3D 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; =20 diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/eth= ernet/qlogic/qede/qede_main.c index e71eed756091..39842eb73bc3 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -971,8 +971,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev) =20 if (!edev->coal_entry) { edev->coal_entry =3D 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; diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/q= logic/qla3xxx.c index b75b4708c300..861a13ad7e1a 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c @@ -2579,7 +2579,7 @@ static int ql_alloc_buffer_queues(struct ql3_adapter = *qdev) qdev->lrg_buf_q_alloc_size =3D qdev->lrg_buf_q_size * 2; =20 qdev->lrg_buf =3D kmalloc_objs(struct ql_rcv_buf_cb, - qdev->num_large_buffers, GFP_KERNEL); + qdev->num_large_buffers); if (qdev->lrg_buf =3D=3D NULL) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net= /ethernet/qlogic/qlcnic/qlcnic_init.c index 86e9cb04cae8..9192c5ad5a16 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c @@ -190,7 +190,7 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *ad= apter) recv_ctx =3D adapter->recv_ctx; =20 rds_ring =3D kzalloc_objs(struct qlcnic_host_rds_ring, - adapter->max_rds_rings, GFP_KERNEL); + adapter->max_rds_rings); if (rds_ring =3D=3D NULL) goto err_out; =20 diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net= /ethernet/qlogic/qlcnic/qlcnic_main.c index 688cb578e865..ff4f7cd20c79 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -680,7 +680,7 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *ad= apter) =20 if (!adapter->msix_entries) { adapter->msix_entries =3D 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) =20 if (!adapter->msix_entries) { adapter->msix_entries =3D 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 *adapt= er) } =20 adapter->eswitch =3D kzalloc_objs(struct qlcnic_eswitch, - QLCNIC_NIU_MAX_XG_PORTS, GFP_KERNEL); + QLCNIC_NIU_MAX_XG_PORTS); if (!adapter->eswitch) { ret =3D -ENOMEM; goto err_npars; @@ -2351,7 +2351,7 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter *adap= ter, struct qlcnic_cmd_buffer *cmd_buf_arr; =20 tx_ring =3D kzalloc_objs(struct qlcnic_host_tx_ring, - adapter->drv_tx_rings, GFP_KERNEL); + adapter->drv_tx_rings); if (tx_ring =3D=3D NULL) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/etherne= t/renesas/ravb_main.c index fb689bd4374c..84b657fc2e15 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -437,7 +437,7 @@ static int ravb_ring_init(struct net_device *ndev, int = q) =20 /* Allocate RX buffers */ priv->rx_buffers[q] =3D 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; =20 diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet= /sfc/efx_channels.c index c3766594d12e..f4dc3f3f4416 100644 --- a/drivers/net/ethernet/sfc/efx_channels.c +++ b/drivers/net/ethernet/sfc/efx_channels.c @@ -935,8 +935,7 @@ int efx_set_channels(struct efx_nic *efx) =20 /* Allocate array for XDP TX queue lookup. */ efx->xdp_tx_queues =3D 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; } diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/s= fc/efx_common.c index a41a840b3710..3afaec36642f 100644 --- a/drivers/net/ethernet/sfc/efx_common.c +++ b/drivers/net/ethernet/sfc/efx_common.c @@ -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 =3D 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); diff --git a/drivers/net/ethernet/sfc/falcon/tx.c b/drivers/net/ethernet/sf= c/falcon/tx.c index c514d2c65672..9e18aaf44bad 100644 --- a/drivers/net/ethernet/sfc/falcon/tx.c +++ b/drivers/net/ethernet/sfc/falcon/tx.c @@ -549,8 +549,7 @@ int ef4_probe_tx_queue(struct ef4_tx_queue *tx_queue) return -ENOMEM; =20 tx_queue->cb_page =3D 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 =3D -ENOMEM; goto fail1; diff --git a/drivers/net/ethernet/sfc/mae.c b/drivers/net/ethernet/sfc/mae.c index 33278d0580aa..7a8606efd492 100644 --- a/drivers/net/ethernet/sfc/mae.c +++ b/drivers/net/ethernet/sfc/mae.c @@ -256,11 +256,11 @@ static int efx_mae_table_get_desc(struct efx_nic *efx, goto fail; rc =3D -ENOMEM; desc->keys =3D kzalloc_objs(struct efx_tc_table_field_fmt, - desc->n_keys, GFP_KERNEL); + desc->n_keys); if (!desc->keys) goto fail; desc->resps =3D kzalloc_objs(struct efx_tc_table_field_fmt, - desc->n_resps, GFP_KERNEL); + desc->n_resps); if (!desc->resps) goto fail; } diff --git a/drivers/net/ethernet/sfc/siena/efx_channels.c b/drivers/net/et= hernet/sfc/siena/efx_channels.c index 1ddab2e2263e..1fc343598771 100644 --- a/drivers/net/ethernet/sfc/siena/efx_channels.c +++ b/drivers/net/ethernet/sfc/siena/efx_channels.c @@ -967,8 +967,7 @@ int efx_siena_set_channels(struct efx_nic *efx) =20 /* Allocate array for XDP TX queue lookup. */ efx->xdp_tx_queues =3D 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; } diff --git a/drivers/net/ethernet/sfc/siena/efx_common.c b/drivers/net/ethe= rnet/sfc/siena/efx_common.c index 07e650f2d13e..f91e5f8c0b35 100644 --- a/drivers/net/ethernet/sfc/siena/efx_common.c +++ b/drivers/net/ethernet/sfc/siena/efx_common.c @@ -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 =3D kzalloc_objs(*efx->rps_hash_table, - EFX_ARFS_HASH_TABLE_SIZE, GFP_KERNEL); + EFX_ARFS_HASH_TABLE_SIZE); #endif efx->mdio.dev =3D net_dev; INIT_WORK(&efx->mac_work, efx_mac_work); diff --git a/drivers/net/ethernet/sfc/siena/tx_common.c b/drivers/net/ether= net/sfc/siena/tx_common.c index 6a92543a1c5e..bcdf8c561579 100644 --- a/drivers/net/ethernet/sfc/siena/tx_common.c +++ b/drivers/net/ethernet/sfc/siena/tx_common.c @@ -41,8 +41,7 @@ int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queu= e) return -ENOMEM; =20 tx_queue->cb_page =3D 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 =3D -ENOMEM; goto fail1; diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sf= c/tx_common.c index f5bdfa0c31a3..71c96499f602 100644 --- a/drivers/net/ethernet/sfc/tx_common.c +++ b/drivers/net/ethernet/sfc/tx_common.c @@ -41,8 +41,7 @@ int efx_probe_tx_queue(struct efx_tx_queue *tx_queue) return -ENOMEM; =20 tx_queue->cb_page =3D 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 =3D -ENOMEM; goto fail1; diff --git a/drivers/net/ethernet/spacemit/k1_emac.c b/drivers/net/ethernet= /spacemit/k1_emac.c index 870ab19395d6..338a2637b1da 100644 --- a/drivers/net/ethernet/spacemit/k1_emac.c +++ b/drivers/net/ethernet/spacemit/k1_emac.c @@ -392,7 +392,7 @@ static int emac_alloc_tx_resources(struct emac_priv *pr= iv) struct platform_device *pdev =3D priv->pdev; =20 tx_ring->tx_desc_buf =3D kzalloc_objs(*tx_ring->tx_desc_buf, - tx_ring->total_cnt, GFP_KERNEL); + tx_ring->total_cnt); =20 if (!tx_ring->tx_desc_buf) return -ENOMEM; @@ -420,7 +420,7 @@ static int emac_alloc_rx_resources(struct emac_priv *pr= iv) struct platform_device *pdev =3D priv->pdev; =20 rx_ring->rx_desc_buf =3D 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; =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/ne= t/ethernet/stmicro/stmmac/stmmac_main.c index 3b3532cc12d7..edf0799b7236 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2296,7 +2296,7 @@ static int __alloc_dma_tx_desc_resources(struct stmma= c_priv *priv, tx_q->priv_data =3D priv; =20 tx_q->tx_skbuff_dma =3D 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; =20 diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c b/drivers/net/= ethernet/synopsys/dwc-xlgmac-desc.c index aa7c90d191f4..2a40257ab47c 100644 --- a/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c +++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c @@ -141,7 +141,7 @@ static int xlgmac_init_ring(struct xlgmac_pdata *pdata, =20 /* Array of descriptor data */ ring->desc_data_head =3D kzalloc_objs(struct xlgmac_desc_data, - dma_desc_count, GFP_KERNEL); + dma_desc_count); if (!ring->desc_data_head) return -ENOMEM; =20 diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c b/drivers/ne= t/ethernet/toshiba/ps3_gelic_wireless.c index f20e06985c5e..88669aa53f65 100644 --- a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c +++ b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c @@ -2306,7 +2306,7 @@ static struct net_device *gelic_wl_alloc(struct gelic= _card *card) =20 /* allocate scan list */ wl->networks =3D kzalloc_objs(struct gelic_wl_scan_info, - GELIC_WL_BSS_MAX_ENT, GFP_KERNEL); + GELIC_WL_BSS_MAX_ENT); =20 if (!wl->networks) goto fail_bss; diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet= /via/via-velocity.c index b71784bacf73..6d7b6f3b4633 100644 --- a/drivers/net/ethernet/via/via-velocity.c +++ b/drivers/net/ethernet/via/via-velocity.c @@ -1632,7 +1632,7 @@ static int velocity_init_rd_ring(struct velocity_info= *vptr) int ret =3D -ENOMEM; =20 vptr->rx.info =3D kzalloc_objs(struct velocity_rd_info, - vptr->options.numrx, GFP_KERNEL); + vptr->options.numrx); if (!vptr->rx.info) goto out; =20 @@ -1665,8 +1665,7 @@ static int velocity_init_td_ring(struct velocity_info= *vptr) for (j =3D 0; j < vptr->tx.numq; j++) { =20 vptr->tx.infos[j] =3D kzalloc_objs(struct velocity_td_info, - vptr->options.numtx, - GFP_KERNEL); + vptr->options.numtx); if (!vptr->tx.infos[j]) { while (--j >=3D 0) kfree(vptr->tx.infos[j]); diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ether= net/wangxun/libwx/wx_hw.c index c78e0775aeb5..bee9e245e792 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c @@ -2506,7 +2506,7 @@ int wx_sw_init(struct wx *wx) WX_RSS_FIELD_IPV6 | WX_RSS_FIELD_IPV6_TCP; =20 wx->mac_table =3D 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); diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index bc13df81bfa3..e82de0fd3157 100644 --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -940,8 +940,7 @@ static int nsim_dev_traps_init(struct devlink *devlink) return -ENOMEM; =20 nsim_trap_data->trap_items_arr =3D 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 =3D -ENOMEM; goto err_trap_data_free; diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index be0051ff6420..98472abdd392 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -1032,7 +1032,7 @@ static struct dp83640_clock *dp83640_clock_get_bus(st= ruct mii_bus *bus) goto out; =20 clock->caps.pin_config =3D kzalloc_objs(struct ptp_pin_desc, - DP83640_N_PINS, GFP_KERNEL); + DP83640_N_PINS); if (!clock->caps.pin_config) { kfree(clock); clock =3D NULL; diff --git a/drivers/net/phy/phy_led_triggers.c b/drivers/net/phy/phy_led_t= riggers.c index 9e24d4ebcb79..4eb7716bb9d6 100644 --- a/drivers/net/phy/phy_led_triggers.c +++ b/drivers/net/phy/phy_led_triggers.c @@ -104,8 +104,7 @@ int phy_led_triggers_register(struct phy_device *phy) goto out_free_link; =20 phy->phy_led_triggers =3D kzalloc_objs(struct phy_led_trigger, - phy->phy_num_led_triggers, - GFP_KERNEL); + phy->phy_num_led_triggers); if (!phy->phy_led_triggers) { err =3D -ENOMEM; goto out_unreg_link; diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c index e923da5c5506..4a3c852780f5 100644 --- a/drivers/net/pse-pd/pd692x0.c +++ b/drivers/net/pse-pd/pd692x0.c @@ -647,8 +647,7 @@ pd692x0_pi_get_pw_limit_ranges(struct pse_controller_de= v *pcdev, int id, =20 pw_table =3D pd692x0_class_pw_table; c33_pw_limit_ranges =3D 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; =20 diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wirele= ss/ath/ath11k/debugfs.c index 7ec8be82c1c9..0c1138407838 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -1216,8 +1216,7 @@ static int ath11k_debugfs_dbr_dbg_init(struct ath11k = *ar, int dbr_id) dbr_dbg_data->num_ring_debug_entries =3D ATH11K_DEBUG_DBR_ENTRIES_MAX; dbr_dbg_data->dbr_debug_idx =3D 0; dbr_dbg_data->entries =3D 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; =20 diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/at= h/ath12k/dp.c index 715e561bf8ca..1c82d927d27b 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -408,7 +408,7 @@ static int ath12k_dp_init_bank_profiles(struct ath12k_b= ase *ab) =20 dp->num_bank_profiles =3D num_tcl_banks; dp->bank_profiles =3D kmalloc_objs(struct ath12k_dp_tx_bank_profile, - num_tcl_banks, GFP_KERNEL); + num_tcl_banks); if (!dp->bank_profiles) return -ENOMEM; =20 diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/a= th/ath5k/base.c index 7b945a010ea1..05c9c07591fc 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -920,7 +920,7 @@ ath5k_desc_alloc(struct ath5k_hw *ah) ds, ah->desc_len, (unsigned long long)ah->desc_daddr); =20 bf =3D kzalloc_objs(struct ath5k_buf, - 1 + ATH_TXBUF + ATH_RXBUF + ATH_BCBUF, GFP_KERNEL); + 1 + ATH_TXBUF + ATH_RXBUF + ATH_BCBUF); if (bf =3D=3D NULL) { ATH5K_ERR(ah, "can't allocate bufptr\n"); ret =3D -ENOMEM; diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless= /ath/ath5k/eeprom.c index 9e4983d31628..e163706f8728 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c @@ -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 =3D kzalloc_objs(struct ath5k_pdgain_info, - AR5K_EEPROM_N_PD_CURVES, GFP_KERNEL); + AR5K_EEPROM_N_PD_CURVES); =20 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 =3D kzalloc_objs(struct ath5k_pdgain_info, - AR5K_EEPROM_N_PD_CURVES, - GFP_KERNEL); + AR5K_EEPROM_N_PD_CURVES); =20 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 =3D kzalloc_objs(struct ath5k_pdgain_info, - AR5K_EEPROM_N_PD_CURVES, - GFP_KERNEL); + AR5K_EEPROM_N_PD_CURVES); =20 if (!chinfo[pier].pd_curves) goto err_out; diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wirel= ess/ath/wil6210/debugfs.c index 1e796087435d..b8cb736a7185 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -2442,7 +2442,7 @@ int wil6210_debugfs_init(struct wil6210_priv *wil) return -ENODEV; =20 wil->dbg_data.data_arr =3D 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 =3D NULL; diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c b/drivers/ne= t/wireless/broadcom/b43legacy/debugfs.c index 22811359d89d..3ad99124d522 100644 --- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c +++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c @@ -366,7 +366,7 @@ void b43legacy_debugfs_add_device(struct b43legacy_wlde= v *dev) e->dev =3D dev; log =3D &e->txstatlog; log->log =3D 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); diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/w= ireless/broadcom/b43legacy/main.c index aba1168ab728..6b3e0b2bbca7 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c @@ -3270,7 +3270,7 @@ static int b43legacy_wireless_core_init(struct b43leg= acy_wldev *dev) if ((phy->type =3D=3D B43legacy_PHYTYPE_B) || (phy->type =3D=3D B43legacy_PHYTYPE_G)) { phy->_lo_pairs =3D kzalloc_objs(struct b43legacy_lopair, - B43legacy_LO_COUNT, GFP_KERNEL); + B43legacy_LO_COUNT); if (!phy->_lo_pairs) return -ENOMEM; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/dr= ivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c index a88abe390aee..ba1ce1552e0f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -1589,7 +1589,7 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) msgbuf->max_flowrings =3D if_msgbuf->max_flowrings; msgbuf->flowring_dma_handle =3D kzalloc_objs(*msgbuf->flowring_dma_handle, - msgbuf->max_flowrings, GFP_KERNEL); + msgbuf->max_flowrings); if (!msgbuf->flowring_dma_handle) goto fail; =20 diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wir= eless/intel/ipw2x00/ipw2100.c index 8837f44fd06b..248a051da52d 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -1886,7 +1886,7 @@ static int ipw2100_wdev_init(struct net_device *dev) bg_band->band =3D NL80211_BAND_2GHZ; bg_band->n_channels =3D geo->bg_channels; bg_band->channels =3D 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 *p= riv) } =20 priv->tx_buffers =3D 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 *p= riv) * allocate packets */ priv->rx_buffers =3D 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"); =20 diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wir= eless/intel/ipw2x00/ipw2200.c index e045208e2531..dd64d21174e3 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -11278,7 +11278,7 @@ static int ipw_wdev_init(struct net_device *dev) bg_band->band =3D NL80211_BAND_2GHZ; bg_band->n_channels =3D geo->bg_channels; bg_band->channels =3D kzalloc_objs(struct ieee80211_channel, - geo->bg_channels, GFP_KERNEL); + geo->bg_channels); if (!bg_band->channels) { rc =3D -ENOMEM; goto out; @@ -11316,7 +11316,7 @@ static int ipw_wdev_init(struct net_device *dev) a_band->band =3D NL80211_BAND_5GHZ; a_band->n_channels =3D geo->a_channels; a_band->channels =3D kzalloc_objs(struct ieee80211_channel, - geo->a_channels, GFP_KERNEL); + geo->a_channels); if (!a_band->channels) { rc =3D -ENOMEM; goto out; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c b/drivers/net/wire= less/intel/iwlwifi/dvm/tt.c index 9bfdf033463b..fc9cf0531024 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c @@ -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 =3D kzalloc_objs(struct iwl_tt_restriction, - IWL_TI_STATE_MAX, GFP_KERNEL); + IWL_TI_STATE_MAX); tt->transaction =3D 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 =3D false; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/low_latency.c b/drivers= /net/wireless/intel/iwlwifi/mld/low_latency.c index fb63c8ba800a..d39dd36b08e3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/low_latency.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/low_latency.c @@ -132,7 +132,7 @@ int iwl_mld_low_latency_init(struct iwl_mld *mld) unsigned long ts =3D jiffies; =20 ll->pkts_counters =3D kzalloc_objs(*ll->pkts_counters, - mld->trans->info.num_rxqs, GFP_KERNEL); + mld->trans->info.num_rxqs); if (!ll->pkts_counters) return -ENOMEM; =20 diff --git a/drivers/net/wireless/intel/iwlwifi/mld/scan.c b/drivers/net/wi= reless/intel/iwlwifi/mld/scan.c index 6679be028a6b..a1a4cf3ab3d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/scan.c @@ -2084,8 +2084,7 @@ void iwl_mld_handle_channel_survey_notif(struct iwl_m= ld *mld, } =20 mld->channel_survey =3D kzalloc_flex(*mld->channel_survey, - channels, n_channels, - GFP_KERNEL); + channels, n_channels); =20 if (!mld->channel_survey) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wir= eless/intel/iwlwifi/mld/sta.c index 3b8ff0744e7c..6b7a89e050e6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -695,8 +695,7 @@ static void iwl_mld_alloc_mpdu_counters(struct iwl_mld = *mld, return; =20 mld_sta->mpdu_counters =3D kzalloc_objs(*mld_sta->mpdu_counters, - mld->trans->info.num_rxqs, - GFP_KERNEL); + mld->trans->info.num_rxqs); if (!mld_sta->mpdu_counters) return; =20 diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/ne= t/wireless/intel/iwlwifi/mvm/mac80211.c index aeaa1d4b312d..090791fe0638 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -4349,8 +4349,7 @@ static int __iwl_mvm_mac_set_key(struct ieee80211_hw = *hw, =20 WARN_ON(rcu_access_pointer(mvmsta->ptk_pn[keyidx])); ptk_pn =3D kzalloc_flex(*ptk_pn, q, - mvm->trans->info.num_rxqs, - GFP_KERNEL); + mvm->trans->info.num_rxqs); if (!ptk_pn) { ret =3D -ENOMEM; break; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wi= reless/intel/iwlwifi/mvm/scan.c index 966558885ea6..79829f775c89 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -3604,7 +3604,7 @@ void iwl_mvm_rx_channel_survey_notif(struct iwl_mvm *= mvm, } =20 mvm->acs_survey =3D kzalloc_flex(*mvm->acs_survey, channels, - n_channels, GFP_KERNEL); + n_channels); =20 if (!mvm->acs_survey) return; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c b/drivers/= net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c index 7c662d5f2b72..fe263cdc2e4f 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c @@ -775,11 +775,10 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans) =20 trans_pcie->rxq =3D kzalloc_objs(struct iwl_rxq, trans->info.num_rxqs); trans_pcie->rx_pool =3D 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 =3D 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 =3D -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c b/drivers/= net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c index d7979d75b073..fdb3ba4f63c0 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c @@ -836,7 +836,7 @@ static int iwl_pcie_tx_alloc(struct iwl_trans *trans) =20 trans_pcie->txq_memory =3D 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 =3D -ENOMEM; diff --git a/drivers/net/wireless/intersil/p54/eeprom.c b/drivers/net/wirel= ess/intersil/p54/eeprom.c index 148c110c5a2b..95580921d933 100644 --- a/drivers/net/wireless/intersil/p54/eeprom.c +++ b/drivers/net/wireless/intersil/p54/eeprom.c @@ -159,7 +159,7 @@ static int p54_generate_band(struct ieee80211_hw *dev, goto err_out; =20 tmp->channels =3D kzalloc_objs(struct ieee80211_channel, - list->band_channel_num[band], GFP_KERNEL); + list->band_channel_num[band]); if (!tmp->channels) goto err_out; =20 diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/= wireless/marvell/mwifiex/cfg80211.c index 63d9ccc5a81c..43704106cd80 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -4678,8 +4678,7 @@ int mwifiex_init_channel_scan_gap(struct mwifiex_adap= ter *adapter) */ adapter->num_in_chan_stats =3D 2 * (n_channels_bg + n_channels_a); adapter->chan_stats =3D kzalloc_objs(*adapter->chan_stats, - adapter->num_in_chan_stats, - GFP_KERNEL); + adapter->num_in_chan_stats); =20 if (!adapter->chan_stats) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wi= reless/marvell/mwifiex/cmdevt.c index 1bb30fbab12b..29e0f274575e 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c @@ -390,7 +390,7 @@ int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *ad= apter) =20 /* Allocate and initialize struct cmd_ctrl_node */ cmd_array =3D kzalloc_objs(struct cmd_ctrl_node, - MWIFIEX_NUM_OF_CMD_BUFFER, GFP_KERNEL); + MWIFIEX_NUM_OF_CMD_BUFFER); if (!cmd_array) return -ENOMEM; =20 diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wire= less/marvell/mwifiex/scan.c index 4e511f8700a8..97c0ec3b822e 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -1510,7 +1510,7 @@ int mwifiex_scan_networks(struct mwifiex_private *pri= v, } =20 scan_chan_list =3D 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 =3D -ENOMEM; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/ne= t/wireless/quantenna/qtnfmac/commands.c index 1b3fcc2b3355..d9c4dd6beaec 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1253,7 +1253,7 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac, =20 mac_info->n_if_comb =3D resp_info->n_iface_combinations; mac_info->if_comb =3D kzalloc_objs(*mac->macinfo.if_comb, - mac->macinfo.n_if_comb, GFP_KERNEL); + mac->macinfo.n_if_comb); =20 if (!mac->macinfo.if_comb) return -ENOMEM; diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index d839824b4e8d..e1bb4707183c 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -3498,7 +3498,7 @@ nvme_fc_alloc_ctrl(struct device *dev, struct nvmf_ct= rl_options *opts, =20 ret =3D -ENOMEM; ctrl->queues =3D kzalloc_objs(struct nvme_fc_queue, - ctrl->ctrl.queue_count, GFP_KERNEL); + ctrl->ctrl.queue_count); if (!ctrl->queues) goto out_free_ida; =20 diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c index 31006ce56832..4e9db96ebfec 100644 --- a/drivers/nvme/target/pci-epf.c +++ b/drivers/nvme/target/pci-epf.c @@ -503,7 +503,7 @@ static inline int nvmet_pci_epf_transfer(struct nvmet_p= ci_epf_ctrl *ctrl, static int nvmet_pci_epf_alloc_irq_vectors(struct nvmet_pci_epf_ctrl *ctrl) { ctrl->irq_vectors =3D kzalloc_objs(struct nvmet_pci_epf_irq_vector, - ctrl->nr_queues, GFP_KERNEL); + ctrl->nr_queues); if (!ctrl->irq_vectors) return -ENOMEM; =20 diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index cf629665db8e..035c996e3ca9 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -928,7 +928,7 @@ void *iosapic_register(unsigned long hpa, void __iomem = *vaddr) DBG_IRT("iosapic_register: num vectors =3D %d\n", isi->isi_num_vectors); =20 vip =3D isi->isi_vector =3D kzalloc_objs(struct vector_info, - isi->isi_num_vectors, GFP_KERNEL); + isi->isi_num_vectors); if (vip =3D=3D NULL) { kfree(isi); return NULL; diff --git a/drivers/platform/x86/amd/wbrf.c b/drivers/platform/x86/amd/wbr= f.c index b7556663223a..3281357185d1 100644 --- a/drivers/platform/x86/amd/wbrf.c +++ b/drivers/platform/x86/amd/wbrf.c @@ -73,8 +73,7 @@ static int wbrf_record(struct acpi_device *adev, uint8_t = action, struct wbrf_ran num_of_elements =3D 2 * num_of_ranges + 2; =20 union acpi_object *tmp __free(kfree) =3D kzalloc_objs(*tmp, - num_of_elements, - GFP_KERNEL); + num_of_elements); if (!tmp) return -ENOMEM; =20 diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x= 86/dell/dell-wmi-base.c index cdaa366b5e11..4eefbade2f5e 100644 --- a/drivers/platform/x86/dell/dell-wmi-base.c +++ b/drivers/platform/x86/dell/dell-wmi-base.c @@ -657,8 +657,7 @@ static int dell_wmi_input_setup(struct wmi_device *wdev) } =20 keymap =3D 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_00= 11) + 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_00= 11) + ARRAY_SIZE(dell_wmi_keymap_type_0012) + 1); if (!keymap) { kfree(dmi_results.keymap); err =3D -ENOMEM; diff --git a/drivers/platform/x86/dell/dell-wmi-privacy.c b/drivers/platfor= m/x86/dell/dell-wmi-privacy.c index 40fe2c4adedb..ed099a431ea4 100644 --- a/drivers/platform/x86/dell/dell-wmi-privacy.c +++ b/drivers/platform/x86/dell/dell-wmi-privacy.c @@ -315,7 +315,7 @@ static int dell_privacy_wmi_probe(struct wmi_device *wd= ev, const void *context) =20 /* remap the wmi keymap event to new keymap */ keymap =3D 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; =20 diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c b/= drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c index c7c55f8fe0a0..09996fbdc707 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c @@ -120,8 +120,7 @@ int alloc_enum_data(void) wmi_priv.enumeration_instances_count =3D get_instance_count(DELL_WMI_BIOS_ENUMERATION_ATTRIBUTE_GUID); wmi_priv.enumeration_data =3D 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 =3D 0; ret =3D -ENOMEM; diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c b/d= rivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c index f00a1cbac2f9..ab5c24722475 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c @@ -124,8 +124,7 @@ int alloc_int_data(void) =20 wmi_priv.integer_instances_count =3D get_instance_count(DELL_WMI_BIOS_INT= EGER_ATTRIBUTE_GUID); wmi_priv.integer_data =3D 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 =3D 0; ret =3D -ENOMEM; diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c= b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c index 44ecdcb82d84..be939b731063 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c @@ -144,7 +144,7 @@ int alloc_po_data(void) =20 wmi_priv.po_instances_count =3D get_instance_count(DELL_WMI_BIOS_PASSOBJ_= ATTRIBUTE_GUID); wmi_priv.po_data =3D 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 =3D 0; ret =3D -ENOMEM; diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c = b/drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c index 9e11c00ad859..41e19f0391b2 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c @@ -109,8 +109,7 @@ int alloc_str_data(void) =20 wmi_priv.str_instances_count =3D get_instance_count(DELL_WMI_BIOS_STRING_= ATTRIBUTE_GUID); wmi_priv.str_data =3D 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 =3D 0; ret =3D -ENOMEM; diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers= /platform/x86/hp/hp-bioscfg/enum-attributes.c index 4a09fd32ebc6..470b9f44ed7a 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c @@ -95,8 +95,7 @@ int hp_alloc_enumeration_data(void) hp_get_instance_count(HP_WMI_BIOS_ENUMERATION_GUID); =20 bioscfg_drv.enumeration_data =3D kzalloc_objs(*bioscfg_drv.enumeration_da= ta, - bioscfg_drv.enumeration_instances_count, - GFP_KERNEL); + bioscfg_drv.enumeration_instances_count); if (!bioscfg_drv.enumeration_data) { bioscfg_drv.enumeration_instances_count =3D 0; return -ENOMEM; diff --git a/drivers/platform/x86/hp/hp-bioscfg/int-attributes.c b/drivers/= platform/x86/hp/hp-bioscfg/int-attributes.c index 84d522f2b491..d96e160953e3 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/int-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/int-attributes.c @@ -110,8 +110,7 @@ int hp_alloc_integer_data(void) { bioscfg_drv.integer_instances_count =3D hp_get_instance_count(HP_WMI_BIOS= _INTEGER_GUID); bioscfg_drv.integer_data =3D kzalloc_objs(*bioscfg_drv.integer_data, - bioscfg_drv.integer_instances_count, - GFP_KERNEL); + bioscfg_drv.integer_instances_count); =20 if (!bioscfg_drv.integer_data) { bioscfg_drv.integer_instances_count =3D 0; diff --git a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c b/d= rivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c index 592328280a81..f09489a085c8 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c @@ -99,8 +99,7 @@ int hp_alloc_ordered_list_data(void) bioscfg_drv.ordered_list_instances_count =3D hp_get_instance_count(HP_WMI_BIOS_ORDERED_LIST_GUID); bioscfg_drv.ordered_list_data =3D 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 =3D 0; return -ENOMEM; diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c b/dr= ivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c index dc7107ff010b..4d79eb8056a5 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c @@ -186,8 +186,7 @@ int hp_alloc_password_data(void) { bioscfg_drv.password_instances_count =3D hp_get_instance_count(HP_WMI_BIO= S_PASSWORD_GUID); bioscfg_drv.password_data =3D 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 =3D 0; return -ENOMEM; diff --git a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c b/drive= rs/platform/x86/hp/hp-bioscfg/string-attributes.c index f0ce4f3e7f20..fe5a9a3a4ef1 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c @@ -102,8 +102,7 @@ int hp_alloc_string_data(void) { bioscfg_drv.string_instances_count =3D hp_get_instance_count(HP_WMI_BIOS_= STRING_GUID); bioscfg_drv.string_data =3D 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 =3D 0; return -ENOMEM; diff --git a/drivers/platform/x86/intel/int1092/intel_sar.c b/drivers/platf= orm/x86/intel/int1092/intel_sar.c index fb26e5a26ffa..88822023a149 100644 --- a/drivers/platform/x86/intel/int1092/intel_sar.c +++ b/drivers/platform/x86/intel/int1092/intel_sar.c @@ -92,7 +92,7 @@ static acpi_status parse_package(struct wwan_sar_context = *context, union acpi_ob return AE_ERROR; =20 data->device_mode_info =3D 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; =20 diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/= drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index a38c278a792b..b8cdaa233ea9 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -1820,7 +1820,7 @@ int tpmi_sst_init(void) } =20 isst_common.sst_inst =3D kzalloc_objs(*isst_common.sst_inst, - topology_max_packages(), GFP_KERNEL); + topology_max_packages()); if (!isst_common.sst_inst) { ret =3D -ENOMEM; goto init_done; diff --git a/drivers/platform/x86/intel/tpmi_power_domains.c b/drivers/plat= form/x86/intel/tpmi_power_domains.c index 57c8856fc468..833052dc34d2 100644 --- a/drivers/platform/x86/intel/tpmi_power_domains.c +++ b/drivers/platform/x86/intel/tpmi_power_domains.c @@ -222,8 +222,7 @@ static int __init tpmi_init(void) return ret; =20 tpmi_power_domain_mask =3D 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; =20 diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysf= s.c index b9adb34502bd..a8c50b323a9e 100644 --- a/drivers/platform/x86/uv_sysfs.c +++ b/drivers/platform/x86/uv_sysfs.c @@ -388,7 +388,7 @@ static int uv_ports_init(void) } for (j =3D 0; j < uv_bios_obj_cnt; j++) { uv_hubs[j]->ports =3D kzalloc_objs(*uv_hubs[j]->ports, - hub_buf[j].ports, GFP_KERNEL); + hub_buf[j].ports); if (!uv_hubs[j]->ports) { ret =3D -ENOMEM; j--; diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sy= s.c index b65bb4f4b92a..9197fa20d93f 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -530,7 +530,7 @@ struct powercap_zone *powercap_register_zone( if (!power_zone->name) goto err_name_alloc; power_zone->constraints =3D kzalloc_objs(*power_zone->constraints, - nr_constraints, GFP_KERNEL); + nr_constraints); if (!power_zone->constraints) goto err_const_alloc; =20 diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c index ef4df1792ece..1eebc2602187 100644 --- a/drivers/resctrl/mpam_devices.c +++ b/drivers/resctrl/mpam_devices.c @@ -2445,8 +2445,7 @@ static int __allocate_component_cfg(struct mpam_compo= nent *comp) continue; =20 mbwu_state =3D 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; diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_= api.c index c1f3ee5eda5a..023ea279361f 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -1628,7 +1628,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, = unsigned int cmd, * sizeof(struct zcrypt_device_status_ext); =20 device_status =3D 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, diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 2e8119ce4411..df9492247631 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -493,7 +493,7 @@ int aac_get_containers(struct aac_dev *dev) fsa_dev_ptr =3D dev->fsa_dev; =20 dev->fsa_dev =3D kzalloc_objs(*fsa_dev_ptr, - maximum_num_containers, GFP_KERNEL); + maximum_num_containers); =20 kfree(fsa_dev_ptr); fsa_dev_ptr =3D NULL; diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_mai= n.c index faab6fd9bc29..fd18d4d3d219 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -2477,8 +2477,7 @@ static int beiscsi_alloc_mem(struct beiscsi_hba *phba) /* Allocate memory for wrb_context */ phwi_ctrlr =3D phba->phwi_ctrlr; phwi_ctrlr->wrb_context =3D 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 =3D phwi_ctrlr->phwi_ctxt; phwi_ctxt->be_wrbq =3D 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 =3D &phwi_ctrlr->wrb_context[index]; pwrb_context->pwrb_handle_base =3D 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 =3D 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 +=3D HWI_MEM_SGLH; if (1 =3D=3D mem_descr_sglh->num_elements) { phba->io_sgl_hndl_base =3D 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 =3D 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 *phb= a) } } phba->ep_array =3D kzalloc_objs(struct iscsi_endpoint *, - phba->params.cxns_per_ctrl, GFP_KERNEL); + phba->params.cxns_per_ctrl); if (!phba->ep_array) { ret =3D -ENOMEM; =20 @@ -4033,7 +4027,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phb= a) } =20 phba->conn_table =3D 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 =3D NULL; diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_w= r.c index 4769e39a8b64..aa6007a21868 100644 --- a/drivers/scsi/csiostor/csio_wr.c +++ b/drivers/scsi/csiostor/csio_wr.c @@ -279,7 +279,7 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uin= t32_t wrsize, =20 flq =3D wrm->q_arr[q->un.iq.flq_idx]; flq->un.fl.bufs =3D 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" diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r= _init.c index a895ff0d15ba..0a35f1953768 100644 --- a/drivers/scsi/esas2r/esas2r_init.c +++ b/drivers/scsi/esas2r/esas2r_init.c @@ -802,7 +802,7 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *= a, /* allocate the request table */ a->req_table =3D kzalloc_objs(struct esas2r_request *, - num_requests + num_ae_requests + 1, GFP_KERNEL); + num_requests + num_ae_requests + 1); =20 if (a->req_table =3D=3D NULL) { esas2r_log(ESAS2R_LOG_CRIT, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index adb3b7d8c6fb..a1b116cd4723 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2206,7 +2206,7 @@ static int hpsa_allocate_ioaccel2_sg_chain_blocks(str= uct ctlr_info *h) for (i =3D 0; i < h->nr_cmds; i++) { h->ioaccel2_cmd_sg_list[i] =3D 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_inf= o *h) =20 for (i =3D 0; i < h->nr_cmds; i++) { h->cmd_sg_list[i] =3D kmalloc_objs(*h->cmd_sg_list[i], - h->chainsize, GFP_KERNEL); + h->chainsize); if (!h->cmd_sg_list[i]) goto clean; =20 diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 5d5d9f97904b..a20fce04fe79 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -6210,7 +6210,7 @@ static int ibmvfc_alloc_mem(struct ibmvfc_host *vhost) goto free_login_buffer; =20 vhost->trace =3D kzalloc_objs(struct ibmvfc_trace_entry, - IBMVFC_NUM_TRACE_ENTRIES, GFP_KERNEL); + IBMVFC_NUM_TRACE_ENTRIES); atomic_set(&vhost->trace_index, -1); =20 if (!vhost->trace) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 03f78c07f87f..d207e5e81afe 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -8860,7 +8860,7 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa= _cfg) return -ENOMEM; =20 ioa_cfg->ipr_cmnd_list =3D kzalloc_objs(struct ipr_cmnd *, - IPR_NUM_CMD_BLKS, GFP_KERNEL); + IPR_NUM_CMD_BLKS); ioa_cfg->ipr_cmnd_list_dma =3D kzalloc_objs(dma_addr_t, IPR_NUM_CMD_BLKS); =20 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) =20 ENTER; ioa_cfg->res_entries =3D kzalloc_objs(struct ipr_resource_entry, - ioa_cfg->max_devs_supported, - GFP_KERNEL); + ioa_cfg->max_devs_supported); =20 if (!ioa_cfg->res_entries) goto out; @@ -9028,7 +9027,7 @@ static int ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg) } =20 ioa_cfg->trace =3D kzalloc_objs(struct ipr_trace_entry, - IPR_NUM_TRACE_ENTRIES, GFP_KERNEL); + IPR_NUM_TRACE_ENTRIES); =20 if (!ioa_cfg->trace) goto out_free_hostrcb_dma; diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debu= gfs.c index 1d9b3fcaa27e..052023fc1733 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -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 =3D 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 " diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index a25a78a5332d..94ad253d65a0 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7771,8 +7771,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) =20 if (!phba->sli.sli3_ring) phba->sli.sli3_ring =3D kzalloc_objs(struct lpfc_sli_ring, - LPFC_SLI3_MAX_RING, - GFP_KERNEL); + LPFC_SLI3_MAX_RING); if (!phba->sli.sli3_ring) return -ENOMEM; =20 @@ -8355,8 +8354,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) } =20 phba->sli4_hba.hba_eq_hdl =3D 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) } =20 phba->sli4_hba.cpu_map =3D 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) } =20 phba->sli4_hba.idle_stat =3D 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) =20 if (!phba->sli4_hba.hdwq) { phba->sli4_hba.hdwq =3D 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 =3D 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 =3D 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 =3D 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 =3D 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: " diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index ea5f24e28ef0..debd9317103a 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -1508,8 +1508,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) phba->sli4_hba.nvmet_xri_cnt); =20 phba->sli4_hba.nvmet_ctx_info =3D 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 " diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index 74b92a56099a..de2bd860b9d7 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c @@ -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 =3D 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); diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megar= aid/megaraid_sas_base.c index c98064200390..ac71ea4898b2 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -6376,7 +6376,7 @@ static int megasas_init_fw(struct megasas_instance *i= nstance) if (instance->adapter_type >=3D VENTURA_SERIES) { fusion->stream_detect_by_ld =3D 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"); diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_f= w.c index 07bdb95dd7e2..81150bef1145 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -2111,8 +2111,7 @@ static int mpi3mr_alloc_op_reply_q_segments(struct mp= i3mr_ioc *mrioc, u16 qidx) op_reply_q->segment_qd); =20 op_reply_q->q_segments =3D kzalloc_objs(struct segments, - op_reply_q->num_segments, - GFP_KERNEL); + op_reply_q->num_segments); if (!op_reply_q->q_segments) return -ENOMEM; =20 @@ -2170,7 +2169,7 @@ static int mpi3mr_alloc_op_req_q_segments(struct mpi3= mr_ioc *mrioc, u16 qidx) op_req_q->segment_qd); =20 op_req_q->q_segments =3D kzalloc_objs(struct segments, - op_req_q->num_segments, GFP_KERNEL); + op_req_q->num_segments); if (!op_req_q->q_segments) return -ENOMEM; =20 diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/m= pi3mr_transport.c index dc23efc79741..240f67a8e2e3 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_transport.c +++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c @@ -2116,7 +2116,7 @@ int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16= handle) goto out_fail; } sas_expander->phy =3D kzalloc_objs(struct mpi3mr_sas_phy, - sas_expander->num_phys, GFP_KERNEL); + sas_expander->num_phys); if (!sas_expander->phy) { rc =3D -1; goto out_fail; diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt= 3sas_base.c index 06ad016e367e..79052f2accbd 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -3462,8 +3462,7 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc) =20 if (iopoll_q_count) { ioc->io_uring_poll_queues =3D kzalloc_objs(struct io_uring_poll_queue, - iopoll_q_count, - GFP_KERNEL); + iopoll_q_count); if (!ioc->io_uring_poll_queues) iopoll_q_count =3D 0; } @@ -3728,8 +3727,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *io= c) * MPT3_SUP_REPLY_POST_HOST_INDEX_REG_OFFSET from previous one. */ ioc->replyPostRegisterIndex =3D 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 *i= oc) =20 /* initialize hi-priority queue smid's */ ioc->hpr_lookup =3D 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 *i= oc) =20 /* initialize internal queue smid's */ ioc->internal_lookup =3D 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) =20 if (ioc->is_warpdrive) { ioc->reply_post_host_index =3D 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 =3D -ENOMEM; @@ -8521,7 +8518,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc) goto out_free_resources; =20 ioc->pfacts =3D kzalloc_objs(struct mpt3sas_port_facts, - ioc->facts.NumberOfPorts, GFP_KERNEL); + ioc->facts.NumberOfPorts); if (!ioc->pfacts) { r =3D -ENOMEM; goto out_free_resources; diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3= sas_ctl.c index b2c9a3b0236a..8bb947004885 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -1332,7 +1332,7 @@ _ctl_eventenable(struct MPT3SAS_ADAPTER *ioc, void __= user *arg) ioc->event_context =3D 0; ioc->aen_event_read_flag =3D 0; ioc->event_log =3D 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__); diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mp= t3sas_scsih.c index 3b6e17e0dbfa..6ff788557294 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -7028,8 +7028,7 @@ _scsih_sas_host_add(struct MPT3SAS_ADAPTER *ioc) ioc->sas_hba.nr_phys_allocated =3D max_t(u8, MPT_MAX_HBA_NUM_PHYS, num_phys); ioc->sas_hba.phy =3D 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 =3D 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__); diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index ce76c9dd6171..942a99393204 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -4386,7 +4386,7 @@ static int pmcraid_allocate_config_buffers(struct pmc= raid_instance *pinstance) =20 pinstance->res_entries =3D kzalloc_objs(struct pmcraid_resource_entry, - PMCRAID_MAX_RESOURCES, GFP_KERNEL); + PMCRAID_MAX_RESOURCES); =20 if (NULL =3D=3D pinstance->res_entries) { pmcraid_err("failed to allocate memory for resource table\n"); diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index d5e0b3d653f5..227ff7bd1bdc 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -411,7 +411,7 @@ static int qedi_alloc_fp(struct qedi_ctx *qedi) int ret =3D 0; =20 qedi->fp_array =3D 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) } =20 qedi->sb_array =3D 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; =20 qedi->cid_que.conn_cid_tbl =3D 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 =3D NULL; @@ -1895,7 +1894,7 @@ struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ct= x *qedi, u32 tid) static int qedi_alloc_itt(struct qedi_ctx *qedi) { qedi->itt_map =3D 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"); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_ini= t.c index 2493b7208222..730c42b1a7b9 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4042,8 +4042,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha= , struct req_que *req) */ req->num_outstanding_cmds =3D MIN_OUTSTANDING_COMMANDS; req->outstanding_cmds =3D kzalloc_objs(srb_t *, - req->num_outstanding_cmds, - GFP_KERNEL); + req->num_outstanding_cmds); =20 if (!req->outstanding_cmds) { ql_log(ql_log_fatal, NULL, 0x0126, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 8dff71007358..72b1c28e4dae 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -463,7 +463,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha,= struct req_que *req, =20 if ((ql2xmqsupport || ql2xnvmeenable) && ha->max_qpairs) { ha->queue_pair_map =3D 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 re= q_len, uint16_t rsp_len, =20 if (QLA_TGT_MODE_ENABLED() || EDIF_CAP(ha)) { ha->vp_map =3D 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 re= q_len, uint16_t rsp_len, /* Allocate memory for NVRAM data for vports */ if (ha->nvram_npiv_size) { ha->npiv_info =3D 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"); diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/= smartpqi_init.c index 5c25381ef800..b4ed991976d0 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1253,7 +1253,7 @@ static inline int pqi_report_phys_luns(struct pqi_ctr= l_info *ctrl_info, void **b num_physicals =3D get_unaligned_be32(&rpl_8byte_wwid_list->header.list_le= ngth) / sizeof(rpl_8byte_wwid_list->lun_entries[0]); =20 rpl_16byte_wwid_list =3D kmalloc_flex(*rpl_16byte_wwid_list, lun_entries, - num_physicals, GFP_KERNEL); + num_physicals); if (!rpl_16byte_wwid_list) { rc =3D -ENOMEM; goto out_free_rpl_list; @@ -5206,8 +5206,7 @@ static int pqi_alloc_io_resources(struct pqi_ctrl_inf= o *ctrl_info) struct pqi_io_request *io_request; =20 ctrl_info->io_request_pool =3D kzalloc_objs(ctrl_info->io_request_pool[0], - ctrl_info->max_io_slots, - GFP_KERNEL); + ctrl_info->max_io_slots); =20 if (!ctrl_info->io_request_pool) { dev_err(&ctrl_info->pci_dev->dev, diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index a85b9ecf1a05..3d8f5a81eff1 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -1231,8 +1231,7 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_s= wrm_ctrl *ctrl, int maxport, pn, nports =3D 0; unsigned int m_port; struct sdw_port_config *pconfig __free(kfree) =3D kzalloc_objs(*pconfig, - ctrl->nports, - GFP_KERNEL); + ctrl->nports); if (!pconfig) return -ENOMEM; =20 diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greyb= us/power_supply.c index 5d180b0f8e4c..33b7a63979d6 100644 --- a/drivers/staging/greybus/power_supply.c +++ b/drivers/staging/greybus/power_supply.c @@ -552,7 +552,7 @@ static int gb_power_supply_prop_descriptors_get(struct = gb_power_supply *gbpsy) } =20 gbpsy->props_raw =3D kzalloc_objs(*gbpsy->props_raw, - gbpsy->properties_count, GFP_KERNEL); + gbpsy->properties_count); if (!gbpsy->props_raw) { ret =3D -ENOMEM; goto out_put_operation; @@ -942,7 +942,7 @@ static int gb_power_supplies_setup(struct gb_power_supp= lies *supplies) goto out; =20 supplies->supply =3D kzalloc_objs(struct gb_power_supply, - supplies->supplies_count, GFP_KERNEL); + supplies->supplies_count); =20 if (!supplies->supply) { ret =3D -ENOMEM; diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c b/driv= ers/staging/media/atomisp/pci/atomisp_csi2_bridge.c index c934da53f4a3..ba61cc28fac1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c @@ -306,7 +306,7 @@ static int atomisp_csi2_add_gpio_mappings(struct acpi_d= evice *adev) =20 /* Max num GPIOs we've seen plus a terminator */ int3472 =3D kzalloc_flex(*int3472, gpios.table, - INT3472_MAX_SENSOR_GPIOS + 1, GFP_KERNEL); + INT3472_MAX_SENSOR_GPIOS + 1); if (!int3472) return -ENOMEM; =20 diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/m= edia/atomisp/pci/sh_css.c index ee7ea04c4fc5..6cda5925fa45 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -4531,16 +4531,14 @@ static int load_video_binaries(struct ia_css_pipe *= pipe) return err; mycs->num_yuv_scaler =3D cas_scaler_descr.num_stage; mycs->yuv_scaler_binary =3D 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 =3D 0; err =3D -ENOMEM; return err; } mycs->is_output_stage =3D kzalloc_objs(bool, - cas_scaler_descr.num_stage, - GFP_KERNEL); + cas_scaler_descr.num_stage); if (!mycs->is_output_stage) { err =3D -ENOMEM; return err; @@ -5112,16 +5110,14 @@ static int load_primary_binaries( } mycs->num_yuv_scaler =3D cas_scaler_descr.num_stage; mycs->yuv_scaler_binary =3D kzalloc_objs(struct ia_css_binary, - cas_scaler_descr.num_stage, - GFP_KERNEL); + cas_scaler_descr.num_stage); if (!mycs->yuv_scaler_binary) { err =3D -ENOMEM; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } mycs->is_output_stage =3D kzalloc_objs(bool, - cas_scaler_descr.num_stage, - GFP_KERNEL); + cas_scaler_descr.num_stage); if (!mycs->is_output_stage) { err =3D -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 =3D num_stages; =20 descr->in_info =3D kmalloc_objs(struct ia_css_frame_info, - descr->num_stage, GFP_KERNEL); + descr->num_stage); if (!descr->in_info) { err =3D -ENOMEM; goto ERR; @@ -6145,15 +6141,13 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe) mycs->num_output =3D cas_scaler_descr.num_output_stage; mycs->num_yuv_scaler =3D cas_scaler_descr.num_stage; mycs->yuv_scaler_binary =3D kzalloc_objs(struct ia_css_binary, - cas_scaler_descr.num_stage, - GFP_KERNEL); + cas_scaler_descr.num_stage); if (!mycs->yuv_scaler_binary) { err =3D -ENOMEM; goto ERR; } mycs->is_output_stage =3D kzalloc_objs(bool, - cas_scaler_descr.num_stage, - GFP_KERNEL); + cas_scaler_descr.num_stage); if (!mycs->is_output_stage) { err =3D -ENOMEM; goto ERR; diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c index af1f8ead2462..0efc5646242a 100644 --- a/drivers/tee/qcomtee/call.c +++ b/drivers/tee/qcomtee/call.c @@ -417,8 +417,7 @@ static int qcomtee_object_invoke(struct tee_context *ct= x, =20 /* +1 for ending QCOMTEE_ARG_TYPE_INV. */ struct qcomtee_arg *u __free(kfree) =3D kzalloc_objs(*u, - arg->num_params + 1, - GFP_KERNEL); + arg->num_params + 1); if (!u) return -ENOMEM; =20 diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_co= oling.c index 3b85f077c364..32bf5ab44f4a 100644 --- a/drivers/thermal/cpufreq_cooling.c +++ b/drivers/thermal/cpufreq_cooling.c @@ -372,7 +372,7 @@ static int allocate_idle_time(struct cpufreq_cooling_de= vice *cpufreq_cdev) unsigned int num_cpus =3D cpumask_weight(cpufreq_cdev->policy->related_cp= us); =20 cpufreq_cdev->idle_time =3D kzalloc_objs(*cpufreq_cdev->idle_time, - num_cpus, GFP_KERNEL); + num_cpus); if (!cpufreq_cdev->idle_time) return -ENOMEM; =20 diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3400_thermal.c index 6742eaf0a447..d200734625ee 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -391,7 +391,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *p= riv) =20 if (priv->odvp_attrs =3D=3D NULL) { priv->odvp_attrs =3D kzalloc_objs(struct odvp_attr, - priv->odvp_count, GFP_KERNEL); + priv->odvp_count); if (!priv->odvp_attrs) { ret =3D -ENOMEM; goto out_err; diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b= /drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 4c8888fb0a8b..965700ee6962 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -134,8 +134,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(st= ruct acpi_device *adev, int34x_zone->aux_trip_nr =3D trip_cnt; =20 zone_trips =3D kzalloc_objs(*zone_trips, - trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT, - GFP_KERNEL); + trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT); if (!zone_trips) { ret =3D -ENOMEM; goto err_trips_alloc; diff --git a/drivers/thermal/testing/zone.c b/drivers/thermal/testing/zone.c index 7af160ceb634..3c339242f52d 100644 --- a/drivers/thermal/testing/zone.c +++ b/drivers/thermal/testing/zone.c @@ -391,8 +391,7 @@ static int tt_zone_register_tz(struct tt_thermal_zone *= tt_zone) return -EINVAL; =20 struct thermal_trip *trips __free(kfree) =3D kzalloc_objs(*trips, - tt_zone->num_trips, - GFP_KERNEL); + tt_zone->num_trips); if (!trips) return -ENOMEM; =20 diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 7c4cf6d02ece..d0a070c23704 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -1118,7 +1118,7 @@ static int __init sunsab_init(void) =20 if (num_channels) { sunsab_ports =3D kzalloc_objs(struct uart_sunsab_port, - num_channels, GFP_KERNEL); + num_channels); if (!sunsab_ports) return -ENOMEM; =20 diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 06e892beda88..183a25f65ac8 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -1629,8 +1629,7 @@ configfs_attach_gadget_strings(struct gadget_info *gi) if (!nlangs) return NULL; =20 - gadget_strings =3D kzalloc_objs(struct usb_gadget_strings *, nlangs + 1, - GFP_KERNEL)/* including NULL terminator */; + gadget_strings =3D kzalloc_objs(struct usb_gadget_strings *, nlangs + 1)/= * including NULL terminator */; if (!gadget_strings) return ERR_PTR(-ENOMEM); =20 @@ -1646,7 +1645,7 @@ configfs_attach_gadget_strings(struct gadget_info *gi) } =20 stringtab =3D kzalloc_objs(struct usb_string, - language->nstrings + 1, GFP_KERNEL); + language->nstrings + 1); if (!stringtab) { us =3D ERR_PTR(-ENOMEM); goto cleanup; diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/fun= ction/f_midi2.c index 4c663431e99f..b5f0defde95d 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -2855,7 +2855,7 @@ static struct usb_function *f_midi2_alloc(struct usb_= function_instance *fi) } =20 midi2->string_defs =3D 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); diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/fun= ction/u_audio.c index 36d2fedbda11..e53f2927b539 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -1210,7 +1210,7 @@ int g_audio_setup(struct g_audio *g_audio, const char= *pcm_name, prm->srate =3D params->c_srates[0]; =20 prm->reqs =3D kzalloc_objs(struct usb_request *, - params->req_number, GFP_KERNEL); + params->req_number); if (!prm->reqs) { err =3D -ENOMEM; goto fail; @@ -1234,7 +1234,7 @@ int g_audio_setup(struct g_audio *g_audio, const char= *pcm_name, prm->srate =3D params->p_srates[0]; =20 prm->reqs =3D kzalloc_objs(struct usb_request *, - params->req_number, GFP_KERNEL); + params->req_number); if (!prm->reqs) { err =3D -ENOMEM; goto fail; diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp176= 0-hcd.c index fbb83c84beee..6c52c6f59d69 100644 --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c @@ -2573,14 +2573,14 @@ int isp1760_hcd_register(struct isp1760_hcd *priv, = struct resource *mem, priv->hcd =3D hcd; =20 priv->atl_slots =3D kzalloc_objs(struct isp1760_slotinfo, - mem_layout->slot_num, GFP_KERNEL); + mem_layout->slot_num); if (!priv->atl_slots) { ret =3D -ENOMEM; goto put_hcd; } =20 priv->int_slots =3D kzalloc_objs(struct isp1760_slotinfo, - mem_layout->slot_num, GFP_KERNEL); + mem_layout->slot_num); if (!priv->int_slots) { ret =3D -ENOMEM; goto free_atl_slots; diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6= 250.c index 7622bc0426cd..8770de01a384 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -1120,8 +1120,7 @@ static int ms_lib_alloc_writebuf(struct us_data *us) info->MS_Lib.BytesPerSector, GFP_KERNEL); info->MS_Lib.blkext =3D kmalloc_objs(struct ms_lib_type_extdat, - info->MS_Lib.PagesPerBlock, - GFP_KERNEL); + info->MS_Lib.PagesPerBlock); =20 if ((info->MS_Lib.blkpag =3D=3D NULL) || (info->MS_Lib.blkext =3D=3D NULL= )) { ms_lib_free_writebuf(us); diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5= _vnet.c index 8425ad23b961..ad0d5fbbbca8 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -3810,7 +3810,7 @@ static void allocate_irqs(struct mlx5_vdpa_net *ndev) return; =20 ndev->irqp.entries =3D kzalloc_objs(*ndev->irqp.entries, - ndev->mvdev.max_vqs, GFP_KERNEL); + ndev->mvdev.max_vqs); if (!ndev->irqp.entries) return; =20 diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_= sim.c index 5fbecb95f7ff..8cb1cc2ea139 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -255,7 +255,7 @@ struct vdpasim *vdpasim_create(struct vdpasim_dev_attr = *dev_attr, goto err_iommu; =20 vdpasim->iommu_pt =3D kmalloc_objs(*vdpasim->iommu_pt, - vdpasim->dev_attr.nas, GFP_KERNEL); + vdpasim->dev_attr.nas); if (!vdpasim->iommu_pt) goto err_iommu; =20 diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 7c05df14bd4c..1c22880e7226 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1947,8 +1947,7 @@ static int vhost_scsi_setup_vq_cmds(struct vhost_virt= queue *vq, int max_cmds) =20 if (vs->inline_sg_cnt) { tv_cmd->sgl =3D 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_virt= queue *vq, int max_cmds) if (vhost_has_feature(vq, VIRTIO_SCSI_F_T10_PI) && vs->inline_sg_cnt) { tv_cmd->prot_sgl =3D 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; diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro= _enclaves/ne_misc_dev.c index 34b4b982dbbd..c91300a73f50 100644 --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c @@ -295,8 +295,7 @@ static int ne_setup_cpu_pool(const char *ne_cpu_list) ne_cpu_pool.nr_parent_vm_cores =3D nr_cpu_ids / ne_cpu_pool.nr_threads_pe= r_core; =20 ne_cpu_pool.avail_threads_per_core =3D kzalloc_objs(*ne_cpu_pool.avail_th= reads_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 =3D -ENOMEM; =20 @@ -942,7 +941,7 @@ static int ne_set_user_memory_region_ioctl(struct ne_en= clave *ne_enclave, } =20 phys_contig_mem_regions.regions =3D kzalloc_objs(*phys_contig_mem_regions= .regions, - max_nr_pages, GFP_KERNEL); + max_nr_pages); if (!phys_contig_mem_regions.regions) { rc =3D -ENOMEM; =20 @@ -1628,8 +1627,7 @@ static int ne_create_vm_ioctl(struct ne_pci_dev *ne_p= ci_dev, u64 __user *slot_ui mutex_unlock(&ne_cpu_pool.mutex); =20 ne_enclave->threads_per_core =3D kzalloc_objs(*ne_enclave->threads_per_co= re, - ne_enclave->nr_parent_vm_cores, - GFP_KERNEL); + ne_enclave->nr_parent_vm_cores); if (!ne_enclave->threads_per_core) { rc =3D -ENOMEM; =20 diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_b= ase.c index 679e807c3663..bc9a41662efc 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -2293,8 +2293,7 @@ void __init xen_init_IRQ(void) xen_evtchn_cpu_prepare, xen_evtchn_cpu_dead); =20 evtchn_to_irq =3D kzalloc_objs(*evtchn_to_irq, - EVTCHN_ROW(xen_evtchn_max_channels()), - GFP_KERNEL); + EVTCHN_ROW(xen_evtchn_max_channels())); BUG_ON(!evtchn_to_irq); =20 /* No event channels are 'live' right now. */ diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c index 4a6f4325ad04..83b0df460894 100644 --- a/drivers/xen/gntdev-dmabuf.c +++ b/drivers/xen/gntdev-dmabuf.c @@ -535,7 +535,7 @@ static struct gntdev_dmabuf *dmabuf_imp_alloc_storage(i= nt count) goto fail_no_free; =20 gntdev_dmabuf->u.imp.refs =3D kzalloc_objs(gntdev_dmabuf->u.imp.refs[0], - count, GFP_KERNEL); + count); if (!gntdev_dmabuf->u.imp.refs) goto fail; =20 diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-proces= sor.c index a395b382c649..31903bfdce9f 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c @@ -142,7 +142,7 @@ xen_copy_pss_data(struct acpi_processor *_pr, sizeof(struct acpi_processor_px)); =20 dst_states =3D kzalloc_objs(struct xen_processor_px, - _pr->performance->state_count, GFP_KERNEL); + _pr->performance->state_count); if (!dst_states) return ERR_PTR(-ENOMEM); =20 diff --git a/drivers/xen/xen-front-pgdir-shbuf.c b/drivers/xen/xen-front-pg= dir-shbuf.c index f693b963a2e8..9c7d8af6e6a1 100644 --- a/drivers/xen/xen-front-pgdir-shbuf.c +++ b/drivers/xen/xen-front-pgdir-shbuf.c @@ -254,7 +254,7 @@ static int backend_map(struct xen_front_pgdir_shbuf *bu= f) return -ENOMEM; =20 buf->backend_map_handles =3D kzalloc_objs(*buf->backend_map_handles, - buf->num_pages, GFP_KERNEL); + buf->num_pages); if (!buf->backend_map_handles) { kfree(map_ops); return -ENOMEM; diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 322a80b43f32..5540ae1cad59 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -229,7 +229,7 @@ static int afs_deliver_cb_callback(struct afs_call *cal= l) =20 _debug("unmarshall FID array"); call->request =3D kzalloc_objs(struct afs_callback_break, - call->count, GFP_KERNEL); + call->count); if (!call->request) return -ENOMEM; =20 @@ -589,7 +589,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call = *call) =20 _debug("unmarshall FID array"); call->request =3D kzalloc_objs(struct afs_callback_break, - call->count, GFP_KERNEL); + call->count); if (!call->request) return -ENOMEM; =20 diff --git a/fs/afs/dir.c b/fs/afs/dir.c index e778a575e1ca..78caef3f1338 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -835,7 +835,7 @@ static struct inode *afs_do_lookup(struct inode *dir, s= truct dentry *dentry) /* Need space for examining all the selected files */ if (op->nr_files > 2) { op->more_files =3D 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; diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index 69e80c5b6610..490b433e4395 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -47,8 +47,7 @@ static bool afs_start_fs_iteration(struct afs_operation *= op, read_unlock(&op->volume->servers_lock); =20 op->server_states =3D 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); diff --git a/fs/btrfs/fiemap.c b/fs/btrfs/fiemap.c index 2e113f81a2d8..27d361c7adc4 100644 --- a/fs/btrfs/fiemap.c +++ b/fs/btrfs/fiemap.c @@ -647,7 +647,7 @@ static int extent_fiemap(struct btrfs_inode *inode, =20 cache.entries_size =3D PAGE_SIZE / sizeof(struct btrfs_fiemap_entry); cache.entries =3D kmalloc_objs(struct btrfs_fiemap_entry, - cache.entries_size, GFP_KERNEL); + cache.entries_size); backref_ctx =3D btrfs_alloc_backref_share_check_ctx(); path =3D btrfs_alloc_path(); if (!cache.entries || !backref_ctx || !path) { diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 865dc30002cd..81022d912abb 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -374,7 +374,7 @@ static int init_scrub_stripe(struct btrfs_fs_info *fs_i= nfo, goto error; =20 stripe->sectors =3D kzalloc_objs(struct scrub_sector_verification, - stripe->nr_sectors, GFP_KERNEL); + stripe->nr_sectors); if (!stripe->sectors) goto error; =20 @@ -2474,8 +2474,7 @@ static noinline_for_stack int scrub_stripe(struct scr= ub_ctx *sctx, ASSERT(sctx->raid56_data_stripes =3D=3D NULL); =20 sctx->raid56_data_stripes =3D kzalloc_objs(struct scrub_stripe, - nr_data_stripes(map), - GFP_KERNEL); + nr_data_stripes(map)); if (!sctx->raid56_data_stripes) { ret =3D -ENOMEM; goto out; diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 7b2ea38b62dd..904a2f57f86d 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -8098,8 +8098,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, c= onst struct btrfs_ioctl_sen } send_buf_num_pages =3D sctx->send_max_size >> PAGE_SHIFT; sctx->send_buf_pages =3D kzalloc_objs(*sctx->send_buf_pages, - send_buf_num_pages, - GFP_KERNEL); + send_buf_num_pages); if (!sctx->send_buf_pages) { ret =3D -ENOMEM; goto out; @@ -8118,8 +8117,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, c= onst struct btrfs_ioctl_sen } =20 sctx->clone_roots =3D kvzalloc_objs(*sctx->clone_roots, - arg->clone_sources_count + 1, - GFP_KERNEL); + arg->clone_sources_count + 1); if (!sctx->clone_roots) { ret =3D -ENOMEM; goto out; diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 8933f05f5144..23b6d00643c9 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -4231,7 +4231,7 @@ static void handle_session(struct ceph_mds_session *s= ession, } =20 cap_auths =3D 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; diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c index 0facb0e77e33..a0ce9226bc02 100644 --- a/fs/erofs/zutil.c +++ b/fs/erofs/zutil.c @@ -138,8 +138,7 @@ int __init z_erofs_gbuf_init(void) if (z_erofs_rsv_nrpages) { z_erofs_rsvbuf =3D &z_erofs_gbufpool[total - 1]; z_erofs_rsvbuf->pages =3D kzalloc_objs(*z_erofs_rsvbuf->pages, - z_erofs_rsv_nrpages, - GFP_KERNEL); + z_erofs_rsv_nrpages); if (!z_erofs_rsvbuf->pages) { z_erofs_rsvbuf =3D NULL; z_erofs_rsv_nrpages =3D 0; diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index b6d59385e13d..20e9fdaf4301 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3816,8 +3816,7 @@ int ext4_mb_init(struct super_block *sb) sbi->s_mb_nr_global_goals =3D umin(num_possible_cpus(), DIV_ROUND_UP(sbi->s_groups_count, 4)); sbi->s_mb_last_groups =3D 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 =3D=3D NULL) { ret =3D -ENOMEM; goto out; diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index a17f0f590151..50b4cb3aea87 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c @@ -334,8 +334,7 @@ static int zisofs_read_folio(struct file *file, struct = folio *folio) pcount =3D 1; } pages =3D 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; diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index ff469d44b92f..c3ce2c868f7a 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -563,7 +563,7 @@ int jffs2_do_fill_super(struct super_block *sb, struct = fs_context *fc) =20 c->inocache_hashsize =3D calculate_inocache_hashsize(c->flash_size); c->inocache_list =3D kzalloc_objs(struct jffs2_inode_cache *, - c->inocache_hashsize, GFP_KERNEL); + c->inocache_hashsize); if (!c->inocache_list) { ret =3D -ENOMEM; goto out_wbuf; diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 7f317ffa17c2..176873f45677 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -379,8 +379,7 @@ static __be32 decode_rc_list(struct xdr_stream *xdr, if (unlikely(p =3D=3D NULL)) goto out; rc_list->rcl_refcalls =3D kmalloc_objs(*rc_list->rcl_refcalls, - rc_list->rcl_nrefcalls, - GFP_KERNEL); + rc_list->rcl_nrefcalls); if (unlikely(rc_list->rcl_refcalls =3D=3D NULL)) goto out; for (i =3D 0; i < rc_list->rcl_nrefcalls; i++) { @@ -420,7 +419,7 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *= rqstp, args->csa_rclists =3D NULL; if (args->csa_nrclists) { args->csa_rclists =3D kmalloc_objs(*args->csa_rclists, - args->csa_nrclists, GFP_KERNEL); + args->csa_nrclists); if (unlikely(args->csa_rclists =3D=3D NULL)) return htonl(NFS4ERR_RESOURCE); =20 diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index cf40ced95305..122fb3f14ffb 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1603,8 +1603,7 @@ int nfs4_delegation_hash_alloc(struct nfs_server *ser= ver) delegation_buckets =3D roundup_pow_of_two(nfs_delegation_watermark / 16); server->delegation_hash_mask =3D delegation_buckets - 1; server->delegation_hash_table =3D kmalloc_objs(*server->delegation_hash_t= able, - delegation_buckets, - GFP_KERNEL); + delegation_buckets); if (!server->delegation_hash_table) return -ENOMEM; for (i =3D 0; i < delegation_buckets; i++) diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index e8441fae01bf..8fdbba7cad96 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -480,7 +480,7 @@ fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_loc= ations *fsloc) return 0; =20 fsloc->locations =3D kzalloc_objs(struct nfsd4_fs_location, - fsloc->locations_count, GFP_KERNEL); + fsloc->locations_count); if (!fsloc->locations) return -ENOMEM; for (i=3D0; i < fsloc->locations_count; i++) { diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index f72bffca6e0e..b4bf85f96f6e 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -479,7 +479,7 @@ nfs4_legacy_state_init(struct net *net) int i; =20 nn->reclaim_str_hashtbl =3D kmalloc_objs(struct list_head, - CLIENT_HASH_SIZE, GFP_KERNEL); + CLIENT_HASH_SIZE); if (!nn->reclaim_str_hashtbl) return -ENOMEM; =20 @@ -1356,7 +1356,7 @@ nfs4_cld_state_init(struct net *net) int i; =20 nn->reclaim_str_hashtbl =3D kmalloc_objs(struct list_head, - CLIENT_HASH_SIZE, GFP_KERNEL); + CLIENT_HASH_SIZE); if (!nn->reclaim_str_hashtbl) return -ENOMEM; =20 diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 74f50670cbe7..6b9c399b89df 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2358,7 +2358,7 @@ static struct nfs4_client *alloc_client(struct xdr_ne= tobj name, if (clp->cl_name.data =3D=3D NULL) goto err_no_name; clp->cl_ownerstr_hashtbl =3D 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 =3D 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 =3D kmalloc_objs(struct list_head, - SESSION_HASH_SIZE, GFP_KERNEL); + SESSION_HASH_SIZE); if (!nn->sessionid_hashtbl) goto err_sessionid; =20 diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 7930c886dbf5..ed97494abf60 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -230,7 +230,7 @@ static int persistent_ram_init_ecc(struct persistent_ra= m_zone *prz, =20 /* allocate workspace instead of using stack VLA */ prz->ecc_info.par =3D 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; diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 77f36d68621b..c79304012b08 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -2806,7 +2806,7 @@ static int allocate_mr_list(struct smbdirect_socket *= sc) } =20 mr->sgt.sgl =3D kzalloc_objs(struct scatterlist, - sp->max_frmr_depth, GFP_KERNEL); + sp->max_frmr_depth); if (!mr->sgt.sgl) { ret =3D -ENOMEM; log_rdma_mr(ERR, "failed to allocate sgl\n"); diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c index 8b45020b4a13..d83594ce91d2 100644 --- a/fs/squashfs/file.c +++ b/fs/squashfs/file.c @@ -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 =3D kzalloc_objs(*(msblk->meta_index), - SQUASHFS_META_SLOTS, - GFP_KERNEL); + SQUASHFS_META_SLOTS); if (msblk->meta_index =3D=3D NULL) { ERROR("Failed to allocate meta_index\n"); goto failed; diff --git a/fs/udf/super.c b/fs/udf/super.c index ccbf16f50ba5..27f463fd1d89 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1757,7 +1757,7 @@ static noinline int udf_process_sequence( data.size_part_descs =3D PART_DESC_ALLOC_STEP; data.num_part_descs =3D 0; data.part_descs_loc =3D kzalloc_objs(*data.part_descs_loc, - data.size_part_descs, GFP_KERNEL); + data.size_part_descs); if (!data.part_descs_loc) return -ENOMEM; =20 diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 2d14fb6d0ed0..0378e83b4099 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -6077,7 +6077,7 @@ static int bpf_prog_bind_map(union bpf_attr *attr) } =20 used_maps_new =3D 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 =3D -ENOMEM; goto out_unlock; diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index 6c44fbdcfa4d..789add0c185a 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c @@ -186,7 +186,7 @@ static __init bool bp_slots_histogram_alloc(struct bp_slots_histogram *hist, enum bp_type_idx= type) { hist->count =3D kzalloc_objs(*hist->count, - hw_breakpoint_slots_cached(type), GFP_KERNEL); + hw_breakpoint_slots_cached(type)); return hist->count; } =20 diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index 776a226fc237..e618bcf75e2d 100644 --- a/kernel/locking/locktorture.c +++ b/kernel/locking/locktorture.c @@ -611,7 +611,7 @@ static void torture_ww_mutex_init(void) ww_mutex_init(&torture_ww_mutex_2, &torture_ww_class); =20 ww_acquire_ctxs =3D 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 <=3D 0) return 0; call_rcu_chain_list =3D kzalloc_objs(*call_rcu_chain_list, - call_rcu_chains, GFP_KERNEL); + call_rcu_chains); if (!call_rcu_chain_list) return -ENOMEM; for (i =3D 0; i < call_rcu_chains; i++) { @@ -1322,8 +1322,7 @@ static int __init lock_torture_init(void) =20 if (nreaders_stress) { cxt.lrsa =3D kmalloc_objs(*cxt.lrsa, - cxt.nrealreaders_stress, - GFP_KERNEL); + cxt.nrealreaders_stress); if (cxt.lrsa =3D=3D NULL) { VERBOSE_TOROUT_STRING("cxt.lrsa: Out of memory"); firsterr =3D -ENOMEM; @@ -1371,7 +1370,7 @@ static int __init lock_torture_init(void) =20 if (nwriters_stress) { writer_tasks =3D kzalloc_objs(writer_tasks[0], - cxt.nrealwriters_stress, GFP_KERNEL); + cxt.nrealwriters_stress); if (writer_tasks =3D=3D NULL) { TOROUT_ERRSTRING("writer_tasks: Out of memory"); firsterr =3D -ENOMEM; @@ -1385,7 +1384,7 @@ static int __init lock_torture_init(void) =20 if (cxt.cur_ops->readlock) { reader_tasks =3D kzalloc_objs(reader_tasks[0], - cxt.nrealreaders_stress, GFP_KERNEL); + cxt.nrealreaders_stress); if (reader_tasks =3D=3D NULL) { TOROUT_ERRSTRING("reader_tasks: Out of memory"); kfree(writer_tasks); diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 16adcbecf875..4ac2b134a983 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -909,7 +909,7 @@ kfree_scale_init(void) kfree_by_call_rcu); =20 kfree_reader_tasks =3D kzalloc_objs(kfree_reader_tasks[0], - kfree_nrealthreads, GFP_KERNEL); + kfree_nrealthreads); if (kfree_reader_tasks =3D=3D NULL) { firsterr =3D -ENOMEM; goto unwind; @@ -1156,7 +1156,7 @@ rcu_scale_init(void) goto unwind; } writer_freelists =3D 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 =3D kzalloc_objs(wflp->ws_mblocks[0], - gp_async_max, - GFP_KERNEL); + gp_async_max); if (!wflp->ws_mblocks) { firsterr =3D -ENOMEM; goto unwind; diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 9279bb57586b..8a9282a0245c 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -4549,7 +4549,7 @@ rcu_torture_init(void) rcu_torture_write_types(); if (nrealfakewriters > 0) { fakewriter_tasks =3D kzalloc_objs(fakewriter_tasks[0], - nrealfakewriters, GFP_KERNEL); + nrealfakewriters); if (fakewriter_tasks =3D=3D NULL) { TOROUT_ERRSTRING("out of memory"); firsterr =3D -ENOMEM; @@ -4564,7 +4564,7 @@ rcu_torture_init(void) } reader_tasks =3D kzalloc_objs(reader_tasks[0], nrealreaders); rcu_torture_reader_mbchk =3D kzalloc_objs(*rcu_torture_reader_mbchk, - nrealreaders, GFP_KERNEL); + nrealreaders); if (!reader_tasks || !rcu_torture_reader_mbchk) { TOROUT_ERRSTRING("out of memory"); firsterr =3D -ENOMEM; diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c index cd630772e164..c5a3b0bac7c3 100644 --- a/kernel/sched/ext_idle.c +++ b/kernel/sched/ext_idle.c @@ -665,7 +665,7 @@ void scx_idle_init_masks(void) =20 /* Allocate per-node idle cpumasks */ scx_idle_node_masks =3D kzalloc_objs(*scx_idle_node_masks, - num_possible_nodes(), GFP_KERNEL); + num_possible_nodes()); BUG_ON(!scx_idle_node_masks); =20 for_each_node(i) { diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c index a8421f3025cd..c1ed0d5e8de6 100644 --- a/kernel/time/timer_migration.c +++ b/kernel/time/timer_migration.c @@ -2002,7 +2002,7 @@ static int __init tmigr_init(void) tmigr_crossnode_level =3D cpulvl; =20 tmigr_level_list =3D kzalloc_objs(struct list_head, - tmigr_hierarchy_levels, GFP_KERNEL); + tmigr_hierarchy_levels); if (!tmigr_level_list) goto err; =20 diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_= synth.c index 7303491e299d..8bb95b2a6fcf 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -999,8 +999,7 @@ static struct synth_event *alloc_synth_event(const char= *name, int n_fields, =20 if (n_dynamic_fields) { event->dynamic_fields =3D kzalloc_objs(*event->dynamic_fields, - n_dynamic_fields, - GFP_KERNEL); + n_dynamic_fields); if (!event->dynamic_fields) { free_synth_event(event); event =3D ERR_PTR(-ENOMEM); diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 6ecae3e6d10a..37317b81fcda 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c @@ -1338,7 +1338,7 @@ void __init init_ftrace_syscalls(void) =20 if (!IS_ENABLED(CONFIG_HAVE_SPARSE_SYSCALL_NR)) { syscalls_metadata =3D kzalloc_objs(*syscalls_metadata, - NR_syscalls, GFP_KERNEL); + NR_syscalls); if (!syscalls_metadata) { WARN_ON(1); return; diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index bb42a4c35dd3..0bed462e9b2a 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -795,7 +795,7 @@ static int insert_extent(struct uid_gid_map *map, struc= t uid_gid_extent *extent) =20 /* Allocate memory for 340 mappings. */ forward =3D kmalloc_objs(struct uid_gid_extent, - UID_GID_MAP_MAX_EXTENTS, GFP_KERNEL); + UID_GID_MAP_MAX_EXTENTS); if (!forward) return -ENOMEM; =20 diff --git a/lib/objagg.c b/lib/objagg.c index e00cb6758c31..23c7105a3f9f 100644 --- a/lib/objagg.c +++ b/lib/objagg.c @@ -611,7 +611,7 @@ const struct objagg_stats *objagg_stats_get(struct obja= gg *objagg) int i; =20 objagg_stats =3D kzalloc_flex(*objagg_stats, stats_info, - objagg->obj_count, GFP_KERNEL); + objagg->obj_count); if (!objagg_stats) return ERR_PTR(-ENOMEM); =20 @@ -1011,7 +1011,7 @@ objagg_hints_stats_get(struct objagg_hints *objagg_hi= nts) int i; =20 objagg_stats =3D kzalloc_flex(*objagg_stats, stats_info, - objagg_hints->node_count, GFP_KERNEL); + objagg_hints->node_count); if (!objagg_stats) return ERR_PTR(-ENOMEM); =20 diff --git a/mm/damon/stat.c b/mm/damon/stat.c index 06fc95861dd4..25fb44ccf99d 100644 --- a/mm/damon/stat.c +++ b/mm/damon/stat.c @@ -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 =3D 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) { diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index a5f0b74b59f3..e0c7020b12f5 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c @@ -1134,7 +1134,7 @@ static int br_mdb_config_src_list_init(struct nlattr = *src_list, } =20 cfg->src_entries =3D kzalloc_objs(struct br_mdb_src_entry, - cfg->num_src_entries, GFP_KERNEL); + cfg->num_src_entries); if (!cfg->src_entries) return -ENOMEM; =20 diff --git a/net/core/devmem.c b/net/core/devmem.c index 16a1949dbed1..8c9aad776bf4 100644 --- a/net/core/devmem.c +++ b/net/core/devmem.c @@ -242,8 +242,7 @@ net_devmem_bind_dmabuf(struct net_device *dev, =20 if (direction =3D=3D DMA_TO_DEVICE) { binding->tx_vec =3D kvmalloc_objs(struct net_iov *, - dmabuf->size / PAGE_SIZE, - GFP_KERNEL); + dmabuf->size / PAGE_SIZE); if (!binding->tx_vec) { err =3D -ENOMEM; goto err_unmap; @@ -290,8 +289,7 @@ net_devmem_bind_dmabuf(struct net_device *dev, } =20 owner->area.niovs =3D kvmalloc_objs(*owner->area.niovs, - owner->area.num_niovs, - GFP_KERNEL); + owner->area.num_niovs); if (!owner->area.niovs) { err =3D -ENOMEM; goto err_free_chunks; diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 3fb181a3f3c0..a05aa075de1a 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c @@ -169,7 +169,7 @@ static int __init cipso_v4_cache_init(void) u32 iter; =20 cipso_v4_cache =3D kzalloc_objs(struct cipso_v4_map_cache_bkt, - CIPSO_V4_CACHE_BUCKETS, GFP_KERNEL); + CIPSO_V4_CACHE_BUCKETS); if (!cipso_v4_cache) return -ENOMEM; =20 diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 8f4190c7c9ab..537bb6c315d2 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -2755,7 +2755,7 @@ static __net_init int devinet_init_net(struct net *ne= t) =20 err =3D -ENOMEM; net->ipv4.inet_addr_lst =3D kmalloc_objs(struct hlist_head, - IN4_ADDR_HSIZE, GFP_KERNEL); + IN4_ADDR_HSIZE); if (!net->ipv4.inet_addr_lst) goto err_alloc_hash; =20 diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index defe6b30f18f..1aa2b05ee8de 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -714,7 +714,7 @@ static int nh_notifier_grp_hw_stats_init(struct nh_noti= fier_info *info, info->id =3D nh->id; info->type =3D NH_NOTIFIER_INFO_TYPE_GRP_HW_STATS; info->nh_grp_hw_stats =3D kzalloc_flex(*info->nh_grp_hw_stats, stats, - nhg->num_nh, GFP_KERNEL); + nhg->num_nh); if (!info->nh_grp_hw_stats) return -ENOMEM; =20 diff --git a/net/ipv4/udp_tunnel_nic.c b/net/ipv4/udp_tunnel_nic.c index 9716e98b9291..9944ed923ddf 100644 --- a/net/ipv4/udp_tunnel_nic.c +++ b/net/ipv4/udp_tunnel_nic.c @@ -762,8 +762,7 @@ udp_tunnel_nic_alloc(const struct udp_tunnel_nic_info *= info, =20 for (i =3D 0; i < n_tables; i++) { utn->entries[i] =3D 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; } diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 9f48b0f210e6..0e55f139e05d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -7398,7 +7398,7 @@ static int __net_init addrconf_init_net(struct net *n= et) spin_lock_init(&net->ipv6.addrconf_hash_lock); INIT_DEFERRABLE_WORK(&net->ipv6.addr_chk_work, addrconf_verify_work); net->ipv6.inet6_addr_lst =3D kzalloc_objs(struct hlist_head, - IN6_ADDR_HSIZE, GFP_KERNEL); + IN6_ADDR_HSIZE); if (!net->ipv6.inet6_addr_lst) goto err_alloc_addr; =20 diff --git a/net/ipv6/calipso.c b/net/ipv6/calipso.c index ff39220fef8a..c6a34334e657 100644 --- a/net/ipv6/calipso.c +++ b/net/ipv6/calipso.c @@ -134,7 +134,7 @@ static int __init calipso_cache_init(void) u32 iter; =20 calipso_cache =3D kzalloc_objs(struct calipso_map_cache_bkt, - CALIPSO_CACHE_BUCKETS, GFP_KERNEL); + CALIPSO_CACHE_BUCKETS); if (!calipso_cache) return -ENOMEM; =20 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8b76525c56ee..b92b4a5c2636 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3941,7 +3941,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beac= on) if (beacon->mbssid_ies && beacon->mbssid_ies->cnt) { new_beacon->mbssid_ies =3D 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 *beac= on) if (beacon->rnr_ies && beacon->rnr_ies->cnt) { new_beacon->rnr_ies =3D 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); diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 9825d7c70cbc..616f86b1a7e4 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1360,7 +1360,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) =20 =20 local->int_scan_req =3D kzalloc_flex(*local->int_scan_req, channels, - channels, GFP_KERNEL); + channels); if (!local->int_scan_req) return -ENOMEM; =20 diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c index 06dece1fb9ee..020863047562 100644 --- a/net/netfilter/ipvs/ip_vs_mh.c +++ b/net/netfilter/ipvs/ip_vs_mh.c @@ -294,7 +294,7 @@ static int ip_vs_mh_reassign(struct ip_vs_mh_state *s, =20 if (svc->num_dests >=3D 1) { s->dest_setup =3D kzalloc_objs(struct ip_vs_mh_dest_setup, - svc->num_dests, GFP_KERNEL); + svc->num_dests); if (!s->dest_setup) return -ENOMEM; } diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 06bd4d6eefeb..fd7f7e4e2a43 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -4316,7 +4316,7 @@ static int nf_tables_newrule(struct sk_buff *skb, con= st struct nfnl_info *info, size =3D 0; if (nla[NFTA_RULE_EXPRESSIONS]) { expr_info =3D kvmalloc_objs(struct nft_expr_info, - NFT_RULE_MAXEXPRS, GFP_KERNEL); + NFT_RULE_MAXEXPRS); if (!expr_info) return -ENOMEM; =20 diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_c= thelper.c index dbc54a3b7074..d658b1478fa0 100644 --- a/net/netfilter/nfnetlink_cthelper.c +++ b/net/netfilter/nfnetlink_cthelper.c @@ -193,7 +193,7 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_h= elper *helper, return -EOVERFLOW; =20 expect_policy =3D kzalloc_objs(struct nf_conntrack_expect_policy, - class_max, GFP_KERNEL); + class_max); if (expect_policy =3D=3D NULL) return -ENOMEM; =20 diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 0926a9ccfa2d..cf6cd4ccfa20 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1096,8 +1096,7 @@ static int htb_init(struct Qdisc *sch, struct nlattr = *opt, =20 q->num_direct_qdiscs =3D dev->real_num_tx_queues; q->direct_qdiscs =3D kzalloc_objs(*q->direct_qdiscs, - q->num_direct_qdiscs, - GFP_KERNEL); + q->num_direct_qdiscs); if (!q->direct_qdiscs) return -ENOMEM; } diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index c9f999ae10e0..59c92b46945c 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -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 =3D 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 =3D 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 =3D 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 =3D 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 =3D 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; =20 diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5ea834414ed5..3756a93dc63a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3803,7 +3803,7 @@ static int __net_init unix_net_init(struct net *net) goto err_proc; =20 net->unx.table.buckets =3D kvmalloc_objs(struct hlist_head, - UNIX_HASH_SIZE, GFP_KERNEL); + UNIX_HASH_SIZE); if (!net->unx.table.buckets) goto free_locks; =20 diff --git a/net/wireless/core.c b/net/wireless/core.c index bd53317e44ef..4b0645d56344 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1001,7 +1001,7 @@ int wiphy_register(struct wiphy *wiphy) int idx; =20 wiphy->radio_cfg =3D kzalloc_objs(*wiphy->radio_cfg, - wiphy->n_radio, GFP_KERNEL); + wiphy->n_radio); if (!wiphy->radio_cfg) return -ENOMEM; /* diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2ea72c64b405..b94231c8441c 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -14308,7 +14308,7 @@ static int nl80211_set_cqm_rssi(struct genl_info *i= nfo, =20 if (n_thresholds) { cqm_config =3D kzalloc_flex(*cqm_config, rssi_thresholds, - n_thresholds, GFP_KERNEL); + n_thresholds); if (!cqm_config) return -ENOMEM; =20 @@ -15051,7 +15051,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, = struct genl_info *info) return -EINVAL; =20 new_triggers.patterns =3D kzalloc_objs(new_triggers.patterns[0], - n_patterns, GFP_KERNEL); + n_patterns); if (!new_triggers.patterns) return -ENOMEM; =20 diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index 281e7af2c50b..37b7a68b89b3 100644 --- a/net/xdp/xsk_buff_pool.c +++ b/net/xdp/xsk_buff_pool.c @@ -420,7 +420,7 @@ static int xp_init_dma_info(struct xsk_buff_pool *pool,= struct xsk_dma_map *dma_ } =20 pool->dma_pages =3D kvzalloc_objs(*pool->dma_pages, - dma_map->dma_pages_cnt, GFP_KERNEL); + dma_map->dma_pages_cnt); if (!pool->dma_pages) return -ENOMEM; =20 diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c index 5c9e56e525f2..050a82101ca5 100644 --- a/net/xfrm/xfrm_iptfs.c +++ b/net/xfrm/xfrm_iptfs.c @@ -2527,7 +2527,7 @@ static int iptfs_user_init(struct net *net, struct xf= rm_state *x, /* saved array is for saving 1..N seq nums from wantseq */ if (xc->reorder_win_size) { xtfs->w_saved =3D 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, st= ruct xfrm_state *orig) xtfs->ra_newskb =3D NULL; if (xtfs->cfg.reorder_win_size) { xtfs->w_saved =3D 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; diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/i= ma_crypto.c index d4af5f0e7d6c..aff61643415d 100644 --- a/security/integrity/ima/ima_crypto.c +++ b/security/integrity/ima/ima_crypto.c @@ -139,8 +139,7 @@ int __init ima_init_crypto(void) ima_hash_algo_idx =3D NR_BANKS(ima_tpm_chip) + ima_extra_slots++; =20 ima_algo_array =3D 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 =3D -ENOMEM; goto out; diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/condit= ional.c index 67a903081699..824c3f896151 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -166,7 +166,7 @@ int cond_init_bool_indexes(struct policydb *p) { kfree(p->bool_val_to_struct); p->bool_val_to_struct =3D 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; =20 @@ -710,7 +710,7 @@ static int duplicate_policydb_bools(struct policydb *ne= wdb, int rc; =20 cond_bool_array =3D kmalloc_objs(*orig->bool_val_to_struct, - orig->p_bools.nprim, GFP_KERNEL); + orig->p_bools.nprim); if (!cond_bool_array) return -ENOMEM; =20 diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index d3b410d04c25..738fd47f33e6 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -739,22 +739,22 @@ static int policydb_index(struct policydb *p) symtab_hash_eval(p->symtab); =20 p->class_val_to_struct =3D 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; =20 p->role_val_to_struct =3D 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; =20 p->user_val_to_struct =3D 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; =20 p->type_val_to_struct =3D 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; =20 @@ -2724,7 +2724,7 @@ int policydb_read(struct policydb *p, struct policy_f= ile *fp) =20 rc =3D -ENOMEM; p->type_attr_map_array =3D 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; =20 diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_os= s_synth.c index b19b8756638d..c4b82e29ab05 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -214,7 +214,7 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp) info->nr_voices =3D rec->nr_voices; if (info->nr_voices > 0) { info->ch =3D 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); diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index f33c08e7c659..e97721f80f65 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -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 =3D 0; s->ctx_data.tx.cache.descs =3D 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 =3D -ENOMEM; goto err_context; @@ -1758,7 +1757,7 @@ static int amdtp_stream_start(struct amdtp_stream *s,= int channel, int speed, }; =20 s->ctx_data.rx.seq.descs =3D kzalloc_objs(*s->ctx_data.rx.seq.descs, - queue_size, GFP_KERNEL); + queue_size); if (!s->ctx_data.rx.seq.descs) { err =3D -ENOMEM; goto err_context; diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 77845b709e12..08e0556bf161 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -1807,7 +1807,7 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *= emu) goto __err_gpr; =20 controls =3D kzalloc_objs(struct snd_emu10k1_fx8010_control_gpr, - SND_EMU10K1_GPR_CONTROLS, GFP_KERNEL); + SND_EMU10K1_GPR_CONTROLS); if (!controls) goto __err_ctrls; =20 diff --git a/sound/soc/codecs/pcm6240.c b/sound/soc/codecs/pcm6240.c index 9d86793f1958..78b21fbfad50 100644 --- a/sound/soc/codecs/pcm6240.c +++ b/sound/soc/codecs/pcm6240.c @@ -1262,7 +1262,7 @@ static struct pcmdevice_config_info *pcmdevice_add_co= nfig(void *ctxt, config_offset +=3D 4; =20 bk_da =3D cfg_info->blk_data =3D kzalloc_objs(struct pcmdevice_block_data= *, - cfg_info->nblocks, GFP_KERNEL); + cfg_info->nblocks); if (!bk_da) { *status =3D -ENOMEM; goto out; diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-f= mwlib.c index 460fae51c2f5..c969eb38704e 100644 --- a/sound/soc/codecs/tas2781-fmwlib.c +++ b/sound/soc/codecs/tas2781-fmwlib.c @@ -218,7 +218,7 @@ static struct tasdevice_config_info *tasdevice_add_conf= ig( * these firmwares. */ bk_da =3D cfg_info->blk_data =3D kzalloc_objs(struct tasdev_blk_data *, - cfg_info->nblocks, GFP_KERNEL); + cfg_info->nblocks); if (!bk_da) { *status =3D -ENOMEM; goto out; @@ -805,7 +805,7 @@ static int fw_parse_variable_header_kernel( } =20 tas_fmw->programs =3D kzalloc_objs(struct tasdevice_prog, - tas_fmw->nr_programs, GFP_KERNEL); + tas_fmw->nr_programs); if (!tas_fmw->programs) { offset =3D -ENOMEM; goto out; @@ -844,7 +844,7 @@ static int fw_parse_variable_header_kernel( } =20 tas_fmw->configs =3D kzalloc_objs(struct tasdevice_config, - tas_fmw->nr_configurations, GFP_KERNEL); + tas_fmw->nr_configurations); if (!tas_fmw->configs) { offset =3D -ENOMEM; goto out; @@ -1346,7 +1346,7 @@ static int fw_parse_configuration_data( goto out; } tas_fmw->configs =3D kzalloc_objs(struct tasdevice_config, - tas_fmw->nr_configurations, GFP_KERNEL); + tas_fmw->nr_configurations); if (!tas_fmw->configs) { offset =3D -ENOMEM; goto out; @@ -2141,8 +2141,7 @@ static int fw_parse_calibration_data(struct tasdevice= _priv *tas_priv, } =20 tas_fmw->calibrations =3D kzalloc_objs(struct tasdevice_calibration, - tas_fmw->nr_calibrations, - GFP_KERNEL); + tas_fmw->nr_calibrations); if (!tas_fmw->calibrations) { offset =3D -ENOMEM; goto out; diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topolog= y.c index e87ad2f65e5d..e732fac9b8ca 100644 --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -318,8 +318,7 @@ audioreach_get_module_priv_data(const struct snd_soc_tp= lg_private *private) struct audioreach_module_priv_data *pdata; =20 pdata =3D kzalloc_flex(*pdata, data, - le32_to_cpu(mod_array->size), - GFP_KERNEL); + le32_to_cpu(mod_array->size)); if (!pdata) return ERR_PTR(-ENOMEM); =20 diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1630a10c7ea3..2768ba5bfc9f 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3333,8 +3333,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_card *car= d) =20 if (w->num_kcontrols) { w->kcontrols =3D kzalloc_objs(struct snd_kcontrol *, - w->num_kcontrols, - GFP_KERNEL); + w->num_kcontrols); if (!w->kcontrols) { snd_soc_dapm_mutex_unlock(card); return -ENOMEM; diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c index f82b080de4a9..fc3ead77e5ea 100644 --- a/sound/soc/sof/ipc4-pcm.c +++ b/sound/soc/sof/ipc4-pcm.c @@ -477,7 +477,7 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_co= mponent *component, =20 /* allocate memory for the pipeline data */ trigger_list =3D kzalloc_flex(*trigger_list, pipeline_instance_ids, - pipeline_list->count, GFP_KERNEL); + pipeline_list->count); if (!trigger_list) return -ENOMEM; =20 @@ -932,8 +932,7 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev,= struct snd_sof_pcm *spcm =20 /* allocate memory for max number of pipeline IDs */ pipeline_list->pipelines =3D 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; diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 8371e54314b4..db077e9d5644 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -437,8 +437,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_compon= ent *scomp, =20 if (available_fmt->num_input_formats) { in_format =3D 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 =3D in_format; @@ -459,8 +458,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_compon= ent *scomp, =20 if (available_fmt->num_output_formats) { out_format =3D kzalloc_objs(*out_format, - available_fmt->num_output_formats, - GFP_KERNEL); + available_fmt->num_output_formats); if (!out_format) { ret =3D -ENOMEM; goto err_in; diff --git a/sound/synth/emux/emux_effect.c b/sound/synth/emux/emux_effect.c index dacbdf8cd39a..258997240a0a 100644 --- a/sound/synth/emux/emux_effect.c +++ b/sound/synth/emux/emux_effect.c @@ -273,7 +273,7 @@ snd_emux_create_effect(struct snd_emux_port *p) { int i; p->effect =3D kzalloc_objs(struct snd_emux_effect_table, - p->chset.max_channels, GFP_KERNEL); + p->chset.max_channels); if (p->effect) { for (i =3D 0; i < p->chset.max_channels; i++) p->chset.channels[i].private =3D p->effect + i; diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_of= fload.c index 57b803e0c986..01e6063c2207 100644 --- a/sound/usb/qcom/qc_audio_offload.c +++ b/sound/usb/qcom/qc_audio_offload.c @@ -1433,8 +1433,7 @@ static int prepare_qmi_response(struct snd_usb_substr= eam *subs, uadev[card_num].num_intf =3D subs->dev->config->desc.bNumInterfaces; uadev[card_num].info =3D kzalloc_objs(struct intf_info, - uadev[card_num].num_intf, - GFP_KERNEL); + uadev[card_num].num_intf); if (!uadev[card_num].info) { ret =3D -ENOMEM; goto unmap_er; diff --git a/sound/xen/xen_snd_front_evtchnl.c b/sound/xen/xen_snd_front_ev= tchnl.c index 8a8807cbc80c..bc03f71bf16e 100644 --- a/sound/xen/xen_snd_front_evtchnl.c +++ b/sound/xen/xen_snd_front_evtchnl.c @@ -268,7 +268,7 @@ int xen_snd_front_evtchnl_create_all(struct xen_snd_fro= nt_info *front_info, =20 front_info->evt_pairs =3D kzalloc_objs(struct xen_snd_front_evtchnl_pair, - num_streams, GFP_KERNEL); + num_streams); if (!front_info->evt_pairs) return -ENOMEM; =20 --=20 2.34.1