summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_sock.c3
-rw-r--r--net/can/af_can.c6
-rw-r--r--net/ceph/mon_client.c3
-rw-r--r--net/core/dev.c3
-rw-r--r--net/core/drop_monitor.c3
-rw-r--r--net/core/flow_offload.c3
-rw-r--r--net/ethtool/mse.c3
-rw-r--r--net/ipv4/af_inet.c3
-rw-r--r--net/ipv4/fib_semantics.c3
-rw-r--r--net/ipv4/nexthop.c3
-rw-r--r--net/ipv6/addrconf.c3
-rw-r--r--net/ipv6/af_inet6.c3
-rw-r--r--net/ipv6/ip6_fib.c6
-rw-r--r--net/mac80211/util.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_mh.c3
-rw-r--r--net/netfilter/nfnetlink_cthelper.c3
-rw-r--r--net/netlink/policy.c3
-rw-r--r--net/openvswitch/conntrack.c6
-rw-r--r--net/openvswitch/datapath.c3
-rw-r--r--net/openvswitch/vport.c3
-rw-r--r--net/packet/af_packet.c3
-rw-r--r--net/rds/ib.c3
-rw-r--r--net/rds/rdma.c3
-rw-r--r--net/sched/cls_api.c3
-rw-r--r--net/sched/cls_u32.c3
-rw-r--r--net/sched/sch_cake.c3
-rw-r--r--net/sched/sch_fq_codel.c3
-rw-r--r--net/sched/sch_hhf.c3
-rw-r--r--net/sched/sch_mq.c3
-rw-r--r--net/sched/sch_mqprio.c3
-rw-r--r--net/sched/sch_taprio.c3
-rw-r--r--net/smc/smc_wr.c15
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c3
-rw-r--r--net/sunrpc/cache.c3
-rw-r--r--net/sunrpc/svcsock.c3
-rw-r--r--net/tipc/netlink_compat.c6
-rw-r--r--net/unix/af_unix.c3
-rw-r--r--net/wireless/nl80211.c9
-rw-r--r--net/xdp/xsk_buff_pool.c6
40 files changed, 51 insertions, 102 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 66ab920d8f50..25f097cb1685 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1564,8 +1564,7 @@ static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
(chan->mode == L2CAP_MODE_ERTM ||
chan->mode == L2CAP_MODE_LE_FLOWCTL ||
chan->mode == L2CAP_MODE_EXT_FLOWCTL)) {
- struct l2cap_rx_busy *rx_busy = kmalloc_obj(*rx_busy,
- GFP_KERNEL);
+ struct l2cap_rx_busy *rx_busy = kmalloc_obj(*rx_busy);
if (!rx_busy) {
err = -ENOMEM;
goto done;
diff --git a/net/can/af_can.c b/net/can/af_can.c
index e80e516bfde9..f70e2ba0aadc 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -798,15 +798,13 @@ EXPORT_SYMBOL(can_proto_unregister);
static int can_pernet_init(struct net *net)
{
spin_lock_init(&net->can.rcvlists_lock);
- net->can.rx_alldev_list = kzalloc_obj(*net->can.rx_alldev_list,
- GFP_KERNEL);
+ net->can.rx_alldev_list = kzalloc_obj(*net->can.rx_alldev_list);
if (!net->can.rx_alldev_list)
goto out;
net->can.pkg_stats = kzalloc_obj(*net->can.pkg_stats);
if (!net->can.pkg_stats)
goto out_free_rx_alldev_list;
- net->can.rcv_lists_stats = kzalloc_obj(*net->can.rcv_lists_stats,
- GFP_KERNEL);
+ net->can.rcv_lists_stats = kzalloc_obj(*net->can.rcv_lists_stats);
if (!net->can.rcv_lists_stats)
goto out_free_pkg_stats;
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 2e2fd241dd19..5136b3766c44 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -1140,8 +1140,7 @@ static int build_initial_monmap(struct ceph_mon_client *monc)
int i;
/* build initial monmap */
- monc->monmap = kzalloc_flex(*monc->monmap, mon_inst, num_mon,
- GFP_KERNEL);
+ monc->monmap = kzalloc_flex(*monc->monmap, mon_inst, num_mon);
if (!monc->monmap)
return -ENOMEM;
monc->monmap->num_mon = num_mon;
diff --git a/net/core/dev.c b/net/core/dev.c
index 27e5fcbaa2d6..6ff4256700e6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -9133,8 +9133,7 @@ static int netdev_offload_xstats_enable_l3(struct net_device *dev,
int err;
int rc;
- dev->offload_xstats_l3 = kzalloc_obj(*dev->offload_xstats_l3,
- GFP_KERNEL);
+ dev->offload_xstats_l3 = kzalloc_obj(*dev->offload_xstats_l3);
if (!dev->offload_xstats_l3)
return -ENOMEM;
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index da0d231e1952..f23cea9e1aaf 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -306,8 +306,7 @@ net_dm_hw_reset_per_cpu_data(struct per_cpu_dm_data *hw_data)
struct net_dm_hw_entries *hw_entries;
unsigned long flags;
- hw_entries = kzalloc_flex(*hw_entries, entries, dm_hit_limit,
- GFP_KERNEL);
+ hw_entries = kzalloc_flex(*hw_entries, entries, dm_hit_limit);
if (!hw_entries) {
/* If the memory allocation failed, we try to perform another
* allocation in 1/10 second. Otherwise, the probe function
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index c0a9c5b3c977..5071d7fe6ce2 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -32,8 +32,7 @@ struct flow_offload_action *offload_action_alloc(unsigned int num_actions)
struct flow_offload_action *fl_action;
int i;
- fl_action = kzalloc_flex(*fl_action, action.entries, num_actions,
- GFP_KERNEL);
+ fl_action = kzalloc_flex(*fl_action, action.entries, num_actions);
if (!fl_action)
return NULL;
diff --git a/net/ethtool/mse.c b/net/ethtool/mse.c
index 4de15aad543b..8cb3fc5e7be4 100644
--- a/net/ethtool/mse.c
+++ b/net/ethtool/mse.c
@@ -64,8 +64,7 @@ static int mse_get_channels(struct phy_device *phydev,
if (!data->capability.supported_caps)
return 0;
- data->snapshots = kzalloc_objs(*data->snapshots, PHY_MSE_CHANNEL_COUNT,
- GFP_KERNEL);
+ data->snapshots = kzalloc_objs(*data->snapshots, PHY_MSE_CHANNEL_COUNT);
if (!data->snapshots)
return -ENOMEM;
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 6e62e80236a4..8036e76aa1e4 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1737,8 +1737,7 @@ static __net_init int ipv4_mib_init_net(struct net *net)
net->mib.icmp_statistics = alloc_percpu(struct icmp_mib);
if (!net->mib.icmp_statistics)
goto err_icmp_mib;
- net->mib.icmpmsg_statistics = kzalloc_obj(struct icmpmsg_mib,
- GFP_KERNEL);
+ net->mib.icmpmsg_statistics = kzalloc_obj(struct icmpmsg_mib);
if (!net->mib.icmpmsg_statistics)
goto err_icmpmsg_mib;
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index a521ac0da2f7..01cb587866d8 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -365,8 +365,7 @@ static struct hlist_head *fib_info_laddrhash_bucket(const struct net *net,
static struct hlist_head *fib_info_hash_alloc(unsigned int hash_bits)
{
/* The second half is used for prefsrc */
- return kvzalloc_objs(struct hlist_head, (1 << hash_bits) * 2,
- GFP_KERNEL);
+ return kvzalloc_objs(struct hlist_head, (1 << hash_bits) * 2);
}
static void fib_info_hash_free(struct hlist_head *head)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 3518c5f27cb2..defe6b30f18f 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -137,8 +137,7 @@ static int nh_notifier_mpath_info_init(struct nh_notifier_info *info,
int i;
info->type = NH_NOTIFIER_INFO_TYPE_GRP;
- info->nh_grp = kzalloc_flex(*info->nh_grp, nh_entries, num_nh,
- GFP_KERNEL);
+ info->nh_grp = kzalloc_flex(*info->nh_grp, nh_entries, num_nh);
if (!info->nh_grp)
return -ENOMEM;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5696ceb09dc7..9f48b0f210e6 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -355,8 +355,7 @@ static int snmp6_alloc_dev(struct inet6_dev *idev)
}
- idev->stats.icmpv6dev = kzalloc_obj(struct icmpv6_mib_device,
- GFP_KERNEL);
+ idev->stats.icmpv6dev = kzalloc_obj(struct icmpv6_mib_device);
if (!idev->stats.icmpv6dev)
goto err_icmp;
idev->stats.icmpv6msgdev = kzalloc_obj(struct icmpv6msg_mib_device,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 25ff5148c926..23cc9b4cb2f1 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -921,8 +921,7 @@ static int __net_init ipv6_init_mibs(struct net *net)
net->mib.icmpv6_statistics = alloc_percpu(struct icmpv6_mib);
if (!net->mib.icmpv6_statistics)
goto err_icmp_mib;
- net->mib.icmpv6msg_statistics = kzalloc_obj(struct icmpv6msg_mib,
- GFP_KERNEL);
+ net->mib.icmpv6msg_statistics = kzalloc_obj(struct icmpv6msg_mib);
if (!net->mib.icmpv6msg_statistics)
goto err_icmpmsg_mib;
return 0;
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 2029d40a9d2c..9058e71241dc 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -2477,8 +2477,7 @@ static int __net_init fib6_net_init(struct net *net)
spin_lock_init(&net->ipv6.fib_table_hash_lock);
- net->ipv6.fib6_main_tbl = kzalloc_obj(*net->ipv6.fib6_main_tbl,
- GFP_KERNEL);
+ net->ipv6.fib6_main_tbl = kzalloc_obj(*net->ipv6.fib6_main_tbl);
if (!net->ipv6.fib6_main_tbl)
goto out_fib_table_hash;
@@ -2491,8 +2490,7 @@ static int __net_init fib6_net_init(struct net *net)
INIT_HLIST_HEAD(&net->ipv6.fib6_main_tbl->tb6_gc_hlist);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
- net->ipv6.fib6_local_tbl = kzalloc_obj(*net->ipv6.fib6_local_tbl,
- GFP_KERNEL);
+ net->ipv6.fib6_local_tbl = kzalloc_obj(*net->ipv6.fib6_local_tbl);
if (!net->ipv6.fib6_local_tbl)
goto out_fib6_main_tbl;
net->ipv6.fib6_local_tbl->tb6_id = RT6_TABLE_LOCAL;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 22efb399b5bc..b2e6c8b98381 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1742,8 +1742,7 @@ static int ieee80211_reconfig_nan(struct ieee80211_sub_if_data *sdata)
if (WARN_ON(res))
return res;
- funcs = kzalloc_objs(*funcs, sdata->local->hw.max_nan_de_entries + 1,
- GFP_KERNEL);
+ funcs = kzalloc_objs(*funcs, sdata->local->hw.max_nan_de_entries + 1);
if (!funcs)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index e05991ec49f3..005c1134d756 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1510,8 +1510,7 @@ int __init ip_vs_conn_init(void)
*/
tab_array_size = array_size(ip_vs_conn_tab_size,
sizeof(*ip_vs_conn_tab));
- ip_vs_conn_tab = kvmalloc_objs(*ip_vs_conn_tab, ip_vs_conn_tab_size,
- GFP_KERNEL);
+ ip_vs_conn_tab = kvmalloc_objs(*ip_vs_conn_tab, ip_vs_conn_tab_size);
if (!ip_vs_conn_tab)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index c029ff6b3eb2..06dece1fb9ee 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -386,8 +386,7 @@ static int ip_vs_mh_init_svc(struct ip_vs_service *svc)
if (!s)
return -ENOMEM;
- s->lookup = kzalloc_objs(struct ip_vs_mh_lookup, IP_VS_MH_TAB_SIZE,
- GFP_KERNEL);
+ s->lookup = kzalloc_objs(struct ip_vs_mh_lookup, IP_VS_MH_TAB_SIZE);
if (!s->lookup) {
kfree(s);
return -ENOMEM;
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index 5efffc52d981..dbc54a3b7074 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -322,8 +322,7 @@ static int nfnl_cthelper_update_policy_all(struct nlattr *tb[],
struct nf_conntrack_expect_policy *policy;
int i, ret = 0;
- new_policy = kmalloc_objs(*new_policy, helper->expect_class_max + 1,
- GFP_KERNEL);
+ new_policy = kmalloc_objs(*new_policy, helper->expect_class_max + 1);
if (!new_policy)
return -ENOMEM;
diff --git a/net/netlink/policy.c b/net/netlink/policy.c
index a3e818c7c0cf..f39cd7cc4fb5 100644
--- a/net/netlink/policy.c
+++ b/net/netlink/policy.c
@@ -102,8 +102,7 @@ static struct netlink_policy_dump_state *alloc_state(void)
{
struct netlink_policy_dump_state *state;
- state = kzalloc_flex(*state, policies, INITIAL_POLICIES_ALLOC,
- GFP_KERNEL);
+ state = kzalloc_flex(*state, policies, INITIAL_POLICIES_ALLOC);
if (!state)
return ERR_PTR(-ENOMEM);
state->n_alloc = INITIAL_POLICIES_ALLOC;
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 8051e3127d2c..7c9256572284 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1586,15 +1586,13 @@ static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
{
int i, err;
- ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info,
- GFP_KERNEL);
+ ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info);
if (!ovs_net->ct_limit_info)
return -ENOMEM;
ovs_net->ct_limit_info->default_limit = OVS_CT_LIMIT_DEFAULT;
ovs_net->ct_limit_info->limits =
- kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS,
- GFP_KERNEL);
+ kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS);
if (!ovs_net->ct_limit_info->limits) {
kfree(ovs_net->ct_limit_info);
return -ENOMEM;
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index bbb9b52861c0..e209099218b4 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1797,8 +1797,7 @@ static int ovs_dp_vport_init(struct datapath *dp)
{
int i;
- dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS,
- GFP_KERNEL);
+ dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS);
if (!dp->ports)
return -ENOMEM;
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 4b83512cbc65..23f629e94a36 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -34,8 +34,7 @@ static struct hlist_head *dev_table;
*/
int ovs_vport_init(void)
{
- dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS,
- GFP_KERNEL);
+ dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS);
if (!dev_table)
return -ENOMEM;
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 753f3bb25970..72d0935139f0 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1754,8 +1754,7 @@ static int fanout_add(struct sock *sk, struct fanout_args *args)
/* legacy PACKET_FANOUT_MAX */
args->max_num_members = 256;
err = -ENOMEM;
- match = kvzalloc_flex(*match, arr, args->max_num_members,
- GFP_KERNEL);
+ match = kvzalloc_flex(*match, arr, args->max_num_members);
if (!match)
goto out;
write_pnet(&match->net, sock_net(sk));
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 8457ec7c3ab8..ac6affa33ce7 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -172,8 +172,7 @@ static int rds_ib_add_one(struct ib_device *device)
rds_ibdev->max_initiator_depth = device->attrs.max_qp_init_rd_atom;
rds_ibdev->max_responder_resources = device->attrs.max_qp_rd_atom;
- rds_ibdev->vector_load = kzalloc_objs(int, device->num_comp_vectors,
- GFP_KERNEL);
+ rds_ibdev->vector_load = kzalloc_objs(int, device->num_comp_vectors);
if (!rds_ibdev->vector_load) {
pr_err("RDS/IB: %s failed to allocate vector memory\n",
__func__);
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 0206492014b7..aa6465dc742c 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -934,8 +934,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
* would have to use GFP_ATOMIC there, and don't want to deal
* with failed allocations.
*/
- rm->atomic.op_notifier = kmalloc_obj(*rm->atomic.op_notifier,
- GFP_KERNEL);
+ rm->atomic.op_notifier = kmalloc_obj(*rm->atomic.op_notifier);
if (!rm->atomic.op_notifier) {
ret = -ENOMEM;
goto err;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index a6729e87bc25..343309e9009b 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3341,8 +3341,7 @@ int tcf_exts_init_ex(struct tcf_exts *exts, struct net *net, int action,
* This reference might be taken later from tcf_exts_get_net().
*/
exts->net = net;
- exts->actions = kzalloc_objs(struct tc_action *, TCA_ACT_MAX_PRIO,
- GFP_KERNEL);
+ exts->actions = kzalloc_objs(struct tc_action *, TCA_ACT_MAX_PRIO);
if (!exts->actions)
return -ENOMEM;
#endif
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index eec222908977..9241c025aa74 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -1480,8 +1480,7 @@ static int __init init_u32(void)
#ifdef CONFIG_NET_CLS_ACT
pr_info(" Actions configured\n");
#endif
- tc_u_common_hash = kvmalloc_objs(struct hlist_head, U32_HASH_SIZE,
- GFP_KERNEL);
+ tc_u_common_hash = kvmalloc_objs(struct hlist_head, U32_HASH_SIZE);
if (!tc_u_common_hash)
return -ENOMEM;
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index 7c7a068513e7..a01f14b1c216 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2849,8 +2849,7 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt,
for (i = 1; i <= CAKE_QUEUES; i++)
quantum_div[i] = 65535 / i;
- qd->tins = kvzalloc_objs(struct cake_tin_data, CAKE_MAX_TINS,
- GFP_KERNEL);
+ qd->tins = kvzalloc_objs(struct cake_tin_data, CAKE_MAX_TINS);
if (!qd->tins)
return -ENOMEM;
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 16cd38a179e5..8181b52dd9a8 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -496,8 +496,7 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt,
goto init_failure;
if (!q->flows) {
- q->flows = kvzalloc_objs(struct fq_codel_flow, q->flows_cnt,
- GFP_KERNEL);
+ q->flows = kvzalloc_objs(struct fq_codel_flow, q->flows_cnt);
if (!q->flows) {
err = -ENOMEM;
goto init_failure;
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index a386c40b67da..95e5d9bfd9c8 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -604,8 +604,7 @@ static int hhf_init(struct Qdisc *sch, struct nlattr *opt,
if (!q->hh_flows) {
/* Initialize heavy-hitter flow table. */
- q->hh_flows = kvzalloc_objs(struct list_head, HH_FLOWS_CNT,
- GFP_KERNEL);
+ q->hh_flows = kvzalloc_objs(struct list_head, HH_FLOWS_CNT);
if (!q->hh_flows)
return -ENOMEM;
for (i = 0; i < HH_FLOWS_CNT; i++)
diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c
index 4dd8379c97b6..0ed199fa18f0 100644
--- a/net/sched/sch_mq.c
+++ b/net/sched/sch_mq.c
@@ -82,8 +82,7 @@ int mq_init_common(struct Qdisc *sch, struct nlattr *opt,
return -EOPNOTSUPP;
/* pre-allocate qdiscs, attachment can't fail */
- priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues,
- GFP_KERNEL);
+ priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues);
if (!priv->qdiscs)
return -ENOMEM;
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index ddb18e97bb91..b83276409416 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -388,8 +388,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt,
}
/* pre-allocate qdisc, attachment can't fail */
- priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues,
- GFP_KERNEL);
+ priv->qdiscs = kzalloc_objs(priv->qdiscs[0], dev->num_tx_queues);
if (!priv->qdiscs)
return -ENOMEM;
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index 2e42a6801d5b..f721c03514f6 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -1376,8 +1376,7 @@ static struct tc_taprio_qopt_offload *taprio_offload_alloc(int num_entries)
{
struct __tc_taprio_qopt_offload *__offload;
- __offload = kzalloc_flex(*__offload, offload.entries, num_entries,
- GFP_KERNEL);
+ __offload = kzalloc_flex(*__offload, offload.entries, num_entries);
if (!__offload)
return NULL;
diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c
index b423abb4210d..c9f999ae10e0 100644
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -749,12 +749,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
GFP_KERNEL);
if (!link->wr_rx_bufs)
goto no_mem_wr_tx_bufs;
- link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr,
- GFP_KERNEL);
+ link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr);
if (!link->wr_tx_ibs)
goto no_mem_wr_rx_bufs;
- link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr,
- GFP_KERNEL);
+ link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr);
if (!link->wr_rx_ibs)
goto no_mem_wr_tx_ibs;
link->wr_tx_rdmas = kzalloc_objs(link->wr_tx_rdmas[0],
@@ -765,8 +763,7 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
link->max_send_wr, GFP_KERNEL);
if (!link->wr_tx_rdma_sges)
goto no_mem_wr_tx_rdmas;
- link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr,
- GFP_KERNEL);
+ link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr);
if (!link->wr_tx_sges)
goto no_mem_wr_tx_rdma_sges;
link->wr_rx_sges = kcalloc(link->max_recv_wr,
@@ -790,12 +787,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
link->wr_tx_v2_ib = kzalloc_obj(*link->wr_tx_v2_ib);
if (!link->wr_tx_v2_ib)
goto no_mem_tx_compl;
- link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge,
- GFP_KERNEL);
+ link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge);
if (!link->wr_tx_v2_sge)
goto no_mem_v2_ib;
- link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend,
- GFP_KERNEL);
+ link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend);
if (!link->wr_tx_v2_pend)
goto no_mem_v2_sge;
}
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 932908c1ef67..9d3fb6848f40 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1817,8 +1817,7 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
last = (snd_buf->page_base + snd_buf->page_len - 1) >> PAGE_SHIFT;
rqstp->rq_enc_pages_num = last - first + 1 + 1;
rqstp->rq_enc_pages
- = kmalloc_objs(struct page *, rqstp->rq_enc_pages_num,
- GFP_KERNEL);
+ = kmalloc_objs(struct page *, rqstp->rq_enc_pages_num);
if (!rqstp->rq_enc_pages)
goto out;
for (i=0; i < rqstp->rq_enc_pages_num; i++) {
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 9b27b533a3c0..237f67a5d004 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1745,8 +1745,7 @@ struct cache_detail *cache_create_net(const struct cache_detail *tmpl, struct ne
if (cd == NULL)
return ERR_PTR(-ENOMEM);
- cd->hash_table = kzalloc_objs(struct hlist_head, cd->hash_size,
- GFP_KERNEL);
+ cd->hash_table = kzalloc_objs(struct hlist_head, cd->hash_size);
if (cd->hash_table == NULL) {
kfree(cd);
return ERR_PTR(-ENOMEM);
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index d7845650f0a0..f28c6076f7e8 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1441,8 +1441,7 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
return ERR_PTR(-ENOMEM);
if (sendpages) {
- svsk->sk_bvec = kzalloc_objs(*svsk->sk_bvec, sendpages,
- GFP_KERNEL);
+ svsk->sk_bvec = kzalloc_objs(*svsk->sk_bvec, sendpages);
if (!svsk->sk_bvec) {
kfree(svsk);
return ERR_PTR(-ENOMEM);
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index f64f03ab4933..2a786c56c8c5 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -202,8 +202,7 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
return -ENOMEM;
}
- attrbuf = kzalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1,
- GFP_KERNEL);
+ attrbuf = kzalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1);
if (!attrbuf) {
err = -ENOMEM;
goto err_out;
@@ -338,8 +337,7 @@ static int __tipc_nl_compat_doit(struct tipc_nl_compat_cmd_doit *cmd,
if (!trans_buf)
return -ENOMEM;
- attrbuf = kmalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1,
- GFP_KERNEL);
+ attrbuf = kmalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1);
if (!attrbuf) {
err = -ENOMEM;
goto trans_out;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 1c4d298a9eb3..5ea834414ed5 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -3798,8 +3798,7 @@ static int __net_init unix_net_init(struct net *net)
goto err_sysctl;
#endif
- net->unx.table.locks = kvmalloc_objs(spinlock_t, UNIX_HASH_SIZE,
- GFP_KERNEL);
+ net->unx.table.locks = kvmalloc_objs(spinlock_t, UNIX_HASH_SIZE);
if (!net->unx.table.locks)
goto err_proc;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 814992861b4f..2ea72c64b405 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1106,8 +1106,7 @@ static int nl80211_prepare_wdev_dump(struct netlink_callback *cb,
struct nlattr **attrbuf_free = NULL;
if (!attrbuf) {
- attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR,
- GFP_KERNEL);
+ attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR);
if (!attrbuf)
return -ENOMEM;
attrbuf_free = attrbuf;
@@ -15299,8 +15298,7 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev,
if (n_patterns > coalesce->n_patterns)
return -EINVAL;
- new_rule->patterns = kzalloc_objs(new_rule->patterns[0], n_patterns,
- GFP_KERNEL);
+ new_rule->patterns = kzalloc_objs(new_rule->patterns[0], n_patterns);
if (!new_rule->patterns)
return -ENOMEM;
@@ -16094,8 +16092,7 @@ static int nl80211_nan_add_func(struct sk_buff *skb,
func->srf_num_macs = n_entries;
func->srf_macs =
- kzalloc_objs(*func->srf_macs, n_entries,
- GFP_KERNEL);
+ kzalloc_objs(*func->srf_macs, n_entries);
if (!func->srf_macs) {
err = -ENOMEM;
goto out;
diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
index e8a62743e3db..281e7af2c50b 100644
--- a/net/xdp/xsk_buff_pool.c
+++ b/net/xdp/xsk_buff_pool.c
@@ -42,8 +42,7 @@ void xp_destroy(struct xsk_buff_pool *pool)
int xp_alloc_tx_descs(struct xsk_buff_pool *pool, struct xdp_sock *xs)
{
- pool->tx_descs = kvzalloc_objs(*pool->tx_descs, xs->tx->nentries,
- GFP_KERNEL);
+ pool->tx_descs = kvzalloc_objs(*pool->tx_descs, xs->tx->nentries);
if (!pool->tx_descs)
return -ENOMEM;
@@ -332,8 +331,7 @@ static struct xsk_dma_map *xp_create_dma_map(struct device *dev, struct net_devi
if (!dma_map)
return NULL;
- dma_map->dma_pages = kvzalloc_objs(*dma_map->dma_pages, nr_pages,
- GFP_KERNEL);
+ dma_map->dma_pages = kvzalloc_objs(*dma_map->dma_pages, nr_pages);
if (!dma_map->dma_pages) {
kfree(dma_map);
return NULL;