diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /net | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
309 files changed, 576 insertions, 576 deletions
diff --git a/net/802/garp.c b/net/802/garp.c index ceeb5f5fac02..6f563b6797d9 100644 --- a/net/802/garp.c +++ b/net/802/garp.c @@ -547,7 +547,7 @@ static int garp_init_port(struct net_device *dev) { struct garp_port *port; - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; rcu_assign_pointer(dev->garp_port, port); @@ -581,7 +581,7 @@ int garp_init_applicant(struct net_device *dev, struct garp_application *appl) } err = -ENOMEM; - app = kzalloc_obj(*app, GFP_KERNEL); + app = kzalloc_obj(*app); if (!app) goto err2; diff --git a/net/802/mrp.c b/net/802/mrp.c index f65c95d43a4e..ff0e80574e6b 100644 --- a/net/802/mrp.c +++ b/net/802/mrp.c @@ -832,7 +832,7 @@ static int mrp_init_port(struct net_device *dev) { struct mrp_port *port; - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; rcu_assign_pointer(dev->mrp_port, port); @@ -866,7 +866,7 @@ int mrp_init_applicant(struct net_device *dev, struct mrp_application *appl) } err = -ENOMEM; - app = kzalloc_obj(*app, GFP_KERNEL); + app = kzalloc_obj(*app); if (!app) goto err2; diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index d7849667ddf0..d23965e76c16 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -150,7 +150,7 @@ static struct vlan_info *vlan_info_alloc(struct net_device *dev) { struct vlan_info *vlan_info; - vlan_info = kzalloc_obj(struct vlan_info, GFP_KERNEL); + vlan_info = kzalloc_obj(struct vlan_info); if (!vlan_info) return NULL; @@ -193,7 +193,7 @@ static struct vlan_vid_info *vlan_vid_info_alloc(__be16 proto, u16 vid) { struct vlan_vid_info *vid_info; - vid_info = kzalloc_obj(struct vlan_vid_info, GFP_KERNEL); + vid_info = kzalloc_obj(struct vlan_vid_info); if (!vid_info) return NULL; vid_info->proto = proto; diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 176912c62915..c40f7d5c4fca 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -192,7 +192,7 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, /* Create a new mapping then. */ mp = vlan->egress_priority_map[skb_prio & 0xF]; - np = kmalloc_obj(struct vlan_priority_tci_mapping, GFP_KERNEL); + np = kmalloc_obj(struct vlan_priority_tci_mapping); if (!np) return -ENOBUFS; @@ -708,7 +708,7 @@ static int vlan_dev_netpoll_setup(struct net_device *dev) struct netpoll *netpoll; int err = 0; - netpoll = kzalloc_obj(*netpoll, GFP_KERNEL); + netpoll = kzalloc_obj(*netpoll); err = -ENOMEM; if (!netpoll) goto out; diff --git a/net/9p/client.c b/net/9p/client.c index 3e8de85c7f7f..f0dcf252af7e 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -730,7 +730,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) struct p9_fid *fid; p9_debug(P9_DEBUG_FID, "clnt %p\n", clnt); - fid = kzalloc_obj(*fid, GFP_KERNEL); + fid = kzalloc_obj(*fid); if (!fid) return NULL; @@ -859,7 +859,7 @@ struct p9_client *p9_client_create(struct fs_context *fc) char *client_id; char *cache_name; - clnt = kmalloc_obj(*clnt, GFP_KERNEL); + clnt = kmalloc_obj(*clnt); if (!clnt) return ERR_PTR(-ENOMEM); @@ -1615,7 +1615,7 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) p9_debug(P9_DEBUG_9P, ">>> TSTAT fid %d\n", fid->fid); - ret = kmalloc_obj(*ret, GFP_KERNEL); + ret = kmalloc_obj(*ret); if (!ret) return ERR_PTR(-ENOMEM); @@ -1667,7 +1667,7 @@ struct p9_stat_dotl *p9_client_getattr_dotl(struct p9_fid *fid, p9_debug(P9_DEBUG_9P, ">>> TGETATTR fid %d, request_mask %lld\n", fid->fid, request_mask); - ret = kmalloc_obj(*ret, GFP_KERNEL); + ret = kmalloc_obj(*ret); if (!ret) return ERR_PTR(-ENOMEM); diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 4e0f4a382ac4..dbad3213ba84 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -719,7 +719,7 @@ static int p9_fd_show_options(struct seq_file *m, struct p9_client *clnt) static int p9_fd_open(struct p9_client *client, int rfd, int wfd) { - struct p9_trans_fd *ts = kzalloc_obj(struct p9_trans_fd, GFP_KERNEL); + struct p9_trans_fd *ts = kzalloc_obj(struct p9_trans_fd); if (!ts) return -ENOMEM; @@ -763,7 +763,7 @@ static int p9_socket_open(struct p9_client *client, struct socket *csocket) struct p9_trans_fd *p; struct file *file; - p = kzalloc_obj(struct p9_trans_fd, GFP_KERNEL); + p = kzalloc_obj(struct p9_trans_fd); if (!p) { sock_release(csocket); return -ENOMEM; diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index c8e27c08a3a2..aa5bd74d333f 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -460,7 +460,7 @@ static struct p9_trans_rdma *alloc_rdma(struct p9_rdma_opts *opts) { struct p9_trans_rdma *rdma; - rdma = kzalloc_obj(struct p9_trans_rdma, GFP_KERNEL); + rdma = kzalloc_obj(struct p9_trans_rdma); if (!rdma) return NULL; diff --git a/net/9p/trans_usbg.c b/net/9p/trans_usbg.c index e167f9f23d65..1ce70338999c 100644 --- a/net/9p/trans_usbg.c +++ b/net/9p/trans_usbg.c @@ -757,7 +757,7 @@ static struct usb_function *usb9pfs_alloc(struct usb_function_instance *fi) struct f_usb9pfs_opts *usb9pfs_opts; struct f_usb9pfs *usb9pfs; - usb9pfs = kzalloc_obj(*usb9pfs, GFP_KERNEL); + usb9pfs = kzalloc_obj(*usb9pfs); if (!usb9pfs) return ERR_PTR(-ENOMEM); @@ -910,7 +910,7 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) struct f_usb9pfs_opts *usb9pfs_opts; struct f_usb9pfs_dev *dev; - usb9pfs_opts = kzalloc_obj(*usb9pfs_opts, GFP_KERNEL); + usb9pfs_opts = kzalloc_obj(*usb9pfs_opts); if (!usb9pfs_opts) return ERR_PTR(-ENOMEM); @@ -921,7 +921,7 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) usb9pfs_opts->buflen = DEFAULT_BUFLEN; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) { kfree(usb9pfs_opts); return ERR_PTR(-ENOMEM); diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0577bdcb67bf..4cdab7094b27 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -601,7 +601,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) return -EINVAL; } - chan = kmalloc_obj(struct virtio_chan, GFP_KERNEL); + chan = kmalloc_obj(struct virtio_chan); if (!chan) { pr_err("Failed to allocate virtio 9P channel\n"); err = -ENOMEM; @@ -641,7 +641,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) if (err) { goto out_free_tag; } - chan->vc_wq = kmalloc_obj(wait_queue_head_t, GFP_KERNEL); + chan->vc_wq = kmalloc_obj(wait_queue_head_t); if (!chan->vc_wq) { err = -ENOMEM; goto out_remove_file; diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index fd6ac8658549..47af5a10e921 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -417,11 +417,11 @@ static int xen_9pfs_front_init(struct xenbus_device *dev) if (p9_xen_trans.maxsize > XEN_FLEX_RING_SIZE(max_ring_order)) p9_xen_trans.maxsize = XEN_FLEX_RING_SIZE(max_ring_order) / 2; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; priv->dev = dev; - priv->rings = kzalloc_objs(*priv->rings, XEN_9PFS_NUM_RINGS, GFP_KERNEL); + priv->rings = kzalloc_objs(*priv->rings, XEN_9PFS_NUM_RINGS); if (!priv->rings) { kfree(priv); return -ENOMEM; diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 53c613e36245..30a6dc06291c 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -233,7 +233,7 @@ static void atif_drop_device(struct net_device *dev) static struct atalk_iface *atif_add_device(struct net_device *dev, struct atalk_addr *sa) { - struct atalk_iface *iface = kzalloc_obj(*iface, GFP_KERNEL); + struct atalk_iface *iface = kzalloc_obj(*iface); if (!iface) goto out; diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 8fdc25271708..6580d67c3456 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -538,7 +538,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg) if (copy_from_user(&be, arg, sizeof be)) return -EFAULT; - brvcc = kzalloc_obj(struct br2684_vcc, GFP_KERNEL); + brvcc = kzalloc_obj(struct br2684_vcc); if (!brvcc) return -ENOMEM; /* diff --git a/net/atm/clip.c b/net/atm/clip.c index 40553fcab389..516b2214680b 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -431,7 +431,7 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) return -EBADFD; if (vcc->user_back) return -EINVAL; - clip_vcc = kmalloc_obj(struct clip_vcc, GFP_KERNEL); + clip_vcc = kmalloc_obj(struct clip_vcc); if (!clip_vcc) return -ENOMEM; pr_debug("%p vcc %p\n", clip_vcc, vcc); diff --git a/net/atm/lec.c b/net/atm/lec.c index cba26158c4ad..a107375c0629 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -696,7 +696,7 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) ioc_data.dev_num = array_index_nospec(ioc_data.dev_num, MAX_LEC_ITF); if (!dev_lec[ioc_data.dev_num]) return -EINVAL; - vpriv = kmalloc_obj(struct lec_vcc_priv, GFP_KERNEL); + vpriv = kmalloc_obj(struct lec_vcc_priv); if (!vpriv) return -ENOMEM; vpriv->xoff = 0; @@ -2125,7 +2125,7 @@ static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc) struct lec_vcc_priv *vpriv; int err = 0; - vpriv = kmalloc_obj(struct lec_vcc_priv, GFP_KERNEL); + vpriv = kmalloc_obj(struct lec_vcc_priv); if (!vpriv) return -ENOMEM; vpriv->xoff = 0; diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 3e2b13734fc4..ce8e9780373b 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -184,7 +184,7 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos) return entry; } - entry = kmalloc_obj(struct atm_mpoa_qos, GFP_KERNEL); + entry = kmalloc_obj(struct atm_mpoa_qos); if (entry == NULL) { pr_info("mpoa: out of memory\n"); return entry; @@ -282,7 +282,7 @@ static struct mpoa_client *alloc_mpc(void) { struct mpoa_client *mpc; - mpc = kzalloc_obj(struct mpoa_client, GFP_KERNEL); + mpc = kzalloc_obj(struct mpoa_client); if (mpc == NULL) return NULL; rwlock_init(&mpc->ingress_lock); diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index b584ab72ed2f..c8d4e6f2e831 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c @@ -97,7 +97,7 @@ static in_cache_entry *in_cache_get_by_vcc(struct atm_vcc *vcc, static in_cache_entry *in_cache_add_entry(__be32 dst_ip, struct mpoa_client *client) { - in_cache_entry *entry = kzalloc_obj(in_cache_entry, GFP_KERNEL); + in_cache_entry *entry = kzalloc_obj(in_cache_entry); if (entry == NULL) { pr_info("mpoa: mpoa_caches.c: new_in_cache_entry: out of memory\n"); @@ -456,7 +456,7 @@ static void eg_cache_remove_entry(eg_cache_entry *entry, static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) { - eg_cache_entry *entry = kzalloc_obj(eg_cache_entry, GFP_KERNEL); + eg_cache_entry *entry = kzalloc_obj(eg_cache_entry); if (entry == NULL) { pr_info("out of memory\n"); diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index 133b0cda7063..2574aae3e066 100644 --- a/net/atm/pppoatm.c +++ b/net/atm/pppoatm.c @@ -397,7 +397,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg) if (be.encaps != PPPOATM_ENCAPS_AUTODETECT && be.encaps != PPPOATM_ENCAPS_VC && be.encaps != PPPOATM_ENCAPS_LLC) return -EINVAL; - pvcc = kzalloc_obj(*pvcc, GFP_KERNEL); + pvcc = kzalloc_obj(*pvcc); if (pvcc == NULL) return -ENOMEM; pvcc->atmvcc = atmvcc; diff --git a/net/atm/resources.c b/net/atm/resources.c index 9849521feaf3..939452a610c0 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -36,7 +36,7 @@ static struct atm_dev *__alloc_atm_dev(const char *type) { struct atm_dev *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return NULL; dev->type = type; diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 855ae9df824d..a76f4793aed2 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -1249,7 +1249,7 @@ static int __must_check ax25_connect(struct socket *sock, goto out_release; } - if ((digi = kmalloc_obj(ax25_digi, GFP_KERNEL)) == NULL) { + if ((digi = kmalloc_obj(ax25_digi)) == NULL) { err = -ENOBUFS; goto out_release; } diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c index 56f605ddd88d..3c0544fc4ad5 100644 --- a/net/ax25/ax25_dev.c +++ b/net/ax25/ax25_dev.c @@ -54,7 +54,7 @@ void ax25_dev_device_up(struct net_device *dev) { ax25_dev *ax25_dev; - ax25_dev = kzalloc_obj(*ax25_dev, GFP_KERNEL); + ax25_dev = kzalloc_obj(*ax25_dev); if (!ax25_dev) { printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n"); return; diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 95c5915f1ab9..159ce74273f0 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c @@ -101,7 +101,7 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) } if (sax->sax25_uid == 0) return -EINVAL; - if ((ax25_uid = kmalloc_obj(*ax25_uid, GFP_KERNEL)) == NULL) + if ((ax25_uid = kmalloc_obj(*ax25_uid)) == NULL) return -ENOMEM; refcount_set(&ax25_uid->refcount, 1); diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index acaf7c9e4a69..2f03b780b40d 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -1107,7 +1107,7 @@ static int lowpan_enable_set(void *data, u64 val) { struct set_enable *set_enable; - set_enable = kzalloc_obj(*set_enable, GFP_KERNEL); + set_enable = kzalloc_obj(*set_enable); if (!set_enable) return -ENOMEM; diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index df4edd43176e..b95413bffa16 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c @@ -72,7 +72,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl) { - struct cmtp_application *app = kzalloc_obj(*app, GFP_KERNEL); + struct cmtp_application *app = kzalloc_obj(*app); BT_DBG("session %p application %p appl %u", session, app, appl); diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index ebfa049598dc..261aeeda3236 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c @@ -341,7 +341,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) if (req->flags & ~valid_flags) return -EINVAL; - session = kzalloc_obj(struct cmtp_session, GFP_KERNEL); + session = kzalloc_obj(struct cmtp_session); if (!session) return -ENOMEM; diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 02d33fe11042..4719dac07190 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -462,7 +462,7 @@ bool hci_setup_sync(struct hci_conn *conn, __u16 handle) struct conn_handle_t *conn_handle; if (enhanced_sync_conn_capable(conn->hdev)) { - conn_handle = kzalloc_obj(*conn_handle, GFP_KERNEL); + conn_handle = kzalloc_obj(*conn_handle); if (!conn_handle) return false; @@ -726,7 +726,7 @@ static int hci_le_terminate_big(struct hci_dev *hdev, struct hci_conn *conn) bt_dev_dbg(hdev, "big 0x%2.2x bis 0x%2.2x", conn->iso_qos.bcast.big, conn->iso_qos.bcast.bis); - d = kzalloc_obj(*d, GFP_KERNEL); + d = kzalloc_obj(*d); if (!d) return -ENOMEM; @@ -777,7 +777,7 @@ static int hci_le_big_terminate(struct hci_dev *hdev, struct hci_conn *conn) bt_dev_dbg(hdev, "hcon %p big 0x%2.2x sync_handle 0x%4.4x", conn, conn->iso_qos.bcast.big, conn->sync_handle); - d = kzalloc_obj(*d, GFP_KERNEL); + d = kzalloc_obj(*d); if (!d) return -ENOMEM; @@ -960,7 +960,7 @@ static struct hci_conn *__hci_conn_add(struct hci_dev *hdev, int type, bt_dev_dbg(hdev, "dst %pMR handle 0x%4.4x", dst, handle); - conn = kzalloc_obj(*conn, GFP_KERNEL); + conn = kzalloc_obj(*conn); if (!conn) return ERR_PTR(-ENOMEM); @@ -1739,7 +1739,7 @@ static struct hci_link *hci_conn_link(struct hci_conn *parent, if (conn->parent) return NULL; - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) return NULL; @@ -2781,7 +2781,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn) return NULL; } - chan = kzalloc_obj(*chan, GFP_KERNEL); + chan = kzalloc_obj(*chan); if (!chan) return NULL; diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index a0cad792be0b..7094f80de24e 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -262,7 +262,7 @@ u32 hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, } /* Entry not in the cache. Add new one. */ - ie = kzalloc_obj(*ie, GFP_KERNEL); + ie = kzalloc_obj(*ie); if (!ie) { flags |= MGMT_DEV_FOUND_CONFIRM_NAME; goto done; @@ -1286,7 +1286,7 @@ struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, key = old_key; } else { old_key_type = conn ? conn->key_type : 0xff; - key = kzalloc_obj(*key, GFP_KERNEL); + key = kzalloc_obj(*key); if (!key) return NULL; list_add_rcu(&key->list, &hdev->link_keys); @@ -1331,7 +1331,7 @@ struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, if (old_key) key = old_key; else { - key = kzalloc_obj(*key, GFP_KERNEL); + key = kzalloc_obj(*key); if (!key) return NULL; list_add_rcu(&key->list, &hdev->long_term_keys); @@ -1356,7 +1356,7 @@ struct smp_irk *hci_add_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, irk = hci_find_irk_by_addr(hdev, bdaddr, addr_type); if (!irk) { - irk = kzalloc_obj(*irk, GFP_KERNEL); + irk = kzalloc_obj(*irk); if (!irk) return NULL; @@ -1550,7 +1550,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, data = hci_find_remote_oob_data(hdev, bdaddr, bdaddr_type); if (!data) { - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return -ENOMEM; @@ -1718,7 +1718,7 @@ struct adv_info *hci_add_adv_instance(struct hci_dev *hdev, u8 instance, instance < 1 || instance > hdev->le_num_of_adv_sets + 1) return ERR_PTR(-EOVERFLOW); - adv = kzalloc_obj(*adv, GFP_KERNEL); + adv = kzalloc_obj(*adv); if (!adv) return ERR_PTR(-ENOMEM); @@ -2107,7 +2107,7 @@ int hci_bdaddr_list_add(struct list_head *list, bdaddr_t *bdaddr, u8 type) if (hci_bdaddr_list_lookup(list, bdaddr, type)) return -EEXIST; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -2130,7 +2130,7 @@ int hci_bdaddr_list_add_with_irk(struct list_head *list, bdaddr_t *bdaddr, if (hci_bdaddr_list_lookup(list, bdaddr, type)) return -EEXIST; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -2159,7 +2159,7 @@ int hci_bdaddr_list_add_with_flags(struct list_head *list, bdaddr_t *bdaddr, if (hci_bdaddr_list_lookup(list, bdaddr, type)) return -EEXIST; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -2276,7 +2276,7 @@ struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev, if (params) return params; - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (!params) { bt_dev_err(hdev, "out of memory"); return NULL; diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index ed5db3eb3df3..44c205ff9fa8 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -711,7 +711,7 @@ int hci_cmd_sync_submit(struct hci_dev *hdev, hci_cmd_sync_work_func_t func, goto unlock; } - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) { err = -ENOMEM; goto unlock; @@ -2685,7 +2685,7 @@ static struct conn_params *conn_params_copy(struct list_head *list, size_t *n) rcu_read_unlock(); - p = kvzalloc_objs(struct conn_params, *n, GFP_KERNEL); + p = kvzalloc_objs(struct conn_params, *n); if (!p) return NULL; @@ -7341,7 +7341,7 @@ int hci_past_sync(struct hci_conn *conn, struct hci_conn *le) if (!past_sender_capable(conn->hdev)) return -EOPNOTSUPP; - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return -ENOMEM; @@ -7473,7 +7473,7 @@ int hci_acl_change_pkt_type(struct hci_conn *conn, u16 pkt_type) struct hci_dev *hdev = conn->hdev; struct hci_cp_change_conn_ptype *cp; - cp = kmalloc_obj(*cp, GFP_KERNEL); + cp = kmalloc_obj(*cp); if (!cp) return -ENOMEM; @@ -7508,7 +7508,7 @@ int hci_le_set_phy(struct hci_conn *conn, u8 tx_phys, u8 rx_phys) struct hci_dev *hdev = conn->hdev; struct hci_cp_le_set_phy *cp; - cp = kmalloc_obj(*cp, GFP_KERNEL); + cp = kmalloc_obj(*cp); if (!cp) return -ENOMEM; diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index a91d5452f24a..6fe815241b01 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -920,7 +920,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr, ctrl = bt_sk(ctrl_sock->sk); intr = bt_sk(intr_sock->sk); - session = kzalloc_obj(*session, GFP_KERNEL); + session = kzalloc_obj(*session); if (!session) return -ENOMEM; diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 693271af6c22..ec61db89936b 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -212,7 +212,7 @@ static struct iso_conn *iso_conn_add(struct hci_conn *hcon) return conn; } - conn = kzalloc_obj(*conn, GFP_KERNEL); + conn = kzalloc_obj(*conn); if (!conn) return NULL; diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4804377781b6..2ad1cb4cbde7 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -6902,7 +6902,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon) if (!hchan) return NULL; - conn = kzalloc_obj(*conn, GFP_KERNEL); + conn = kzalloc_obj(*conn); if (!conn) { hci_chan_del(hchan); return NULL; diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index c9725ca3356c..1cfe03260d50 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2767,7 +2767,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) goto failed; } - uuid = kmalloc_obj(*uuid, GFP_KERNEL); + uuid = kmalloc_obj(*uuid); if (!uuid) { err = -ENOMEM; goto failed; @@ -4377,7 +4377,7 @@ static int set_blocked_keys(struct sock *sk, struct hci_dev *hdev, void *data, hci_blocked_keys_clear(hdev); for (i = 0; i < key_count; ++i) { - struct blocked_key *b = kzalloc_obj(*b, GFP_KERNEL); + struct blocked_key *b = kzalloc_obj(*b); if (!b) { err = MGMT_STATUS_NO_RESOURCES; @@ -5490,7 +5490,7 @@ static u8 parse_adv_monitor_pattern(struct adv_monitor *m, u8 pattern_count, (offset + length) > HCI_MAX_AD_LENGTH) return MGMT_STATUS_INVALID_PARAMS; - p = kmalloc_obj(*p, GFP_KERNEL); + p = kmalloc_obj(*p); if (!p) return MGMT_STATUS_NO_RESOURCES; @@ -5527,7 +5527,7 @@ static int add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev, goto done; } - m = kzalloc_obj(*m, GFP_KERNEL); + m = kzalloc_obj(*m); if (!m) { status = MGMT_STATUS_NO_RESOURCES; goto done; @@ -5564,7 +5564,7 @@ static int add_adv_patterns_monitor_rssi(struct sock *sk, struct hci_dev *hdev, goto done; } - m = kzalloc_obj(*m, GFP_KERNEL); + m = kzalloc_obj(*m); if (!m) { status = MGMT_STATUS_NO_RESOURCES; goto done; diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c index 4ed16ca8771d..4f19654d41a9 100644 --- a/net/bluetooth/mgmt_util.c +++ b/net/bluetooth/mgmt_util.c @@ -266,7 +266,7 @@ struct mgmt_pending_cmd *mgmt_pending_new(struct sock *sk, u16 opcode, { struct mgmt_pending_cmd *cmd; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return NULL; @@ -413,7 +413,7 @@ struct mgmt_mesh_tx *mgmt_mesh_add(struct sock *sk, struct hci_dev *hdev, { struct mgmt_mesh_tx *mesh_tx; - mesh_tx = kzalloc_obj(*mesh_tx, GFP_KERNEL); + mesh_tx = kzalloc_obj(*mesh_tx); if (!mesh_tx) return NULL; diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c index 25cde1ea5d23..2f008167cbaa 100644 --- a/net/bluetooth/msft.c +++ b/net/bluetooth/msft.c @@ -276,7 +276,7 @@ static int msft_le_monitor_advertisement_cb(struct hci_dev *hdev, u16 opcode, if (status) goto unlock; - handle_data = kmalloc_obj(*handle_data, GFP_KERNEL); + handle_data = kmalloc_obj(*handle_data); if (!handle_data) { status = HCI_ERROR_UNSPECIFIED; goto unlock; @@ -756,7 +756,7 @@ void msft_register(struct hci_dev *hdev) bt_dev_dbg(hdev, "Register MSFT extension"); - msft = kzalloc_obj(*msft, GFP_KERNEL); + msft = kzalloc_obj(*msft); if (!msft) { bt_dev_err(hdev, "Failed to register MSFT extension"); return; @@ -790,7 +790,7 @@ static void msft_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, { struct monitored_device *dev; - dev = kmalloc_obj(*dev, GFP_KERNEL); + dev = kmalloc_obj(*dev); if (!dev) { bt_dev_err(hdev, "MSFT vendor event %u: no memory", MSFT_EV_LE_MONITOR_DEVICE); @@ -932,7 +932,7 @@ static struct msft_monitor_addr_filter_data *msft_add_address_filter struct msft_data *msft = hdev->msft_data; int err; - address_filter = kzalloc_obj(*address_filter, GFP_KERNEL); + address_filter = kzalloc_obj(*address_filter); if (!address_filter) return NULL; diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index d7718844c520..611a9a94151e 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -680,7 +680,7 @@ int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig) /* ---- RFCOMM sessions ---- */ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) { - struct rfcomm_session *s = kzalloc_obj(*s, GFP_KERNEL); + struct rfcomm_session *s = kzalloc_obj(*s); if (!s) return NULL; diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 4d8ab1a49e92..b65feeba1b30 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -221,7 +221,7 @@ static struct rfcomm_dev *__rfcomm_dev_add(struct rfcomm_dev_req *req, struct list_head *head = &rfcomm_dev_list; int err = 0; - dev = kzalloc_obj(struct rfcomm_dev, GFP_KERNEL); + dev = kzalloc_obj(struct rfcomm_dev); if (!dev) return ERR_PTR(-ENOMEM); diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 26c5c5fe7c5a..70a378ff168e 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -204,7 +204,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon) return conn; } - conn = kzalloc_obj(struct sco_conn, GFP_KERNEL); + conn = kzalloc_obj(struct sco_conn); if (!conn) return NULL; diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index e0e66dc95007..e67bf7b34ea7 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1344,7 +1344,7 @@ static void smp_distribute_keys(struct smp_chan *smp) /* Generate a new random key */ get_random_bytes(sign.csrk, sizeof(sign.csrk)); - csrk = kzalloc_obj(*csrk, GFP_KERNEL); + csrk = kzalloc_obj(*csrk); if (csrk) { if (hcon->sec_level > BT_SECURITY_MEDIUM) csrk->type = MGMT_CSRK_LOCAL_AUTHENTICATED; @@ -2664,7 +2664,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb) skb_pull(skb, sizeof(*rp)); - csrk = kzalloc_obj(*csrk, GFP_KERNEL); + csrk = kzalloc_obj(*csrk); if (csrk) { if (conn->hcon->sec_level > BT_SECURITY_MEDIUM) csrk->type = MGMT_CSRK_REMOTE_AUTHENTICATED; @@ -3293,7 +3293,7 @@ static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid) goto create_chan; } - smp = kzalloc_obj(*smp, GFP_KERNEL); + smp = kzalloc_obj(*smp); if (!smp) return ERR_PTR(-ENOMEM); diff --git a/net/bpf/bpf_dummy_struct_ops.c b/net/bpf/bpf_dummy_struct_ops.c index 52117422e0f2..ae5a54c350b9 100644 --- a/net/bpf/bpf_dummy_struct_ops.c +++ b/net/bpf/bpf_dummy_struct_ops.c @@ -36,7 +36,7 @@ dummy_ops_init_args(const union bpf_attr *kattr, unsigned int nr) if (size_in != sizeof(u64) * nr) return ERR_PTR(-EINVAL); - args = kzalloc_obj(*args, GFP_KERNEL); + args = kzalloc_obj(*args); if (!args) return ERR_PTR(-ENOMEM); @@ -158,7 +158,7 @@ int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr, if (err) goto out; - tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX, GFP_KERNEL); + tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX); if (!tlinks) { err = -ENOMEM; goto out; diff --git a/net/bridge/br_cfm.c b/net/bridge/br_cfm.c index a2276ce350fa..2c70fe47de38 100644 --- a/net/bridge/br_cfm.c +++ b/net/bridge/br_cfm.c @@ -547,7 +547,7 @@ int br_cfm_mep_create(struct net_bridge *br, } } - mep = kzalloc_obj(*mep, GFP_KERNEL); + mep = kzalloc_obj(*mep); if (!mep) return -ENOMEM; @@ -693,7 +693,7 @@ int br_cfm_cc_peer_mep_add(struct net_bridge *br, const u32 instance, return -EEXIST; } - peer_mep = kzalloc_obj(*peer_mep, GFP_KERNEL); + peer_mep = kzalloc_obj(*peer_mep); if (!peer_mep) return -ENOMEM; diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 1a3bcb5dd955..ee01122f466f 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -308,7 +308,7 @@ static int __br_netpoll_enable(struct net_bridge_port *p) struct netpoll *np; int err; - np = kzalloc_obj(*p->np, GFP_KERNEL); + np = kzalloc_obj(*p->np); if (!np) return -ENOMEM; diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 4737ee16bebb..d39571e13744 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -429,7 +429,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, if (index < 0) return ERR_PTR(index); - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (p == NULL) return ERR_PTR(-ENOMEM); diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 7245ca29c5ea..766c43b327af 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -204,7 +204,7 @@ int br_dev_siocdevprivate(struct net_device *dev, struct ifreq *rq, if (num > BR_MAX_PORTS) num = BR_MAX_PORTS; - indices = kzalloc_objs(int, num, GFP_KERNEL); + indices = kzalloc_objs(int, num); if (indices == NULL) return -ENOMEM; @@ -357,7 +357,7 @@ static int old_deviceless(struct net *net, void __user *data) if (args[2] >= 2048) return -ENOMEM; - indices = kzalloc_objs(int, args[2], GFP_KERNEL); + indices = kzalloc_objs(int, args[2]); if (indices == NULL) return -ENOMEM; diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c index d587f99afef6..f1aa67f7a051 100644 --- a/net/bridge/br_mrp.c +++ b/net/bridge/br_mrp.c @@ -516,7 +516,7 @@ int br_mrp_add(struct net_bridge *br, struct br_mrp_instance *instance) !br_mrp_unique_ifindex(br, instance->s_ifindex)) return -EINVAL; - mrp = kzalloc_obj(*mrp, GFP_KERNEL); + mrp = kzalloc_obj(*mrp); if (!mrp) return -ENOMEM; diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index e3a5eb9e6ed1..326933b455b3 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -787,7 +787,7 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags, bool *changed, return br_vlan_add_existing(br, vg, vlan, flags, changed, extack); - vlan = kzalloc_obj(*vlan, GFP_KERNEL); + vlan = kzalloc_obj(*vlan); if (!vlan) return -ENOMEM; @@ -1224,7 +1224,7 @@ int br_vlan_init(struct net_bridge *br) struct net_bridge_vlan_group *vg; int ret = -ENOMEM; - vg = kzalloc_obj(*vg, GFP_KERNEL); + vg = kzalloc_obj(*vg); if (!vg) goto out; ret = rhashtable_init(&vg->vlan_hash, &br_vlan_rht_params); @@ -1260,7 +1260,7 @@ int nbp_vlan_init(struct net_bridge_port *p, struct netlink_ext_ack *extack) struct net_bridge_vlan_group *vg; int ret = -ENOMEM; - vg = kzalloc_obj(struct net_bridge_vlan_group, GFP_KERNEL); + vg = kzalloc_obj(struct net_bridge_vlan_group); if (!vg) goto out; @@ -1334,7 +1334,7 @@ int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags, return 0; } - vlan = kzalloc_obj(*vlan, GFP_KERNEL); + vlan = kzalloc_obj(*vlan); if (!vlan) return -ENOMEM; diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index f01efd0b139e..aea3e19875c6 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -1303,7 +1303,7 @@ int ebt_register_template(const struct ebt_table *t, int (*table_init)(struct ne } } - tmpl = kzalloc_obj(*tmpl, GFP_KERNEL); + tmpl = kzalloc_obj(*tmpl); if (!tmpl) { mutex_unlock(&ebt_mutex); return -ENOMEM; diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 18f7769405f9..922de3d611c0 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -94,7 +94,7 @@ static struct caif_device_entry *caif_device_alloc(struct net_device *dev) { struct caif_device_entry *caifd; - caifd = kzalloc_obj(*caifd, GFP_KERNEL); + caifd = kzalloc_obj(*caifd); if (!caifd) return NULL; caifd->pcpu_refcnt = alloc_percpu(int); diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index 566546da4152..c6cc2bfed65d 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -270,7 +270,7 @@ int cfctrl_linkup_request(struct cflayer *layer, cfpkt_destroy(pkt); return -EINVAL; } - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) { cfpkt_destroy(pkt); return -ENOMEM; diff --git a/net/can/af_can.c b/net/can/af_can.c index 6fa0dd649d0c..e80e516bfde9 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -802,7 +802,7 @@ static int can_pernet_init(struct net *net) GFP_KERNEL); if (!net->can.rx_alldev_list) goto out; - net->can.pkg_stats = kzalloc_obj(*net->can.pkg_stats, GFP_KERNEL); + 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, diff --git a/net/can/gw.c b/net/can/gw.c index c6cf4cb72891..8ee4d67a07d3 100644 --- a/net/can/gw.c +++ b/net/can/gw.c @@ -1099,7 +1099,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh, if (r->gwtype != CGW_TYPE_CAN_CAN) return -EINVAL; - mod = kmalloc_obj(*mod, GFP_KERNEL); + mod = kmalloc_obj(*mod); if (!mod) return -ENOMEM; diff --git a/net/can/j1939/main.c b/net/can/j1939/main.c index 45b718c680e0..9937c04241bc 100644 --- a/net/can/j1939/main.c +++ b/net/can/j1939/main.c @@ -128,7 +128,7 @@ static struct j1939_priv *j1939_priv_create(struct net_device *ndev) { struct j1939_priv *priv; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return NULL; diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 455787422784..952121849180 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c @@ -309,12 +309,12 @@ struct ceph_options *ceph_alloc_options(void) { struct ceph_options *opt; - opt = kzalloc_obj(*opt, GFP_KERNEL); + opt = kzalloc_obj(*opt); if (!opt) return NULL; opt->crush_locs = RB_ROOT; - opt->mon_addr = kzalloc_objs(*opt->mon_addr, CEPH_MAX_MON, GFP_KERNEL); + opt->mon_addr = kzalloc_objs(*opt->mon_addr, CEPH_MAX_MON); if (!opt->mon_addr) { kfree(opt); return NULL; @@ -455,7 +455,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, ceph_crypto_key_destroy(opt->key); kfree(opt->key); - opt->key = kzalloc_obj(*opt->key, GFP_KERNEL); + opt->key = kzalloc_obj(*opt->key); if (!opt->key) return -ENOMEM; err = ceph_crypto_key_unarmor(opt->key, param->string); @@ -468,7 +468,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, ceph_crypto_key_destroy(opt->key); kfree(opt->key); - opt->key = kzalloc_obj(*opt->key, GFP_KERNEL); + opt->key = kzalloc_obj(*opt->key); if (!opt->key) return -ENOMEM; return get_secret(opt->key, param->string, &log); @@ -713,7 +713,7 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) if (err < 0) return ERR_PTR(err); - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (client == NULL) return ERR_PTR(-ENOMEM); diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index ef8a98c1174f..de7496791c91 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c @@ -466,7 +466,7 @@ static int ceph_key_preparse(struct key_preparsed_payload *prep) goto err; ret = -ENOMEM; - ckey = kzalloc_obj(*ckey, GFP_KERNEL); + ckey = kzalloc_obj(*ckey); if (!ckey) goto err; diff --git a/net/core/dev.c b/net/core/dev.c index 525cf5952101..b91aabb18bbe 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -273,7 +273,7 @@ static struct netdev_name_node *netdev_name_node_alloc(struct net_device *dev, { struct netdev_name_node *name_node; - name_node = kmalloc_obj(*name_node, GFP_KERNEL); + name_node = kmalloc_obj(*name_node); if (!name_node) return NULL; INIT_HLIST_NODE(&name_node->hlist); @@ -8693,7 +8693,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev, return 0; } - adj = kmalloc_obj(*adj, GFP_KERNEL); + adj = kmalloc_obj(*adj); if (!adj) return -ENOMEM; @@ -11940,7 +11940,7 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev) #ifdef CONFIG_NET_CLS_ACT if (queue) return queue; - queue = kzalloc_obj(*queue, GFP_KERNEL); + queue = kzalloc_obj(*queue); if (!queue) return NULL; netdev_init_one_queue(dev, queue, NULL); @@ -12857,7 +12857,7 @@ static struct hlist_head * __net_init netdev_create_hash(void) int i; struct hlist_head *hash; - hash = kmalloc_objs(*hash, NETDEV_HASHENTRIES, GFP_KERNEL); + hash = kmalloc_objs(*hash, NETDEV_HASHENTRIES); if (hash != NULL) for (i = 0; i < NETDEV_HASHENTRIES; i++) INIT_HLIST_HEAD(&hash[i]); diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 99f9d4dfb866..da0d231e1952 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -1583,7 +1583,7 @@ static int dropmon_net_event(struct notifier_block *ev_block, case NETDEV_REGISTER: if (WARN_ON_ONCE(rtnl_dereference(dev->dm_private))) break; - stat = kzalloc_obj(*stat, GFP_KERNEL); + stat = kzalloc_obj(*stat); if (!stat) break; diff --git a/net/core/failover.c b/net/core/failover.c index fcc04e6995d0..0eb2e0ec875b 100644 --- a/net/core/failover.c +++ b/net/core/failover.c @@ -247,7 +247,7 @@ struct failover *failover_register(struct net_device *dev, if (dev->type != ARPHRD_ETHER) return ERR_PTR(-EINVAL); - failover = kzalloc_obj(*failover, GFP_KERNEL); + failover = kzalloc_obj(*failover); if (!failover) return ERR_PTR(-ENOMEM); diff --git a/net/core/filter.c b/net/core/filter.c index 6957d3449f2c..0d5d5a17acb2 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1161,7 +1161,7 @@ static int bpf_prog_store_orig_filter(struct bpf_prog *fp, unsigned int fsize = bpf_classic_proglen(fprog); struct sock_fprog_kern *fkprog; - fp->orig_prog = kmalloc_obj(*fkprog, GFP_KERNEL); + fp->orig_prog = kmalloc_obj(*fkprog); if (!fp->orig_prog) return -ENOMEM; @@ -1481,7 +1481,7 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk) { struct sk_filter *fp, *old_fp; - fp = kmalloc_obj(*fp, GFP_KERNEL); + fp = kmalloc_obj(*fp); if (!fp) return -ENOMEM; diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c index 630f94e2c2c1..c55bf9d5ac8c 100644 --- a/net/core/flow_offload.c +++ b/net/core/flow_offload.c @@ -263,7 +263,7 @@ struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb, { struct flow_block_cb *block_cb; - block_cb = kzalloc_obj(*block_cb, GFP_KERNEL); + block_cb = kzalloc_obj(*block_cb); if (!block_cb) return ERR_PTR(-ENOMEM); @@ -390,7 +390,7 @@ static struct flow_indr_dev *flow_indr_dev_alloc(flow_indr_block_bind_cb_t *cb, { struct flow_indr_dev *indr_dev; - indr_dev = kmalloc_obj(*indr_dev, GFP_KERNEL); + indr_dev = kmalloc_obj(*indr_dev); if (!indr_dev) return NULL; @@ -570,7 +570,7 @@ static int indir_dev_add(void *data, struct net_device *dev, struct Qdisc *sch, if (info) return -EEXIST; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 64d0d55fa2b2..c34e58c6c3e6 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -154,7 +154,7 @@ int gen_new_estimator(struct gnet_stats_basic_sync *bstats, if (parm->ewma_log == 0 || parm->ewma_log >= 31) return -EINVAL; - est = kzalloc_obj(*est, GFP_KERNEL); + est = kzalloc_obj(*est); if (!est) return -ENOBUFS; diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 7a040a9233e7..1057d16d5dd2 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -492,7 +492,7 @@ static struct net *net_alloc(void) goto out_free; #ifdef CONFIG_KEYS - net->key_domain = kzalloc_obj(struct key_tag, GFP_KERNEL); + net->key_domain = kzalloc_obj(struct key_tag); if (!net->key_domain) goto out_free_2; refcount_set(&net->key_domain->usage, 1); diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c index 9267880a0a17..e1e30f0b60cd 100644 --- a/net/core/netclassid_cgroup.c +++ b/net/core/netclassid_cgroup.c @@ -32,7 +32,7 @@ cgrp_css_alloc(struct cgroup_subsys_state *parent_css) { struct cgroup_cls_state *cs; - cs = kzalloc_obj(*cs, GFP_KERNEL); + cs = kzalloc_obj(*cs); if (!cs) return ERR_PTR(-ENOMEM); diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 70e458893ea5..a8558a52884f 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -565,7 +565,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev) npinfo = rtnl_dereference(ndev->npinfo); if (!npinfo) { - npinfo = kmalloc_obj(*npinfo, GFP_KERNEL); + npinfo = kmalloc_obj(*npinfo); if (!npinfo) { err = -ENOMEM; goto out; diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index fb3cd2886e1f..76c33ab44761 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c @@ -135,7 +135,7 @@ cgrp_css_alloc(struct cgroup_subsys_state *parent_css) { struct cgroup_subsys_state *css; - css = kzalloc_obj(*css, GFP_KERNEL); + css = kzalloc_obj(*css); if (!css) return ERR_PTR(-ENOMEM); diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index da268fc45356..dad4b1054955 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -414,7 +414,7 @@ static int rtnl_register_internal(struct module *owner, if (!link) goto unlock; } else { - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) goto unlock; } @@ -3969,7 +3969,7 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, int ops_srcu_index; int ret; - tbs = kmalloc_obj(*tbs, GFP_KERNEL); + tbs = kmalloc_obj(*tbs); if (!tbs) return -ENOMEM; diff --git a/net/core/selftests.c b/net/core/selftests.c index 248112bd51a8..0a203d3fb9dc 100644 --- a/net/core/selftests.c +++ b/net/core/selftests.c @@ -237,7 +237,7 @@ static int __net_test_loopback(struct net_device *ndev, struct sk_buff *skb = NULL; int ret = 0; - tpriv = kzalloc_obj(*tpriv, GFP_KERNEL); + tpriv = kzalloc_obj(*tpriv); if (!tpriv) return -ENOMEM; diff --git a/net/core/sock.c b/net/core/sock.c index b62e509e06d9..5976100a9d55 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1097,7 +1097,7 @@ sock_devmem_dontneed(struct sock *sk, sockptr_t optval, unsigned int optlen) return -EINVAL; num_tokens = optlen / sizeof(*tokens); - tokens = kvmalloc_objs(*tokens, num_tokens, GFP_KERNEL); + tokens = kvmalloc_objs(*tokens, num_tokens); if (!tokens) return -ENOMEM; diff --git a/net/core/xdp.c b/net/core/xdp.c index 8c65d7dafd89..9890a30584ba 100644 --- a/net/core/xdp.c +++ b/net/core/xdp.c @@ -214,7 +214,7 @@ static int __mem_id_init_hash_table(void) if (unlikely(mem_id_init)) return 0; - rht = kzalloc_obj(*rht, GFP_KERNEL); + rht = kzalloc_obj(*rht); if (!rht) return -ENOMEM; diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index ff2198133213..35164bfa563d 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1021,7 +1021,7 @@ static int dcbnl_build_peer_app(struct net_device *netdev, struct sk_buff* skb, */ err = ops->peer_getappinfo(netdev, &info, &app_count); if (!err && app_count) { - table = kmalloc_objs(struct dcb_app, app_count, GFP_KERNEL); + table = kmalloc_objs(struct dcb_app, app_count); if (!table) return -ENOMEM; diff --git a/net/devlink/core.c b/net/devlink/core.c index 44584f3613ca..0b020f69cef1 100644 --- a/net/devlink/core.c +++ b/net/devlink/core.c @@ -111,7 +111,7 @@ static struct devlink_rel *devlink_rel_alloc(void) static u32 next; int err; - rel = kzalloc_obj(*rel, GFP_KERNEL); + rel = kzalloc_obj(*rel); if (!rel) return ERR_PTR(-ENOMEM); diff --git a/net/devlink/dpipe.c b/net/devlink/dpipe.c index 3b86dc25e7f2..c8d4a4374ae1 100644 --- a/net/devlink/dpipe.c +++ b/net/devlink/dpipe.c @@ -851,7 +851,7 @@ int devl_dpipe_table_register(struct devlink *devlink, devlink)) return -EEXIST; - table = kzalloc_obj(*table, GFP_KERNEL); + table = kzalloc_obj(*table); if (!table) return -ENOMEM; diff --git a/net/devlink/health.c b/net/devlink/health.c index 0578f7b460f5..449c7611c640 100644 --- a/net/devlink/health.c +++ b/net/devlink/health.c @@ -32,7 +32,7 @@ static struct devlink_fmsg *devlink_fmsg_alloc(void) { struct devlink_fmsg *fmsg; - fmsg = kzalloc_obj(*fmsg, GFP_KERNEL); + fmsg = kzalloc_obj(*fmsg); if (!fmsg) return NULL; @@ -119,7 +119,7 @@ __devlink_health_reporter_create(struct devlink *devlink, if (WARN_ON(ops->default_burst_period && !ops->default_graceful_period)) return ERR_PTR(-EINVAL); - reporter = kzalloc_obj(*reporter, GFP_KERNEL); + reporter = kzalloc_obj(*reporter); if (!reporter) return ERR_PTR(-ENOMEM); @@ -738,7 +738,7 @@ static void devlink_fmsg_nest_common(struct devlink_fmsg *fmsg, int attrtype) if (fmsg->err) return; - item = kzalloc_obj(*item, GFP_KERNEL); + item = kzalloc_obj(*item); if (!item) { fmsg->err = -ENOMEM; return; diff --git a/net/devlink/linecard.c b/net/devlink/linecard.c index 110f1347b9c6..8315d35cb91d 100644 --- a/net/devlink/linecard.c +++ b/net/devlink/linecard.c @@ -404,7 +404,7 @@ static int devlink_linecard_types_init(struct devlink_linecard *linecard) int i; count = linecard->ops->types_count(linecard, linecard->priv); - linecard->types = kmalloc_objs(*linecard_type, count, GFP_KERNEL); + linecard->types = kmalloc_objs(*linecard_type, count); if (!linecard->types) return -ENOMEM; linecard->types_count = count; @@ -450,7 +450,7 @@ devl_linecard_create(struct devlink *devlink, unsigned int linecard_index, if (devlink_linecard_index_exists(devlink, linecard_index)) return ERR_PTR(-EEXIST); - linecard = kzalloc_obj(*linecard, GFP_KERNEL); + linecard = kzalloc_obj(*linecard); if (!linecard) return ERR_PTR(-ENOMEM); diff --git a/net/devlink/param.c b/net/devlink/param.c index 74adb0fdb5f7..cf95268da5b0 100644 --- a/net/devlink/param.c +++ b/net/devlink/param.c @@ -718,7 +718,7 @@ static int devlink_param_register(struct devlink *devlink, else WARN_ON(!param->get || !param->set); - param_item = kzalloc_obj(*param_item, GFP_KERNEL); + param_item = kzalloc_obj(*param_item); if (!param_item) return -ENOMEM; diff --git a/net/devlink/rate.c b/net/devlink/rate.c index 8d8a688ad140..41be2d6c2954 100644 --- a/net/devlink/rate.c +++ b/net/devlink/rate.c @@ -627,7 +627,7 @@ int devlink_nl_rate_new_doit(struct sk_buff *skb, struct genl_info *info) else if (rate_node == ERR_PTR(-EINVAL)) return -EINVAL; - rate_node = kzalloc_obj(*rate_node, GFP_KERNEL); + rate_node = kzalloc_obj(*rate_node); if (!rate_node) return -ENOMEM; @@ -721,7 +721,7 @@ devl_rate_node_create(struct devlink *devlink, void *priv, char *node_name, if (!IS_ERR(rate_node)) return ERR_PTR(-EEXIST); - rate_node = kzalloc_obj(*rate_node, GFP_KERNEL); + rate_node = kzalloc_obj(*rate_node); if (!rate_node) return ERR_PTR(-ENOMEM); @@ -766,7 +766,7 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv, if (WARN_ON(devlink_port->devlink_rate)) return -EBUSY; - devlink_rate = kzalloc_obj(*devlink_rate, GFP_KERNEL); + devlink_rate = kzalloc_obj(*devlink_rate); if (!devlink_rate) return -ENOMEM; diff --git a/net/devlink/region.c b/net/devlink/region.c index 654e3766710f..5588e3d560b9 100644 --- a/net/devlink/region.c +++ b/net/devlink/region.c @@ -428,7 +428,7 @@ __devlink_region_snapshot_create(struct devlink_region *region, if (devlink_region_snapshot_get_by_id(region, snapshot_id)) return -EEXIST; - snapshot = kzalloc_obj(*snapshot, GFP_KERNEL); + snapshot = kzalloc_obj(*snapshot); if (!snapshot) return -ENOMEM; @@ -1055,7 +1055,7 @@ struct devlink_region *devl_region_create(struct devlink *devlink, if (devlink_region_get_by_name(devlink, ops->name)) return ERR_PTR(-EEXIST); - region = kzalloc_obj(*region, GFP_KERNEL); + region = kzalloc_obj(*region); if (!region) return ERR_PTR(-ENOMEM); @@ -1128,7 +1128,7 @@ devlink_port_region_create(struct devlink_port *port, goto unlock; } - region = kzalloc_obj(*region, GFP_KERNEL); + region = kzalloc_obj(*region); if (!region) { err = -ENOMEM; goto unlock; diff --git a/net/devlink/resource.c b/net/devlink/resource.c index aa3621c28a00..351835a710b1 100644 --- a/net/devlink/resource.c +++ b/net/devlink/resource.c @@ -347,7 +347,7 @@ int devl_resource_register(struct devlink *devlink, if (resource) return -EEXIST; - resource = kzalloc_obj(*resource, GFP_KERNEL); + resource = kzalloc_obj(*resource); if (!resource) return -ENOMEM; diff --git a/net/devlink/sb.c b/net/devlink/sb.c index bcfeed079433..49fcbfe08f15 100644 --- a/net/devlink/sb.c +++ b/net/devlink/sb.c @@ -943,7 +943,7 @@ int devl_sb_register(struct devlink *devlink, unsigned int sb_index, if (devlink_sb_index_exists(devlink, sb_index)) return -EEXIST; - devlink_sb = kzalloc_obj(*devlink_sb, GFP_KERNEL); + devlink_sb = kzalloc_obj(*devlink_sb); if (!devlink_sb) return -ENOMEM; devlink_sb->index = sb_index; diff --git a/net/devlink/trap.c b/net/devlink/trap.c index e4255c0a6a30..8edb31654a68 100644 --- a/net/devlink/trap.c +++ b/net/devlink/trap.c @@ -1271,7 +1271,7 @@ devlink_trap_register(struct devlink *devlink, if (devlink_trap_item_lookup(devlink, trap->name)) return -EEXIST; - trap_item = kzalloc_obj(*trap_item, GFP_KERNEL); + trap_item = kzalloc_obj(*trap_item); if (!trap_item) return -ENOMEM; @@ -1545,7 +1545,7 @@ devlink_trap_group_register(struct devlink *devlink, if (devlink_trap_group_item_lookup(devlink, group->name)) return -EEXIST; - group_item = kzalloc_obj(*group_item, GFP_KERNEL); + group_item = kzalloc_obj(*group_item); if (!group_item) return -ENOMEM; @@ -1751,7 +1751,7 @@ devlink_trap_policer_register(struct devlink *devlink, if (devlink_trap_policer_item_lookup(devlink, policer->id)) return -EEXIST; - policer_item = kzalloc_obj(*policer_item, GFP_KERNEL); + policer_item = kzalloc_obj(*policer_item); if (!policer_item) return -ENOMEM; diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index b0ae980ca684..9cb732f6b1e3 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -213,7 +213,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index) { struct dsa_switch_tree *dst; - dst = kzalloc_obj(*dst, GFP_KERNEL); + dst = kzalloc_obj(*dst); if (!dst) return NULL; @@ -298,7 +298,7 @@ static struct dsa_link *dsa_link_touch(struct dsa_port *dp, if (dl->dp == dp && dl->link_dp == link_dp) return dl; - dl = kzalloc_obj(*dl, GFP_KERNEL); + dl = kzalloc_obj(*dl); if (!dl) return NULL; @@ -844,7 +844,7 @@ static int dsa_tree_setup_lags(struct dsa_switch_tree *dst) if (!len) return 0; - dst->lags = kzalloc_objs(*dst->lags, len, GFP_KERNEL); + dst->lags = kzalloc_objs(*dst->lags, len); if (!dst->lags) return -ENOMEM; @@ -1092,7 +1092,7 @@ static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index) if (dp->index == index) return dp; - dp = kzalloc_obj(*dp, GFP_KERNEL); + dp = kzalloc_obj(*dp); if (!dp) return NULL; diff --git a/net/dsa/port.c b/net/dsa/port.c index 4da911edc512..1f5536c0dffc 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -431,7 +431,7 @@ static int dsa_port_bridge_create(struct dsa_port *dp, return 0; } - bridge = kzalloc_obj(*bridge, GFP_KERNEL); + bridge = kzalloc_obj(*bridge); if (!bridge) return -ENOMEM; @@ -617,7 +617,7 @@ static int dsa_port_lag_create(struct dsa_port *dp, return 0; } - lag = kzalloc_obj(*lag, GFP_KERNEL); + lag = kzalloc_obj(*lag); if (!lag) return -ENOMEM; diff --git a/net/dsa/switch.c b/net/dsa/switch.c index e00997977c93..a670a04edb72 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -182,7 +182,7 @@ static int dsa_port_do_mdb_add(struct dsa_port *dp, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -280,7 +280,7 @@ static int dsa_port_do_fdb_add(struct dsa_port *dp, const unsigned char *addr, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -368,7 +368,7 @@ static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -719,7 +719,7 @@ static int dsa_port_do_vlan_add(struct dsa_port *dp, goto out; } - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) { err = -ENOMEM; goto out; diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index c9bea6808da3..f91646e60246 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -158,7 +158,7 @@ static int dsa_port_do_tag_8021q_vlan_add(struct dsa_port *dp, u16 vid, return 0; } - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) return -ENOMEM; @@ -420,7 +420,7 @@ int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto) struct dsa_8021q_context *ctx; int err; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 15aa44478807..d2475c3bbb7d 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -62,7 +62,7 @@ static int ksz_connect(struct dsa_switch *ds) struct ksz_tagger_private *priv; int ret; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/tag_ocelot_8021q.c b/net/dsa/tag_ocelot_8021q.c index b9bf2895309a..e89d9254e90a 100644 --- a/net/dsa/tag_ocelot_8021q.c +++ b/net/dsa/tag_ocelot_8021q.c @@ -106,7 +106,7 @@ static int ocelot_connect(struct dsa_switch *ds) struct ocelot_8021q_tagger_private *priv; int err; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c index 4326487c1f29..9e3b429e8b36 100644 --- a/net/dsa/tag_qca.c +++ b/net/dsa/tag_qca.c @@ -92,7 +92,7 @@ static int qca_tag_connect(struct dsa_switch *ds) { struct qca_tagger_data *tagger_data; - tagger_data = kzalloc_obj(*tagger_data, GFP_KERNEL); + tagger_data = kzalloc_obj(*tagger_data); if (!tagger_data) return -ENOMEM; diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index 2083ef3b4b90..de6d4ce8668b 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -701,7 +701,7 @@ static int sja1105_connect(struct dsa_switch *ds) struct kthread_worker *xmit_worker; int err; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/user.c b/net/dsa/user.c index 5df8cb69295d..c4bd6fe90b45 100644 --- a/net/dsa/user.c +++ b/net/dsa/user.c @@ -1318,7 +1318,7 @@ static int dsa_user_netpoll_setup(struct net_device *dev) struct netpoll *netpoll; int err = 0; - netpoll = kzalloc_obj(*netpoll, GFP_KERNEL); + netpoll = kzalloc_obj(*netpoll); if (!netpoll) return -ENOMEM; @@ -1430,7 +1430,7 @@ dsa_user_add_cls_matchall_mirred(struct net_device *dev, return -EOPNOTSUPP; } - mall_tc_entry = kzalloc_obj(*mall_tc_entry, GFP_KERNEL); + mall_tc_entry = kzalloc_obj(*mall_tc_entry); if (!mall_tc_entry) return -ENOMEM; @@ -1490,7 +1490,7 @@ dsa_user_add_cls_matchall_police(struct net_device *dev, act = &cls->rule->action.entries[0]; - mall_tc_entry = kzalloc_obj(*mall_tc_entry, GFP_KERNEL); + mall_tc_entry = kzalloc_obj(*mall_tc_entry); if (!mall_tc_entry) return -ENOMEM; @@ -1823,7 +1823,7 @@ static int dsa_user_vlan_rx_add_vid(struct net_device *dev, __be16 proto, !dsa_switch_supports_mc_filtering(ds)) return 0; - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) { ret = -ENOMEM; goto rollback; @@ -2070,7 +2070,7 @@ static void dsa_bridge_mtu_normalization(struct dsa_port *dp) if (min_mtu > user->mtu) min_mtu = user->mtu; - hw_port = kzalloc_obj(*hw_port, GFP_KERNEL); + hw_port = kzalloc_obj(*hw_port); if (!hw_port) goto out; diff --git a/net/ethtool/cmis_cdb.c b/net/ethtool/cmis_cdb.c index 674439bedd49..3670ca42dd40 100644 --- a/net/ethtool/cmis_cdb.c +++ b/net/ethtool/cmis_cdb.c @@ -276,7 +276,7 @@ ethtool_cmis_cdb_init(struct net_device *dev, struct ethtool_cmis_cdb *cdb; int err; - cdb = kzalloc_obj(*cdb, GFP_KERNEL); + cdb = kzalloc_obj(*cdb); if (!cdb) return ERR_PTR(-ENOMEM); diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index b4e7c6ccf9f3..ff4b4780d6af 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -3040,7 +3040,7 @@ ethtool_set_per_queue_coalesce(struct net_device *dev, bitmap_from_arr32(queue_mask, per_queue_opt->queue_mask, MAX_NUM_QUEUE); n_queue = bitmap_weight(queue_mask, MAX_NUM_QUEUE); - tmp = backup = kmalloc_objs(*backup, n_queue, GFP_KERNEL); + tmp = backup = kmalloc_objs(*backup, n_queue); if (!backup) return -ENOMEM; @@ -3554,7 +3554,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *useraddr) if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) return -EFAULT; - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) return -ENOMEM; diff --git a/net/ethtool/module.c b/net/ethtool/module.c index d033a20aa48c..0a761bf4771e 100644 --- a/net/ethtool/module.c +++ b/net/ethtool/module.c @@ -301,7 +301,7 @@ module_flash_fw_schedule(struct net_device *dev, const char *file_name, struct ethtool_module_fw_flash *module_fw; int err; - module_fw = kzalloc_obj(*module_fw, GFP_KERNEL); + module_fw = kzalloc_obj(*module_fw); if (!module_fw) return -ENOMEM; diff --git a/net/ethtool/tsconfig.c b/net/ethtool/tsconfig.c index acd0477b3a2d..e49e612a68c2 100644 --- a/net/ethtool/tsconfig.c +++ b/net/ethtool/tsconfig.c @@ -202,10 +202,10 @@ static int tsconfig_send_reply(struct net_device *dev, struct genl_info *info) int reply_len = 0; int ret; - req_info = kzalloc_obj(*req_info, GFP_KERNEL); + req_info = kzalloc_obj(*req_info); if (!req_info) return -ENOMEM; - reply_data = kmalloc_obj(*reply_data, GFP_KERNEL); + reply_data = kmalloc_obj(*reply_data); if (!reply_data) { kfree(req_info); return -ENOMEM; @@ -280,7 +280,7 @@ tsconfig_set_hwprov_from_desc(struct net_device *dev, source = HWTSTAMP_SOURCE_PHYLIB; } - hwprov = kzalloc_obj(*hwprov, GFP_KERNEL); + hwprov = kzalloc_obj(*hwprov); if (!hwprov) return ERR_PTR(-ENOMEM); diff --git a/net/ethtool/tsinfo.c b/net/ethtool/tsinfo.c index df9c7de9a640..c0145c752d2f 100644 --- a/net/ethtool/tsinfo.c +++ b/net/ethtool/tsinfo.c @@ -505,10 +505,10 @@ int ethnl_tsinfo_start(struct netlink_callback *cb) BUILD_BUG_ON(sizeof(*ctx) > sizeof(cb->ctx)); - req_info = kzalloc_obj(*req_info, GFP_KERNEL); + req_info = kzalloc_obj(*req_info); if (!req_info) return -ENOMEM; - reply_data = kzalloc_obj(*reply_data, GFP_KERNEL); + reply_data = kzalloc_obj(*reply_data); if (!reply_data) { ret = -ENOMEM; goto free_req_info; diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index d5a742cb77d1..50996f4de7f9 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -80,7 +80,7 @@ int hsr_create_self_node(struct hsr_priv *hsr, { struct hsr_self_node *sn, *old; - sn = kmalloc_obj(*sn, GFP_KERNEL); + sn = kmalloc_obj(*sn); if (!sn) return -ENOMEM; diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c index 9a3f3add4b47..44f83c8c56a7 100644 --- a/net/hsr/hsr_slave.c +++ b/net/hsr/hsr_slave.c @@ -198,7 +198,7 @@ int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev, if (port) return -EBUSY; /* This port already exists */ - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index f743d1568f3f..115f43d0e158 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c @@ -603,7 +603,7 @@ nl802154_dump_wpan_phy(struct sk_buff *skb, struct netlink_callback *cb) rtnl_lock(); if (!state) { - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) { rtnl_unlock(); return -ENOMEM; @@ -1418,7 +1418,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info) return -EOPNOTSUPP; } - request = kzalloc_obj(*request, GFP_KERNEL); + request = kzalloc_obj(*request); if (!request) return -ENOMEM; @@ -1586,7 +1586,7 @@ nl802154_send_beacons(struct sk_buff *skb, struct genl_info *info) return -EOPNOTSUPP; } - request = kzalloc_obj(*request, GFP_KERNEL); + request = kzalloc_obj(*request); if (!request) return -ENOMEM; diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index f4a207c7cfc6..5fb812443a08 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -484,7 +484,7 @@ static int ah_init_state(struct xfrm_state *x, struct netlink_ext_ack *extack) goto error; } - ahp = kzalloc_obj(*ahp, GFP_KERNEL); + ahp = kzalloc_obj(*ahp); if (!ahp) return -ENOMEM; diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 9fd41dfbe788..8f4190c7c9ab 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -270,7 +270,7 @@ static struct in_device *inetdev_init(struct net_device *dev) ASSERT_RTNL(); - in_dev = kzalloc_obj(*in_dev, GFP_KERNEL); + in_dev = kzalloc_obj(*in_dev); if (!in_dev) goto out; memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt, diff --git a/net/ipv4/fou_core.c b/net/ipv4/fou_core.c index 885f3b06f6e9..3baaa4df7e42 100644 --- a/net/ipv4/fou_core.c +++ b/net/ipv4/fou_core.c @@ -581,7 +581,7 @@ static int fou_create(struct net *net, struct fou_cfg *cfg, goto error; /* Allocate FOU port structure */ - fou = kzalloc_obj(*fou, GFP_KERNEL); + fou = kzalloc_obj(*fou); if (!fou) { err = -ENOMEM; goto error; diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 89f99c7ee69e..9d215485b5c7 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -845,7 +845,7 @@ static int __inet_diag_dump_start(struct netlink_callback *cb, int hdrlen) struct nlattr *nla; int err; - cb_data = kzalloc_obj(*cb_data, GFP_KERNEL); + cb_data = kzalloc_obj(*cb_data); if (!cb_data) return -ENOMEM; diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index b006606ebb1d..393770920abd 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c @@ -188,7 +188,7 @@ static void fqdir_work_fn(struct work_struct *work) int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net) { - struct fqdir *fqdir = kzalloc_obj(*fqdir, GFP_KERNEL); + struct fqdir *fqdir = kzalloc_obj(*fqdir); int res; if (!fqdir) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 50bf4ec8213a..fca980772c81 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -1284,7 +1284,7 @@ void __init inet_hashinfo2_init(struct inet_hashinfo *h, const char *name, int inet_hashinfo2_init_mod(struct inet_hashinfo *h) { - h->lhash2 = kmalloc_objs(*h->lhash2, INET_LHTABLE_SIZE, GFP_KERNEL); + h->lhash2 = kmalloc_objs(*h->lhash2, INET_LHTABLE_SIZE); if (!h->lhash2) return -ENOMEM; diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index d09377780942..697e18242d6c 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -350,7 +350,7 @@ int ip_ra_control(struct sock *sk, unsigned char on, if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num == IPPROTO_RAW) return -EINVAL; - new_ra = on ? kmalloc_obj(*new_ra, GFP_KERNEL) : NULL; + new_ra = on ? kmalloc_obj(*new_ra) : NULL; if (on && !new_ra) return -ENOMEM; diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 5dcac1fb4209..a35ffedacc7c 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -244,7 +244,7 @@ static int __init ic_open_devs(void) dev->name); continue; } - if (!(d = kmalloc_obj(struct ic_device, GFP_KERNEL))) { + if (!(d = kmalloc_obj(struct ic_device))) { rtnl_unlock(); return -ENOMEM; } diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c index 77b7717b9c14..2d62526406ca 100644 --- a/net/ipv4/ipmr_base.c +++ b/net/ipv4/ipmr_base.c @@ -38,7 +38,7 @@ mr_table_alloc(struct net *net, u32 id, struct mr_table *mrt; int err; - mrt = kzalloc_obj(*mrt, GFP_KERNEL); + mrt = kzalloc_obj(*mrt); if (!mrt) return ERR_PTR(-ENOMEM); mrt->id = id; diff --git a/net/ipv4/metrics.c b/net/ipv4/metrics.c index 8b88d674a1ea..c1463add48c4 100644 --- a/net/ipv4/metrics.c +++ b/net/ipv4/metrics.c @@ -73,7 +73,7 @@ struct dst_metrics *ip_fib_metrics_init(struct nlattr *fc_mx, if (!fc_mx) return (struct dst_metrics *)&dst_default_metrics; - fib_metrics = kzalloc_obj(*fib_metrics, GFP_KERNEL); + fib_metrics = kzalloc_obj(*fib_metrics); if (unlikely(!fib_metrics)) return ERR_PTR(-ENOMEM); diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 36b52a92e999..b9873370c69e 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -116,7 +116,7 @@ static int nh_notifier_single_info_init(struct nh_notifier_info *info, struct nh_info *nhi = rtnl_dereference(nh->nh_info); info->type = NH_NOTIFIER_INFO_TYPE_SINGLE; - info->nh = kzalloc_obj(*info->nh, GFP_KERNEL); + info->nh = kzalloc_obj(*info->nh); if (!info->nh) return -ENOMEM; @@ -318,7 +318,7 @@ static int nh_notifier_res_bucket_info_init(struct nh_notifier_info *info, return err; info->type = NH_NOTIFIER_INFO_TYPE_RES_BUCKET; - info->nh_res_bucket = kzalloc_obj(*info->nh_res_bucket, GFP_KERNEL); + info->nh_res_bucket = kzalloc_obj(*info->nh_res_bucket); if (!info->nh_res_bucket) return -ENOMEM; @@ -534,7 +534,7 @@ static struct nexthop *nexthop_alloc(void) { struct nexthop *nh; - nh = kzalloc_obj(struct nexthop, GFP_KERNEL); + nh = kzalloc_obj(struct nexthop); if (nh) { INIT_LIST_HEAD(&nh->fi_list); INIT_LIST_HEAD(&nh->f6i_list); @@ -2895,7 +2895,7 @@ static struct nexthop *nexthop_create(struct net *net, struct nh_config *cfg, if (!nh) return ERR_PTR(-ENOMEM); - nhi = kzalloc_obj(*nhi, GFP_KERNEL); + nhi = kzalloc_obj(*nhi); if (!nhi) { kfree(nh); return ERR_PTR(-ENOMEM); diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c75b92f60742..463236e0dc2d 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -315,7 +315,7 @@ static int rt_acct_proc_show(struct seq_file *m, void *v) struct ip_rt_acct *dst, *src; unsigned int i, j; - dst = kzalloc_objs(struct ip_rt_acct, 256, GFP_KERNEL); + dst = kzalloc_objs(struct ip_rt_acct, 256); if (!dst) return -ENOMEM; @@ -3687,7 +3687,7 @@ static __net_initdata struct pernet_operations rt_genid_ops = { static int __net_init ipv4_inetpeer_init(struct net *net) { - struct inet_peer_base *bp = kmalloc_obj(*bp, GFP_KERNEL); + struct inet_peer_base *bp = kmalloc_obj(*bp); if (!bp) return -ENOMEM; diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index b4309dc4b9c5..1b7ba2cf3efe 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c @@ -149,7 +149,7 @@ int tcp_fastopen_reset_cipher(struct net *net, struct sock *sk, struct fastopen_queue *q; int err = 0; - ctx = kmalloc_obj(*ctx, GFP_KERNEL); + ctx = kmalloc_obj(*ctx); if (!ctx) { err = -ENOMEM; goto out; diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 5fcf81a833e8..6c6b68a66dcd 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -3859,7 +3859,7 @@ static struct udp_table __net_init *udp_pernet_table_alloc(unsigned int hash_ent unsigned int slot_size; int i; - udptable = kmalloc_obj(*udptable, GFP_KERNEL); + udptable = kmalloc_obj(*udptable); if (!udptable) goto out; diff --git a/net/ipv4/udp_tunnel_nic.c b/net/ipv4/udp_tunnel_nic.c index ae674e3ed9b8..75d9b6d3f51a 100644 --- a/net/ipv4/udp_tunnel_nic.c +++ b/net/ipv4/udp_tunnel_nic.c @@ -821,7 +821,7 @@ static int udp_tunnel_nic_register(struct net_device *dev) /* Create UDP tunnel state structures */ if (info->shared) { - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (!node) return -ENOMEM; diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index e3b6b9a3f02e..f4b2618446bd 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -180,7 +180,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix, break; } - newp = kmalloc_obj(*newp, GFP_KERNEL); + newp = kmalloc_obj(*newp); if (!newp) return ERR_PTR(-ENOMEM); diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 7ad0c894f2fd..cb26beea4398 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -691,7 +691,7 @@ static int ah6_init_state(struct xfrm_state *x, struct netlink_ext_ack *extack) goto error; } - ahp = kzalloc_obj(*ahp, GFP_KERNEL); + ahp = kzalloc_obj(*ahp); if (!ahp) return -ENOMEM; diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c index c5ff34040175..8991805fc3d6 100644 --- a/net/ipv6/ila/ila_xlat.c +++ b/net/ipv6/ila/ila_xlat.c @@ -220,7 +220,7 @@ static int ila_add_mapping(struct net *net, struct ila_xlat_params *xp) return err; } - ila = kzalloc_obj(*ila, GFP_KERNEL); + ila = kzalloc_obj(*ila); if (!ila) return -ENOMEM; @@ -509,7 +509,7 @@ int ila_xlat_nl_dump_start(struct netlink_callback *cb) struct ila_net *ilan = net_generic(net, ila_net_id); struct ila_dump_iter *iter; - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; diff --git a/net/ipv6/ioam6.c b/net/ipv6/ioam6.c index b6c9e48891fe..b76f89d92e7b 100644 --- a/net/ipv6/ioam6.c +++ b/net/ipv6/ioam6.c @@ -127,7 +127,7 @@ static int ioam6_genl_addns(struct sk_buff *skb, struct genl_info *info) goto out_unlock; } - ns = kzalloc_obj(*ns, GFP_KERNEL); + ns = kzalloc_obj(*ns); if (!ns) { err = -ENOMEM; goto out_unlock; @@ -245,7 +245,7 @@ static int ioam6_genl_dumpns_start(struct netlink_callback *cb) struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -431,7 +431,7 @@ static int ioam6_genl_dumpsc_start(struct netlink_callback *cb) struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -975,7 +975,7 @@ static int __net_init ioam6_net_init(struct net *net) struct ioam6_pernet_data *nsdata; int err = -ENOMEM; - nsdata = kzalloc_obj(*nsdata, GFP_KERNEL); + nsdata = kzalloc_obj(*nsdata); if (!nsdata) goto out; diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 6a26d9448395..2029d40a9d2c 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2464,7 +2464,7 @@ static int __net_init fib6_net_init(struct net *net) INIT_LIST_HEAD(&net->ipv6.fib6_walkers); timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); - net->ipv6.rt6_stats = kzalloc_obj(*net->ipv6.rt6_stats, GFP_KERNEL); + net->ipv6.rt6_stats = kzalloc_obj(*net->ipv6.rt6_stats); if (!net->ipv6.rt6_stats) goto out_notifier; diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index f89e0af5a9ed..7c12bf75beed 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -386,7 +386,7 @@ fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq, goto done; err = -ENOMEM; - fl = kzalloc_obj(*fl, GFP_KERNEL); + fl = kzalloc_obj(*fl); if (!fl) goto done; @@ -638,7 +638,7 @@ static int ipv6_flowlabel_get(struct sock *sk, struct in6_flowlabel_req *freq, if (!fl) return err; - sfl1 = kmalloc_obj(*sfl1, GFP_KERNEL); + sfl1 = kmalloc_obj(*sfl1); if (freq->flr_label) { err = -EEXIST; diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 152388dc96ec..02c4cab60c69 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -66,7 +66,7 @@ int ip6_ra_control(struct sock *sk, int sel) if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num != IPPROTO_RAW) return -ENOPROTOOPT; - new_ra = (sel >= 0) ? kmalloc_obj(*new_ra, GFP_KERNEL) : NULL; + new_ra = (sel >= 0) ? kmalloc_obj(*new_ra) : NULL; if (sel >= 0 && !new_ra) return -ENOMEM; diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index f982f3b71435..3330adcf26db 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -740,7 +740,7 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im) * for deleted items allows change reports to use common code with * non-deleted or query-response MCA's. */ - pmc = kzalloc_obj(*pmc, GFP_KERNEL); + pmc = kzalloc_obj(*pmc); if (!pmc) return; @@ -868,7 +868,7 @@ static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev, mc_assert_locked(idev); - mc = kzalloc_obj(*mc, GFP_KERNEL); + mc = kzalloc_obj(*mc); if (!mc) return NULL; @@ -2415,7 +2415,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode, psf_prev = psf; } if (!psf) { - psf = kzalloc_obj(*psf, GFP_KERNEL); + psf = kzalloc_obj(*psf); if (!psf) return -ENOBUFS; @@ -2500,7 +2500,7 @@ static int sf_setstate(struct ifmcaddr6 *pmc) &psf->sf_addr)) break; if (!dpsf) { - dpsf = kmalloc_obj(*dpsf, GFP_KERNEL); + dpsf = kmalloc_obj(*dpsf); if (!dpsf) continue; *dpsf = *psf; diff --git a/net/ipv6/route.c b/net/ipv6/route.c index dd50cf2bf6ef..85df25c36409 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5331,7 +5331,7 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list, return -EEXIST; } - nh = kzalloc_obj(*nh, GFP_KERNEL); + nh = kzalloc_obj(*nh); if (!nh) return -ENOMEM; @@ -6778,7 +6778,7 @@ static struct pernet_operations ip6_route_net_ops = { static int __net_init ipv6_inetpeer_init(struct net *net) { - struct inet_peer_base *bp = kmalloc_obj(*bp, GFP_KERNEL); + struct inet_peer_base *bp = kmalloc_obj(*bp); if (!bp) return -ENOMEM; diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c index b53c491079cd..1c3ad25700c4 100644 --- a/net/ipv6/seg6.c +++ b/net/ipv6/seg6.c @@ -202,7 +202,7 @@ static int seg6_genl_sethmac(struct sk_buff *skb, struct genl_info *info) secret = (char *)nla_data(info->attrs[SEG6_ATTR_SECRET]); - hinfo = kzalloc_obj(*hinfo, GFP_KERNEL); + hinfo = kzalloc_obj(*hinfo); if (!hinfo) { err = -ENOMEM; goto out_unlock; @@ -339,7 +339,7 @@ static int seg6_genl_dumphmac_start(struct netlink_callback *cb) iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -421,13 +421,13 @@ static int __net_init seg6_net_init(struct net *net) { struct seg6_pernet_data *sdata; - sdata = kzalloc_obj(*sdata, GFP_KERNEL); + sdata = kzalloc_obj(*sdata); if (!sdata) return -ENOMEM; mutex_init(&sdata->lock); - sdata->tun_src = kzalloc_obj(*sdata->tun_src, GFP_KERNEL); + sdata->tun_src = kzalloc_obj(*sdata->tun_src); if (!sdata->tun_src) { kfree(sdata); return -ENOMEM; diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index ca7955831c28..6a7b8abb0477 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -394,7 +394,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) goto out; } - p = kzalloc_obj(struct ip_tunnel_prl_entry, GFP_KERNEL); + p = kzalloc_obj(struct ip_tunnel_prl_entry); if (!p) { err = -ENOBUFS; goto out; diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 0c3492c873ca..6641c49b09ac 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -90,7 +90,7 @@ struct device *iucv_alloc_device(const struct attribute_group **attrs, char buf[20]; int rc; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto out_error; va_start(vargs, fmt); diff --git a/net/key/af_key.c b/net/key/af_key.c index 83c7697c679a..0756bac62f7c 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1196,7 +1196,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, err = -ENOSYS; goto out; } - x->calg = kmalloc_obj(*x->calg, GFP_KERNEL); + x->calg = kmalloc_obj(*x->calg); if (!x->calg) { err = -ENOMEM; goto out; @@ -1261,7 +1261,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, const struct sadb_x_nat_t_type* n_type; struct xfrm_encap_tmpl *natt; - x->encap = kzalloc_obj(*x->encap, GFP_KERNEL); + x->encap = kzalloc_obj(*x->encap); if (!x->encap) { err = -ENOMEM; goto out; @@ -1855,7 +1855,7 @@ static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_ms mutex_unlock(&pfk->dump_lock); return -EINVAL; } - filter = kmalloc_obj(*filter, GFP_KERNEL); + filter = kmalloc_obj(*filter); if (filter == NULL) { mutex_unlock(&pfk->dump_lock); return -ENOMEM; diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 1b84338f2a90..c89ae52764b8 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1572,7 +1572,7 @@ int l2tp_tunnel_create(int fd, int version, u32 tunnel_id, u32 peer_tunnel_id, if (cfg) encap = cfg->encap; - tunnel = kzalloc_obj(*tunnel, GFP_KERNEL); + tunnel = kzalloc_obj(*tunnel); if (!tunnel) { err = -ENOMEM; goto err; diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c index 56ea3ed20581..b26986fda9d6 100644 --- a/net/l2tp/l2tp_debugfs.c +++ b/net/l2tp/l2tp_debugfs.c @@ -269,7 +269,7 @@ static int l2tp_dfs_seq_open(struct inode *inode, struct file *file) struct seq_file *seq; int rc = -ENOMEM; - pd = kzalloc_obj(*pd, GFP_KERNEL); + pd = kzalloc_obj(*pd); if (!pd) goto out; diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index e8670a46371c..f301a8622bee 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -395,7 +395,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, } /* prepare A-MPDU MLME for Rx aggregation */ - tid_agg_rx = kzalloc_obj(*tid_agg_rx, GFP_KERNEL); + tid_agg_rx = kzalloc_obj(*tid_agg_rx); if (!tid_agg_rx) goto end; @@ -411,7 +411,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, /* prepare reordering buffer */ tid_agg_rx->reorder_buf = - kzalloc_objs(struct sk_buff_head, buf_size, GFP_KERNEL); + kzalloc_objs(struct sk_buff_head, buf_size); tid_agg_rx->reorder_time = kcalloc(buf_size, sizeof(unsigned long), GFP_KERNEL); if (!tid_agg_rx->reorder_buf || !tid_agg_rx->reorder_time) { diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d1adbc4984d1..8b76525c56ee 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -4742,7 +4742,7 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy, struct mac80211_qos_map *new_qos_map, *old_qos_map; if (qos_map) { - new_qos_map = kzalloc_obj(*new_qos_map, GFP_KERNEL); + new_qos_map = kzalloc_obj(*new_qos_map); if (!new_qos_map) return -ENOMEM; memcpy(&new_qos_map->qos_map, qos_map, sizeof(*qos_map)); diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 60654b0b542d..4447cf03c41b 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -1612,7 +1612,7 @@ static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, lockdep_assert_wiphy(local->hw.wiphy); - vif_chsw = kzalloc_objs(vif_chsw[0], n_vifs, GFP_KERNEL); + vif_chsw = kzalloc_objs(vif_chsw[0], n_vifs); if (!vif_chsw) return -ENOMEM; diff --git a/net/mac80211/led.c b/net/mac80211/led.c index f93fe928c4bc..b5600d223452 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c @@ -298,7 +298,7 @@ __ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, if (WARN_ON(local->tpt_led_trigger)) return NULL; - tpt_trig = kzalloc_obj(struct tpt_led_trigger, GFP_KERNEL); + tpt_trig = kzalloc_obj(struct tpt_led_trigger); if (!tpt_trig) return NULL; diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 7102d113d89d..f589450754a9 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -295,7 +295,7 @@ static int ieee80211_vif_update_links(struct ieee80211_sub_if_data *sdata, /* allocate new link structures first */ for_each_set_bit(link_id, &add, IEEE80211_MLD_MAX_NUM_LINKS) { - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) { ret = -ENOMEM; goto free; diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index a7bd4dd9aa19..a7e71eef3660 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -178,7 +178,7 @@ int mesh_rmc_init(struct ieee80211_sub_if_data *sdata) { int i; - sdata->u.mesh.rmc = kmalloc_obj(struct mesh_rmc, GFP_KERNEL); + sdata->u.mesh.rmc = kmalloc_obj(struct mesh_rmc); if (!sdata->u.mesh.rmc) return -ENOMEM; sdata->u.mesh.rmc->idx_mask = RMC_BUCKETS - 1; diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c1d0808f2545..e8edcee0e08a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -10839,7 +10839,7 @@ int ieee80211_mgd_assoc_ml_reconf(struct ieee80211_sub_if_data *sdata, if (added_links) { bool uapsd_supported; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 00ef339f7de4..f60f6a58948b 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -579,7 +579,7 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, if (!local->emulate_chanctx && !local->ops->remain_on_channel) return -EOPNOTSUPP; - roc = kzalloc_obj(*roc, GFP_KERNEL); + roc = kzalloc_obj(*roc); if (!roc) return -ENOMEM; diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 3ae891be800b..31af7dd6aedc 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -163,7 +163,7 @@ int ieee80211_rate_control_register(const struct rate_control_ops *ops) } } - alg = kzalloc_obj(*alg, GFP_KERNEL); + alg = kzalloc_obj(*alg); if (alg == NULL) { mutex_unlock(&rate_ctrl_mutex); return -ENOMEM; @@ -263,7 +263,7 @@ rate_control_alloc(const char *name, struct ieee80211_local *local) { struct rate_control_ref *ref; - ref = kmalloc_obj(struct rate_control_ref, GFP_KERNEL); + ref = kmalloc_obj(struct rate_control_ref); if (!ref) return NULL; ref->ops = ieee80211_rate_control_ops_get(name); diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 6abcf410a0ca..6dc22f1593be 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -903,7 +903,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) goto out_cleanup; } - sinfo = kzalloc_obj(struct station_info, GFP_KERNEL); + sinfo = kzalloc_obj(struct station_info); if (!sinfo) { err = -ENOMEM; goto out_cleanup; @@ -1545,7 +1545,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta, bool recalc) } } - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (sinfo) sta_set_sinfo(sta, sinfo, true); @@ -3306,7 +3306,7 @@ int ieee80211_sta_allocate_link(struct sta_info *sta, unsigned int link_id) sta->link[link_id])) return -EBUSY; - alloc = kzalloc_obj(*alloc, GFP_KERNEL); + alloc = kzalloc_obj(*alloc); if (!alloc) return -ENOMEM; diff --git a/net/mac80211/tests/util.c b/net/mac80211/tests/util.c index cddc46eeb648..0b01264af577 100644 --- a/net/mac80211/tests/util.c +++ b/net/mac80211/tests/util.c @@ -195,16 +195,16 @@ int t_sdata_init(struct kunit_resource *resource, void *ctx) struct kunit *test = kunit_get_current_test(); struct t_sdata *t_sdata; - t_sdata = kzalloc_obj(*t_sdata, GFP_KERNEL); + t_sdata = kzalloc_obj(*t_sdata); KUNIT_ASSERT_NOT_NULL(test, t_sdata); resource->data = t_sdata; resource->name = "sdata"; - t_sdata->sdata = kzalloc_obj(*t_sdata->sdata, GFP_KERNEL); + t_sdata->sdata = kzalloc_obj(*t_sdata->sdata); KUNIT_ASSERT_NOT_NULL(test, t_sdata->sdata); - t_sdata->wiphy = kzalloc_obj(*t_sdata->wiphy, GFP_KERNEL); + t_sdata->wiphy = kzalloc_obj(*t_sdata->wiphy); KUNIT_ASSERT_NOT_NULL(test, t_sdata->wiphy); strscpy(t_sdata->sdata->name, "kunit"); diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a3113e1d9829..8cdbd417d7be 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1611,7 +1611,7 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local) local->cparams.target = MS2TIME(20); local->cparams.ecn = true; - local->cvars = kvzalloc_objs(local->cvars[0], fq->flows_cnt, GFP_KERNEL); + local->cvars = kvzalloc_objs(local->cvars[0], fq->flows_cnt); if (!local->cvars) { spin_lock_bh(&fq->lock); fq_reset(fq, fq_skb_free_func); diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c index 44ad05726db3..e8484031a390 100644 --- a/net/mac802154/cfg.c +++ b/net/mac802154/cfg.c @@ -339,7 +339,7 @@ static int mac802154_associate(struct wpan_phy *wpan_phy, if (coord->mode == IEEE802154_SHORT_ADDRESSING) return -EINVAL; - parent = kzalloc_obj(*parent, GFP_KERNEL); + parent = kzalloc_obj(*parent); if (!parent) return -ENOMEM; diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 0489f2515eb6..e8512578398e 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c @@ -117,7 +117,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template) struct mac802154_llsec_key *key; int i; - key = kzalloc_obj(*key, GFP_KERNEL); + key = kzalloc_obj(*key); if (!key) return NULL; @@ -241,7 +241,7 @@ int mac802154_llsec_key_add(struct mac802154_llsec *sec, break; } - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) return -ENOMEM; @@ -369,7 +369,7 @@ int mac802154_llsec_dev_add(struct mac802154_llsec *sec, llsec_dev_find_long(sec, dev->hwaddr)) return -EEXIST; - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -441,7 +441,7 @@ int mac802154_llsec_devkey_add(struct mac802154_llsec *sec, if (llsec_devkey_find(dev, &key->key_id)) return -EEXIST; - devkey = kmalloc_obj(*devkey, GFP_KERNEL); + devkey = kmalloc_obj(*devkey); if (!devkey) return -ENOMEM; @@ -500,7 +500,7 @@ int mac802154_llsec_seclevel_add(struct mac802154_llsec *sec, if (llsec_find_seclevel(sec, sl)) return -EEXIST; - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) return -ENOMEM; diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c index 583178784c9b..0a31ac8d8415 100644 --- a/net/mac802154/scan.c +++ b/net/mac802154/scan.c @@ -798,7 +798,7 @@ int mac802154_process_association_req(struct ieee802154_sub_if_data *sdata, goto unlock; } - child = kzalloc_obj(*child, GFP_KERNEL); + child = kzalloc_obj(*child); if (!child) { ret = -ENOMEM; goto unlock; diff --git a/net/mctp/device.c b/net/mctp/device.c index 08f3d35fa45b..2c84df674669 100644 --- a/net/mctp/device.c +++ b/net/mctp/device.c @@ -336,7 +336,7 @@ static struct mctp_dev *mctp_add_dev(struct net_device *dev) ASSERT_RTNL(); - mdev = kzalloc_obj(*mdev, GFP_KERNEL); + mdev = kzalloc_obj(*mdev); if (!mdev) return ERR_PTR(-ENOMEM); diff --git a/net/mctp/neigh.c b/net/mctp/neigh.c index 5894433535eb..87e40db0f078 100644 --- a/net/mctp/neigh.c +++ b/net/mctp/neigh.c @@ -40,7 +40,7 @@ static int mctp_neigh_add(struct mctp_dev *mdev, mctp_eid_t eid, goto out; } - neigh = kzalloc_obj(*neigh, GFP_KERNEL); + neigh = kzalloc_obj(*neigh); if (!neigh) { rc = -ENOMEM; goto out; diff --git a/net/mctp/route.c b/net/mctp/route.c index 349fc650a805..0381377ab760 100644 --- a/net/mctp/route.c +++ b/net/mctp/route.c @@ -675,7 +675,7 @@ static struct mctp_route *mctp_route_alloc(void) { struct mctp_route *rt; - rt = kzalloc_obj(*rt, GFP_KERNEL); + rt = kzalloc_obj(*rt); if (!rt) return NULL; diff --git a/net/mctp/test/utils.c b/net/mctp/test/utils.c index 922b2c353a4e..97afe8cd2b05 100644 --- a/net/mctp/test/utils.c +++ b/net/mctp/test/utils.c @@ -106,7 +106,7 @@ static struct mctp_test_route *mctp_route_test_alloc(void) { struct mctp_test_route *rt; - rt = kzalloc_obj(*rt, GFP_KERNEL); + rt = kzalloc_obj(*rt); if (!rt) return NULL; diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 82d885b8478a..ef9e749d5e08 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1470,7 +1470,7 @@ static struct mpls_dev *mpls_add_dev(struct net_device *dev) int err = -ENOMEM; int i; - mdev = kzalloc_obj(*mdev, GFP_KERNEL); + mdev = kzalloc_obj(*mdev); if (!mdev) return ERR_PTR(err); @@ -1977,7 +1977,7 @@ static int mpls_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, struct mpls_route_config *cfg; int err; - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) return -ENOMEM; @@ -2002,7 +2002,7 @@ static int mpls_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, struct mpls_route_config *cfg; int err; - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) return -ENOMEM; diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index dec9812c3fbb..54d0df0a9efe 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c @@ -1697,7 +1697,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid) return -ENOSPC; } - vlan = kzalloc_obj(*vlan, GFP_KERNEL); + vlan = kzalloc_obj(*vlan); if (!vlan) return -ENOMEM; diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index c3beef6155b6..a2fe711cb5e3 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -1077,7 +1077,7 @@ static int ip_set_create(struct sk_buff *skb, const struct nfnl_info *info, /* First, and without any locks, allocate and initialize * a normal base set structure. */ - set = kzalloc_obj(*set, GFP_KERNEL); + set = kzalloc_obj(*set); if (!set) return -ENOMEM; spin_lock_init(&set->lock); @@ -1135,7 +1135,7 @@ static int ip_set_create(struct sk_buff *skb, const struct nfnl_info *info, /* Wraparound */ goto cleanup; - list = kvzalloc_objs(struct ip_set *, i, GFP_KERNEL); + list = kvzalloc_objs(struct ip_set *, i); if (!list) goto cleanup; /* nfnl mutex is held, both lists are valid */ @@ -2377,7 +2377,7 @@ ip_set_net_init(struct net *net) if (inst->ip_set_max >= IPSET_INVALID_ID) inst->ip_set_max = IPSET_INVALID_ID - 1; - list = kvzalloc_objs(struct ip_set *, inst->ip_set_max, GFP_KERNEL); + list = kvzalloc_objs(struct ip_set *, inst->ip_set_max); if (!list) return -ENOMEM; inst->is_deleted = false; diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c index 39165c014bd9..98b91b34c314 100644 --- a/net/netfilter/ipset/ip_set_list_set.c +++ b/net/netfilter/ipset/ip_set_list_set.c @@ -598,7 +598,7 @@ init_list_set(struct net *net, struct ip_set *set, u32 size) { struct list_set *map; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) return false; diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index d38867c52180..35642de2a0fe 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -938,7 +938,7 @@ int ip_vs_stats_init_alloc(struct ip_vs_stats *s) struct ip_vs_stats *ip_vs_stats_alloc(void) { - struct ip_vs_stats *s = kzalloc_obj(*s, GFP_KERNEL); + struct ip_vs_stats *s = kzalloc_obj(*s); if (s && ip_vs_stats_init_alloc(s) >= 0) return s; @@ -1079,7 +1079,7 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest) return -EINVAL; } - dest = kzalloc_obj(struct ip_vs_dest, GFP_KERNEL); + dest = kzalloc_obj(struct ip_vs_dest); if (dest == NULL) return -ENOMEM; @@ -1421,7 +1421,7 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u, ret_hooks = ret; } - svc = kzalloc_obj(struct ip_vs_service, GFP_KERNEL); + svc = kzalloc_obj(struct ip_vs_service); if (svc == NULL) { IP_VS_DBG(1, "%s(): no memory\n", __func__); ret = -ENOMEM; @@ -4439,7 +4439,7 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs) INIT_DELAYED_WORK(&ipvs->est_reload_work, est_reload_work_handler); /* procfs stats */ - ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats, GFP_KERNEL); + ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats); if (!ipvs->tot_stats) goto out; if (ip_vs_stats_init_alloc(&ipvs->tot_stats->s) < 0) diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index ac1d6f5bfe8a..e1f62f6b25e2 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c @@ -153,7 +153,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc) struct ip_vs_dh_state *s; /* allocate the DH table for this service */ - s = kzalloc_obj(struct ip_vs_dh_state, GFP_KERNEL); + s = kzalloc_obj(struct ip_vs_dh_state); if (s == NULL) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index 06999a17519b..b17de33314da 100644 --- a/net/netfilter/ipvs/ip_vs_est.c +++ b/net/netfilter/ipvs/ip_vs_est.c @@ -325,7 +325,7 @@ static int ip_vs_est_add_kthread(struct netns_ipvs *ipvs) id = i; } - kd = kzalloc_obj(*kd, GFP_KERNEL); + kd = kzalloc_obj(*kd); if (!kd) goto out; kd->ipvs = ipvs; @@ -443,7 +443,7 @@ add_est: td = rcu_dereference_protected(kd->ticks[row], 1); if (!td) { - td = kzalloc_obj(*td, GFP_KERNEL); + td = kzalloc_obj(*td); if (!td) { ret = -ENOMEM; goto out; diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index 36d91153712c..15ccb2b2fa1f 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c @@ -347,7 +347,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc) /* * Allocate the ip_vs_lblc_table for this service */ - tbl = kmalloc_obj(*tbl, GFP_KERNEL); + tbl = kmalloc_obj(*tbl); if (tbl == NULL) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index eba6600decbe..c90ea897c3f7 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c @@ -510,7 +510,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc) /* * Allocate the ip_vs_lblcr_table for this service */ - tbl = kmalloc_obj(*tbl, GFP_KERNEL); + tbl = kmalloc_obj(*tbl); if (tbl == NULL) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c index 7f5be86bab4d..c029ff6b3eb2 100644 --- a/net/netfilter/ipvs/ip_vs_mh.c +++ b/net/netfilter/ipvs/ip_vs_mh.c @@ -382,7 +382,7 @@ static int ip_vs_mh_init_svc(struct ip_vs_service *svc) struct ip_vs_mh_state *s; /* Allocate the MH table for this service */ - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index a62c1e8fc1da..0046aed1fb38 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c @@ -66,7 +66,7 @@ register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp) { unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); struct ip_vs_proto_data *pd = - kzalloc_obj(struct ip_vs_proto_data, GFP_KERNEL); + kzalloc_obj(struct ip_vs_proto_data); if (!pd) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index a4616433b445..cd67066e3b26 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c @@ -229,7 +229,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc) struct ip_vs_sh_state *s; /* allocate the SH table for this service */ - s = kzalloc_obj(struct ip_vs_sh_state, GFP_KERNEL); + s = kzalloc_obj(struct ip_vs_sh_state); if (s == NULL) return -ENOMEM; diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index f83732777228..b2ba3befbd55 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -1827,7 +1827,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, struct ipvs_master_sync_state *ms; result = -ENOMEM; - ipvs->ms = kzalloc_objs(ipvs->ms[0], count, GFP_KERNEL); + ipvs->ms = kzalloc_objs(ipvs->ms[0], count); if (!ipvs->ms) goto out; ms = ipvs->ms; @@ -1841,7 +1841,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, } } result = -ENOMEM; - ti = kzalloc_objs(struct ip_vs_sync_thread_data, count, GFP_KERNEL); + ti = kzalloc_objs(struct ip_vs_sync_thread_data, count); if (!ti) goto out; diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c index 58c65af9830a..2dcff1040da5 100644 --- a/net/netfilter/ipvs/ip_vs_wrr.c +++ b/net/netfilter/ipvs/ip_vs_wrr.c @@ -109,7 +109,7 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc) /* * Allocate the mark variable for WRR scheduling */ - mark = kmalloc_obj(struct ip_vs_wrr_mark, GFP_KERNEL); + mark = kmalloc_obj(struct ip_vs_wrr_mark); if (mark == NULL) return -ENOMEM; diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index 520781335fc8..00eed5b4d1b1 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -632,7 +632,7 @@ struct nf_conncount_data *nf_conncount_init(struct net *net, unsigned int keylen net_get_random_once(&conncount_rnd, sizeof(conncount_rnd)); - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return ERR_PTR(-ENOMEM); diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 42da155ab028..27ce5fda8993 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -2535,7 +2535,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls) if (nr_slots > (INT_MAX / sizeof(struct hlist_nulls_head))) return NULL; - hash = kvzalloc_objs(struct hlist_nulls_head, nr_slots, GFP_KERNEL); + hash = kvzalloc_objs(struct hlist_nulls_head, nr_slots); if (hash && nulls) for (i = 0; i < nr_slots; i++) diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index cd1ab584fb2f..c9d725fc2d71 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -999,7 +999,7 @@ ctnetlink_alloc_filter(const struct nlattr * const cda[], u8 family) return ERR_PTR(-EOPNOTSUPP); #endif - filter = kzalloc_obj(*filter, GFP_KERNEL); + filter = kzalloc_obj(*filter); if (filter == NULL) return ERR_PTR(-ENOMEM); diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c index c95a18ca178b..9b677e116487 100644 --- a/net/netfilter/nf_flow_table_offload.c +++ b/net/netfilter/nf_flow_table_offload.c @@ -741,7 +741,7 @@ nf_flow_offload_rule_alloc(struct net *net, struct nf_flow_rule *flow_rule; int err = -ENOMEM; - flow_rule = kzalloc_obj(*flow_rule, GFP_KERNEL); + flow_rule = kzalloc_obj(*flow_rule); if (!flow_rule) goto err_flow; diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index b4053e5ee07f..3b5434e4ec9c 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -1213,7 +1213,7 @@ int nf_nat_register_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops, } for (i = 0; i < ops_count; i++) { - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv) { nat_ops[i].priv = priv; continue; diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 6044f1ec6953..06bd4d6eefeb 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1104,7 +1104,7 @@ __printf(2, 3) int nft_request_module(struct net *net, const char *fmt, } } - req = kmalloc_obj(*req, GFP_KERNEL); + req = kmalloc_obj(*req); if (!req) return -ENOMEM; @@ -8075,7 +8075,7 @@ static struct nft_object *nft_obj_init(const struct nft_ctx *ctx, struct nft_object *obj; int err = -ENOMEM; - tb = kmalloc_objs(*tb, type->maxattr + 1, GFP_KERNEL); + tb = kmalloc_objs(*tb, type->maxattr + 1); if (!tb) goto err1; @@ -10688,7 +10688,7 @@ static int nf_tables_commit_audit_alloc(struct list_head *adl, if (adp->table == table) return 0; } - adp = kzalloc_obj(*adp, GFP_KERNEL); + adp = kzalloc_obj(*adp); if (!adp) return -ENOMEM; adp->table = table; diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c index 42f11cb0c0f5..9101b1703b52 100644 --- a/net/netfilter/nf_tables_offload.c +++ b/net/netfilter/nf_tables_offload.c @@ -11,7 +11,7 @@ static struct nft_flow_rule *nft_flow_rule_alloc(int num_actions) { struct nft_flow_rule *flow; - flow = kzalloc_obj(struct nft_flow_rule, GFP_KERNEL); + flow = kzalloc_obj(struct nft_flow_rule); if (!flow) return NULL; @@ -111,7 +111,7 @@ struct nft_flow_rule *nft_flow_rule_create(struct net *net, expr = nft_expr_first(rule); - ctx = kzalloc_obj(struct nft_offload_ctx, GFP_KERNEL); + ctx = kzalloc_obj(struct nft_offload_ctx); if (!ctx) { err = -ENOMEM; goto err_out; diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 39c3d54de9f6..e62a0dea24ea 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -325,7 +325,7 @@ static int nfnl_err_add(struct list_head *list, struct nlmsghdr *nlh, int err, { struct nfnl_err *nfnl_err; - nfnl_err = kmalloc_obj(struct nfnl_err, GFP_KERNEL); + nfnl_err = kmalloc_obj(struct nfnl_err); if (nfnl_err == NULL) return -ENOMEM; diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c index bd3d960a1adb..2bfaa773d82f 100644 --- a/net/netfilter/nfnetlink_acct.c +++ b/net/netfilter/nfnetlink_acct.c @@ -260,7 +260,7 @@ static int nfnl_acct_start(struct netlink_callback *cb) if (!tb[NFACCT_FILTER_MASK] || !tb[NFACCT_FILTER_VALUE]) return -EINVAL; - filter = kzalloc_obj(struct nfacct_filter, GFP_KERNEL); + filter = kzalloc_obj(struct nfacct_filter); if (!filter) return -ENOMEM; diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c index 1a3d333e45dd..5efffc52d981 100644 --- a/net/netfilter/nfnetlink_cthelper.c +++ b/net/netfilter/nfnetlink_cthelper.c @@ -227,7 +227,7 @@ nfnl_cthelper_create(const struct nlattr * const tb[], if (!tb[NFCTH_TUPLE] || !tb[NFCTH_POLICY] || !tb[NFCTH_PRIV_DATA_LEN]) return -EINVAL; - nfcth = kzalloc_obj(*nfcth, GFP_KERNEL); + nfcth = kzalloc_obj(*nfcth); if (nfcth == NULL) return -ENOMEM; helper = &nfcth->helper; diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c index 6b91f9d3161a..fd8652aa7e88 100644 --- a/net/netfilter/nfnetlink_cttimeout.c +++ b/net/netfilter/nfnetlink_cttimeout.c @@ -74,7 +74,7 @@ ctnl_timeout_parse_policy(void *timeout, struct nlattr **tb; int ret = 0; - tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1, GFP_KERNEL); + tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1); if (!tb) return -ENOMEM; diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c index c2a572d86853..531706982859 100644 --- a/net/netfilter/nfnetlink_hook.c +++ b/net/netfilter/nfnetlink_hook.c @@ -408,7 +408,7 @@ static int nfnl_hook_dump_start(struct netlink_callback *cb) if (head && IS_ERR(head)) return PTR_ERR(head); - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c index 1ba43e562a5e..94e3eac5743a 100644 --- a/net/netfilter/nfnetlink_osf.c +++ b/net/netfilter/nfnetlink_osf.c @@ -323,7 +323,7 @@ static int nfnl_osf_add_callback(struct sk_buff *skb, !memchr(f->version, 0, MAXGENRELEN)) return -EINVAL; - kf = kmalloc_obj(struct nf_osf_finger, GFP_KERNEL); + kf = kmalloc_obj(struct nf_osf_finger); if (!kf) return -ENOMEM; diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index 8d7f6c8e8aad..47d3ef109a99 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c @@ -894,7 +894,7 @@ nft_ct_timeout_parse_policy(void *timeouts, struct nlattr **tb; int ret = 0; - tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1, GFP_KERNEL); + tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1); if (!tb) return -ENOMEM; diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index f5d720c9ee32..e594b3b7ad82 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1742,7 +1742,7 @@ xt_hook_ops_alloc(const struct xt_table *table, nf_hookfn *fn) if (!num_hooks) return ERR_PTR(-EINVAL); - ops = kzalloc_objs(*ops, num_hooks, GFP_KERNEL); + ops = kzalloc_objs(*ops, num_hooks); if (ops == NULL) return ERR_PTR(-ENOMEM); @@ -1775,7 +1775,7 @@ int xt_register_template(const struct xt_table *table, } ret = -ENOMEM; - t = kzalloc_obj(*t, GFP_KERNEL); + t = kzalloc_obj(*t); if (!t) goto out_unlock; @@ -1993,7 +1993,7 @@ static int __init xt_init(void) } } - xt = kzalloc_objs(struct xt_af, NFPROTO_NUMPROTO, GFP_KERNEL); + xt = kzalloc_objs(struct xt_af, NFPROTO_NUMPROTO); if (!xt) return -ENOMEM; diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 746abeee6775..5d93e225d0f8 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -135,7 +135,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) { int ret; - info->timer = kzalloc_obj(*info->timer, GFP_KERNEL); + info->timer = kzalloc_obj(*info->timer); if (!info->timer) { ret = -ENOMEM; goto out; @@ -184,7 +184,7 @@ static int idletimer_tg_create_v1(struct idletimer_tg_info_v1 *info) { int ret; - info->timer = kmalloc_obj(*info->timer, GFP_KERNEL); + info->timer = kmalloc_obj(*info->timer); if (!info->timer) { ret = -ENOMEM; goto out; diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index 6b21810e1b97..caaaf4d2c584 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c @@ -111,7 +111,7 @@ static int led_tg_check(const struct xt_tgchk_param *par) } err = -ENOMEM; - ledinternal = kzalloc_obj(struct xt_led_info_internal, GFP_KERNEL); + ledinternal = kzalloc_obj(struct xt_led_info_internal); if (!ledinternal) goto exit_mutex_only; diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c index d75b1e101a5b..91270d467ffd 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c @@ -139,7 +139,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) } ret = -ENOMEM; - est = kzalloc_obj(*est, GFP_KERNEL); + est = kzalloc_obj(*est); if (!est) goto err1; diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c index c6044ea31d16..5d34ceb893ed 100644 --- a/net/netfilter/xt_TEE.c +++ b/net/netfilter/xt_TEE.c @@ -106,7 +106,7 @@ static int tee_tg_check(const struct xt_tgchk_param *par) if (info->oif[sizeof(info->oif)-1] != '\0') return -EINVAL; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv == NULL) return -ENOMEM; diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 203f8bb28132..87d74da14c0b 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c @@ -115,7 +115,7 @@ static int limit_mt_check(const struct xt_mtchk_param *par) return -ERANGE; } - priv = kmalloc_obj(*priv, GFP_KERNEL); + priv = kmalloc_obj(*priv); if (priv == NULL) return -ENOMEM; diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 7952a4ef4c51..b05c5c8dac78 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c @@ -50,7 +50,7 @@ static int quota_mt_check(const struct xt_mtchk_param *par) if (q->flags & ~XT_QUOTA_MASK) return -EINVAL; - q->master = kmalloc_obj(*q->master, GFP_KERNEL); + q->master = kmalloc_obj(*q->master); if (q->master == NULL) return -ENOMEM; diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c index e80ddc317ca5..334e09771abf 100644 --- a/net/netfilter/xt_statistic.c +++ b/net/netfilter/xt_statistic.c @@ -58,7 +58,7 @@ static int statistic_mt_check(const struct xt_mtchk_param *par) info->flags & ~XT_STATISTIC_MASK) return -EINVAL; - info->master = kzalloc_obj(*info->master, GFP_KERNEL); + info->master = kzalloc_obj(*info->master); if (info->master == NULL) return -ENOMEM; atomic_set(&info->master->count, info->u.nth.count); diff --git a/net/netlabel/netlabel_calipso.c b/net/netlabel/netlabel_calipso.c index fae0bee5c065..e1efd888b4a2 100644 --- a/net/netlabel/netlabel_calipso.c +++ b/net/netlabel/netlabel_calipso.c @@ -95,7 +95,7 @@ static int netlbl_calipso_add_pass(struct genl_info *info, int ret_val; struct calipso_doi *doi_def = NULL; - doi_def = kmalloc_obj(*doi_def, GFP_KERNEL); + doi_def = kmalloc_obj(*doi_def); if (!doi_def) return -ENOMEM; doi_def->type = CALIPSO_MAP_PASS; diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index 526f3dc3e67a..b080e666523f 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c @@ -139,10 +139,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info, NULL) != 0) return -EINVAL; - doi_def = kmalloc_obj(*doi_def, GFP_KERNEL); + doi_def = kmalloc_obj(*doi_def); if (doi_def == NULL) return -ENOMEM; - doi_def->map.std = kzalloc_obj(*doi_def->map.std, GFP_KERNEL); + doi_def->map.std = kzalloc_obj(*doi_def->map.std); if (doi_def->map.std == NULL) { kfree(doi_def); return -ENOMEM; @@ -332,7 +332,7 @@ static int netlbl_cipsov4_add_pass(struct genl_info *info, if (!info->attrs[NLBL_CIPSOV4_A_TAGLST]) return -EINVAL; - doi_def = kmalloc_obj(*doi_def, GFP_KERNEL); + doi_def = kmalloc_obj(*doi_def); if (doi_def == NULL) return -ENOMEM; doi_def->type = CIPSO_V4_MAP_PASS; @@ -371,7 +371,7 @@ static int netlbl_cipsov4_add_local(struct genl_info *info, if (!info->attrs[NLBL_CIPSOV4_A_TAGLST]) return -EINVAL; - doi_def = kmalloc_obj(*doi_def, GFP_KERNEL); + doi_def = kmalloc_obj(*doi_def); if (doi_def == NULL) return -ENOMEM; doi_def->type = CIPSO_V4_MAP_LOCAL; diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index fc014849d6b3..3fe31648ba2d 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c @@ -367,11 +367,11 @@ int __init netlbl_domhsh_init(u32 size) if (size == 0) return -EINVAL; - hsh_tbl = kmalloc_obj(*hsh_tbl, GFP_KERNEL); + hsh_tbl = kmalloc_obj(*hsh_tbl); if (hsh_tbl == NULL) return -ENOMEM; hsh_tbl->size = 1 << size; - hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size, GFP_KERNEL); + hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size); if (hsh_tbl->tbl == NULL) { kfree(hsh_tbl); return -ENOMEM; diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 13f45fbff824..3e89c3b3a1a4 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c @@ -84,7 +84,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, struct calipso_doi *calipso = NULL; #endif u32 tmp_val; - struct netlbl_dom_map *entry = kzalloc_obj(*entry, GFP_KERNEL); + struct netlbl_dom_map *entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -148,7 +148,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, struct in_addr *mask; struct netlbl_domaddr4_map *map; - addrmap = kzalloc_obj(*addrmap, GFP_KERNEL); + addrmap = kzalloc_obj(*addrmap); if (addrmap == NULL) { ret_val = -ENOMEM; goto add_doi_put_def; @@ -169,7 +169,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, addr = nla_data(info->attrs[NLBL_MGMT_A_IPV4ADDR]); mask = nla_data(info->attrs[NLBL_MGMT_A_IPV4MASK]); - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (map == NULL) { ret_val = -ENOMEM; goto add_free_addrmap; @@ -195,7 +195,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, struct in6_addr *mask; struct netlbl_domaddr6_map *map; - addrmap = kzalloc_obj(*addrmap, GFP_KERNEL); + addrmap = kzalloc_obj(*addrmap); if (addrmap == NULL) { ret_val = -ENOMEM; goto add_doi_put_def; @@ -216,7 +216,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info, addr = nla_data(info->attrs[NLBL_MGMT_A_IPV6ADDR]); mask = nla_data(info->attrs[NLBL_MGMT_A_IPV6MASK]); - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (map == NULL) { ret_val = -ENOMEM; goto add_free_addrmap; diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index ab68324c08d9..ca7a9e2a3de7 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c @@ -1413,11 +1413,11 @@ int __init netlbl_unlabel_init(u32 size) if (size == 0) return -EINVAL; - hsh_tbl = kmalloc_obj(*hsh_tbl, GFP_KERNEL); + hsh_tbl = kmalloc_obj(*hsh_tbl); if (hsh_tbl == NULL) return -ENOMEM; hsh_tbl->size = 1 << size; - hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size, GFP_KERNEL); + hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size); if (hsh_tbl->tbl == NULL) { kfree(hsh_tbl); return -ENOMEM; @@ -1532,7 +1532,7 @@ int __init netlbl_unlabel_defconf(void) audit_info.loginuid = GLOBAL_ROOT_UID; audit_info.sessionid = 0; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (entry == NULL) return -ENOMEM; entry->family = AF_UNSPEC; diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 2d91b8b8ba9a..4d609d5cf406 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2927,7 +2927,7 @@ static int __init netlink_proto_init(void) BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof_field(struct sk_buff, cb)); - nl_table = kzalloc_objs(*nl_table, MAX_LINKS, GFP_KERNEL); + nl_table = kzalloc_objs(*nl_table, MAX_LINKS); if (!nl_table) goto panic; diff --git a/net/netlink/diag.c b/net/netlink/diag.c index 25e930a64d07..1dfc340736b8 100644 --- a/net/netlink/diag.c +++ b/net/netlink/diag.c @@ -107,7 +107,7 @@ static int __netlink_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, num--; if (!hti) { - hti = kmalloc_obj(*hti, GFP_KERNEL); + hti = kmalloc_obj(*hti); if (!hti) return -ENOMEM; diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index ac1fdf7d7327..a23d4c51c089 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -659,7 +659,7 @@ static int genl_sk_privs_alloc(struct genl_family *family) if (!family->sock_priv_size) return 0; - family->sock_privs = kzalloc_obj(*family->sock_privs, GFP_KERNEL); + family->sock_privs = kzalloc_obj(*family->sock_privs); if (!family->sock_privs) return -ENOMEM; xa_init(family->sock_privs); @@ -912,7 +912,7 @@ EXPORT_SYMBOL(genlmsg_put); static struct genl_dumpit_info *genl_dumpit_info_alloc(void) { - return kmalloc_obj(struct genl_dumpit_info, GFP_KERNEL); + return kmalloc_obj(struct genl_dumpit_info); } static void genl_dumpit_info_free(const struct genl_dumpit_info *info) @@ -937,7 +937,7 @@ genl_family_rcv_msg_attrs_parse(const struct genl_family *family, if (!ops->maxattr) return NULL; - attrbuf = kmalloc_objs(struct nlattr *, ops->maxattr + 1, GFP_KERNEL); + attrbuf = kmalloc_objs(struct nlattr *, ops->maxattr + 1); if (!attrbuf) return ERR_PTR(-ENOMEM); @@ -1590,7 +1590,7 @@ static int ctrl_dumppolicy_start(struct netlink_callback *cb) return 0; } - ctx->op_iter = kmalloc_obj(*ctx->op_iter, GFP_KERNEL); + ctx->op_iter = kmalloc_obj(*ctx->op_iter); if (!ctx->op_iter) return -ENOMEM; diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index d7090dad8113..b816c56124ab 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -1401,7 +1401,7 @@ static int __init nr_proto_init(void) goto unregister_proto; } - dev_nr = kzalloc_objs(struct net_device *, nr_ndevs, GFP_KERNEL); + dev_nr = kzalloc_objs(struct net_device *, nr_ndevs); if (!dev_nr) { pr_err("NET/ROM: %s - unable to allocate device array\n", __func__); diff --git a/net/nfc/core.c b/net/nfc/core.c index c39d00b2a0d7..a92a6566e6a0 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c @@ -879,7 +879,7 @@ int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type) if (se) return -EALREADY; - se = kzalloc_obj(struct nfc_se, GFP_KERNEL); + se = kzalloc_obj(struct nfc_se); if (!se) return -ENOMEM; @@ -1062,7 +1062,7 @@ struct nfc_dev *nfc_allocate_device(const struct nfc_ops *ops, if (!supported_protocols) return NULL; - dev = kzalloc_obj(struct nfc_dev, GFP_KERNEL); + dev = kzalloc_obj(struct nfc_dev); if (!dev) return NULL; diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index be9a048b583b..3670bb33732e 100644 --- a/net/nfc/digital_core.c +++ b/net/nfc/digital_core.c @@ -231,7 +231,7 @@ int digital_send_cmd(struct nfc_digital_dev *ddev, u8 cmd_type, { struct digital_cmd *cmd; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -279,7 +279,7 @@ static int digital_tg_listen_mdaa(struct nfc_digital_dev *ddev, u8 rf_tech) struct digital_tg_mdaa_params *params; int rc; - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (!params) return -ENOMEM; @@ -706,7 +706,7 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target, struct digital_data_exch *data_exch; int rc; - data_exch = kzalloc_obj(*data_exch, GFP_KERNEL); + data_exch = kzalloc_obj(*data_exch); if (!data_exch) return -ENOMEM; @@ -762,7 +762,7 @@ struct nfc_digital_dev *nfc_digital_allocate_device(const struct nfc_digital_ops !ops->switch_rf || (ops->tg_listen_md && !ops->tg_get_rf_tech)) return NULL; - ddev = kzalloc_obj(*ddev, GFP_KERNEL); + ddev = kzalloc_obj(*ddev); if (!ddev) return NULL; diff --git a/net/nfc/digital_technology.c b/net/nfc/digital_technology.c index df2bfb4734c5..63f1b721c71d 100644 --- a/net/nfc/digital_technology.c +++ b/net/nfc/digital_technology.c @@ -490,7 +490,7 @@ static void digital_in_recv_sens_res(struct nfc_digital_dev *ddev, void *arg, goto exit; } - target = kzalloc_obj(struct nfc_target, GFP_KERNEL); + target = kzalloc_obj(struct nfc_target); if (!target) { rc = -ENOMEM; goto exit; @@ -688,7 +688,7 @@ static void digital_in_recv_sensb_res(struct nfc_digital_dev *ddev, void *arg, else ddev->target_fsc = digital_ats_fsc[fsci]; - target = kzalloc_obj(struct nfc_target, GFP_KERNEL); + target = kzalloc_obj(struct nfc_target); if (!target) { rc = -ENOMEM; goto exit; @@ -863,7 +863,7 @@ static void digital_in_recv_iso15693_inv_res(struct nfc_digital_dev *ddev, goto out_free_skb; } - target = kzalloc_obj(*target, GFP_KERNEL); + target = kzalloc_obj(*target); if (!target) { rc = -ENOMEM; goto out_free_skb; diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index 10bcd9d2576a..0d33c81a15fe 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -291,7 +291,7 @@ int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate) pr_debug("from gate %d\n", gate); - targets = kzalloc_obj(struct nfc_target, GFP_KERNEL); + targets = kzalloc_obj(struct nfc_target); if (targets == NULL) return -ENOMEM; @@ -964,7 +964,7 @@ struct nfc_hci_dev *nfc_hci_allocate_device(const struct nfc_hci_ops *ops, if (protocols == 0) return NULL; - hdev = kzalloc_obj(struct nfc_hci_dev, GFP_KERNEL); + hdev = kzalloc_obj(struct nfc_hci_dev); if (hdev == NULL) return NULL; diff --git a/net/nfc/hci/hcp.c b/net/nfc/hci/hcp.c index 903fb134cd80..4d19c697d6ec 100644 --- a/net/nfc/hci/hcp.c +++ b/net/nfc/hci/hcp.c @@ -30,7 +30,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe, int hci_len, err; bool firstfrag = true; - cmd = kzalloc_obj(struct hci_msg, GFP_KERNEL); + cmd = kzalloc_obj(struct hci_msg); if (cmd == NULL) return -ENOMEM; diff --git a/net/nfc/hci/llc.c b/net/nfc/hci/llc.c index 12d7940c6217..51dfa0d5dfa2 100644 --- a/net/nfc/hci/llc.c +++ b/net/nfc/hci/llc.c @@ -49,7 +49,7 @@ int nfc_llc_register(const char *name, const struct nfc_llc_ops *ops) { struct nfc_llc_engine *llc_engine; - llc_engine = kzalloc_obj(struct nfc_llc_engine, GFP_KERNEL); + llc_engine = kzalloc_obj(struct nfc_llc_engine); if (llc_engine == NULL) return -ENOMEM; @@ -90,7 +90,7 @@ struct nfc_llc *nfc_llc_allocate(const char *name, struct nfc_hci_dev *hdev, if (llc_engine == NULL) return NULL; - llc = kzalloc_obj(struct nfc_llc, GFP_KERNEL); + llc = kzalloc_obj(struct nfc_llc); if (llc == NULL) return NULL; diff --git a/net/nfc/hci/llc_nop.c b/net/nfc/hci/llc_nop.c index eb940330fd5d..f9c826a138e5 100644 --- a/net/nfc/hci/llc_nop.c +++ b/net/nfc/hci/llc_nop.c @@ -28,7 +28,7 @@ static void *llc_nop_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, *rx_headroom = 0; *rx_tailroom = 0; - llc_nop = kzalloc_obj(struct llc_nop, GFP_KERNEL); + llc_nop = kzalloc_obj(struct llc_nop); if (llc_nop == NULL) return NULL; diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c index 7e0d84c29cb1..6819695d993c 100644 --- a/net/nfc/hci/llc_shdlc.c +++ b/net/nfc/hci/llc_shdlc.c @@ -728,7 +728,7 @@ static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, *rx_headroom = SHDLC_LLC_HEAD_ROOM; *rx_tailroom = 0; - shdlc = kzalloc_obj(struct llc_shdlc, GFP_KERNEL); + shdlc = kzalloc_obj(struct llc_shdlc); if (shdlc == NULL) return NULL; diff --git a/net/nfc/llcp_commands.c b/net/nfc/llcp_commands.c index 90f68199ecca..291f26facbf3 100644 --- a/net/nfc/llcp_commands.c +++ b/net/nfc/llcp_commands.c @@ -108,7 +108,7 @@ struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdres_tlv(u8 tid, u8 sap) struct nfc_llcp_sdp_tlv *sdres; u8 value[2]; - sdres = kzalloc_obj(struct nfc_llcp_sdp_tlv, GFP_KERNEL); + sdres = kzalloc_obj(struct nfc_llcp_sdp_tlv); if (sdres == NULL) return NULL; @@ -141,7 +141,7 @@ struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, const char *uri, if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) return NULL; - sdreq = kzalloc_obj(struct nfc_llcp_sdp_tlv, GFP_KERNEL); + sdreq = kzalloc_obj(struct nfc_llcp_sdp_tlv); if (sdreq == NULL) return NULL; diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index 98f0c3281281..366d7566308c 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -1621,7 +1621,7 @@ int nfc_llcp_register_device(struct nfc_dev *ndev) { struct nfc_llcp_local *local; - local = kzalloc_obj(struct nfc_llcp_local, GFP_KERNEL); + local = kzalloc_obj(struct nfc_llcp_local); if (local == NULL) return -ENOMEM; diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index dc17ed8be242..6e9b76e2cc56 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -1171,7 +1171,7 @@ struct nci_dev *nci_allocate_device(const struct nci_ops *ops, if (!supported_protocols) return NULL; - ndev = kzalloc_obj(struct nci_dev, GFP_KERNEL); + ndev = kzalloc_obj(struct nci_dev); if (!ndev) return NULL; diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index cd3e87b2dd3e..40ae8e5a7ec7 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -777,7 +777,7 @@ struct nci_hci_dev *nci_hci_allocate(struct nci_dev *ndev) { struct nci_hci_dev *hdev; - hdev = kzalloc_obj(*hdev, GFP_KERNEL); + hdev = kzalloc_obj(*hdev); if (!hdev) return NULL; diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c index 25dc2868fd27..5a3aed7f84f5 100644 --- a/net/nfc/nci/uart.c +++ b/net/nfc/nci/uart.c @@ -113,7 +113,7 @@ static int nci_uart_set_driver(struct tty_struct *tty, unsigned int driver) if (!nci_uart_drivers[driver]) return -ENOENT; - nu = kzalloc_obj(*nu, GFP_KERNEL); + nu = kzalloc_obj(*nu); if (!nu) return -ENOMEM; diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index a69322721c31..0c58824cb150 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -604,7 +604,7 @@ static int nfc_genl_dump_devices(struct sk_buff *skb, if (!iter) { first_call = true; - iter = kmalloc_obj(struct class_dev_iter, GFP_KERNEL); + iter = kmalloc_obj(struct class_dev_iter); if (!iter) return -ENOMEM; cb->args[0] = (long) iter; @@ -1370,7 +1370,7 @@ static int nfc_genl_dump_ses(struct sk_buff *skb, if (!iter) { first_call = true; - iter = kmalloc_obj(struct class_dev_iter, GFP_KERNEL); + iter = kmalloc_obj(struct class_dev_iter); if (!iter) return -ENOMEM; cb->args[0] = (long) iter; @@ -1541,7 +1541,7 @@ static int nfc_genl_se_io(struct sk_buff *skb, struct genl_info *info) apdu = nla_data(info->attrs[NFC_ATTR_SE_APDU]); - ctx = kzalloc_obj(struct se_io_ctx, GFP_KERNEL); + ctx = kzalloc_obj(struct se_io_ctx); if (!ctx) { rc = -ENOMEM; goto put_dev; diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index b4fb83c3c0f9..bbb9b52861c0 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1029,7 +1029,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info) } /* Extract key. */ - key = kzalloc_obj(*key, GFP_KERNEL); + key = kzalloc_obj(*key); if (!key) { error = -ENOMEM; goto err_kfree_flow; @@ -1827,7 +1827,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) return -ENOMEM; err = -ENOMEM; - dp = kzalloc_obj(*dp, GFP_KERNEL); + dp = kzalloc_obj(*dp); if (dp == NULL) goto err_destroy_reply; diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 54fd208a1a68..67fbf6e48a30 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c @@ -1890,7 +1890,7 @@ int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid, return 0; /* If UFID was not provided, use unmasked key. */ - new_key = kmalloc_obj(*new_key, GFP_KERNEL); + new_key = kmalloc_obj(*new_key); if (!new_key) return -ENOMEM; memcpy(new_key, key, sizeof(*key)); diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index b75236aa4414..61c6a5f77c2e 100644 --- a/net/openvswitch/flow_table.c +++ b/net/openvswitch/flow_table.c @@ -150,13 +150,13 @@ static void __table_instance_destroy(struct table_instance *ti) static struct table_instance *table_instance_alloc(int new_size) { - struct table_instance *ti = kmalloc_obj(*ti, GFP_KERNEL); + struct table_instance *ti = kmalloc_obj(*ti); int i; if (!ti) return NULL; - ti->buckets = kvmalloc_objs(struct hlist_head, new_size, GFP_KERNEL); + ti->buckets = kvmalloc_objs(struct hlist_head, new_size); if (!ti->buckets) { kfree(ti); return NULL; @@ -366,7 +366,7 @@ static struct mask_cache *tbl_mask_cache_alloc(u32 size) (size * sizeof(struct mask_cache_entry)) > PCPU_MIN_UNIT_SIZE) return NULL; - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) return NULL; @@ -964,7 +964,7 @@ static struct sw_flow_mask *mask_alloc(void) { struct sw_flow_mask *mask; - mask = kmalloc_obj(*mask, GFP_KERNEL); + mask = kmalloc_obj(*mask); if (mask) mask->ref_count = 1; @@ -1109,7 +1109,7 @@ void ovs_flow_masks_rebalance(struct flow_table *table) int i; /* Build array of all current entries with use counters. */ - masks_and_count = kmalloc_objs(*masks_and_count, ma->max, GFP_KERNEL); + masks_and_count = kmalloc_objs(*masks_and_count, ma->max); if (!masks_and_count) return; diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index a78c5122a3d7..753f3bb25970 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1711,7 +1711,7 @@ static int fanout_add(struct sock *sk, struct fanout_args *args) if (type == PACKET_FANOUT_ROLLOVER || (type_flags & PACKET_FANOUT_FLAG_ROLLOVER)) { err = -ENOMEM; - rollover = kzalloc_obj(*rollover, GFP_KERNEL); + rollover = kzalloc_obj(*rollover); if (!rollover) goto out; atomic_long_set(&rollover->num, 0); @@ -3693,7 +3693,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq) goto done; err = -ENOBUFS; - i = kmalloc_obj(*i, GFP_KERNEL); + i = kmalloc_obj(*i); if (i == NULL) goto done; diff --git a/net/psp/psp_main.c b/net/psp/psp_main.c index 08decafee7a6..c5c42b5a00d5 100644 --- a/net/psp/psp_main.c +++ b/net/psp/psp_main.c @@ -64,7 +64,7 @@ psp_dev_create(struct net_device *netdev, !psd_ops->get_stats)) return ERR_PTR(-EINVAL); - psd = kzalloc_obj(*psd, GFP_KERNEL); + psd = kzalloc_obj(*psd); if (!psd) return ERR_PTR(-ENOMEM); diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c index 70e7a210fd42..55fd2dd37588 100644 --- a/net/qrtr/af_qrtr.c +++ b/net/qrtr/af_qrtr.c @@ -271,7 +271,7 @@ static int qrtr_tx_wait(struct qrtr_node *node, int dest_node, int dest_port, mutex_lock(&node->qrtr_tx_lock); flow = radix_tree_lookup(&node->qrtr_tx_flow, key); if (!flow) { - flow = kzalloc_obj(*flow, GFP_KERNEL); + flow = kzalloc_obj(*flow); if (flow) { init_waitqueue_head(&flow->resume_tx); if (radix_tree_insert(&node->qrtr_tx_flow, key, flow)) { @@ -589,7 +589,7 @@ int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid) if (!ep || !ep->xmit) return -EINVAL; - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (!node) return -ENOMEM; diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c index 36b5c1990bf5..3203b2220860 100644 --- a/net/qrtr/ns.c +++ b/net/qrtr/ns.c @@ -78,7 +78,7 @@ static struct qrtr_node *node_get(unsigned int node_id) return node; /* If node didn't exist, allocate and insert it to the tree */ - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (!node) return NULL; @@ -229,7 +229,7 @@ static struct qrtr_server *server_add(unsigned int service, if (!service || !port) return NULL; - srv = kzalloc_obj(*srv, GFP_KERNEL); + srv = kzalloc_obj(*srv); if (!srv) return NULL; @@ -534,7 +534,7 @@ static int ctrl_cmd_new_lookup(struct sockaddr_qrtr *from, if (from->sq_node != qrtr_ns.local_node) return -EINVAL; - lookup = kzalloc_obj(*lookup, GFP_KERNEL); + lookup = kzalloc_obj(*lookup); if (!lookup) return -ENOMEM; diff --git a/net/qrtr/tun.c b/net/qrtr/tun.c index 9ad17a773593..9726db31fc7e 100644 --- a/net/qrtr/tun.c +++ b/net/qrtr/tun.c @@ -33,7 +33,7 @@ static int qrtr_tun_open(struct inode *inode, struct file *filp) struct qrtr_tun *tun; int ret; - tun = kzalloc_obj(*tun, GFP_KERNEL); + tun = kzalloc_obj(*tun); if (!tun) return -ENOMEM; diff --git a/net/rds/cong.c b/net/rds/cong.c index e7f019c3a625..3133b91f9e69 100644 --- a/net/rds/cong.c +++ b/net/rds/cong.c @@ -143,7 +143,7 @@ static struct rds_cong_map *rds_cong_from_addr(const struct in6_addr *addr) unsigned long i; unsigned long flags; - map = kzalloc_obj(struct rds_cong_map, GFP_KERNEL); + map = kzalloc_obj(struct rds_cong_map); if (!map) return NULL; diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index 651f658a6a0a..077f7041df15 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c @@ -67,7 +67,7 @@ static int rds_ib_add_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr) { struct rds_ib_ipaddr *i_ipaddr; - i_ipaddr = kmalloc_obj(*i_ipaddr, GFP_KERNEL); + i_ipaddr = kmalloc_obj(*i_ipaddr); if (!i_ipaddr) return -ENOMEM; @@ -585,7 +585,7 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, if (key_ret) *key_ret = ib_mr->rkey; - ibmr = kzalloc_obj(*ibmr, GFP_KERNEL); + ibmr = kzalloc_obj(*ibmr); if (!ibmr) { ib_dereg_mr(ib_mr); ret = -ENOMEM; @@ -641,7 +641,7 @@ struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev, { struct rds_ib_mr_pool *pool; - pool = kzalloc_obj(*pool, GFP_KERNEL); + pool = kzalloc_obj(*pool); if (!pool) return ERR_PTR(-ENOMEM); diff --git a/net/rds/info.c b/net/rds/info.c index 696e957c41a9..f1b29994934a 100644 --- a/net/rds/info.c +++ b/net/rds/info.c @@ -187,7 +187,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval, nr_pages = (PAGE_ALIGN(start + len) - (start & PAGE_MASK)) >> PAGE_SHIFT; - pages = kmalloc_objs(struct page *, nr_pages, GFP_KERNEL); + pages = kmalloc_objs(struct page *, nr_pages); if (!pages) { ret = -ENOMEM; goto out; diff --git a/net/rds/message.c b/net/rds/message.c index e367ca4f4f31..eaa6f22601a4 100644 --- a/net/rds/message.c +++ b/net/rds/message.c @@ -415,7 +415,7 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter * */ sg = rm->data.op_sg; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; INIT_LIST_HEAD(&info->rs_zcookie_next); diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 0015531aff05..0206492014b7 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -228,13 +228,13 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, args->vec.addr, args->vec.bytes, nr_pages); /* XXX clamp nr_pages to limit the size of this alloc? */ - pages = kzalloc_objs(struct page *, nr_pages, GFP_KERNEL); + pages = kzalloc_objs(struct page *, nr_pages); if (!pages) { ret = -ENOMEM; goto out; } - mr = kzalloc_obj(struct rds_mr, GFP_KERNEL); + mr = kzalloc_obj(struct rds_mr); if (!mr) { ret = -ENOMEM; goto out; @@ -269,7 +269,7 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, goto out; } else { nents = ret; - sg = kmalloc_objs(*sg, nents, GFP_KERNEL); + sg = kmalloc_objs(*sg, nents); if (!sg) { ret = -ENOMEM; goto out; @@ -571,7 +571,7 @@ int rds_rdma_extra_size(struct rds_rdma_args *args, if (args->nr_local > UIO_MAXIOV) return -EMSGSIZE; - iov->iov = kzalloc_objs(struct rds_iovec, args->nr_local, GFP_KERNEL); + iov->iov = kzalloc_objs(struct rds_iovec, args->nr_local); if (!iov->iov) return -ENOMEM; @@ -652,7 +652,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, goto out_ret; } - pages = kzalloc_objs(struct page *, nr_pages, GFP_KERNEL); + pages = kzalloc_objs(struct page *, nr_pages); if (!pages) { ret = -ENOMEM; goto out_ret; @@ -679,7 +679,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, * would have to use GFP_ATOMIC there, and don't want to deal * with failed allocations. */ - op->op_notifier = kmalloc_obj(struct rds_notifier, GFP_KERNEL); + op->op_notifier = kmalloc_obj(struct rds_notifier); if (!op->op_notifier) { ret = -ENOMEM; goto out_pages; @@ -728,7 +728,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, ret = -EOPNOTSUPP; goto out_pages; } - local_odp_mr = kzalloc_obj(*local_odp_mr, GFP_KERNEL); + local_odp_mr = kzalloc_obj(*local_odp_mr); if (!local_odp_mr) { ret = -ENOMEM; goto out_pages; diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 0f64aa4797f7..2444237bc36a 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -279,7 +279,7 @@ static void rfkill_send_events(struct rfkill *rfkill, enum rfkill_operation op) struct rfkill_int_event *ev; list_for_each_entry(data, &rfkill_fds, list) { - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) continue; rfkill_fill_event(&ev->ev, rfkill, op); @@ -1165,7 +1165,7 @@ static int rfkill_fop_open(struct inode *inode, struct file *file) struct rfkill *rfkill; struct rfkill_int_event *ev, *tmp; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; @@ -1182,7 +1182,7 @@ static int rfkill_fop_open(struct inode *inode, struct file *file) */ list_for_each_entry(rfkill, &rfkill_list, node) { - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) goto free; rfkill_sync(rfkill); diff --git a/net/rfkill/input.c b/net/rfkill/input.c index 2be6d13ba6ba..f7cb24ce7754 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c @@ -221,7 +221,7 @@ static int rfkill_connect(struct input_handler *handler, struct input_dev *dev, struct input_handle *handle; int error; - handle = kzalloc_obj(struct input_handle, GFP_KERNEL); + handle = kzalloc_obj(struct input_handle); if (!handle) return -ENOMEM; diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 83c62af80d7c..841d62481048 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -1571,7 +1571,7 @@ static int __init rose_proto_init(void) rose_callsign = null_ax25_address; - dev_rose = kzalloc_objs(struct net_device *, rose_ndevs, GFP_KERNEL); + dev_rose = kzalloc_objs(struct net_device *, rose_ndevs); if (dev_rose == NULL) { printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); rc = -ENOMEM; diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 4330df1b1b59..e31842e6b3c8 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c @@ -368,7 +368,7 @@ void rose_add_loopback_neigh(void) { struct rose_neigh *sn; - rose_loopback_neigh = kmalloc_obj(struct rose_neigh, GFP_KERNEL); + rose_loopback_neigh = kmalloc_obj(struct rose_neigh); if (!rose_loopback_neigh) return; sn = rose_loopback_neigh; diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index cd65bff97a8e..85078114b2dd 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -75,7 +75,7 @@ static int rxrpc_preparse_xdr_rxkad(struct key_preparsed_payload *prep, prep->quotalen = datalen + plen; plen -= sizeof(*token); - token = kzalloc_obj(*token, GFP_KERNEL); + token = kzalloc_obj(*token); if (!token) return -ENOMEM; @@ -202,7 +202,7 @@ static int rxrpc_preparse_xdr_yfs_rxgk(struct key_preparsed_payload *prep, prep->quotalen = datalen + plen; plen -= sizeof(*token); - token = kzalloc_obj(*token, GFP_KERNEL); + token = kzalloc_obj(*token); if (!token) goto nomem; @@ -500,7 +500,7 @@ static int rxrpc_preparse(struct key_preparsed_payload *prep) prep->quotalen = plen + sizeof(*token); ret = -ENOMEM; - token = kzalloc_obj(*token, GFP_KERNEL); + token = kzalloc_obj(*token); if (!token) goto error; token->kad = kzalloc(plen, GFP_KERNEL); diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 6f799b26d4d5..111f574fe667 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -112,7 +112,7 @@ static struct rxrpc_local *rxrpc_alloc_local(struct net *net, struct rxrpc_local *local; u32 tmp; - local = kzalloc_obj(struct rxrpc_local, GFP_KERNEL); + local = kzalloc_obj(struct rxrpc_local); if (local) { refcount_set(&local->ref, 1); atomic_set(&local->active_users, 1); diff --git a/net/rxrpc/rxgk_kdf.c b/net/rxrpc/rxgk_kdf.c index 6011fa7cf221..677981d1ad79 100644 --- a/net/rxrpc/rxgk_kdf.c +++ b/net/rxrpc/rxgk_kdf.c @@ -213,7 +213,7 @@ struct rxgk_context *rxgk_generate_transport_key(struct rxrpc_connection *conn, _enter(""); - gk = kzalloc_obj(*gk, GFP_KERNEL); + gk = kzalloc_obj(*gk); if (!gk) return ERR_PTR(-ENOMEM); refcount_set(&gk->usage, 1); diff --git a/net/rxrpc/rxperf.c b/net/rxrpc/rxperf.c index 1345ffffb109..b8df6d22314d 100644 --- a/net/rxrpc/rxperf.c +++ b/net/rxrpc/rxperf.c @@ -151,7 +151,7 @@ static void rxperf_charge_preallocation(struct work_struct *work) struct rxperf_call *call; for (;;) { - call = kzalloc_obj(*call, GFP_KERNEL); + call = kzalloc_obj(*call); if (!call) break; diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 389874842982..332fd9695e54 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -985,7 +985,7 @@ static int tcf_pernet_add_id_list(unsigned int id) } } - id_ptr = kzalloc_obj(*id_ptr, GFP_KERNEL); + id_ptr = kzalloc_obj(*id_ptr); if (!id_ptr) { ret = -ENOMEM; goto err_out; @@ -1272,7 +1272,7 @@ errout: static struct tc_cookie *nla_memdup_cookie(struct nlattr **tb) { - struct tc_cookie *c = kzalloc_obj(*c, GFP_KERNEL); + struct tc_cookie *c = kzalloc_obj(*c); if (!c) return NULL; diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c index 19eea8daa6b5..c634af5edfcd 100644 --- a/net/sched/act_connmark.c +++ b/net/sched/act_connmark.c @@ -121,7 +121,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla, if (!tb[TCA_CONNMARK_PARMS]) return -EINVAL; - nparms = kzalloc_obj(*nparms, GFP_KERNEL); + nparms = kzalloc_obj(*nparms); if (!nparms) return -ENOMEM; diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c index 1cd3336eeeea..213e1ce9d2da 100644 --- a/net/sched/act_csum.c +++ b/net/sched/act_csum.c @@ -93,7 +93,7 @@ static int tcf_csum_init(struct net *net, struct nlattr *nla, p = to_tcf_csum(*a); - params_new = kzalloc_obj(*params_new, GFP_KERNEL); + params_new = kzalloc_obj(*params_new); if (unlikely(!params_new)) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index 5f45bec69c50..bd51522c7953 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -332,7 +332,7 @@ static int tcf_ct_flow_table_get(struct net *net, struct tcf_ct_params *params) if (ct_ft && refcount_inc_not_zero(&ct_ft->ref)) goto out_unlock; - ct_ft = kzalloc_obj(*ct_ft, GFP_KERNEL); + ct_ft = kzalloc_obj(*ct_ft); if (!ct_ft) goto err_alloc; refcount_set(&ct_ft->ref, 1); @@ -1397,7 +1397,7 @@ static int tcf_ct_init(struct net *net, struct nlattr *nla, c = to_ct(*a); - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (unlikely(!params)) { err = -ENOMEM; goto cleanup; diff --git a/net/sched/act_ctinfo.c b/net/sched/act_ctinfo.c index 00e303a01241..1886ffd2ca95 100644 --- a/net/sched/act_ctinfo.c +++ b/net/sched/act_ctinfo.c @@ -236,7 +236,7 @@ static int tcf_ctinfo_init(struct net *net, struct nlattr *nla, ci = to_ctinfo(*a); - cp_new = kzalloc_obj(*cp_new, GFP_KERNEL); + cp_new = kzalloc_obj(*cp_new); if (unlikely(!cp_new)) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c index 6895834a929c..79df81d12894 100644 --- a/net/sched/act_ife.c +++ b/net/sched/act_ife.c @@ -520,7 +520,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla, if (parm->flags & ~IFE_ENCODE) return -EINVAL; - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) return -ENOMEM; diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c index 30c915d43432..1abfaf9d99f1 100644 --- a/net/sched/act_mpls.c +++ b/net/sched/act_mpls.c @@ -279,7 +279,7 @@ static int tcf_mpls_init(struct net *net, struct nlattr *nla, m = to_mpls(*a); - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c index 7ca2af5a10c3..abb332dee836 100644 --- a/net/sched/act_nat.c +++ b/net/sched/act_nat.c @@ -81,7 +81,7 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est, if (err < 0) goto release_idr; - nparm = kzalloc_obj(*nparm, GFP_KERNEL); + nparm = kzalloc_obj(*nparm); if (!nparm) { err = -ENOMEM; goto release_idr; diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index fb960a05cbc8..bc20f08a2789 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -51,7 +51,7 @@ static struct tcf_pedit_key_ex *tcf_pedit_keys_ex_parse(struct nlattr *nla, if (!nla) return NULL; - keys_ex = kzalloc_objs(*k, n, GFP_KERNEL); + keys_ex = kzalloc_objs(*k, n); if (!keys_ex) return ERR_PTR(-ENOMEM); @@ -223,7 +223,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla, goto out_release; } - nparms = kzalloc_obj(*nparms, GFP_KERNEL); + nparms = kzalloc_obj(*nparms); if (!nparms) { ret = -ENOMEM; goto out_release; diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 4778c3ebd5db..12ea9e5a6005 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -151,7 +151,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla, goto failure; } - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (unlikely(!new)) { err = -ENOMEM; goto failure; diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index e3764d9862ad..a778cdba9258 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c @@ -242,7 +242,7 @@ static int tcf_skbedit_init(struct net *net, struct nlattr *nla, if (err < 0) goto release_idr; - params_new = kzalloc_obj(*params_new, GFP_KERNEL); + params_new = kzalloc_obj(*params_new); if (unlikely(!params_new)) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c index 2eaf82dc2179..23ca46138f04 100644 --- a/net/sched/act_skbmod.c +++ b/net/sched/act_skbmod.c @@ -185,7 +185,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla, d = to_skbmod(*a); - p = kzalloc_obj(struct tcf_skbmod_params, GFP_KERNEL); + p = kzalloc_obj(struct tcf_skbmod_params); if (unlikely(!p)) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c index 51ac783f7d6c..6a375fdc63dd 100644 --- a/net/sched/act_vlan.c +++ b/net/sched/act_vlan.c @@ -233,7 +233,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla, v = to_vlan(*a); - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) { err = -ENOMEM; goto put_chain; diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 22e8527657af..a6729e87bc25 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -84,7 +84,7 @@ tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts, struct tcf_proto *tp, if (WARN_ON(!handle || !tp->ops->get_exts)) return -EINVAL; - n = kzalloc_obj(*n, GFP_KERNEL); + n = kzalloc_obj(*n); if (!n) return -ENOMEM; @@ -377,7 +377,7 @@ static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol, struct tcf_proto *tp; int err; - tp = kzalloc_obj(*tp, GFP_KERNEL); + tp = kzalloc_obj(*tp); if (!tp) return ERR_PTR(-ENOBUFS); @@ -502,7 +502,7 @@ static struct tcf_chain *tcf_chain_create(struct tcf_block *block, ASSERT_BLOCK_LOCKED(block); - chain = kzalloc_obj(*chain, GFP_KERNEL); + chain = kzalloc_obj(*chain); if (!chain) return NULL; list_add_tail_rcu(&chain->list, &block->chain_list); @@ -918,7 +918,7 @@ tcf_chain0_head_change_cb_add(struct tcf_block *block, struct tcf_filter_chain_list_item *item; struct tcf_chain *chain0; - item = kmalloc_obj(*item, GFP_KERNEL); + item = kmalloc_obj(*item); if (!item) { NL_SET_ERR_MSG(extack, "Memory allocation for head change callback item failed"); return -ENOMEM; @@ -1016,7 +1016,7 @@ static struct tcf_block *tcf_block_create(struct net *net, struct Qdisc *q, { struct tcf_block *block; - block = kzalloc_obj(*block, GFP_KERNEL); + block = kzalloc_obj(*block); if (!block) { NL_SET_ERR_MSG(extack, "Memory allocation for block failed"); return ERR_PTR(-ENOMEM); @@ -1428,7 +1428,7 @@ static int tcf_block_owner_add(struct tcf_block *block, { struct tcf_block_owner_item *item; - item = kmalloc_obj(*item, GFP_KERNEL); + item = kmalloc_obj(*item); if (!item) return -ENOMEM; item->q = q; diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 5479fd5341b2..492cd9ce8d46 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c @@ -77,7 +77,7 @@ static int basic_init(struct tcf_proto *tp) { struct basic_head *head; - head = kzalloc_obj(*head, GFP_KERNEL); + head = kzalloc_obj(*head); if (head == NULL) return -ENOBUFS; INIT_LIST_HEAD(&head->flist); @@ -193,7 +193,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb, return -EINVAL; } - fnew = kzalloc_obj(*fnew, GFP_KERNEL); + fnew = kzalloc_obj(*fnew); if (!fnew) return -ENOBUFS; diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index f42b89ba10a8..9a346b6221b3 100644 --- a/net/sched/cls_bpf.c +++ b/net/sched/cls_bpf.c @@ -242,7 +242,7 @@ static int cls_bpf_init(struct tcf_proto *tp) { struct cls_bpf_head *head; - head = kzalloc_obj(*head, GFP_KERNEL); + head = kzalloc_obj(*head); if (head == NULL) return -ENOBUFS; @@ -427,7 +427,7 @@ static int cls_bpf_change(struct net *net, struct sk_buff *in_skb, if (ret < 0) return ret; - prog = kzalloc_obj(*prog, GFP_KERNEL); + prog = kzalloc_obj(*prog); if (!prog) return -ENOBUFS; diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index d177b1cfde60..680a5c308094 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c @@ -95,7 +95,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb, if (head && handle != head->handle) return -ENOENT; - new = kzalloc_obj(*head, GFP_KERNEL); + new = kzalloc_obj(*head); if (!new) return -ENOBUFS; diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 83d837c4bced..339c664beff6 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c @@ -433,7 +433,7 @@ static int flow_change(struct net *net, struct sk_buff *in_skb, return -EOPNOTSUPP; } - fnew = kzalloc_obj(*fnew, GFP_KERNEL); + fnew = kzalloc_obj(*fnew); if (!fnew) return -ENOBUFS; @@ -583,7 +583,7 @@ static int flow_init(struct tcf_proto *tp) { struct flow_head *head; - head = kzalloc_obj(*head, GFP_KERNEL); + head = kzalloc_obj(*head); if (head == NULL) return -ENOBUFS; INIT_LIST_HEAD(&head->filters); diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 3c930039bacb..26070c892305 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -363,7 +363,7 @@ static int fl_init(struct tcf_proto *tp) { struct cls_fl_head *head; - head = kzalloc_obj(*head, GFP_KERNEL); + head = kzalloc_obj(*head); if (!head) return -ENOBUFS; @@ -2237,7 +2237,7 @@ static struct fl_flow_mask *fl_create_new_mask(struct cls_fl_head *head, struct fl_flow_mask *newmask; int err; - newmask = kzalloc_obj(*newmask, GFP_KERNEL); + newmask = kzalloc_obj(*newmask); if (!newmask) return ERR_PTR(-ENOMEM); @@ -2376,13 +2376,13 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, goto errout_fold; } - mask = kzalloc_obj(struct fl_flow_mask, GFP_KERNEL); + mask = kzalloc_obj(struct fl_flow_mask); if (!mask) { err = -ENOBUFS; goto errout_fold; } - tb = kzalloc_objs(struct nlattr *, TCA_FLOWER_MAX + 1, GFP_KERNEL); + tb = kzalloc_objs(struct nlattr *, TCA_FLOWER_MAX + 1); if (!tb) { err = -ENOBUFS; goto errout_mask_alloc; @@ -2398,7 +2398,7 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, goto errout_tb; } - fnew = kzalloc_obj(*fnew, GFP_KERNEL); + fnew = kzalloc_obj(*fnew); if (!fnew) { err = -ENOBUFS; goto errout_tb; @@ -2815,7 +2815,7 @@ static void *fl_tmplt_create(struct net *net, struct tcf_chain *chain, if (!tca_opts) return ERR_PTR(-EINVAL); - tb = kzalloc_objs(struct nlattr *, TCA_FLOWER_MAX + 1, GFP_KERNEL); + tb = kzalloc_objs(struct nlattr *, TCA_FLOWER_MAX + 1); if (!tb) return ERR_PTR(-ENOBUFS); err = nla_parse_nested_deprecated(tb, TCA_FLOWER_MAX, @@ -2823,7 +2823,7 @@ static void *fl_tmplt_create(struct net *net, struct tcf_chain *chain, if (err) goto errout_tb; - tmplt = kzalloc_obj(*tmplt, GFP_KERNEL); + tmplt = kzalloc_obj(*tmplt); if (!tmplt) { err = -ENOMEM; goto errout_tb; diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 8eb3bea06e3b..be81c108179d 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -262,7 +262,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb, if (f->id != handle && handle) return -EINVAL; - fnew = kzalloc_obj(struct fw_filter, GFP_KERNEL); + fnew = kzalloc_obj(struct fw_filter); if (!fnew) return -ENOBUFS; @@ -308,7 +308,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb, if (tb[TCA_FW_MASK]) mask = nla_get_u32(tb[TCA_FW_MASK]); - head = kzalloc_obj(*head, GFP_KERNEL); + head = kzalloc_obj(*head); if (!head) return -ENOBUFS; head->mask = mask; @@ -316,7 +316,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb, rcu_assign_pointer(tp->root, head); } - f = kzalloc_obj(struct fw_filter, GFP_KERNEL); + f = kzalloc_obj(struct fw_filter); if (f == NULL) return -ENOBUFS; diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index e78b6da59782..6f126872c14a 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -189,7 +189,7 @@ static int mall_change(struct net *net, struct sk_buff *in_skb, return -EINVAL; } - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) return -ENOBUFS; diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index 6e16819ba91f..bd6f945bd388 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c @@ -244,7 +244,7 @@ static int route4_init(struct tcf_proto *tp) { struct route4_head *head; - head = kzalloc_obj(struct route4_head, GFP_KERNEL); + head = kzalloc_obj(struct route4_head); if (head == NULL) return -ENOBUFS; @@ -438,7 +438,7 @@ static int route4_set_parms(struct net *net, struct tcf_proto *tp, h1 = to_hash(nhandle); b = rtnl_dereference(head->table[h1]); if (!b) { - b = kzalloc_obj(struct route4_bucket, GFP_KERNEL); + b = kzalloc_obj(struct route4_bucket); if (b == NULL) return -ENOBUFS; @@ -507,7 +507,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, return -EINVAL; err = -ENOBUFS; - f = kzalloc_obj(struct route4_filter, GFP_KERNEL); + f = kzalloc_obj(struct route4_filter); if (!f) goto errout; diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 2bdc14c5e533..75a1c8c8ace1 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -375,7 +375,7 @@ static int u32_init(struct tcf_proto *tp) idr_init(&root_ht->handle_idr); if (tp_c == NULL) { - tp_c = kzalloc_obj(*tp_c, GFP_KERNEL); + tp_c = kzalloc_obj(*tp_c); if (tp_c == NULL) { kfree(root_ht); return -ENOBUFS; diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index bc47af8a45c6..48bdd77df0a3 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -927,7 +927,7 @@ static int em_meta_change(struct net *net, void *data, int len, TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX) goto errout; - meta = kzalloc_obj(*meta, GFP_KERNEL); + meta = kzalloc_obj(*meta); if (meta == NULL) { err = -ENOMEM; goto errout; diff --git a/net/sched/em_text.c b/net/sched/em_text.c index a69889159537..343f1aebeec2 100644 --- a/net/sched/em_text.c +++ b/net/sched/em_text.c @@ -84,7 +84,7 @@ retry: return -EAGAIN; } - tm = kmalloc_obj(*tm, GFP_KERNEL); + tm = kmalloc_obj(*tm); if (tm == NULL) { textsearch_destroy(ts_conf); return -ENOBUFS; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index bcf82bbc60fd..deb8ebc4401a 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -437,7 +437,7 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, } } - rtab = kmalloc_obj(*rtab, GFP_KERNEL); + rtab = kmalloc_obj(*rtab); if (rtab) { rtab->rate = *r; rtab->refcnt = 1; @@ -668,7 +668,7 @@ static struct hlist_head *qdisc_class_hash_alloc(unsigned int n) struct hlist_head *h; unsigned int i; - h = kvmalloc_objs(struct hlist_head, n, GFP_KERNEL); + h = kvmalloc_objs(struct hlist_head, n); if (h != NULL) { for (i = 0; i < n; i++) diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c index 8d2dd1c4f3dc..94df8e741a97 100644 --- a/net/sched/sch_choke.c +++ b/net/sched/sch_choke.c @@ -370,7 +370,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt, if (mask != q->tab_mask) { struct sk_buff **ntab; - ntab = kvzalloc_objs(struct sk_buff *, mask + 1, GFP_KERNEL); + ntab = kvzalloc_objs(struct sk_buff *, mask + 1); if (!ntab) return -ENOMEM; diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 80d845dfbe80..01335a49e091 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -105,7 +105,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, return 0; } - cl = kzalloc_obj(struct drr_class, GFP_KERNEL); + cl = kzalloc_obj(struct drr_class); if (cl == NULL) return -ENOBUFS; diff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c index 8784f89619d0..d8ac3519e937 100644 --- a/net/sched/sch_fq_pie.c +++ b/net/sched/sch_fq_pie.c @@ -448,7 +448,7 @@ static int fq_pie_init(struct Qdisc *sch, struct nlattr *opt, if (err) goto init_failure; - q->flows = kvzalloc_objs(struct fq_pie_flow, q->flows_cnt, GFP_KERNEL); + q->flows = kvzalloc_objs(struct fq_pie_flow, q->flows_cnt); if (!q->flows) { err = -ENOMEM; goto init_failure; diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index ec4c8513e617..6706faba95b9 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -359,7 +359,7 @@ static int gred_offload_dump_stats(struct Qdisc *sch) unsigned int i; int ret; - hw_stats = kzalloc_obj(*hw_stats, GFP_KERNEL); + hw_stats = kzalloc_obj(*hw_stats); if (!hw_stats) return -ENOMEM; @@ -700,7 +700,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt, prio = ctl->prio; } - prealloc = kzalloc_obj(*prealloc, GFP_KERNEL); + prealloc = kzalloc_obj(*prealloc); sch_tree_lock(sch); err = gred_change_vq(sch, ctl->DP, ctl, prio, stab, max_P, &prealloc, @@ -757,7 +757,7 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt, * psched_mtu(qdisc_dev(sch)); if (qdisc_dev(sch)->netdev_ops->ndo_setup_tc) { - table->opt = kzalloc_obj(*table->opt, GFP_KERNEL); + table->opt = kzalloc_obj(*table->opt); if (!table->opt) return -ENOMEM; } diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 3f08daae26d8..b5657ffbbf84 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1025,7 +1025,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (rsc == NULL && fsc == NULL) return -EINVAL; - cl = kzalloc_obj(struct hfsc_class, GFP_KERNEL); + cl = kzalloc_obj(struct hfsc_class); if (cl == NULL) return -ENOBUFS; diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 7b34e40d4bd2..0926a9ccfa2d 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1845,7 +1845,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, goto failure; } err = -ENOBUFS; - cl = kzalloc_obj(*cl, GFP_KERNEL); + cl = kzalloc_obj(*cl); if (!cl) goto failure; diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c index e61e53e3711f..9f822fee113d 100644 --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c @@ -249,7 +249,7 @@ static int multiq_init(struct Qdisc *sch, struct nlattr *opt, q->max_bands = qdisc_dev(sch)->num_tx_queues; - q->queues = kzalloc_objs(struct Qdisc *, q->max_bands, GFP_KERNEL); + q->queues = kzalloc_objs(struct Qdisc *, q->max_bands); if (!q->queues) return -ENOBUFS; for (i = 0; i < q->max_bands; i++) diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 6eb71d3f03dd..699e45873f86 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -476,7 +476,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, } /* create and init new class */ - cl = kzalloc_obj(struct qfq_class, GFP_KERNEL); + cl = kzalloc_obj(struct qfq_class); if (cl == NULL) return -ENOBUFS; @@ -508,7 +508,7 @@ set_change_agg: new_agg = qfq_find_agg(q, lmax, weight); if (new_agg == NULL) { /* create new aggregate */ sch_tree_unlock(sch); - new_agg = kzalloc_obj(*new_agg, GFP_KERNEL); + new_agg = kzalloc_obj(*new_agg); if (new_agg == NULL) { err = -ENOBUFS; gen_kill_estimator(&cl->rate_est); diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 31ee70314431..503d7d3ca081 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -668,7 +668,7 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt, ctl_v1->Wlog, ctl_v1->Scell_log, NULL)) return -EINVAL; if (ctl_v1 && ctl_v1->qth_min) { - p = kmalloc_obj(*p, GFP_KERNEL); + p = kmalloc_obj(*p); if (!p) return -ENOMEM; } diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 31e59e875932..2e42a6801d5b 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -1103,7 +1103,7 @@ static int parse_sched_list(struct taprio_sched *q, struct nlattr *list, continue; } - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) { NL_SET_ERR_MSG(extack, "Not enough memory for entry"); return -ENOMEM; @@ -1870,7 +1870,7 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt, if (err) return err; - new_admin = kzalloc_obj(*new_admin, GFP_KERNEL); + new_admin = kzalloc_obj(*new_admin); if (!new_admin) { NL_SET_ERR_MSG(extack, "Not enough memory for a new schedule"); return -ENOMEM; @@ -2091,7 +2091,7 @@ static int taprio_init(struct Qdisc *sch, struct nlattr *opt, return -EOPNOTSUPP; } - q->qdiscs = kzalloc_objs(q->qdiscs[0], dev->num_tx_queues, GFP_KERNEL); + q->qdiscs = kzalloc_objs(q->qdiscs[0], dev->num_tx_queues); if (!q->qdiscs) return -ENOMEM; diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 0723cbdbc366..828a59b8e7bf 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1538,7 +1538,7 @@ static __init int sctp_init(void) /* Allocate and initialize the endpoint hash table. */ sctp_ep_hashsize = 64; sctp_ep_hashtable = - kmalloc_objs(struct sctp_hashbucket, 64, GFP_KERNEL); + kmalloc_objs(struct sctp_hashbucket, 64); if (!sctp_ep_hashtable) { pr_err("Failed endpoint_hash alloc\n"); status = -ENOMEM; diff --git a/net/sctp/stream.c b/net/sctp/stream.c index 03636bed60ff..c2247793c88b 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -166,7 +166,7 @@ int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid) struct sctp_stream_out_ext *soute; int ret; - soute = kzalloc_obj(*soute, GFP_KERNEL); + soute = kzalloc_obj(*soute); if (!soute) return -ENOMEM; SCTP_SO(stream, sid)->ext = soute; diff --git a/net/shaper/shaper.c b/net/shaper/shaper.c index ca7a6167702d..005bfc766e22 100644 --- a/net/shaper/shaper.c +++ b/net/shaper/shaper.c @@ -272,7 +272,7 @@ net_shaper_hierarchy_setup(struct net_shaper_binding *binding) if (hierarchy) return hierarchy; - hierarchy = kmalloc_obj(*hierarchy, GFP_KERNEL); + hierarchy = kmalloc_obj(*hierarchy); if (!hierarchy) return NULL; @@ -329,7 +329,7 @@ static int net_shaper_pre_insert(struct net_shaper_binding *binding, id_allocated = true; } - cur = kzalloc_obj(*cur, GFP_KERNEL); + cur = kzalloc_obj(*cur); if (!cur) { ret = -ENOMEM; goto free_id; @@ -1033,7 +1033,7 @@ static int net_shaper_pre_del_node(struct net_shaper_binding *binding, return -EINVAL; } - leaves = kzalloc_objs(struct net_shaper, shaper->leaves, GFP_KERNEL); + leaves = kzalloc_objs(struct net_shaper, shaper->leaves); if (!leaves) return -ENOMEM; diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 242101f269c3..7072556b38f6 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1195,7 +1195,7 @@ void smc_fill_gid_list(struct smc_link_group *lgr, memset(gidlist, 0, sizeof(*gidlist)); memcpy(gidlist->list[gidlist->len++], known_gid, SMC_GID_SIZE); - alt_ini = kzalloc_obj(*alt_ini, GFP_KERNEL); + alt_ini = kzalloc_obj(*alt_ini); if (!alt_ini) goto out; @@ -1522,7 +1522,7 @@ static int __smc_connect(struct smc_sock *smc) return smc_connect_decline_fallback(smc, SMC_CLC_DECL_IPSEC, version); - ini = kzalloc_obj(*ini, GFP_KERNEL); + ini = kzalloc_obj(*ini); if (!ini) return smc_connect_decline_fallback(smc, SMC_CLC_DECL_MEM, version); @@ -2470,7 +2470,7 @@ static void smc_listen_work(struct work_struct *work) /* do inband token exchange - * wait for and receive SMC Proposal CLC message */ - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) { rc = SMC_CLC_DECL_MEM; goto out_decl; @@ -2490,7 +2490,7 @@ static void smc_listen_work(struct work_struct *work) goto out_decl; } - ini = kzalloc_obj(*ini, GFP_KERNEL); + ini = kzalloc_obj(*ini); if (!ini) { rc = SMC_CLC_DECL_MEM; goto out_decl; diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 992fd2b9f05f..c38fc7bf0a7e 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -88,7 +88,7 @@ static int smc_clc_ueid_add(char *ueid) return -EINVAL; /* add a new ueid entry to the ueid table if there isn't one */ - new_ueid = kzalloc_obj(*new_ueid, GFP_KERNEL); + new_ueid = kzalloc_obj(*new_ueid); if (!new_ueid) return -ENOMEM; memcpy(new_ueid->eid, ueid, SMC_MAX_EID_LEN); @@ -861,7 +861,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini) struct kvec vec[8]; struct msghdr msg; - pclc = kzalloc_obj(*pclc, GFP_KERNEL); + pclc = kzalloc_obj(*pclc); if (!pclc) return -ENOMEM; diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 50d01a573042..e2d083daeb7e 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -905,7 +905,7 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini) } } - lgr = kzalloc_obj(*lgr, GFP_KERNEL); + lgr = kzalloc_obj(*lgr); if (!lgr) { rc = SMC_CLC_DECL_MEM; goto ism_put_vlan; @@ -2320,7 +2320,7 @@ static struct smc_buf_desc *smcr_new_buf_create(struct smc_link_group *lgr, struct smc_buf_desc *buf_desc; /* try to alloc a new buffer */ - buf_desc = kzalloc_obj(*buf_desc, GFP_KERNEL); + buf_desc = kzalloc_obj(*buf_desc); if (!buf_desc) return ERR_PTR(-ENOMEM); @@ -2394,7 +2394,7 @@ static struct smc_buf_desc *smcd_new_buf_create(struct smc_link_group *lgr, int rc; /* try to alloc a new DMB */ - buf_desc = kzalloc_obj(*buf_desc, GFP_KERNEL); + buf_desc = kzalloc_obj(*buf_desc); if (!buf_desc) return ERR_PTR(-ENOMEM); if (is_dmb) { @@ -2578,7 +2578,7 @@ int smcd_buf_attach(struct smc_sock *smc) struct smc_buf_desc *buf_desc; int rc; - buf_desc = kzalloc_obj(*buf_desc, GFP_KERNEL); + buf_desc = kzalloc_obj(*buf_desc); if (!buf_desc) return -ENOMEM; diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c index 5a1384126f91..9bb495707445 100644 --- a/net/smc/smc_ib.c +++ b/net/smc/smc_ib.c @@ -944,7 +944,7 @@ static int smc_ib_add_dev(struct ib_device *ibdev) if (ibdev->node_type != RDMA_NODE_IB_CA) return -EOPNOTSUPP; - smcibdev = kzalloc_obj(*smcibdev, GFP_KERNEL); + smcibdev = kzalloc_obj(*smcibdev); if (!smcibdev) return -ENOMEM; diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index 4ee7362e91c5..e0dba2c7b6e3 100644 --- a/net/smc/smc_ism.c +++ b/net/smc/smc_ism.c @@ -142,7 +142,7 @@ int smc_ism_get_vlan(struct smcd_dev *smcd, unsigned short vlanid) return -EOPNOTSUPP; /* create new vlan entry, in case we need it */ - new_vlan = kzalloc_obj(*new_vlan, GFP_KERNEL); + new_vlan = kzalloc_obj(*new_vlan); if (!new_vlan) return -ENOMEM; new_vlan->vlanid = vlanid; @@ -467,10 +467,10 @@ static struct smcd_dev *smcd_alloc_dev(const char *name, int max_dmbs) { struct smcd_dev *smcd; - smcd = kzalloc_obj(*smcd, GFP_KERNEL); + smcd = kzalloc_obj(*smcd); if (!smcd) return NULL; - smcd->conn = kzalloc_objs(struct smc_connection *, max_dmbs, GFP_KERNEL); + smcd->conn = kzalloc_objs(struct smc_connection *, max_dmbs); if (!smcd->conn) goto free_smcd; diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index f82d5fc7f068..954b2ff1815c 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -1040,7 +1040,7 @@ int smc_llc_cli_add_link(struct smc_link *link, struct smc_llc_qentry *qentry) if (!llc->qp_mtu) goto out_reject; - ini = kzalloc_obj(*ini, GFP_KERNEL); + ini = kzalloc_obj(*ini); if (!ini) { rc = -ENOMEM; goto out_reject; @@ -1180,7 +1180,7 @@ static void smc_llc_cli_add_link_invite(struct smc_link *link, if (lgr->type == SMC_LGR_SINGLE && lgr->max_links <= 1) goto out; - ini = kzalloc_obj(*ini, GFP_KERNEL); + ini = kzalloc_obj(*ini); if (!ini) goto out; @@ -1419,7 +1419,7 @@ int smc_llc_srv_add_link(struct smc_link *link, req_qentry->msg.raw.hdr.common.llc_type == SMC_LLC_REQ_ADD_LINK) send_req_add_link_resp = true; - ini = kzalloc_obj(*ini, GFP_KERNEL); + ini = kzalloc_obj(*ini); if (!ini) { rc = -ENOMEM; goto out; diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index 239da54ba01c..63e286e2dfaa 100644 --- a/net/smc/smc_pnet.c +++ b/net/smc/smc_pnet.c @@ -368,7 +368,7 @@ static int smc_pnet_add_eth(struct smc_pnettable *pnettable, struct net *net, /* add a new netdev entry to the pnet table if there isn't one */ rc = -ENOMEM; - new_pe = kzalloc_obj(*new_pe, GFP_KERNEL); + new_pe = kzalloc_obj(*new_pe); if (!new_pe) goto out_put; new_pe->type = SMC_PNET_ETH; @@ -445,7 +445,7 @@ static int smc_pnet_add_ib(struct smc_pnettable *pnettable, char *ib_name, return -EEXIST; /* add a new ib entry to the pnet table if there isn't one */ - new_pe = kzalloc_obj(*new_pe, GFP_KERNEL); + new_pe = kzalloc_obj(*new_pe); if (!new_pe) return -ENOMEM; new_pe->type = SMC_PNET_IB; @@ -747,7 +747,7 @@ static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid) struct smc_net *sn = net_generic(net, smc_net_id); struct smc_pnetids_ndev_entry *pe, *pi; - pe = kzalloc_obj(*pe, GFP_KERNEL); + pe = kzalloc_obj(*pe); if (!pe) return -ENOMEM; diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c index bde9bc1ed4c0..d833e36f7fd4 100644 --- a/net/smc/smc_rx.c +++ b/net/smc/smc_rx.c @@ -161,17 +161,17 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len, nr_pages = !lgr->is_smcd && smc->conn.rmb_desc->is_vm ? PAGE_ALIGN(len + offset) / PAGE_SIZE : 1; - pages = kzalloc_objs(*pages, nr_pages, GFP_KERNEL); + pages = kzalloc_objs(*pages, nr_pages); if (!pages) goto out; - partial = kzalloc_objs(*partial, nr_pages, GFP_KERNEL); + partial = kzalloc_objs(*partial, nr_pages); if (!partial) goto out_page; - priv = kzalloc_objs(*priv, nr_pages, GFP_KERNEL); + priv = kzalloc_objs(*priv, nr_pages); if (!priv) goto out_part; for (i = 0; i < nr_pages; i++) { - priv[i] = kzalloc_obj(**priv, GFP_KERNEL); + priv[i] = kzalloc_obj(**priv); if (!priv[i]) goto out_priv; } diff --git a/net/smc/smc_stats.c b/net/smc/smc_stats.c index aeb462dbbb2c..59db611821f6 100644 --- a/net/smc/smc_stats.c +++ b/net/smc/smc_stats.c @@ -20,7 +20,7 @@ int smc_stats_init(struct net *net) { - net->smc.fback_rsn = kzalloc_obj(*net->smc.fback_rsn, GFP_KERNEL); + net->smc.fback_rsn = kzalloc_obj(*net->smc.fback_rsn); if (!net->smc.fback_rsn) goto err_fback; net->smc.smc_stats = alloc_percpu(struct smc_stats); @@ -285,7 +285,7 @@ int smc_nl_get_stats(struct sk_buff *skb, attrs = nla_nest_start(skb, SMC_GEN_STATS); if (!attrs) goto errnest; - stats = kzalloc_obj(*stats, GFP_KERNEL); + stats = kzalloc_obj(*stats); if (!stats) goto erralloc; size = sizeof(*stats) / sizeof(u64); diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index bad014f353b3..b423abb4210d 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -787,7 +787,7 @@ int smc_wr_alloc_link_mem(struct smc_link *link) goto no_mem_wr_tx_pends; if (link->lgr->smc_version == SMC_V2) { - link->wr_tx_v2_ib = kzalloc_obj(*link->wr_tx_v2_ib, GFP_KERNEL); + 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, diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index fb33a4d0cdc7..68c0595ea2fd 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -290,12 +290,12 @@ rpcauth_init_credcache(struct rpc_auth *auth) struct rpc_cred_cache *new; unsigned int hashsize; - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); if (!new) goto out_nocache; new->hashbits = auth_hashbits; hashsize = 1U << new->hashbits; - new->hashtable = kzalloc_objs(new->hashtable[0], hashsize, GFP_KERNEL); + new->hashtable = kzalloc_objs(new->hashtable[0], hashsize); if (!new->hashtable) goto out_nohashtbl; spin_lock_init(&new->lock); diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index f8a0d6386635..932908c1ef67 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -164,7 +164,7 @@ gss_alloc_context(void) { struct gss_cl_ctx *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (ctx != NULL) { ctx->gc_proc = RPC_GSS_PROC_DATA; ctx->gc_seq = 1; /* NetApp 6.4R1 doesn't accept seq. no. 0 */ @@ -529,7 +529,7 @@ gss_alloc_msg(struct gss_auth *gss_auth, int vers; int err = -ENOMEM; - gss_msg = kzalloc_obj(*gss_msg, GFP_KERNEL); + gss_msg = kzalloc_obj(*gss_msg); if (gss_msg == NULL) goto err; vers = get_pipe_version(gss_auth->net); @@ -914,7 +914,7 @@ static struct gss_pipe *gss_pipe_alloc(struct rpc_clnt *clnt, struct gss_pipe *p; int err = -ENOMEM; - p = kmalloc_obj(*p, GFP_KERNEL); + p = kmalloc_obj(*p); if (p == NULL) goto err; p->pipe = rpc_mkpipe_data(upcall_ops, RPC_PIPE_WAIT_FOR_OPEN); @@ -1029,7 +1029,7 @@ gss_create_new(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) if (!try_module_get(THIS_MODULE)) return ERR_PTR(err); - if (!(gss_auth = kmalloc_obj(*gss_auth, GFP_KERNEL))) + if (!(gss_auth = kmalloc_obj(*gss_auth))) goto out_dec; INIT_HLIST_NODE(&gss_auth->hash); gss_auth->target_name = NULL; @@ -1246,7 +1246,7 @@ gss_dup_cred(struct gss_auth *gss_auth, struct gss_cred *gss_cred) struct gss_cred *new; /* Make a copy of the cred so that we can reference count it */ - new = kzalloc_obj(*gss_cred, GFP_KERNEL); + new = kzalloc_obj(*gss_cred); if (new) { struct auth_cred acred = { .cred = gss_cred->gc_base.cr_cred, diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c index e02e6d4a3185..0fa4778620d9 100644 --- a/net/sunrpc/auth_gss/gss_rpc_upcall.c +++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c @@ -214,7 +214,7 @@ static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg) unsigned int i; arg->npages = DIV_ROUND_UP(NGROUPS_MAX * 4, PAGE_SIZE); - arg->pages = kzalloc_objs(struct page *, arg->npages, GFP_KERNEL); + arg->pages = kzalloc_objs(struct page *, arg->npages); if (!arg->pages) return -ENOMEM; for (i = 0; i < arg->npages; i++) { diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c index e1e01965ef58..fceee648d545 100644 --- a/net/sunrpc/auth_gss/gss_rpc_xdr.c +++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c @@ -244,11 +244,11 @@ static int gssx_dec_option_array(struct xdr_stream *xdr, /* we recognize only 1 currently: CREDS_VALUE */ oa->count = 1; - oa->data = kmalloc_obj(struct gssx_option, GFP_KERNEL); + oa->data = kmalloc_obj(struct gssx_option); if (!oa->data) return -ENOMEM; - creds = kzalloc_obj(struct svc_cred, GFP_KERNEL); + creds = kzalloc_obj(struct svc_cred); if (!creds) { err = -ENOMEM; goto free_oa; diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 411297c9527d..161d02cc1c2c 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -197,7 +197,7 @@ static void update_rsi(struct cache_head *cnew, struct cache_head *citem) static struct cache_head *rsi_alloc(void) { - struct rsi *rsii = kmalloc_obj(*rsii, GFP_KERNEL); + struct rsi *rsii = kmalloc_obj(*rsii); if (rsii) return &rsii->h; else @@ -449,7 +449,7 @@ update_rsc(struct cache_head *cnew, struct cache_head *ctmp) static struct cache_head * rsc_alloc(void) { - struct rsc *rsci = kmalloc_obj(*rsci, GFP_KERNEL); + struct rsc *rsci = kmalloc_obj(*rsci); if (rsci) return &rsci->h; else @@ -814,7 +814,7 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name) struct auth_domain *test; int stat = -ENOMEM; - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); if (!new) goto out; kref_init(&new->h.ref); @@ -1069,7 +1069,7 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp, goto out_denied_free; pages = DIV_ROUND_UP(inlen, PAGE_SIZE); - in_token->pages = kzalloc_objs(struct page *, pages + 1, GFP_KERNEL); + in_token->pages = kzalloc_objs(struct page *, pages + 1); if (!in_token->pages) goto out_denied_free; in_token->page_base = 0; @@ -1631,7 +1631,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp) rqstp->rq_auth_stat = rpc_autherr_failed; if (!svcdata) - svcdata = kmalloc_obj(*svcdata, GFP_KERNEL); + svcdata = kmalloc_obj(*svcdata); if (!svcdata) goto auth_err; rqstp->rq_auth_data = svcdata; diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 5129f3dace8c..9b27b533a3c0 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1038,7 +1038,7 @@ static int cache_open(struct inode *inode, struct file *filp, return -EACCES; nonseekable_open(inode, filp); if (filp->f_mode & FMODE_READ) { - rp = kmalloc_obj(*rp, GFP_KERNEL); + rp = kmalloc_obj(*rp); if (!rp) { module_put(cd->owner); return -ENOMEM; @@ -1225,7 +1225,7 @@ static int cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h) if (!buf) return -EAGAIN; - crq = kmalloc_obj(*crq, GFP_KERNEL); + crq = kmalloc_obj(*crq); if (!crq) { kfree(buf); return -EAGAIN; diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f6e086b62053..bc8ca470718b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -374,7 +374,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, goto out_err; err = -ENOMEM; - clnt = kzalloc_obj(*clnt, GFP_KERNEL); + clnt = kzalloc_obj(*clnt); if (!clnt) goto out_err; clnt->cl_parent = parent ? : clnt; @@ -2976,7 +2976,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, return -EINVAL; } - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return -ENOMEM; data->xps = xprt_switch_get(xps); diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index a4b3c51be0f3..9d349cfbc483 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -511,7 +511,7 @@ struct rpc_pipe *rpc_mkpipe_data(const struct rpc_pipe_ops *ops, int flags) { struct rpc_pipe *pipe; - pipe = kzalloc_obj(struct rpc_pipe, GFP_KERNEL); + pipe = kzalloc_obj(struct rpc_pipe); if (!pipe) return ERR_PTR(-ENOMEM); init_pipe(pipe); diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 36308711e0e9..7093e18ac26c 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c @@ -126,7 +126,7 @@ struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) struct rpc_iostats *stats; int i; - stats = kzalloc_objs(*stats, clnt->cl_maxproc, GFP_KERNEL); + stats = kzalloc_objs(*stats, clnt->cl_maxproc); if (stats) { for (i = 0; i < clnt->cl_maxproc; i++) spin_lock_init(&stats[i].om_lock); diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index bc160368a7dc..d8ccb8e4b5c2 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -488,7 +488,7 @@ __svc_create(struct svc_program *prog, int nprogs, struct svc_stat *stats, unsigned int xdrsize; unsigned int i; - if (!(serv = kzalloc_obj(*serv, GFP_KERNEL))) + if (!(serv = kzalloc_obj(*serv))) return NULL; serv->sv_name = prog->pg_name; serv->sv_programs = prog; @@ -523,7 +523,7 @@ __svc_create(struct svc_program *prog, int nprogs, struct svc_stat *stats, serv->sv_nrpools = npools; serv->sv_pools = - kzalloc_objs(struct svc_pool, serv->sv_nrpools, GFP_KERNEL); + kzalloc_objs(struct svc_pool, serv->sv_nrpools); if (!serv->sv_pools) { kfree(serv); return NULL; diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 7f952d9201f5..3be69c145d2a 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c @@ -72,7 +72,7 @@ struct auth_domain *unix_domain_find(char *name) return rv; } - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); if (new == NULL) return NULL; kref_init(&new->h.ref); @@ -143,7 +143,7 @@ static void update(struct cache_head *cnew, struct cache_head *citem) } static struct cache_head *ip_map_alloc(void) { - struct ip_map *i = kmalloc_obj(*i, GFP_KERNEL); + struct ip_map *i = kmalloc_obj(*i); if (i) return &i->h; else @@ -458,7 +458,7 @@ static void unix_gid_update(struct cache_head *cnew, struct cache_head *citem) } static struct cache_head *unix_gid_alloc(void) { - struct unix_gid *g = kmalloc_obj(*g, GFP_KERNEL); + struct unix_gid *g = kmalloc_obj(*g); if (g) return &g->h; else diff --git a/net/sunrpc/sysfs.c b/net/sunrpc/sysfs.c index ec6ddfa11f86..af8fac9cedd4 100644 --- a/net/sunrpc/sysfs.c +++ b/net/sunrpc/sysfs.c @@ -48,7 +48,7 @@ static struct kobject *rpc_sysfs_object_alloc(const char *name, { struct kobject *kobj; - kobj = kzalloc_obj(*kobj, GFP_KERNEL); + kobj = kzalloc_obj(*kobj); if (kobj) { kobj->kset = kset; if (kobject_init_and_add(kobj, &rpc_sysfs_object_type, @@ -397,7 +397,7 @@ static ssize_t rpc_sysfs_xprt_dstaddr_store(struct kobject *kobj, dst_addr = kstrndup(buf, buf_len, GFP_KERNEL); if (!dst_addr) goto out_err; - saved_addr = kzalloc_obj(*saved_addr, GFP_KERNEL); + saved_addr = kzalloc_obj(*saved_addr); if (!saved_addr) goto out_err_free; saved_addr->addr = @@ -663,7 +663,7 @@ static struct rpc_sysfs_client *rpc_sysfs_client_alloc(struct kobject *parent, { struct rpc_sysfs_client *p; - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (p) { p->net = net; p->kobject.kset = rpc_sunrpc_kset; diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 16f6989a0a2d..4fbb57a29704 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -1829,7 +1829,7 @@ struct rpc_xprt *xprt_alloc(struct net *net, size_t size, xprt_init(xprt, net); for (i = 0; i < num_prealloc; i++) { - req = kzalloc_obj(struct rpc_rqst, GFP_KERNEL); + req = kzalloc_obj(struct rpc_rqst); if (!req) goto out_free; list_add(&req->rq_list, &xprt->free); diff --git a/net/sunrpc/xprtrdma/ib_client.c b/net/sunrpc/xprtrdma/ib_client.c index e5b6dfaf01aa..de49ad02053d 100644 --- a/net/sunrpc/xprtrdma/ib_client.c +++ b/net/sunrpc/xprtrdma/ib_client.c @@ -108,7 +108,7 @@ static int rpcrdma_add_one(struct ib_device *device) { struct rpcrdma_device *rd; - rd = kzalloc_obj(*rd, GFP_KERNEL); + rd = kzalloc_obj(*rd); if (!rd) return -ENOMEM; diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index c7c7f08eee9a..76a1585d3f6b 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -692,7 +692,7 @@ int tipc_bcast_init(struct net *net) struct tipc_bc_base *bb = NULL; struct tipc_link *l = NULL; - bb = kzalloc_obj(*bb, GFP_KERNEL); + bb = kzalloc_obj(*bb); if (!bb) goto enomem; tn->bcbase = bb; diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index abd191a3ac4a..d3046a39ff72 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -560,7 +560,7 @@ static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey, break; } - tfm_entry = kmalloc_obj(*tfm_entry, GFP_KERNEL); + tfm_entry = kmalloc_obj(*tfm_entry); if (unlikely(!tfm_entry)) { crypto_free_aead(tfm); err = -ENOMEM; diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index ec0ac85ca70b..8e129cf52245 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -888,7 +888,7 @@ int tipc_nametbl_init(struct net *net) struct name_table *nt; int i; - nt = kzalloc_obj(*nt, GFP_KERNEL); + nt = kzalloc_obj(*nt); if (!nt) return -ENOMEM; diff --git a/net/tipc/socket.c b/net/tipc/socket.c index d52f700b5493..4c618c2b871d 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -3595,7 +3595,7 @@ int __tipc_dump_start(struct netlink_callback *cb, struct net *net) struct tipc_net *tn = tipc_net(net); if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 7a85ef064e4c..99c8eff9783e 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -346,7 +346,7 @@ static int tls_create_new_record(struct tls_offload_context_tx *offload_ctx, struct tls_record_info *record; skb_frag_t *frag; - record = kmalloc_obj(*record, GFP_KERNEL); + record = kmalloc_obj(*record); if (!record) return -ENOMEM; @@ -1040,7 +1040,7 @@ static struct tls_offload_context_tx *alloc_offload_ctx_tx(struct tls_context *c struct tls_offload_context_tx *offload_ctx; __be64 rcd_sn; - offload_ctx = kzalloc_obj(*offload_ctx, GFP_KERNEL); + offload_ctx = kzalloc_obj(*offload_ctx); if (!offload_ctx) return NULL; @@ -1110,7 +1110,7 @@ int tls_set_device_offload(struct sock *sk) memcpy(ctx->tx.iv + cipher_desc->salt, iv, cipher_desc->iv); memcpy(ctx->tx.rec_seq, rec_seq, cipher_desc->rec_seq); - start_marker_record = kmalloc_obj(*start_marker_record, GFP_KERNEL); + start_marker_record = kmalloc_obj(*start_marker_record); if (!start_marker_record) { rc = -ENOMEM; goto release_netdev; @@ -1224,7 +1224,7 @@ int tls_set_device_offload_rx(struct sock *sk, struct tls_context *ctx) goto release_lock; } - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) { rc = -ENOMEM; goto release_lock; diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 36bacedd6177..7877c238e758 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2698,7 +2698,7 @@ static struct tls_sw_context_tx *init_ctx_tx(struct tls_context *ctx, struct soc struct tls_sw_context_tx *sw_ctx_tx; if (!ctx->priv_ctx_tx) { - sw_ctx_tx = kzalloc_obj(*sw_ctx_tx, GFP_KERNEL); + sw_ctx_tx = kzalloc_obj(*sw_ctx_tx); if (!sw_ctx_tx) return NULL; } else { @@ -2719,7 +2719,7 @@ static struct tls_sw_context_rx *init_ctx_rx(struct tls_context *ctx) struct tls_sw_context_rx *sw_ctx_rx; if (!ctx->priv_ctx_rx) { - sw_ctx_rx = kzalloc_obj(*sw_ctx_rx, GFP_KERNEL); + sw_ctx_rx = kzalloc_obj(*sw_ctx_rx); if (!sw_ctx_rx) return NULL; } else { diff --git a/net/unix/garbage.c b/net/unix/garbage.c index a15e7eb50851..816e8fa2b062 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -288,7 +288,7 @@ int unix_prepare_fpl(struct scm_fp_list *fpl) return 0; for (i = 0; i < fpl->count_unix; i++) { - vertex = kmalloc_obj(*vertex, GFP_KERNEL); + vertex = kmalloc_obj(*vertex); if (!vertex) goto err; diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index b1bf64b5cc97..069386a74557 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -444,7 +444,7 @@ static int hvs_sock_init(struct vsock_sock *vsk, struct vsock_sock *psk) struct hvsock *hvs; struct sock *sk = sk_vsock(vsk); - hvs = kzalloc_obj(*hvs, GFP_KERNEL); + hvs = kzalloc_obj(*hvs); if (!hvs) return -ENOMEM; @@ -655,7 +655,7 @@ static ssize_t hvs_stream_enqueue(struct vsock_sock *vsk, struct msghdr *msg, BUILD_BUG_ON(sizeof(*send_buf) != HV_HYP_PAGE_SIZE); - send_buf = kmalloc_obj(*send_buf, GFP_KERNEL); + send_buf = kmalloc_obj(*send_buf); if (!send_buf) return -ENOMEM; diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index d6c07334bf94..77fe5b7b066c 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -805,7 +805,7 @@ static int virtio_vsock_probe(struct virtio_device *vdev) goto out; } - vsock = kzalloc_obj(*vsock, GFP_KERNEL); + vsock = kzalloc_obj(*vsock); if (!vsock) { ret = -ENOMEM; goto out; diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 925ed086058c..8a9fb23c6e85 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -920,7 +920,7 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk, { struct virtio_vsock_sock *vvs; - vvs = kzalloc_obj(*vvs, GFP_KERNEL); + vvs = kzalloc_obj(*vvs); if (!vvs) return -ENOMEM; diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c index 3e80639b7c08..4296ca1183f1 100644 --- a/net/vmw_vsock/vmci_transport.c +++ b/net/vmw_vsock/vmci_transport.c @@ -262,7 +262,7 @@ vmci_transport_alloc_send_control_pkt(struct sockaddr_vm *src, struct vmci_transport_packet *pkt; int err; - pkt = kmalloc_obj(*pkt, GFP_KERNEL); + pkt = kmalloc_obj(*pkt); if (!pkt) return -ENOMEM; @@ -1583,7 +1583,7 @@ static int vmci_transport_recv_connected(struct sock *sk, static int vmci_transport_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk) { - vsk->trans = kmalloc_obj(struct vmci_transport, GFP_KERNEL); + vsk->trans = kmalloc_obj(struct vmci_transport); if (!vsk->trans) return -ENOMEM; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 33782370fbaf..e25a15b9267d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1615,7 +1615,7 @@ nl80211_parse_connkeys(struct cfg80211_registered_device *rdev, if (!have_key) return NULL; - result = kzalloc_obj(*result, GFP_KERNEL); + result = kzalloc_obj(*result); if (!result) return ERR_PTR(-ENOMEM); @@ -3367,7 +3367,7 @@ static int nl80211_dump_wiphy_parse(struct sk_buff *skb, struct netlink_callback *cb, struct nl80211_dump_wiphy_state *state) { - struct nlattr **tb = kzalloc_objs(*tb, NUM_NL80211_ATTR, GFP_KERNEL); + struct nlattr **tb = kzalloc_objs(*tb, NUM_NL80211_ATTR); int ret; if (!tb) @@ -3419,7 +3419,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) rtnl_lock(); if (!state) { - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) { rtnl_unlock(); return -ENOMEM; @@ -6702,7 +6702,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) nla_get_u8(info->attrs[NL80211_ATTR_SMPS_MODE]) != NL80211_SMPS_OFF) return -EOPNOTSUPP; - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (!params) return -ENOMEM; @@ -6995,7 +6995,7 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info) if (!wdev->links[link_id].ap.beacon_interval) return -EINVAL; - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (!params) return -ENOMEM; @@ -7985,7 +7985,7 @@ static int nl80211_dump_station(struct sk_buff *skb, for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) { sinfo.links[i] = - kzalloc_obj(*sinfo.links[0], GFP_KERNEL); + kzalloc_obj(*sinfo.links[0]); if (!sinfo.links[i]) { err = -ENOMEM; goto out_err; @@ -8049,7 +8049,7 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info) return -EOPNOTSUPP; for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) { - sinfo.links[i] = kzalloc_obj(*sinfo.links[0], GFP_KERNEL); + sinfo.links[i] = kzalloc_obj(*sinfo.links[0]); if (!sinfo.links[i]) { cfg80211_sinfo_release_content(&sinfo); return -ENOMEM; @@ -11520,7 +11520,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info) if (err) goto free; - csa_attrs = kzalloc_objs(*csa_attrs, NL80211_ATTR_MAX + 1, GFP_KERNEL); + csa_attrs = kzalloc_objs(*csa_attrs, NL80211_ATTR_MAX + 1); if (!csa_attrs) { err = -ENOMEM; goto free; @@ -11780,7 +11780,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) bool dump_include_use_data; int err; - attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR, GFP_KERNEL); + attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR); if (!attrbuf) return -ENOMEM; @@ -11920,7 +11920,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) int res; bool radio_stats; - attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR, GFP_KERNEL); + attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR); if (!attrbuf) return -ENOMEM; @@ -13111,7 +13111,7 @@ static int nl80211_testmode_dump(struct sk_buff *skb, goto out_err; } } else { - attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR, GFP_KERNEL); + attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR); if (!attrbuf) { err = -ENOMEM; goto out_err; @@ -14935,7 +14935,7 @@ static int nl80211_parse_wowlan_nd(struct cfg80211_registered_device *rdev, struct nlattr **tb; int err; - tb = kzalloc_objs(*tb, NUM_NL80211_ATTR, GFP_KERNEL); + tb = kzalloc_objs(*tb, NUM_NL80211_ATTR); if (!tb) return -ENOMEM; @@ -15538,7 +15538,7 @@ static int nl80211_register_beacons(struct sk_buff *skb, struct genl_info *info) if (!(rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS)) return -EOPNOTSUPP; - nreg = kzalloc_obj(*nreg, GFP_KERNEL); + nreg = kzalloc_obj(*nreg); if (!nreg) return -ENOMEM; @@ -15895,7 +15895,7 @@ static int handle_nan_filter(struct nlattr *attr_filter, BUILD_BUG_ON(sizeof(*func->rx_filters) != sizeof(*func->tx_filters)); - filter = kzalloc_objs(*func->rx_filters, n_entries, GFP_KERNEL); + filter = kzalloc_objs(*func->rx_filters, n_entries); if (!filter) return -ENOMEM; @@ -15955,7 +15955,7 @@ static int nl80211_nan_add_func(struct sk_buff *skb, if (err) return err; - func = kzalloc_obj(*func, GFP_KERNEL); + func = kzalloc_obj(*func); if (!func) return -ENOMEM; @@ -16597,7 +16597,7 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, return 0; } - attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR, GFP_KERNEL); + attrbuf = kzalloc_objs(*attrbuf, NUM_NL80211_ATTR); if (!attrbuf) return -ENOMEM; @@ -16828,7 +16828,7 @@ static int nl80211_set_qos_map(struct sk_buff *skb, if (len % 2) return -EINVAL; - qos_map = kzalloc_obj(struct cfg80211_qos_map, GFP_KERNEL); + qos_map = kzalloc_obj(struct cfg80211_qos_map); if (!qos_map) return -ENOMEM; @@ -17528,7 +17528,7 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info) if (err) return err; - tb = kzalloc_objs(*tb, NL80211_ATTR_MAX + 1, GFP_KERNEL); + tb = kzalloc_objs(*tb, NL80211_ATTR_MAX + 1); if (!tb) return -ENOMEM; diff --git a/net/wireless/of.c b/net/wireless/of.c index 35a3bcd84b6f..60a864465331 100644 --- a/net/wireless/of.c +++ b/net/wireless/of.c @@ -98,7 +98,7 @@ void wiphy_read_of_freq_limits(struct wiphy *wiphy) } n_freq_limits = len / sizeof(u32) / 2; - freq_limits = kzalloc_objs(*freq_limits, n_freq_limits, GFP_KERNEL); + freq_limits = kzalloc_objs(*freq_limits, n_freq_limits); if (!freq_limits) { err = -ENOMEM; goto out_kfree; diff --git a/net/wireless/reg.c b/net/wireless/reg.c index d6f3282fe986..4d7479ffda36 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -509,7 +509,7 @@ static int reg_schedule_apply(const struct ieee80211_regdomain *regdom) { struct reg_regdb_apply_request *request; - request = kzalloc_obj(struct reg_regdb_apply_request, GFP_KERNEL); + request = kzalloc_obj(struct reg_regdb_apply_request); if (!request) { kfree(regdom); return -ENOMEM; @@ -1098,7 +1098,7 @@ int reg_reload_regdb(void) /* reset regulatory domain */ current_regdomain = get_cfg80211_regdom(); - request = kzalloc_obj(*request, GFP_KERNEL); + request = kzalloc_obj(*request); if (!request) { err = -ENOMEM; goto out_unlock; @@ -3222,7 +3222,7 @@ static int regulatory_hint_core(const char *alpha2) { struct regulatory_request *request; - request = kzalloc_obj(struct regulatory_request, GFP_KERNEL); + request = kzalloc_obj(struct regulatory_request); if (!request) return -ENOMEM; @@ -3248,7 +3248,7 @@ int regulatory_hint_user(const char *alpha2, if (!is_world_regdom(alpha2) && !is_an_alpha2(alpha2)) return -EINVAL; - request = kzalloc_obj(struct regulatory_request, GFP_KERNEL); + request = kzalloc_obj(struct regulatory_request); if (!request) return -ENOMEM; @@ -3318,7 +3318,7 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2) wiphy->regulatory_flags &= ~REGULATORY_CUSTOM_REG; - request = kzalloc_obj(struct regulatory_request, GFP_KERNEL); + request = kzalloc_obj(struct regulatory_request); if (!request) return -ENOMEM; @@ -3351,7 +3351,7 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band, if (country_ie_len < IEEE80211_COUNTRY_IE_MIN_LEN) return; - request = kzalloc_obj(*request, GFP_KERNEL); + request = kzalloc_obj(*request); if (!request) return; diff --git a/net/wireless/sme.c b/net/wireless/sme.c index cb1a75fda5ca..5b21432450d5 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -570,7 +570,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, if (wdev->conn) return -EINPROGRESS; - wdev->conn = kzalloc_obj(*wdev->conn, GFP_KERNEL); + wdev->conn = kzalloc_obj(*wdev->conn); if (!wdev->conn) return -ENOMEM; diff --git a/net/wireless/tests/util.c b/net/wireless/tests/util.c index 6f870b06307d..118f7fb4226d 100644 --- a/net/wireless/tests/util.c +++ b/net/wireless/tests/util.c @@ -17,7 +17,7 @@ int t_wiphy_init(struct kunit_resource *resource, void *ctx) struct wiphy *wiphy; struct t_wiphy_priv *priv; - ops = kzalloc_obj(*ops, GFP_KERNEL); + ops = kzalloc_obj(*ops); KUNIT_ASSERT_NOT_NULL(test, ops); wiphy = wiphy_new_nm(ops, sizeof(*priv), "kunit"); diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 3ce845cd1936..55783a7f51c2 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -414,7 +414,7 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev, * to do it first in case the allocation fails. Don't use wext. */ if (!wdev->wext.keys) { - wdev->wext.keys = kzalloc_obj(*wdev->wext.keys, GFP_KERNEL); + wdev->wext.keys = kzalloc_obj(*wdev->wext.keys); if (!wdev->wext.keys) return -ENOMEM; for (i = 0; i < 4; i++) diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index 4c94ec312d75..066ce07c506d 100644 --- a/net/xdp/xdp_umem.c +++ b/net/xdp/xdp_umem.c @@ -250,7 +250,7 @@ struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr) struct xdp_umem *umem; int err; - umem = kzalloc_obj(*umem, GFP_KERNEL); + umem = kzalloc_obj(*umem); if (!umem) return ERR_PTR(-ENOMEM); diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index a8f932b28ee3..c5015802f946 100644 --- a/net/xdp/xsk_buff_pool.c +++ b/net/xdp/xsk_buff_pool.c @@ -63,7 +63,7 @@ struct xsk_buff_pool *xp_create_and_assign_umem(struct xdp_sock *xs, if (!pool) goto out; - pool->heads = kvzalloc_objs(*pool->heads, umem->chunks, GFP_KERNEL); + pool->heads = kvzalloc_objs(*pool->heads, umem->chunks); if (!pool->heads) goto out; @@ -328,7 +328,7 @@ static struct xsk_dma_map *xp_create_dma_map(struct device *dev, struct net_devi { struct xsk_dma_map *dma_map; - dma_map = kzalloc_obj(*dma_map, GFP_KERNEL); + dma_map = kzalloc_obj(*dma_map); if (!dma_map) return NULL; diff --git a/net/xdp/xsk_queue.c b/net/xdp/xsk_queue.c index ef089b9c4fc8..4dd01b7d858e 100644 --- a/net/xdp/xsk_queue.c +++ b/net/xdp/xsk_queue.c @@ -26,7 +26,7 @@ struct xsk_queue *xskq_create(u32 nentries, bool umem_queue) struct xsk_queue *q; size_t size; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; diff --git a/net/xfrm/espintcp.c b/net/xfrm/espintcp.c index 3f6eda9364ec..61f1cef89bc1 100644 --- a/net/xfrm/espintcp.c +++ b/net/xfrm/espintcp.c @@ -465,7 +465,7 @@ static int espintcp_init_sk(struct sock *sk) if (sk->sk_user_data) return -EBUSY; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c index 35f8236059a7..5f38dff16177 100644 --- a/net/xfrm/xfrm_ipcomp.c +++ b/net/xfrm/xfrm_ipcomp.c @@ -336,7 +336,7 @@ int ipcomp_init_state(struct xfrm_state *x, struct netlink_ext_ack *extack) } err = -ENOMEM; - ipcd = kzalloc_obj(*ipcd, GFP_KERNEL); + ipcd = kzalloc_obj(*ipcd); if (!ipcd) goto out; diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c index 92b9a5b80804..5c9e56e525f2 100644 --- a/net/xfrm/xfrm_iptfs.c +++ b/net/xfrm/xfrm_iptfs.c @@ -2678,7 +2678,7 @@ static int iptfs_init_state(struct xfrm_state *x) /* We have arrived here from xfrm_state_clone() */ xtfs = x->mode_data; } else { - xtfs = kzalloc_obj(*xtfs, GFP_KERNEL); + xtfs = kzalloc_obj(*xtfs); if (!xtfs) return -ENOMEM; } |
