diff options
Diffstat (limited to 'drivers/net/wireless')
198 files changed, 538 insertions, 538 deletions
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c index f1567365ac04..66ac396858a5 100644 --- a/drivers/net/wireless/ath/ar5523/ar5523.c +++ b/drivers/net/wireless/ath/ar5523/ar5523.c @@ -1512,11 +1512,11 @@ static int ar5523_load_firmware(struct usb_device *dev) return -ENOENT; } - txblock = kzalloc_obj(*txblock, GFP_KERNEL); + txblock = kzalloc_obj(*txblock); if (!txblock) goto out; - rxblock = kmalloc_obj(*rxblock, GFP_KERNEL); + rxblock = kmalloc_obj(*rxblock); if (!rxblock) goto out_free_txblock; diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index bea2cd4e5ee4..25ab945fecef 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -807,7 +807,7 @@ int ath10k_htt_rx_alloc(struct ath10k_htt *htt) } htt->rx_ring.netbufs_ring = - kzalloc_objs(struct sk_buff *, htt->rx_ring.size, GFP_KERNEL); + kzalloc_objs(struct sk_buff *, htt->rx_ring.size); if (!htt->rx_ring.netbufs_ring) goto err_netbuf; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index ef595a939bde..cf7424be9f4b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6431,7 +6431,7 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw, if (ret) goto exit; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -7972,7 +7972,7 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, scan_time_msec = ar->hw->wiphy->max_remain_on_channel_duration * 2; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -8954,7 +8954,7 @@ ath10k_mac_op_change_chanctx(struct ieee80211_hw *hw, if (arg.n_vifs == 0) goto radar; - arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs, GFP_KERNEL); + arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs); if (!arg.vifs) goto radar; diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index 62c9ef500ee7..eebd78e7ff6b 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -245,7 +245,7 @@ static int ath10k_qmi_bdf_dnld_send_sync(struct ath10k_qmi *qmi) const u8 *temp; int ret; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -437,7 +437,7 @@ ath10k_qmi_cfg_send_sync_msg(struct ath10k *ar, int ret; u32 i; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -578,7 +578,7 @@ static int ath10k_qmi_cap_send_sync_msg(struct ath10k_qmi *qmi) struct qmi_txn txn; int ret; - resp = kzalloc_obj(*resp, GFP_KERNEL); + resp = kzalloc_obj(*resp); if (!resp) return -ENOMEM; @@ -1075,7 +1075,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size) struct ath10k_qmi *qmi; int ret; - qmi = kzalloc_obj(*qmi, GFP_KERNEL); + qmi = kzalloc_obj(*qmi); if (!qmi) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index ff046cff7399..43a6b1ba8fb8 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -246,7 +246,7 @@ static int ath10k_sdio_writesb32(struct ath10k *ar, u32 addr, u32 val) __le32 *buf; int ret; - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) return -ENOMEM; @@ -1766,7 +1766,7 @@ static int ath10k_sdio_diag_read32(struct ath10k *ar, u32 address, __le32 *val; int ret; - val = kzalloc_obj(*val, GFP_KERNEL); + val = kzalloc_obj(*val); if (!val) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index 59969db56048..6661fff326e0 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -799,7 +799,7 @@ static int ath10k_usb_alloc_pipe_resources(struct ath10k *ar, init_usb_anchor(&pipe->urb_submitted); for (i = 0; i < urb_cnt; i++) { - urb_context = kzalloc_obj(*urb_context, GFP_KERNEL); + urb_context = kzalloc_obj(*urb_context); if (!urb_context) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath10k/wow.c b/drivers/net/wireless/ath/ath10k/wow.c index 8b7f608b5265..78653f257925 100644 --- a/drivers/net/wireless/ath/ath10k/wow.c +++ b/drivers/net/wireless/ath/ath10k/wow.c @@ -301,7 +301,7 @@ static int ath10k_vif_wow_set_wakeups(struct ath10k_vif *arvif, struct wmi_pno_scan_req *pno; int ret; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; @@ -413,7 +413,7 @@ static int ath10k_vif_wow_clean_nlo(struct ath10k_vif *arvif) if (ar->nlo_enabled) { struct wmi_pno_scan_req *pno; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath11k/cfr.c b/drivers/net/wireless/ath/ath11k/cfr.c index 61ac656ece07..a91f25fb6c6b 100644 --- a/drivers/net/wireless/ath/ath11k/cfr.c +++ b/drivers/net/wireless/ath/ath11k/cfr.c @@ -975,7 +975,7 @@ int ath11k_cfr_init(struct ath11k_base *ab) spin_lock_init(&cfr->lut_lock); num_lut_entries = min_t(u32, CFR_MAX_LUT_ENTRIES, db_cap.min_elem); - cfr->lut = kzalloc_objs(*cfr->lut, num_lut_entries, GFP_KERNEL); + cfr->lut = kzalloc_objs(*cfr->lut, num_lut_entries); if (!cfr->lut) { ret = -ENOMEM; goto err; diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wireless/ath/ath11k/debugfs.c index 9b8660e56a1a..7ec8be82c1c9 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -1193,7 +1193,7 @@ static int ath11k_debugfs_dbr_dbg_init(struct ath11k *ar, int dbr_id) if (ar->debug.dbr_debug[dbr_id]) return 0; - ar->debug.dbr_debug[dbr_id] = kzalloc_obj(*dbr_debug, GFP_KERNEL); + ar->debug.dbr_debug[dbr_id] = kzalloc_obj(*dbr_debug); if (!ar->debug.dbr_debug[dbr_id]) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 7ec87ea7620f..e4ee2ba1f669 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -4221,7 +4221,7 @@ static int ath11k_mac_op_hw_scan(struct ieee80211_hw *hw, if (ret) goto exit; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; @@ -7876,7 +7876,7 @@ ath11k_mac_update_active_vif_chan(struct ath11k *ar, if (arg.n_vifs == 0) return; - arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs, GFP_KERNEL); + arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs); if (!arg.vifs) return; @@ -9729,7 +9729,7 @@ static int ath11k_mac_op_remain_on_channel(struct ieee80211_hw *hw, scan_time_msec = ar->hw->wiphy->max_remain_on_channel_duration * 2; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -9823,7 +9823,7 @@ static int ath11k_mac_station_add(struct ath11k *ar, arvif->reinstall_group_keys = false; } - arsta->rx_stats = kzalloc_obj(*arsta->rx_stats, GFP_KERNEL); + arsta->rx_stats = kzalloc_obj(*arsta->rx_stats); if (!arsta->rx_stats) { ret = -ENOMEM; goto dec_num_station; @@ -9844,7 +9844,7 @@ static int ath11k_mac_station_add(struct ath11k *ar, sta->addr, arvif->vdev_id); if (ath11k_debugfs_is_extd_tx_stats_enabled(ar)) { - arsta->tx_stats = kzalloc_obj(*arsta->tx_stats, GFP_KERNEL); + arsta->tx_stats = kzalloc_obj(*arsta->tx_stats); if (!arsta->tx_stats) { ret = -ENOMEM; goto free_peer; @@ -10278,7 +10278,7 @@ static void ath11k_mac_setup_mac_address_list(struct ath11k *ar) return; n_addresses = ar->ab->hw_params.num_vdevs; - addresses = kzalloc_objs(*addresses, n_addresses, GFP_KERNEL); + addresses = kzalloc_objs(*addresses, n_addresses); if (!addresses) return; @@ -10310,7 +10310,7 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) else n_combos = 1; - combinations = kzalloc_objs(*combinations, n_combos, GFP_KERNEL); + combinations = kzalloc_objs(*combinations, n_combos); if (!combinations) return -ENOMEM; @@ -10319,7 +10319,7 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) else n_limits = 2; - limits = kzalloc_objs(*limits, n_limits, GFP_KERNEL); + limits = kzalloc_objs(*limits, n_limits); if (!limits) { kfree(combinations); return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c index 7cb91d23362f..f994233df2bb 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.c +++ b/drivers/net/wireless/ath/ath11k/mhi.c @@ -207,7 +207,7 @@ static int ath11k_mhi_get_msi(struct ath11k_pci *ab_pci) ath11k_dbg(ab, ATH11K_DBG_PCI, "num_vectors %d base_vector %d\n", num_vectors, base_vector); - irq = kzalloc_objs(int, num_vectors, GFP_KERNEL); + irq = kzalloc_objs(int, num_vectors); if (!irq) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index ea6f560abd98..feebbc30f3df 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -1799,11 +1799,11 @@ static int ath11k_qmi_fw_ind_register_send(struct ath11k_base *ab) struct qmi_txn txn; int ret; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; - resp = kzalloc_obj(*resp, GFP_KERNEL); + resp = kzalloc_obj(*resp); if (!resp) { ret = -ENOMEM; goto resp_out; @@ -1878,7 +1878,7 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab) int ret = 0, i; bool delayed; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -2306,7 +2306,7 @@ static int ath11k_qmi_load_file_target_mem(struct ath11k_base *ab, int ret = 0; u32 remaining = len; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -2705,7 +2705,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab) ce_cfg = (struct ce_pipe_config *)ab->qmi.ce_cfg.tgt_ce; svc_cfg = (struct service_to_pipe *)ab->qmi.ce_cfg.svc_to_ce_map; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath11k/wow.c b/drivers/net/wireless/ath/ath11k/wow.c index 7b696d1dd0e8..f02edc9b8a9e 100644 --- a/drivers/net/wireless/ath/ath11k/wow.c +++ b/drivers/net/wireless/ath/ath11k/wow.c @@ -381,7 +381,7 @@ static int ath11k_vif_wow_set_wakeups(struct ath11k_vif *arvif, struct wmi_pno_scan_req *pno; int ret; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; @@ -495,7 +495,7 @@ static int ath11k_vif_wow_clean_nlo(struct ath11k_vif *arvif) if (ar->nlo_enabled) { struct wmi_pno_scan_req *pno; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index d9b41fc90dcd..4ed608ba3c30 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1805,7 +1805,7 @@ static struct ath12k_hw_group *ath12k_core_hw_group_alloc(struct ath12k_base *ab list_for_each_entry(ag, &ath12k_hw_group_list, list) count++; - ag = kzalloc_obj(*ag, GFP_KERNEL); + ag = kzalloc_obj(*ag); if (!ag) return NULL; diff --git a/drivers/net/wireless/ath/ath12k/dp_peer.c b/drivers/net/wireless/ath/ath12k/dp_peer.c index 95b5a4af4b2e..a1100782d45e 100644 --- a/drivers/net/wireless/ath/ath12k/dp_peer.c +++ b/drivers/net/wireless/ath/ath12k/dp_peer.c @@ -233,7 +233,7 @@ static int ath12k_dp_link_peer_rhash_addr_tbl_init(struct ath12k_dp *dp) lockdep_assert_held(&dp->link_peer_rhash_tbl_lock); - rhash_addr_tbl = kzalloc_obj(*dp->rhead_peer_addr, GFP_KERNEL); + rhash_addr_tbl = kzalloc_obj(*dp->rhead_peer_addr); if (!rhash_addr_tbl) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 007c91dbb269..c6d64b467898 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -3838,7 +3838,7 @@ static void ath12k_bss_assoc(struct ath12k *ar, lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy); struct ath12k_wmi_peer_assoc_arg *peer_arg __free(kfree) = - kzalloc_obj(*peer_arg, GFP_KERNEL); + kzalloc_obj(*peer_arg); if (!peer_arg) return; @@ -4217,7 +4217,7 @@ static struct ath12k_link_vif *ath12k_mac_assign_link_vif(struct ath12k_hw *ah, if (vif->type == NL80211_IFTYPE_STATION) arvif->is_sta_assoc_link = true; } else { - arvif = kzalloc_obj(*arvif, GFP_KERNEL); + arvif = kzalloc_obj(*arvif); if (!arvif) return NULL; } @@ -5603,7 +5603,7 @@ static int ath12k_mac_initiate_hw_scan(struct ieee80211_hw *hw, if (ret) goto exit; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -5693,7 +5693,7 @@ int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw, lockdep_assert_wiphy(hw->wiphy); - chan_list = kzalloc_objs(*chan_list, hw_req->req.n_channels, GFP_KERNEL); + chan_list = kzalloc_objs(*chan_list, hw_req->req.n_channels); if (!chan_list) return -ENOMEM; @@ -6123,7 +6123,7 @@ static int ath12k_mac_update_key_cache(struct ath12k_vif_cache *cache, } if (cmd == SET_KEY) { - key_conf = kzalloc_obj(*key_conf, GFP_KERNEL); + key_conf = kzalloc_obj(*key_conf); if (!key_conf) return -ENOMEM; @@ -6457,7 +6457,7 @@ static int ath12k_mac_station_assoc(struct ath12k *ar, mask = &arvif->bitrate_mask; struct ath12k_wmi_peer_assoc_arg *peer_arg __free(kfree) = - kzalloc_obj(*peer_arg, GFP_KERNEL); + kzalloc_obj(*peer_arg); if (!peer_arg) return -ENOMEM; @@ -6620,7 +6620,7 @@ static void ath12k_sta_rc_update_wk(struct wiphy *wiphy, struct wiphy_work *wk) nss = min(nss, mac_nss); struct ath12k_wmi_peer_assoc_arg *peer_arg __free(kfree) = - kzalloc_obj(*peer_arg, GFP_KERNEL); + kzalloc_obj(*peer_arg); if (!peer_arg) return; @@ -7975,7 +7975,7 @@ static struct ath12k_link_sta *ath12k_mac_alloc_assign_link_sta(struct ath12k_hw if (arsta) return NULL; - arsta = kmalloc_obj(*arsta, GFP_KERNEL); + arsta = kmalloc_obj(*arsta); if (!arsta) return NULL; @@ -11550,7 +11550,7 @@ ath12k_mac_update_active_vif_chan(struct ath12k *ar, if (arg.n_vifs == 0) return; - arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs, GFP_KERNEL); + arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs); if (!arg.vifs) return; @@ -13715,7 +13715,7 @@ int ath12k_mac_op_remain_on_channel(struct ieee80211_hw *hw, scan_time_msec = hw->wiphy->max_remain_on_channel_duration * 2; struct ath12k_wmi_scan_req_arg *arg __free(kfree) = - kzalloc_obj(*arg, GFP_KERNEL); + kzalloc_obj(*arg); if (!arg) return -ENOMEM; @@ -14123,7 +14123,7 @@ ath12k_mac_setup_radio_iface_comb(struct ath12k *ar, max_interfaces = 1; } - limits = kzalloc_objs(*limits, n_limits, GFP_KERNEL); + limits = kzalloc_objs(*limits, n_limits); if (!limits) return -ENOMEM; @@ -14187,7 +14187,7 @@ ath12k_mac_setup_global_iface_comb(struct ath12k_hw *ah, else n_limits = 1; - limits = kzalloc_objs(*limits, n_limits, GFP_KERNEL); + limits = kzalloc_objs(*limits, n_limits); if (!limits) return -ENOMEM; @@ -14272,20 +14272,20 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah) goto out; } - combinations = kzalloc_objs(*combinations, n_combinations, GFP_KERNEL); + combinations = kzalloc_objs(*combinations, n_combinations); if (!combinations) return -ENOMEM; /* there are multiple radios */ - radio = kzalloc_objs(*radio, ah->num_radio, GFP_KERNEL); + radio = kzalloc_objs(*radio, ah->num_radio); if (!radio) { ret = -ENOMEM; goto err_free_combinations; } for_each_ar(ah, ar, i) { - comb = kzalloc_obj(*comb, GFP_KERNEL); + comb = kzalloc_obj(*comb); if (!comb) { ret = -ENOMEM; goto err_free_radios; diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c index 8f07c00c51a2..ee87f00bc5de 100644 --- a/drivers/net/wireless/ath/ath12k/mhi.c +++ b/drivers/net/wireless/ath/ath12k/mhi.c @@ -80,7 +80,7 @@ static int ath12k_mhi_get_msi(struct ath12k_pci *ab_pci) ath12k_dbg(ab, ATH12K_DBG_PCI, "Number of assigned MSI for MHI is %d, base vector is %d\n", num_vectors, base_vector); - irq = kzalloc_objs(*irq, num_vectors, GFP_KERNEL); + irq = kzalloc_objs(*irq, num_vectors); if (!irq) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath12k/peer.c b/drivers/net/wireless/ath/ath12k/peer.c index ad571a4cf974..2e875176baaa 100644 --- a/drivers/net/wireless/ath/ath12k/peer.c +++ b/drivers/net/wireless/ath/ath12k/peer.c @@ -413,7 +413,7 @@ int ath12k_link_sta_rhash_tbl_init(struct ath12k_base *ab) struct rhashtable *rhash_addr_tbl; int ret; - rhash_addr_tbl = kzalloc_obj(*ab->rhead_sta_addr, GFP_KERNEL); + rhash_addr_tbl = kzalloc_obj(*ab->rhead_sta_addr); if (!rhash_addr_tbl) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 631041bf1dc1..c11b84b56f8f 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2344,11 +2344,11 @@ static int ath12k_qmi_fw_ind_register_send(struct ath12k_base *ab) struct qmi_txn txn; int ret; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; - resp = kzalloc_obj(*resp, GFP_KERNEL); + resp = kzalloc_obj(*resp); if (!resp) { ret = -ENOMEM; goto resp_out; @@ -2416,7 +2416,7 @@ int ath12k_qmi_respond_fw_mem_request(struct ath12k_base *ab) int ret = 0, i; bool delayed; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -2968,7 +2968,7 @@ static int ath12k_qmi_load_file_target_mem(struct ath12k_base *ab, int ret = 0; u32 remaining = len; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -3465,7 +3465,7 @@ static int ath12k_qmi_wlanfw_wlan_cfg_send(struct ath12k_base *ab) ce_cfg = (struct ce_pipe_config *)ab->qmi.ce_cfg.tgt_ce; svc_cfg = (struct service_to_pipe *)ab->qmi.ce_cfg.svc_to_ce_map; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp.c b/drivers/net/wireless/ath/ath12k/wifi7/dp.c index 8e0b83801346..c72f604661ce 100644 --- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c +++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c @@ -161,7 +161,7 @@ struct ath12k_dp *ath12k_wifi7_dp_device_alloc(struct ath12k_base *ab) struct ath12k_dp *dp; /* TODO: align dp later if cache alignment becomes a bottleneck */ - dp = kzalloc_obj(*dp, GFP_KERNEL); + dp = kzalloc_obj(*dp); if (!dp) return NULL; diff --git a/drivers/net/wireless/ath/ath12k/wow.c b/drivers/net/wireless/ath/ath12k/wow.c index bdac483c58cf..d8789104d886 100644 --- a/drivers/net/wireless/ath/ath12k/wow.c +++ b/drivers/net/wireless/ath/ath12k/wow.c @@ -395,7 +395,7 @@ static int ath12k_wow_vif_set_wakeups(struct ath12k_link_vif *arvif, struct wmi_pno_scan_req_arg *pno; int ret; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; @@ -507,7 +507,7 @@ static int ath12k_wow_vdev_clean_nlo(struct ath12k *ar, u32 vdev_id) if (!ar->nlo_enabled) return 0; - pno = kzalloc_obj(*pno, GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; @@ -748,7 +748,7 @@ static int ath12k_wow_arp_ns_offload(struct ath12k *ar, bool enable) lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy); - offload = kmalloc_obj(*offload, GFP_KERNEL); + offload = kmalloc_obj(*offload); if (!offload) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 5e30316f4543..25edc35dc7b9 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c @@ -928,7 +928,7 @@ static int open_file_eeprom(struct inode *inode, struct file *file) /* Create private struct and assign to file */ - ep = kmalloc_obj(*ep, GFP_KERNEL); + ep = kmalloc_obj(*ep); if (!ep) { ret = -ENOMEM; goto freebuf; diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c index 8be852e832f3..648110cd313f 100644 --- a/drivers/net/wireless/ath/ath6kl/core.c +++ b/drivers/net/wireless/ath/ath6kl/core.c @@ -311,7 +311,7 @@ struct ath6kl *ath6kl_core_create(struct device *dev) ar->sta_list[ctr].mgmt_psq_len = 0; INIT_LIST_HEAD(&ar->sta_list[ctr].mgmt_psq); ar->sta_list[ctr].aggr_conn = - kzalloc_obj(struct aggr_info_conn, GFP_KERNEL); + kzalloc_obj(struct aggr_info_conn); if (!ar->sta_list[ctr].aggr_conn) { ath6kl_err("Failed to allocate memory for sta aggregation information\n"); ath6kl_core_destroy(ar); diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index 19dfeb012c04..9ece8f9983f1 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -2792,7 +2792,7 @@ static int ath6kl_htc_reset(struct htc_target *target) (HTC_MAX_CTRL_MSG_LEN + HTC_HDR_LENGTH); for (i = 0; i < NUM_CONTROL_BUFFERS; i++) { - packet = kzalloc_obj(*packet, GFP_KERNEL); + packet = kzalloc_obj(*packet); if (!packet) return -ENOMEM; @@ -2842,13 +2842,13 @@ static void *ath6kl_htc_mbox_create(struct ath6kl *ar) struct htc_target *target = NULL; int status = 0; - target = kzalloc_obj(*target, GFP_KERNEL); + target = kzalloc_obj(*target); if (!target) { ath6kl_err("unable to allocate memory\n"); return NULL; } - target->dev = kzalloc_obj(*target->dev, GFP_KERNEL); + target->dev = kzalloc_obj(*target->dev); if (!target->dev) { ath6kl_err("unable to allocate memory\n"); kfree(target); diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index ba8a701087c3..5183e3029886 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c @@ -510,7 +510,7 @@ static struct htc_packet *build_htc_txctrl_packet(void) struct htc_packet *packet = NULL; struct sk_buff *skb; - packet = kzalloc_obj(struct htc_packet, GFP_KERNEL); + packet = kzalloc_obj(struct htc_packet); if (packet == NULL) return NULL; @@ -1409,7 +1409,7 @@ static void *ath6kl_htc_pipe_create(struct ath6kl *ar) struct htc_packet *packet; int i; - target = kzalloc_obj(struct htc_target, GFP_KERNEL); + target = kzalloc_obj(struct htc_target); if (target == NULL) { ath6kl_err("htc create unable to allocate memory\n"); status = -ENOMEM; @@ -1423,13 +1423,13 @@ static void *ath6kl_htc_pipe_create(struct ath6kl *ar) reset_endpoint_states(target); for (i = 0; i < HTC_PACKET_CONTAINER_ALLOCATION; i++) { - packet = kzalloc_obj(struct htc_packet, GFP_KERNEL); + packet = kzalloc_obj(struct htc_packet); if (packet != NULL) free_htc_packet_container(target, packet); } - target->dev = kzalloc_obj(*target->dev, GFP_KERNEL); + target->dev = kzalloc_obj(*target->dev); if (!target->dev) { ath6kl_err("unable to allocate memory\n"); status = -ENOMEM; diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 908cb87842f7..85d6ad53cf94 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -485,7 +485,7 @@ void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr, keymgmt, ucipher, auth, apsd_info); /* send event to application */ - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return; diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index c0a895ae882f..56929e965bd6 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -1316,7 +1316,7 @@ static int ath6kl_sdio_probe(struct sdio_func *func, func->num, func->vendor, func->device, func->max_blksize, func->cur_blksize); - ar_sdio = kzalloc_obj(struct ath6kl_sdio, GFP_KERNEL); + ar_sdio = kzalloc_obj(struct ath6kl_sdio); if (!ar_sdio) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 623d134c4be7..97fdac7237e2 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1770,13 +1770,13 @@ struct aggr_info *aggr_init(struct ath6kl_vif *vif) { struct aggr_info *p_aggr = NULL; - p_aggr = kzalloc_obj(struct aggr_info, GFP_KERNEL); + p_aggr = kzalloc_obj(struct aggr_info); if (!p_aggr) { ath6kl_err("failed to alloc memory for aggr_node\n"); return NULL; } - p_aggr->aggr_conn = kzalloc_obj(struct aggr_info_conn, GFP_KERNEL); + p_aggr->aggr_conn = kzalloc_obj(struct aggr_info_conn); if (!p_aggr->aggr_conn) { ath6kl_err("failed to alloc memory for connection specific aggr info\n"); kfree(p_aggr); diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 9362ab82cc30..852e77e41bde 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -190,7 +190,7 @@ static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe, init_usb_anchor(&pipe->urb_submitted); for (i = 0; i < urb_cnt; i++) { - urb_context = kzalloc_obj(struct ath6kl_urb_context, GFP_KERNEL); + urb_context = kzalloc_obj(struct ath6kl_urb_context); if (urb_context == NULL) { status = -ENOMEM; goto fail_alloc_pipe_resources; @@ -633,7 +633,7 @@ static struct ath6kl_usb *ath6kl_usb_create(struct usb_interface *interface) int i; /* ath6kl_usb_destroy() needs ar_usb != NULL && ar_usb->wq != NULL. */ - ar_usb = kzalloc_obj(struct ath6kl_usb, GFP_KERNEL); + ar_usb = kzalloc_obj(struct ath6kl_usb); if (ar_usb == NULL) return NULL; ar_usb->wq = alloc_workqueue("ath6kl_wq", 0, 0); diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index c043ba9a2afa..72611a2ceb9d 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -4135,7 +4135,7 @@ void *ath6kl_wmi_init(struct ath6kl *dev) { struct wmi *wmi; - wmi = kzalloc_obj(struct wmi, GFP_KERNEL); + wmi = kzalloc_obj(struct wmi); if (!wmi) return NULL; diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index c7e063482f55..8533b88974b2 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -107,7 +107,7 @@ static int hif_usb_send_regout(struct hif_device_usb *hif_dev, if (urb == NULL) return -ENOMEM; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) { usb_free_urb(urb); return -ENOMEM; @@ -849,7 +849,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) init_usb_anchor(&hif_dev->mgmt_submitted); for (i = 0; i < MAX_TX_URB_NUM; i++) { - tx_buf = kzalloc_obj(*tx_buf, GFP_KERNEL); + tx_buf = kzalloc_obj(*tx_buf); if (!tx_buf) goto err; @@ -897,7 +897,7 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) for (i = 0; i < MAX_RX_URB_NUM; i++) { - rx_buf = kzalloc_obj(*rx_buf, GFP_KERNEL); + rx_buf = kzalloc_obj(*rx_buf); if (!rx_buf) { ret = -ENOMEM; goto err_rxb; @@ -972,7 +972,7 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) for (i = 0; i < MAX_REG_IN_URB_NUM; i++) { - rx_buf = kzalloc_obj(*rx_buf, GFP_KERNEL); + rx_buf = kzalloc_obj(*rx_buf); if (!rx_buf) { ret = -ENOMEM; goto err_rxb; @@ -1376,7 +1376,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, if (id->driver_info == STORAGE_DEVICE) return send_eject_command(interface); - hif_dev = kzalloc_obj(struct hif_device_usb, GFP_KERNEL); + hif_dev = kzalloc_obj(struct hif_device_usb); if (!hif_dev) { ret = -ENOMEM; goto err_alloc; diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index a57b1ca76891..5270d0c0af17 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -611,7 +611,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, struct ath_common *common; int i, ret = 0, csz = 0; - ah = kzalloc_obj(struct ath_hw, GFP_KERNEL); + ah = kzalloc_obj(struct ath_hw); if (!ah) return -ENOMEM; diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 20e1f9b72b16..bed7ea2425a0 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -1193,7 +1193,7 @@ int ath9k_rx_init(struct ath9k_htc_priv *priv) for (i = 0; i < ATH9K_HTC_RXBUF; i++) { struct ath9k_htc_rxbuf *rxbuf = - kzalloc_obj(struct ath9k_htc_rxbuf, GFP_KERNEL); + kzalloc_obj(struct ath9k_htc_rxbuf); if (rxbuf == NULL) goto err; diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index a2fe131d8c00..efd73f2ffda6 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -499,7 +499,7 @@ struct htc_target *ath9k_htc_hw_alloc(void *hif_handle, struct htc_endpoint *endpoint; struct htc_target *target; - target = kzalloc_obj(struct htc_target, GFP_KERNEL); + target = kzalloc_obj(struct htc_target); if (!target) return NULL; diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index e7bf63d257b2..a45351afcf6e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -3128,7 +3128,7 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah, !AR_SREV_9300_20_OR_LATER(ah)) return NULL; - timer = kzalloc_obj(struct ath_gen_timer, GFP_KERNEL); + timer = kzalloc_obj(struct ath_gen_timer); if (timer == NULL) return NULL; diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index 2f56b9cc0ab8..284e8c13b043 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c @@ -92,7 +92,7 @@ struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv) { struct wmi *wmi; - wmi = kzalloc_obj(struct wmi, GFP_KERNEL); + wmi = kzalloc_obj(struct wmi); if (!wmi) return NULL; diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 3262a279746f..af632418fa06 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c @@ -1412,7 +1412,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw, if (!sta_info->ht_sta) return -EOPNOTSUPP; - tid_info = kzalloc_obj(struct carl9170_sta_tid, GFP_KERNEL); + tid_info = kzalloc_obj(struct carl9170_sta_tid); if (!tid_info) return -ENOMEM; diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c index a798ff11183d..ce5a6a39c0ad 100644 --- a/drivers/net/wireless/ath/dfs_pattern_detector.c +++ b/drivers/net/wireless/ath/dfs_pattern_detector.c @@ -354,7 +354,7 @@ dfs_pattern_detector_init(struct ath_common *common, if (!IS_ENABLED(CONFIG_CFG80211_CERTIFICATION_ONUS)) return NULL; - dpd = kmalloc_obj(*dpd, GFP_KERNEL); + dpd = kmalloc_obj(*dpd); if (dpd == NULL) return NULL; diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c index c6ec7a296240..5a0ef2295a3a 100644 --- a/drivers/net/wireless/ath/wcn36xx/dxe.c +++ b/drivers/net/wireless/ath/wcn36xx/dxe.c @@ -74,7 +74,7 @@ static int wcn36xx_dxe_allocate_ctl_block(struct wcn36xx_dxe_ch *ch) spin_lock_init(&ch->lock); for (i = 0; i < ch->desc_num; i++) { - cur_ctl = kzalloc_obj(*cur_ctl, GFP_KERNEL); + cur_ctl = kzalloc_obj(*cur_ctl); if (!cur_ctl) goto out_fail; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index f9ebe13d0245..813553edcb78 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -847,7 +847,7 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, return -EINVAL; mutex_lock(&wcn->hal_mutex); - msg_body = kzalloc_obj(*msg_body, GFP_KERNEL); + msg_body = kzalloc_obj(*msg_body); if (!msg_body) { ret = -ENOMEM; goto out; @@ -942,7 +942,7 @@ int wcn36xx_smd_update_channel_list(struct wcn36xx *wcn, struct cfg80211_scan_re struct wcn36xx_hal_update_channel_list_req_msg *msg_body; int ret, i; - msg_body = kzalloc_obj(*msg_body, GFP_KERNEL); + msg_body = kzalloc_obj(*msg_body); if (!msg_body) return -ENOMEM; @@ -1624,7 +1624,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct cfg80211_chan_def *chandef; int ret; - msg_body = kzalloc_obj(*msg_body, GFP_KERNEL); + msg_body = kzalloc_obj(*msg_body); if (!msg_body) return -ENOMEM; @@ -1744,7 +1744,7 @@ static int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_params *sta_params; int ret; - msg = kzalloc_obj(*msg, GFP_KERNEL); + msg = kzalloc_obj(*msg); if (!msg) return -ENOMEM; diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index e0f39ef9ac78..c74f5e66166d 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -691,7 +691,7 @@ wil_cfg80211_add_iface(struct wiphy *wiphy, const char *name, return ERR_PTR(-EINVAL); } - p2p_wdev = kzalloc_obj(*p2p_wdev, GFP_KERNEL); + p2p_wdev = kzalloc_obj(*p2p_wdev); if (!p2p_wdev) return ERR_PTR(-ENOMEM); @@ -2394,7 +2394,7 @@ static int wil_cfg80211_probe_client(struct wiphy *wiphy, if (cid < 0) return -ENOLINK; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 2e5c24245e6a..1e796087435d 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -1392,7 +1392,7 @@ static int link_show(struct seq_file *s, void *data) struct station_info *sinfo; int i, rc = 0; - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; diff --git a/drivers/net/wireless/ath/wil6210/rx_reorder.c b/drivers/net/wireless/ath/wil6210/rx_reorder.c index 75bf9dbbf23a..5841098ff8f9 100644 --- a/drivers/net/wireless/ath/wil6210/rx_reorder.c +++ b/drivers/net/wireless/ath/wil6210/rx_reorder.c @@ -241,13 +241,13 @@ out: struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil, int size, u16 ssn) { - struct wil_tid_ampdu_rx *r = kzalloc_obj(*r, GFP_KERNEL); + struct wil_tid_ampdu_rx *r = kzalloc_obj(*r); if (!r) return NULL; r->reorder_buf = - kzalloc_objs(struct sk_buff *, size, GFP_KERNEL); + kzalloc_objs(struct sk_buff *, size); if (!r->reorder_buf) { kfree(r); return NULL; diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index e11f30a7bb48..e8320607603e 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -119,7 +119,7 @@ static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) vring->swhead = 0; vring->swtail = 0; - vring->ctx = kzalloc_objs(vring->ctx[0], vring->size, GFP_KERNEL); + vring->ctx = kzalloc_objs(vring->ctx[0], vring->size); if (!vring->ctx) { vring->va = NULL; return -ENOMEM; diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c index e391951346c2..c4c6b3088a7a 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.c +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c @@ -381,7 +381,7 @@ static int wil_ring_alloc_desc_ring(struct wil6210_priv *wil, ring->swhead = 0; ring->swtail = 0; - ring->ctx = kzalloc_objs(ring->ctx[0], ring->size, GFP_KERNEL); + ring->ctx = kzalloc_objs(ring->ctx[0], ring->size); if (!ring->ctx) goto err; diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 69f9fb19f01b..05b040c684e8 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -1080,7 +1080,7 @@ static void wmi_evt_connect(struct wil6210_vif *vif, int id, void *d, int len) goto out; } - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) { rc = -ENOMEM; goto out; diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index 11554306a5f3..6445332801a4 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -378,7 +378,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size, return -EINVAL; } - dfu_stat_buf = kmalloc_obj(*dfu_stat_buf, GFP_KERNEL); + dfu_stat_buf = kmalloc_obj(*dfu_stat_buf); if (!dfu_stat_buf) { ret = -ENOMEM; goto exit; @@ -607,7 +607,7 @@ static inline int at76_get_hw_cfg_intersil(struct usb_device *udev, static int at76_get_hw_config(struct at76_priv *priv) { int ret; - union at76_hwcfg *hwcfg = kmalloc_obj(*hwcfg, GFP_KERNEL); + union at76_hwcfg *hwcfg = kmalloc_obj(*hwcfg); if (!hwcfg) return -ENOMEM; @@ -931,7 +931,7 @@ static void at76_dump_mib_mac_addr(struct at76_priv *priv) { int i; int ret; - struct mib_mac_addr *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_mac_addr *m = kmalloc_obj(*m); if (!m) return; @@ -959,7 +959,7 @@ static void at76_dump_mib_mac_wep(struct at76_priv *priv) int i; int ret; int key_len; - struct mib_mac_wep *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_mac_wep *m = kmalloc_obj(*m); if (!m) return; @@ -994,7 +994,7 @@ exit: static void at76_dump_mib_mac_mgmt(struct at76_priv *priv) { int ret; - struct mib_mac_mgmt *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_mac_mgmt *m = kmalloc_obj(*m); if (!m) return; @@ -1030,7 +1030,7 @@ exit: static void at76_dump_mib_mac(struct at76_priv *priv) { int ret; - struct mib_mac *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_mac *m = kmalloc_obj(*m); if (!m) return; @@ -1067,7 +1067,7 @@ exit: static void at76_dump_mib_phy(struct at76_priv *priv) { int ret; - struct mib_phy *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_phy *m = kmalloc_obj(*m); if (!m) return; @@ -1100,7 +1100,7 @@ exit: static void at76_dump_mib_local(struct at76_priv *priv) { int ret; - struct mib_local *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_local *m = kmalloc_obj(*m); if (!m) return; @@ -1125,7 +1125,7 @@ exit: static void at76_dump_mib_mdomain(struct at76_priv *priv) { int ret; - struct mib_mdomain *m = kmalloc_obj(*m, GFP_KERNEL); + struct mib_mdomain *m = kmalloc_obj(*m); if (!m) return; @@ -2442,7 +2442,7 @@ static int at76_probe(struct usb_interface *interface, udev = usb_get_dev(interface_to_usbdev(interface)); - fwv = kmalloc_obj(*fwv, GFP_KERNEL); + fwv = kmalloc_obj(*fwv); if (!fwv) { ret = -ENOMEM; goto exit; diff --git a/drivers/net/wireless/broadcom/b43/bus.c b/drivers/net/wireless/broadcom/b43/bus.c index b6c8697f782b..3ed329a39daf 100644 --- a/drivers/net/wireless/broadcom/b43/bus.c +++ b/drivers/net/wireless/broadcom/b43/bus.c @@ -74,7 +74,7 @@ void b43_bus_bcma_block_write(struct b43_bus_dev *dev, const void *buffer, struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core) { - struct b43_bus_dev *dev = kzalloc_obj(*dev, GFP_KERNEL); + struct b43_bus_dev *dev = kzalloc_obj(*dev); if (!dev) return NULL; @@ -179,7 +179,7 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev) { struct b43_bus_dev *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return NULL; diff --git a/drivers/net/wireless/broadcom/b43/debugfs.c b/drivers/net/wireless/broadcom/b43/debugfs.c index aa6768a66b03..3d1c94d2d999 100644 --- a/drivers/net/wireless/broadcom/b43/debugfs.c +++ b/drivers/net/wireless/broadcom/b43/debugfs.c @@ -670,7 +670,7 @@ void b43_debugfs_add_device(struct b43_wldev *dev) char devdir[16]; B43_WARN_ON(!dev); - e = kzalloc_obj(*e, GFP_KERNEL); + e = kzalloc_obj(*e); if (!e) { b43err(dev->wl, "debugfs: add device OOM\n"); return; diff --git a/drivers/net/wireless/broadcom/b43/dma.c b/drivers/net/wireless/broadcom/b43/dma.c index eca39555718f..6eabe78c938a 100644 --- a/drivers/net/wireless/broadcom/b43/dma.c +++ b/drivers/net/wireless/broadcom/b43/dma.c @@ -838,7 +838,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, int i, err; dma_addr_t dma_test; - ring = kzalloc_obj(*ring, GFP_KERNEL); + ring = kzalloc_obj(*ring); if (!ring) goto out; diff --git a/drivers/net/wireless/broadcom/b43/lo.c b/drivers/net/wireless/broadcom/b43/lo.c index 6fcd7205bda3..f86e8969673f 100644 --- a/drivers/net/wireless/broadcom/b43/lo.c +++ b/drivers/net/wireless/broadcom/b43/lo.c @@ -766,7 +766,7 @@ struct b43_lo_calib *b43_calibrate_lo_setting(struct b43_wldev *dev, loctl.i, loctl.q); } - cal = kmalloc_obj(*cal, GFP_KERNEL); + cal = kmalloc_obj(*cal); if (!cal) { b43warn(dev->wl, "LO calib: out of memory\n"); return NULL; diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index 97e222e9e613..b0e6aeb0b872 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -2555,7 +2555,7 @@ static void b43_request_firmware(struct work_struct *work) int err; const char *errmsg; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return; ctx->dev = dev; @@ -5494,7 +5494,7 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl) struct b43_wldev *wldev; int err = -ENOMEM; - wldev = kzalloc_obj(*wldev, GFP_KERNEL); + wldev = kzalloc_obj(*wldev); if (!wldev) goto out; diff --git a/drivers/net/wireless/broadcom/b43/phy_ac.c b/drivers/net/wireless/broadcom/b43/phy_ac.c index 85af2d791d91..fe102ea3d1fa 100644 --- a/drivers/net/wireless/broadcom/b43/phy_ac.c +++ b/drivers/net/wireless/broadcom/b43/phy_ac.c @@ -17,7 +17,7 @@ static int b43_phy_ac_op_allocate(struct b43_wldev *dev) { struct b43_phy_ac *phy_ac; - phy_ac = kzalloc_obj(*phy_ac, GFP_KERNEL); + phy_ac = kzalloc_obj(*phy_ac); if (!phy_ac) return -ENOMEM; dev->phy.ac = phy_ac; diff --git a/drivers/net/wireless/broadcom/b43/phy_g.c b/drivers/net/wireless/broadcom/b43/phy_g.c index 94038d427b39..9e292a349674 100644 --- a/drivers/net/wireless/broadcom/b43/phy_g.c +++ b/drivers/net/wireless/broadcom/b43/phy_g.c @@ -2422,14 +2422,14 @@ static int b43_gphy_op_allocate(struct b43_wldev *dev) struct b43_txpower_lo_control *lo; int err; - gphy = kzalloc_obj(*gphy, GFP_KERNEL); + gphy = kzalloc_obj(*gphy); if (!gphy) { err = -ENOMEM; goto error; } dev->phy.g = gphy; - lo = kzalloc_obj(*lo, GFP_KERNEL); + lo = kzalloc_obj(*lo); if (!lo) { err = -ENOMEM; goto err_free_gphy; diff --git a/drivers/net/wireless/broadcom/b43/phy_ht.c b/drivers/net/wireless/broadcom/b43/phy_ht.c index a1a5e699caf1..fab8399c64f7 100644 --- a/drivers/net/wireless/broadcom/b43/phy_ht.c +++ b/drivers/net/wireless/broadcom/b43/phy_ht.c @@ -842,7 +842,7 @@ static int b43_phy_ht_op_allocate(struct b43_wldev *dev) { struct b43_phy_ht *phy_ht; - phy_ht = kzalloc_obj(*phy_ht, GFP_KERNEL); + phy_ht = kzalloc_obj(*phy_ht); if (!phy_ht) return -ENOMEM; dev->phy.ht = phy_ht; diff --git a/drivers/net/wireless/broadcom/b43/phy_lcn.c b/drivers/net/wireless/broadcom/b43/phy_lcn.c index 67b61a915aa2..dd726894738c 100644 --- a/drivers/net/wireless/broadcom/b43/phy_lcn.c +++ b/drivers/net/wireless/broadcom/b43/phy_lcn.c @@ -669,7 +669,7 @@ static int b43_phy_lcn_op_allocate(struct b43_wldev *dev) { struct b43_phy_lcn *phy_lcn; - phy_lcn = kzalloc_obj(*phy_lcn, GFP_KERNEL); + phy_lcn = kzalloc_obj(*phy_lcn); if (!phy_lcn) return -ENOMEM; dev->phy.lcn = phy_lcn; diff --git a/drivers/net/wireless/broadcom/b43/phy_lp.c b/drivers/net/wireless/broadcom/b43/phy_lp.c index 622d4fe3b613..8e0058072242 100644 --- a/drivers/net/wireless/broadcom/b43/phy_lp.c +++ b/drivers/net/wireless/broadcom/b43/phy_lp.c @@ -43,7 +43,7 @@ static int b43_lpphy_op_allocate(struct b43_wldev *dev) { struct b43_phy_lp *lpphy; - lpphy = kzalloc_obj(*lpphy, GFP_KERNEL); + lpphy = kzalloc_obj(*lpphy); if (!lpphy) return -ENOMEM; dev->phy.lp = lpphy; diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c index 768d9576be41..bbc30cbad0bb 100644 --- a/drivers/net/wireless/broadcom/b43/phy_n.c +++ b/drivers/net/wireless/broadcom/b43/phy_n.c @@ -1549,7 +1549,7 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max, len = bw << 1; } - samples = kzalloc_objs(struct cordic_iq, len, GFP_KERNEL); + samples = kzalloc_objs(struct cordic_iq, len); if (!samples) { b43err(dev->wl, "allocation for samples generation failed\n"); return 0; @@ -6417,7 +6417,7 @@ static int b43_nphy_op_allocate(struct b43_wldev *dev) { struct b43_phy_n *nphy; - nphy = kzalloc_obj(*nphy, GFP_KERNEL); + nphy = kzalloc_obj(*nphy); if (!nphy) return -ENOMEM; diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless/broadcom/b43/pio.c index 135091bec6c4..8358b1d5c298 100644 --- a/drivers/net/wireless/broadcom/b43/pio.c +++ b/drivers/net/wireless/broadcom/b43/pio.c @@ -127,7 +127,7 @@ static struct b43_pio_txqueue *b43_setup_pioqueue_tx(struct b43_wldev *dev, struct b43_pio_txpacket *p; unsigned int i; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; q->dev = dev; @@ -161,7 +161,7 @@ static struct b43_pio_rxqueue *b43_setup_pioqueue_rx(struct b43_wldev *dev, { struct b43_pio_rxqueue *q; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; q->dev = dev; diff --git a/drivers/net/wireless/broadcom/b43/sdio.c b/drivers/net/wireless/broadcom/b43/sdio.c index 8d19fe48831f..dda8d894aebe 100644 --- a/drivers/net/wireless/broadcom/b43/sdio.c +++ b/drivers/net/wireless/broadcom/b43/sdio.c @@ -139,7 +139,7 @@ static int b43_sdio_probe(struct sdio_func *func, } sdio_release_host(func); - sdio = kzalloc_obj(*sdio, GFP_KERNEL); + sdio = kzalloc_obj(*sdio); if (!sdio) { error = -ENOMEM; dev_err(&func->dev, "failed to allocate ssb bus\n"); diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c b/drivers/net/wireless/broadcom/b43legacy/debugfs.c index ec1f67f6d328..22811359d89d 100644 --- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c +++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c @@ -358,7 +358,7 @@ void b43legacy_debugfs_add_device(struct b43legacy_wldev *dev) char devdir[16]; B43legacy_WARN_ON(!dev); - e = kzalloc_obj(*e, GFP_KERNEL); + e = kzalloc_obj(*e); if (!e) { b43legacyerr(dev->wl, "debugfs: add device OOM\n"); return; diff --git a/drivers/net/wireless/broadcom/b43legacy/dma.c b/drivers/net/wireless/broadcom/b43legacy/dma.c index aff7e9161ffc..1608fd0a582b 100644 --- a/drivers/net/wireless/broadcom/b43legacy/dma.c +++ b/drivers/net/wireless/broadcom/b43legacy/dma.c @@ -610,7 +610,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, int nr_slots; dma_addr_t dma_test; - ring = kzalloc_obj(*ring, GFP_KERNEL); + ring = kzalloc_obj(*ring); if (!ring) goto out; ring->type = type; diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index 0873014a9299..aba1168ab728 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c @@ -3738,7 +3738,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev, struct b43legacy_wldev *wldev; int err = -ENOMEM; - wldev = kzalloc_obj(*wldev, GFP_KERNEL); + wldev = kzalloc_obj(*wldev); if (!wldev) goto out; diff --git a/drivers/net/wireless/broadcom/b43legacy/pio.c b/drivers/net/wireless/broadcom/b43legacy/pio.c index fd9b79710350..0274fe47ca7e 100644 --- a/drivers/net/wireless/broadcom/b43legacy/pio.c +++ b/drivers/net/wireless/broadcom/b43legacy/pio.c @@ -320,7 +320,7 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev, u32 value; u16 qsize; - queue = kzalloc_obj(*queue, GFP_KERNEL); + queue = kzalloc_obj(*queue); if (!queue) goto out; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index cf5cf1dce28d..28e5df04bd43 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -794,7 +794,7 @@ static int brcmf_sdiod_freezer_attach(struct brcmf_sdio_dev *sdiodev) if (!IS_ENABLED(CONFIG_PM_SLEEP)) return 0; - sdiodev->freezer = kzalloc_obj(*sdiodev->freezer, GFP_KERNEL); + sdiodev->freezer = kzalloc_obj(*sdiodev->freezer); if (!sdiodev->freezer) return -ENOMEM; atomic_set(&sdiodev->freezer->thread_count, 0); @@ -1067,10 +1067,10 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, if (func->num != 2) return -ENODEV; - bus_if = kzalloc_obj(*bus_if, GFP_KERNEL); + bus_if = kzalloc_obj(*bus_if); if (!bus_if) return -ENOMEM; - sdiodev = kzalloc_obj(*sdiodev, GFP_KERNEL); + sdiodev = kzalloc_obj(*sdiodev); if (!sdiodev) { kfree(bus_if); return -ENOMEM; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c index 5aa1dd33bf85..0ca7f8672803 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c @@ -362,7 +362,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg) struct brcmf_btcoex_info *btci; brcmf_dbg(TRACE, "enter\n"); - btci = kmalloc_obj(*btci, GFP_KERNEL); + btci = kmalloc_obj(*btci); if (!btci) return -ENOMEM; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a442c74423a6..cea02b33b798 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2527,7 +2527,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, offsetof(struct brcmf_assoc_params_le, chanspec_list); if (cfg->channel) join_params_size += sizeof(u16); - ext_join_params = kzalloc_obj(*ext_join_params, GFP_KERNEL); + ext_join_params = kzalloc_obj(*ext_join_params); if (ext_join_params == NULL) { err = -ENOMEM; goto done; @@ -4330,7 +4330,7 @@ brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa, int length = offsetof(struct brcmf_pmk_op_v3_le, pmk); int ret; - pmk_op = kzalloc_obj(*pmk_op, GFP_KERNEL); + pmk_op = kzalloc_obj(*pmk_op); if (!pmk_op) return -ENOMEM; @@ -5588,7 +5588,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, err = -EINVAL; goto exit; } - af_params = kzalloc_obj(*af_params, GFP_KERNEL); + af_params = kzalloc_obj(*af_params); if (af_params == NULL) { bphy_err(drvr, "unable to allocate frame\n"); err = -ENOMEM; @@ -6050,7 +6050,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_vif(struct brcmf_cfg80211_info *cfg, brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n", sizeof(*vif)); - vif = kzalloc_obj(*vif, GFP_KERNEL); + vif = kzalloc_obj(*vif); if (!vif) return ERR_PTR(-ENOMEM); @@ -6540,7 +6540,7 @@ brcmf_notify_connect_status_ap(struct brcmf_cfg80211_info *cfg, return -EINVAL; } - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; @@ -6828,7 +6828,7 @@ static void brcmf_deinit_priv_mem(struct brcmf_cfg80211_info *cfg) static s32 brcmf_init_priv_mem(struct brcmf_cfg80211_info *cfg) { - cfg->conf = kzalloc_obj(*cfg->conf, GFP_KERNEL); + cfg->conf = kzalloc_obj(*cfg->conf); if (!cfg->conf) goto init_priv_mem_out; cfg->extra_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); @@ -7486,7 +7486,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) mchan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN); n_combos = 1 + !!(p2p && !rsdb) + !!mbss; - combo = kzalloc_objs(*combo, n_combos, GFP_KERNEL); + combo = kzalloc_objs(*combo, n_combos); if (!combo) goto err; @@ -7503,7 +7503,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) c = 0; i = 0; n_limits = 1 + mon_flag + (p2p ? 2 : 0) + (rsdb || !p2p); - c0_limits = kzalloc_objs(*c0_limits, n_limits, GFP_KERNEL); + c0_limits = kzalloc_objs(*c0_limits, n_limits); if (!c0_limits) goto err; @@ -7542,7 +7542,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) if (p2p && !rsdb) { c++; i = 0; - p2p_limits = kzalloc_objs(*p2p_limits, 4, GFP_KERNEL); + p2p_limits = kzalloc_objs(*p2p_limits, 4); if (!p2p_limits) goto err; p2p_limits[i].max = 1; @@ -7563,7 +7563,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) c++; i = 0; n_limits = 1 + mon_flag; - mbss_limits = kzalloc_objs(*mbss_limits, n_limits, GFP_KERNEL); + mbss_limits = kzalloc_objs(*mbss_limits, n_limits); if (!mbss_limits) goto err; mbss_limits[i].max = 4; @@ -8321,7 +8321,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, return NULL; } - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) { bphy_err(drvr, "Could not allocate wiphy device\n"); return NULL; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index a3bbbb76dd97..a790f1693b82 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -507,7 +507,7 @@ static struct brcmf_core *brcmf_chip_add_core(struct brcmf_chip_priv *ci, { struct brcmf_core_priv *core; - core = kzalloc_obj(*core, GFP_KERNEL); + core = kzalloc_obj(*core); if (!core) return ERR_PTR(-ENOMEM); @@ -1137,7 +1137,7 @@ struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, if (err < 0) return ERR_PTR(-EINVAL); - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index 99d5fd453cf1..ec170647800d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -879,7 +879,7 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, if (!drvr->settings->p2p_enable && is_p2pdev) { /* this is P2P_DEVICE interface */ brcmf_dbg(INFO, "allocate non-netdev interface\n"); - ifp = kzalloc_obj(*ifp, GFP_KERNEL); + ifp = kzalloc_obj(*ifp); if (!ifp) return ERR_PTR(-ENOMEM); } else { diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c index 7b3b0bd1acaf..9d05a0f656f4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c @@ -765,7 +765,7 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req, if (!brcmf_fw_request_is_valid(req)) return -EINVAL; - fwctx = kzalloc_obj(*fwctx, GFP_KERNEL); + fwctx = kzalloc_obj(*fwctx); if (!fwctx) return -ENOMEM; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c index 9184022600d6..df7e3bee19f2 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c @@ -360,7 +360,7 @@ struct brcmf_flowring *brcmf_flowring_attach(struct device *dev, u16 nrofrings) struct brcmf_flowring *flow; u32 i; - flow = kzalloc_obj(*flow, GFP_KERNEL); + flow = kzalloc_obj(*flow); if (flow) { flow->dev = dev; flow->nrofrings = nrofrings; @@ -369,7 +369,7 @@ struct brcmf_flowring *brcmf_flowring_attach(struct device *dev, u16 nrofrings) flow->addr_mode[i] = ADDR_INDIRECT; for (i = 0; i < ARRAY_SIZE(flow->hash); i++) flow->hash[i].ifidx = BRCMF_FLOWRING_INVALID_IFIDX; - flow->rings = kzalloc_objs(*flow->rings, nrofrings, GFP_KERNEL); + flow->rings = kzalloc_objs(*flow->rings, nrofrings); if (!flow->rings) { kfree(flow); flow = NULL; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c index b6fab5eb6002..a43f1a38b0e3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c @@ -2342,7 +2342,7 @@ struct brcmf_fws_info *brcmf_fws_attach(struct brcmf_pub *drvr) int rc; u32 mode; - fws = kzalloc_obj(*fws, GFP_KERNEL); + fws = kzalloc_obj(*fws); if (!fws) { rc = -ENOMEM; goto fail; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c index 7252cdb6d87a..a88abe390aee 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -299,11 +299,11 @@ brcmf_msgbuf_init_pktids(u32 nr_array_entries, struct brcmf_msgbuf_pktid *array; struct brcmf_msgbuf_pktids *pktids; - array = kzalloc_objs(*array, nr_array_entries, GFP_KERNEL); + array = kzalloc_objs(*array, nr_array_entries); if (!array) return NULL; - pktids = kzalloc_obj(*pktids, GFP_KERNEL); + pktids = kzalloc_obj(*pktids); if (!pktids) { kfree(array); return NULL; @@ -1539,7 +1539,7 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) if_msgbuf->max_flowrings = BRCMF_FLOWRING_HASHSIZE - 1; } - msgbuf = kzalloc_obj(*msgbuf, GFP_KERNEL); + msgbuf = kzalloc_obj(*msgbuf); if (!msgbuf) goto fail; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index d15b98273cd3..beb33003fe54 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -1155,7 +1155,7 @@ brcmf_pcie_alloc_dma_and_ring(struct brcmf_pciedev_info *devinfo, u32 ring_id, addr = tcm_ring_phys_addr + BRCMF_RING_LEN_ITEMS_OFFSET; brcmf_pcie_write_tcm16(devinfo, addr, ring_itemsize_array[ring_id]); - ring = kzalloc_obj(*ring, GFP_KERNEL); + ring = kzalloc_obj(*ring); if (!ring) { dma_free_coherent(&devinfo->pdev->dev, size, dma_buf, dma_handle); @@ -1347,7 +1347,7 @@ static int brcmf_pcie_init_ringbuffers(struct brcmf_pciedev_info *devinfo) devinfo->shared.max_flowrings = max_flowrings; devinfo->shared.max_submissionrings = max_submissionrings; devinfo->shared.max_completionrings = max_completionrings; - rings = kzalloc_objs(*ring, max_flowrings, GFP_KERNEL); + rings = kzalloc_objs(*ring, max_flowrings); if (!rings) goto fail; @@ -2457,7 +2457,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device); ret = -ENOMEM; - devinfo = kzalloc_obj(*devinfo, GFP_KERNEL); + devinfo = kzalloc_obj(*devinfo); if (devinfo == NULL) return ret; @@ -2477,7 +2477,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) else devinfo->reginfo = &brcmf_reginfo_default; - pcie_bus_dev = kzalloc_obj(*pcie_bus_dev, GFP_KERNEL); + pcie_bus_dev = kzalloc_obj(*pcie_bus_dev); if (pcie_bus_dev == NULL) { ret = -ENOMEM; goto fail; @@ -2495,12 +2495,12 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret < 0) goto fail; - bus = kzalloc_obj(*bus, GFP_KERNEL); + bus = kzalloc_obj(*bus); if (!bus) { ret = -ENOMEM; goto fail; } - bus->msgbuf = kzalloc_obj(*bus->msgbuf, GFP_KERNEL); + bus->msgbuf = kzalloc_obj(*bus->msgbuf); if (!bus->msgbuf) { ret = -ENOMEM; kfree(bus); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c index 34179e69d77d..d9fc94076791 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c @@ -321,7 +321,7 @@ static int brcmf_pno_prep_fwconfig(struct brcmf_pno_info *pi, } *buckets = NULL; - fw_buckets = kzalloc_objs(*fw_buckets, pi->n_reqs, GFP_KERNEL); + fw_buckets = kzalloc_objs(*fw_buckets, pi->n_reqs); if (!fw_buckets) return -ENOMEM; @@ -517,7 +517,7 @@ int brcmf_pno_attach(struct brcmf_cfg80211_info *cfg) struct brcmf_pno_info *pi; brcmf_dbg(TRACE, "enter\n"); - pi = kzalloc_obj(*pi, GFP_KERNEL); + pi = kzalloc_obj(*pi); if (!pi) return -ENOMEM; diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index a39985e4a977..e045208e2531 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -3153,7 +3153,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len) if (!virts) return -ENOMEM; - phys = kmalloc_objs(dma_addr_t, CB_NUMBER_OF_ELEMENTS_SMALL, GFP_KERNEL); + phys = kmalloc_objs(dma_addr_t, CB_NUMBER_OF_ELEMENTS_SMALL); if (!phys) { kfree(virts); return -ENOMEM; @@ -3722,7 +3722,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv, { struct pci_dev *dev = priv->pci_dev; - q->txb = kmalloc_objs(q->txb[0], count, GFP_KERNEL); + q->txb = kmalloc_objs(q->txb[0], count); if (!q->txb) return -ENOMEM; @@ -5200,7 +5200,7 @@ static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv) struct ipw_rx_queue *rxq; int i; - rxq = kzalloc_obj(*rxq, GFP_KERNEL); + rxq = kzalloc_obj(*rxq); if (unlikely(!rxq)) { IPW_ERROR("memory allocation failed\n"); return NULL; @@ -11118,7 +11118,7 @@ static int ipw_up(struct ipw_priv *priv) return -EIO; if (cmdlog && !priv->cmdlog) { - priv->cmdlog = kzalloc_objs(*priv->cmdlog, cmdlog, GFP_KERNEL); + priv->cmdlog = kzalloc_objs(*priv->cmdlog, cmdlog); if (priv->cmdlog == NULL) { IPW_ERROR("Error allocating %d command log entries.\n", cmdlog); diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_crypto.c b/drivers/net/wireless/intel/ipw2x00/libipw_crypto.c index e39b95f68dd4..af03114fdf6c 100644 --- a/drivers/net/wireless/intel/ipw2x00/libipw_crypto.c +++ b/drivers/net/wireless/intel/ipw2x00/libipw_crypto.c @@ -159,7 +159,7 @@ int libipw_register_crypto_ops(const struct libipw_crypto_ops *ops) unsigned long flags; struct libipw_crypto_alg *alg; - alg = kzalloc_obj(*alg, GFP_KERNEL); + alg = kzalloc_obj(*alg); if (alg == NULL) return -ENOMEM; diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_wx.c b/drivers/net/wireless/intel/ipw2x00/libipw_wx.c index 3db31b740a0e..122bcbae188f 100644 --- a/drivers/net/wireless/intel/ipw2x00/libipw_wx.c +++ b/drivers/net/wireless/intel/ipw2x00/libipw_wx.c @@ -365,7 +365,7 @@ int libipw_wx_set_encode(struct libipw_device *ieee, struct libipw_crypt_data *new_crypt; /* take WEP into use */ - new_crypt = kzalloc_obj(struct libipw_crypt_data, GFP_KERNEL); + new_crypt = kzalloc_obj(struct libipw_crypt_data); if (new_crypt == NULL) return -ENOMEM; new_crypt->ops = libipw_get_crypto_ops("WEP"); @@ -597,7 +597,7 @@ int libipw_wx_set_encodeext(struct libipw_device *ieee, libipw_crypt_delayed_deinit(&ieee->crypt_info, crypt); - new_crypt = kzalloc_obj(*new_crypt, GFP_KERNEL); + new_crypt = kzalloc_obj(*new_crypt); if (new_crypt == NULL) { ret = -ENOMEM; goto done; diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index c87579e4c7f9..c148654aa953 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -269,7 +269,7 @@ il3945_get_free_frame(struct il_priv *il) struct il3945_frame *frame; struct list_head *element; if (list_empty(&il->free_frames)) { - frame = kzalloc_obj(*frame, GFP_KERNEL); + frame = kzalloc_obj(*frame); if (!frame) { IL_ERR("Could not allocate frame!\n"); return NULL; diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index 8429b6f5768b..7921bc45e21d 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -3027,7 +3027,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id) u32 rate_flags = 0; __le32 rate_n_flags; - link_cmd = kzalloc_obj(struct il_link_quality_cmd, GFP_KERNEL); + link_cmd = kzalloc_obj(struct il_link_quality_cmd); if (!link_cmd) { IL_ERR("Unable to allocate memory for LQ cmd.\n"); return NULL; @@ -3709,7 +3709,7 @@ il4965_get_free_frame(struct il_priv *il) struct il_frame *frame; struct list_head *element; if (list_empty(&il->free_frames)) { - frame = kzalloc_obj(*frame, GFP_KERNEL); + frame = kzalloc_obj(*frame); if (!frame) { IL_ERR("Could not allocate frame!\n"); return NULL; diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index 4a12703e9b46..c9efb948f6c7 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c @@ -907,7 +907,7 @@ il_init_channel_map(struct il_priv *il) D_EEPROM("Parsing data for %d channels.\n", il->channel_count); il->channel_info = - kzalloc_objs(struct il_channel_info, il->channel_count, GFP_KERNEL); + kzalloc_objs(struct il_channel_info, il->channel_count); if (!il->channel_info) { IL_ERR("Could not allocate channel_info\n"); il->channel_count = 0; @@ -3022,9 +3022,9 @@ il_tx_queue_init(struct il_priv *il, u32 txq_id) } txq->meta = - kzalloc_objs(struct il_cmd_meta, actual_slots, GFP_KERNEL); + kzalloc_objs(struct il_cmd_meta, actual_slots); txq->cmd = - kzalloc_objs(struct il_device_cmd *, actual_slots, GFP_KERNEL); + kzalloc_objs(struct il_device_cmd *, actual_slots); if (!txq->meta || !txq->cmd) goto out_free_arrays; @@ -3447,7 +3447,7 @@ il_init_geos(struct il_priv *il) if (!channels) return -ENOMEM; - rates = kzalloc_objs(*rates, RATE_COUNT_LEGACY, GFP_KERNEL); + rates = kzalloc_objs(*rates, RATE_COUNT_LEGACY); if (!rates) { kfree(channels); return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c index 5c8665b5a1b7..7f83f1bbdaad 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c @@ -567,7 +567,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, }; int err; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c index bc14ed3060dd..2e16799818e4 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c @@ -1056,7 +1056,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan) int ret, i; u16 seq; - key_data.rsc_tsc = kzalloc_obj(*key_data.rsc_tsc, GFP_KERNEL); + key_data.rsc_tsc = kzalloc_obj(*key_data.rsc_tsc); if (!key_data.rsc_tsc) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c index ec30b5f3870b..ca5a8140908a 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c @@ -205,7 +205,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) /* Allocate beacon command */ if (!priv->beacon_cmd) - priv->beacon_cmd = kzalloc_obj(*tx_beacon_cmd, GFP_KERNEL); + priv->beacon_cmd = kzalloc_obj(*tx_beacon_cmd); tx_beacon_cmd = priv->beacon_cmd; if (!tx_beacon_cmd) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c index b29859f9d7c0..b6e3824fcda8 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c @@ -864,7 +864,7 @@ iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, { struct iwl_link_quality_cmd *link_cmd; - link_cmd = kzalloc_obj(struct iwl_link_quality_cmd, GFP_KERNEL); + link_cmd = kzalloc_obj(struct iwl_link_quality_cmd); if (!link_cmd) { IWL_ERR(priv, "Unable to allocate memory for LQ cmd.\n"); return NULL; diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index a070593e085f..402842e0dad4 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -595,7 +595,7 @@ static struct scatterlist *alloc_sgtable(ssize_t size) nents -= n_fill; } - new = kzalloc_objs(*new, n_alloc, GFP_KERNEL); + new = kzalloc_objs(*new, n_alloc); if (!new) { if (result) _devcd_free_sgtable(result); diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c index 21d889344796..ddee7c2deb36 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c @@ -360,7 +360,7 @@ static void *iwl_dbgfs_fw_info_seq_start(struct seq_file *seq, loff_t *pos) if (*pos >= fw->ucode_capa.n_cmd_versions) return NULL; - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) return NULL; state->pos = *pos; diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c index a45c3a9c223e..afff8d51ca95 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c @@ -379,7 +379,7 @@ iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans, return; } - pnvm_data = kzalloc_obj(*pnvm_data, GFP_KERNEL); + pnvm_data = kzalloc_obj(*pnvm_data); if (!pnvm_data) goto free; @@ -425,7 +425,7 @@ iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans, return; } - pnvm_data = kzalloc_obj(*pnvm_data, GFP_KERNEL); + pnvm_data = kzalloc_obj(*pnvm_data); if (!pnvm_data) goto free; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c index a6733224428a..ac8b64fec96d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c @@ -618,7 +618,7 @@ static int iwl_dbg_tlv_alloc_fragments(struct iwl_fw_runtime *fwrt, num_frags = min_t(u32, num_frags, remain_pages); frag_pages = DIV_ROUND_UP(remain_pages, num_frags); - fw_mon->frags = kzalloc_objs(*fw_mon->frags, num_frags, GFP_KERNEL); + fw_mon->frags = kzalloc_objs(*fw_mon->frags, num_frags); if (!fw_mon->frags) return -ENOMEM; @@ -1001,7 +1001,7 @@ static void iwl_dbg_tlv_set_periodic_trigs(struct iwl_fw_runtime *fwrt) collect_interval = le32_to_cpu(trig->data[0]); - timer_node = kzalloc_obj(*timer_node, GFP_KERNEL); + timer_node = kzalloc_obj(*timer_node); if (!timer_node) { IWL_ERR(fwrt, "WRT: Failed to allocate periodic trigger\n"); diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 39e362df0233..475b3e417efa 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -1459,7 +1459,7 @@ static int iwl_alloc_ucode_mem(struct fw_img *out, struct fw_img_parsing *img) { struct fw_desc *sec; - sec = kzalloc_objs(*sec, img->sec_counter, GFP_KERNEL); + sec = kzalloc_objs(*sec, img->sec_counter); if (!sec) return -ENOMEM; @@ -1622,7 +1622,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) /* dump all fw memory areas by default */ fw->dbg.dump_mask = 0xffffffff; - pieces = kzalloc_obj(*pieces, GFP_KERNEL); + pieces = kzalloc_obj(*pieces); if (!pieces) goto out_free_fw; @@ -1915,7 +1915,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) struct iwl_drv *drv; int ret; - drv = kzalloc_obj(*drv, GFP_KERNEL); + drv = kzalloc_obj(*drv); if (!drv) { ret = -ENOMEM; goto err; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c index a5e287daf440..0a87deea3474 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c @@ -59,7 +59,7 @@ struct iwl_phy_db_chg_txp { struct iwl_phy_db *iwl_phy_db_init(struct iwl_trans *trans) { - struct iwl_phy_db *phy_db = kzalloc_obj(struct iwl_phy_db, GFP_KERNEL); + struct iwl_phy_db *phy_db = kzalloc_obj(struct iwl_phy_db); if (!phy_db) return phy_db; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c index eebec9b8c169..89901786fd68 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c @@ -113,7 +113,7 @@ static void iwl_trans_schedule_reprobe(struct iwl_trans *trans, return; } - reprobe = kzalloc_obj(*reprobe, GFP_KERNEL); + reprobe = kzalloc_obj(*reprobe); if (!reprobe) { module_put(THIS_MODULE); return; diff --git a/drivers/net/wireless/intel/iwlwifi/mei/main.c b/drivers/net/wireless/intel/iwlwifi/mei/main.c index f9358cb01103..c5ff1b1b720f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/main.c +++ b/drivers/net/wireless/intel/iwlwifi/mei/main.c @@ -702,7 +702,7 @@ static void iwl_mei_handle_csme_filters(struct mei_cl_device *cldev, rcu_dereference_protected(mei->filters, lockdep_is_held(&iwl_mei_mutex)); - new_filters = kzalloc_obj(*new_filters, GFP_KERNEL); + new_filters = kzalloc_obj(*new_filters); if (!new_filters) return; @@ -886,7 +886,7 @@ static void iwl_mei_handle_nvm(struct mei_cl_device *cldev, int i; kfree(mei->nvm); - mei->nvm = kzalloc_obj(*mei_nvm, GFP_KERNEL); + mei->nvm = kzalloc_obj(*mei_nvm); if (!mei->nvm) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c index e7849183dff1..5ececb849786 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c @@ -1654,7 +1654,7 @@ iwl_mld_suspend_send_security_cmds(struct iwl_mld *mld, struct iwl_mld_suspend_key_iter_data data = {}; int ret; - data.rsc = kzalloc_obj(*data.rsc, GFP_KERNEL); + data.rsc = kzalloc_obj(*data.rsc); if (!data.rsc) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c index b418cbeb30aa..29df747c8938 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c @@ -542,7 +542,7 @@ void iwl_mld_handle_probe_resp_data_notif(struct iwl_mld *mld, notif->noa_attr.len_low)) return; - new_data = kzalloc_obj(*new_data, GFP_KERNEL); + new_data = kzalloc_obj(*new_data); if (!new_data) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.c b/drivers/net/wireless/intel/iwlwifi/mld/link.c index 5640de4662d7..b5430e8a73d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.c @@ -468,7 +468,7 @@ int iwl_mld_add_link(struct iwl_mld *mld, if (is_deflink) { link = &mld_vif->deflink; } else { - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) return -ENOMEM; } diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c index 0869f2ee7cee..3f0d093f2c5e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -539,7 +539,7 @@ iwl_mld_add_link_sta(struct iwl_mld *mld, struct ieee80211_link_sta *link_sta) if (link_sta == &link_sta->sta->deflink) { mld_link_sta = &mld_sta->deflink; } else { - mld_link_sta = kzalloc_obj(*mld_link_sta, GFP_KERNEL); + mld_link_sta = kzalloc_obj(*mld_link_sta); if (!mld_link_sta) return -ENOMEM; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 8df70323d426..66f4b3c98580 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -460,7 +460,7 @@ static int iwl_mvm_wowlan_config_rsc_tsc(struct iwl_mvm *mvm, struct wowlan_key_rsc_v5_data data = {}; int i; - data.rsc = kzalloc_obj(*data.rsc, GFP_KERNEL); + data.rsc = kzalloc_obj(*data.rsc); if (!data.rsc) return -ENOMEM; @@ -483,7 +483,7 @@ static int iwl_mvm_wowlan_config_rsc_tsc(struct iwl_mvm *mvm, } else if (ver == 2 || ver == IWL_FW_CMD_VER_UNKNOWN) { struct wowlan_key_rsc_tsc_data data = {}; - data.rsc_tsc = kzalloc_obj(*data.rsc_tsc, GFP_KERNEL); + data.rsc_tsc = kzalloc_obj(*data.rsc_tsc); if (!data.rsc_tsc) return -ENOMEM; @@ -3091,7 +3091,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm) } if (resume_notif_based) { - d3_data.status = kzalloc_obj(*d3_data.status, GFP_KERNEL); + d3_data.status = kzalloc_obj(*d3_data.status); if (!d3_data.status) { IWL_ERR(mvm, "Failed to allocate wowlan status\n"); ret = -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c index 0a21670a9207..ebc569e94f55 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c @@ -1124,7 +1124,7 @@ static void iwl_mvm_ftm_rtt_smoothing(struct iwl_mvm *mvm, } if (!resp) { - resp = kzalloc_obj(*resp, GFP_KERNEL); + resp = kzalloc_obj(*resp); if (!resp) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index a633f0d9c821..c523c5e82d4a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1764,7 +1764,7 @@ void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm, notif->noa_attr.len_low)) return; - new_data = kzalloc_obj(*new_data, GFP_KERNEL); + new_data = kzalloc_obj(*new_data); if (!new_data) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 00ba47d5f499..896ed9823021 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -905,7 +905,7 @@ iwl_mvm_mld_change_vif_links(struct ieee80211_hw *hw, if (!(added & BIT(i))) continue; - new_link[i] = kzalloc_obj(*new_link[i], GFP_KERNEL); + new_link[i] = kzalloc_obj(*new_link[i]); if (!new_link[i]) { err = -ENOMEM; goto free; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 8417b76e8fdb..3359e02e151f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -547,7 +547,7 @@ static int iwl_mvm_mld_alloc_sta_link(struct iwl_mvm *mvm, if (rcu_access_pointer(sta->link[link_id]) == &sta->deflink) { link = &mvm_sta->deflink; } else { - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) return -ENOMEM; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index be328607e6f8..ae177477b201 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -1097,7 +1097,7 @@ static void iwl_mvm_me_conn_status(void *priv, const struct iwl_mei_conn_info *c */ prev_conn_info = rcu_dereference_protected(mvm->csme_conn_info, true); - curr_conn_info = kzalloc_obj(*curr_conn_info, GFP_KERNEL); + curr_conn_info = kzalloc_obj(*curr_conn_info); if (!curr_conn_info) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 3e39c243ddca..966558885ea6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -547,7 +547,7 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm, else blocklist_len = IWL_SCAN_MAX_BLACKLIST_LEN; - blocklist = kzalloc_objs(*blocklist, blocklist_len, GFP_KERNEL); + blocklist = kzalloc_objs(*blocklist, blocklist_len); if (!blocklist) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c index 65b54f1e6347..d5eb895144ef 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c @@ -99,10 +99,10 @@ int iwl_pcie_init_fw_sec(struct iwl_trans *trans, /* add 2 due to separators */ paging_cnt = iwl_pcie_get_num_sections(fw, lmac_cnt + umac_cnt + 2); - dram->fw = kzalloc_objs(*dram->fw, umac_cnt + lmac_cnt, GFP_KERNEL); + dram->fw = kzalloc_objs(*dram->fw, umac_cnt + lmac_cnt); if (!dram->fw) return -ENOMEM; - dram->paging = kzalloc_objs(*dram->paging, paging_cnt, GFP_KERNEL); + dram->paging = kzalloc_objs(*dram->paging, paging_cnt); if (!dram->paging) return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c index ec88aefb0913..4560d92d76fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c @@ -2748,7 +2748,7 @@ static void *iwl_dbgfs_tx_queue_seq_start(struct seq_file *seq, loff_t *pos) if (*pos >= priv->trans->mac_cfg->base->num_of_queues) return NULL; - state = kmalloc_obj(*state, GFP_KERNEL); + state = kmalloc_obj(*state); if (!state) return NULL; state->pos = *pos; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c index f2752ab4c402..bda9f807321e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c @@ -928,7 +928,7 @@ iwl_txq_dyn_alloc_dma(struct iwl_trans *trans, int size, unsigned int timeout) if (WARN_ON(size > bc_tbl_entries)) return ERR_PTR(-EINVAL); - txq = kzalloc_obj(*txq, GFP_KERNEL); + txq = kzalloc_obj(*txq); if (!txq) return ERR_PTR(-ENOMEM); @@ -1152,7 +1152,7 @@ int iwl_txq_gen2_init(struct iwl_trans *trans, int txq_id, int queue_size) /* alloc and init the tx queue */ if (!trans_pcie->txqs.txq[txq_id]) { - queue = kzalloc_obj(*queue, GFP_KERNEL); + queue = kzalloc_obj(*queue); if (!queue) { IWL_ERR(trans, "Not enough memory for tx queue\n"); return -ENOMEM; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c index 0b817e5c5679..0de3f5de237e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c @@ -750,7 +750,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq, if (cmd_queue) for (i = 0; i < slots_num; i++) { txq->entries[i].cmd = - kmalloc_obj(struct iwl_device_cmd, GFP_KERNEL); + kmalloc_obj(struct iwl_device_cmd); if (!txq->entries[i].cmd) goto error; } diff --git a/drivers/net/wireless/intersil/p54/eeprom.c b/drivers/net/wireless/intersil/p54/eeprom.c index c338a7a7fc41..1c49aad5d5f8 100644 --- a/drivers/net/wireless/intersil/p54/eeprom.c +++ b/drivers/net/wireless/intersil/p54/eeprom.c @@ -154,7 +154,7 @@ static int p54_generate_band(struct ieee80211_hw *dev, if ((!list->entries) || (!list->band_channel_num[band])) return -EINVAL; - tmp = kzalloc_obj(*tmp, GFP_KERNEL); + tmp = kzalloc_obj(*tmp); if (!tmp) goto err_out; @@ -335,7 +335,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev) max_channel_num = max_t(unsigned int, max_channel_num, priv->curve_data->entries); - list = kzalloc_obj(*list, GFP_KERNEL); + list = kzalloc_obj(*list); if (!list) { ret = -ENOMEM; goto free; diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c index 331b0b69ce62..98517888dba7 100644 --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c @@ -2094,7 +2094,7 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev) int ret = 0; struct wireless_dev *wdev; - wdev = kzalloc_obj(struct wireless_dev, GFP_KERNEL); + wdev = kzalloc_obj(struct wireless_dev); if (!wdev) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/wireless/marvell/libertas/debugfs.c b/drivers/net/wireless/marvell/libertas/debugfs.c index d2dc9128dae2..9ebd69134940 100644 --- a/drivers/net/wireless/marvell/libertas/debugfs.c +++ b/drivers/net/wireless/marvell/libertas/debugfs.c @@ -232,7 +232,7 @@ static ssize_t lbs_threshold_read(uint16_t tlv_type, uint16_t event_mask, if (!buf) return -ENOMEM; - subscribed = kzalloc_obj(*subscribed, GFP_KERNEL); + subscribed = kzalloc_obj(*subscribed); if (!subscribed) { ret = -ENOMEM; goto out_page; @@ -288,7 +288,7 @@ static ssize_t lbs_threshold_write(uint16_t tlv_type, uint16_t event_mask, ret = -EINVAL; goto out_page; } - events = kzalloc_obj(*events, GFP_KERNEL); + events = kzalloc_obj(*events); if (!events) { ret = -ENOMEM; goto out_page; diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c index b814cf9032ad..dd6756c1242e 100644 --- a/drivers/net/wireless/marvell/libertas/if_sdio.c +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c @@ -1158,7 +1158,7 @@ static int if_sdio_probe(struct sdio_func *func, return -ENODEV; } - card = kzalloc_obj(struct if_sdio_card, GFP_KERNEL); + card = kzalloc_obj(struct if_sdio_card); if (!card) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c b/drivers/net/wireless/marvell/libertas/if_spi.c index a21f7bba13c5..b22d1e65f552 100644 --- a/drivers/net/wireless/marvell/libertas/if_spi.c +++ b/drivers/net/wireless/marvell/libertas/if_spi.c @@ -1113,7 +1113,7 @@ static int if_spi_probe(struct spi_device *spi) } /* Allocate card structure to represent this specific device */ - card = kzalloc_obj(struct if_spi_card, GFP_KERNEL); + card = kzalloc_obj(struct if_spi_card); if (!card) { err = -ENOMEM; goto teardown; diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c index e02756d7e87a..8a6bf1365cfa 100644 --- a/drivers/net/wireless/marvell/libertas/if_usb.c +++ b/drivers/net/wireless/marvell/libertas/if_usb.c @@ -203,7 +203,7 @@ static int if_usb_probe(struct usb_interface *intf, udev = interface_to_usbdev(intf); - cardp = kzalloc_obj(struct if_usb_card, GFP_KERNEL); + cardp = kzalloc_obj(struct if_usb_card); if (!cardp) goto error; diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c index aa94b777da13..fced7485d015 100644 --- a/drivers/net/wireless/marvell/libertas/mesh.c +++ b/drivers/net/wireless/marvell/libertas/mesh.c @@ -983,7 +983,7 @@ static int lbs_add_mesh(struct lbs_private *priv) int ret = 0; /* Allocate a virtual mesh device */ - mesh_wdev = kzalloc_obj(struct wireless_dev, GFP_KERNEL); + mesh_wdev = kzalloc_obj(struct wireless_dev); if (!mesh_wdev) { lbs_deb_mesh("init mshX wireless device failed\n"); ret = -ENOMEM; diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c index 44c609205422..f49151c18b79 100644 --- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c +++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c @@ -154,7 +154,7 @@ static int if_usb_probe(struct usb_interface *intf, lbtf_deb_enter(LBTF_DEB_USB); udev = interface_to_usbdev(intf); - cardp = kzalloc_obj(struct if_usb_card, GFP_KERNEL); + cardp = kzalloc_obj(struct if_usb_card); if (!cardp) goto error; diff --git a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c index c00b385c0f58..610ec8302adf 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c @@ -344,7 +344,7 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta, return; } /* if !tbl then create one */ - new_node = kzalloc_obj(struct mwifiex_rx_reorder_tbl, GFP_KERNEL); + new_node = kzalloc_obj(struct mwifiex_rx_reorder_tbl); if (!new_node) return; diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index f387b26b086b..63d9ccc5a81c 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -756,7 +756,7 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx, return -EINVAL; } - bss_cfg = kzalloc_obj(*bss_cfg, GFP_KERNEL); + bss_cfg = kzalloc_obj(*bss_cfg); if (!bss_cfg) return -ENOMEM; @@ -2073,7 +2073,7 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_UAP) return -1; - bss_cfg = kzalloc_obj(struct mwifiex_uap_bss_param, GFP_KERNEL); + bss_cfg = kzalloc_obj(struct mwifiex_uap_bss_param); if (!bss_cfg) return -ENOMEM; @@ -2683,7 +2683,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, if (!mwifiex_stop_bg_scan(priv)) cfg80211_sched_scan_stopped_locked(priv->wdev.wiphy, 0); - user_scan_cfg = kzalloc_obj(*user_scan_cfg, GFP_KERNEL); + user_scan_cfg = kzalloc_obj(*user_scan_cfg); if (!user_scan_cfg) return -ENOMEM; @@ -2787,7 +2787,7 @@ mwifiex_cfg80211_sched_scan_start(struct wiphy *wiphy, request->n_channels, request->scan_plans->interval, (int)request->ie_len); - bgscan_cfg = kzalloc_obj(*bgscan_cfg, GFP_KERNEL); + bgscan_cfg = kzalloc_obj(*bgscan_cfg); if (!bgscan_cfg) return -ENOMEM; @@ -3452,7 +3452,7 @@ static int mwifiex_set_mef_filter(struct mwifiex_private *priv, if (wowlan->n_patterns || wowlan->magic_pkt) num_entries++; - mef_entry = kzalloc_objs(*mef_entry, num_entries, GFP_KERNEL); + mef_entry = kzalloc_objs(*mef_entry, num_entries); if (!mef_entry) return -ENOMEM; @@ -3989,7 +3989,7 @@ mwifiex_cfg80211_uap_add_station(struct mwifiex_private *priv, const u8 *mac, if (!ret) { struct station_info *sinfo; - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; @@ -4161,7 +4161,7 @@ static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, if (!tb[MWIFIEX_TM_ATTR_DATA]) return -EINVAL; - hostcmd = kzalloc_obj(*hostcmd, GFP_KERNEL); + hostcmd = kzalloc_obj(*hostcmd); if (!hostcmd) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/ie.c b/drivers/net/wireless/marvell/mwifiex/ie.c index 55af5e9b5bee..6e4074bfc0c8 100644 --- a/drivers/net/wireless/marvell/mwifiex/ie.c +++ b/drivers/net/wireless/marvell/mwifiex/ie.c @@ -149,7 +149,7 @@ mwifiex_update_uap_custom_ie(struct mwifiex_private *priv, u16 len; int ret; - ap_custom_ie = kzalloc_obj(*ap_custom_ie, GFP_KERNEL); + ap_custom_ie = kzalloc_obj(*ap_custom_ie); if (!ap_custom_ie) return -ENOMEM; @@ -221,7 +221,7 @@ static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len); if (vendor_ie) { if (!*ie_ptr) { - *ie_ptr = kzalloc_obj(struct mwifiex_ie, GFP_KERNEL); + *ie_ptr = kzalloc_obj(struct mwifiex_ie); if (!*ie_ptr) return -ENOMEM; ie = *ie_ptr; @@ -325,7 +325,7 @@ static int mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv, if (!info->tail || !info->tail_len) return 0; - gen_ie = kzalloc_obj(*gen_ie, GFP_KERNEL); + gen_ie = kzalloc_obj(*gen_ie); if (!gen_ie) return -ENOMEM; @@ -438,7 +438,7 @@ int mwifiex_del_mgmt_ies(struct mwifiex_private *priv) int ret = 0; if (priv->gen_idx != MWIFIEX_AUTO_IDX_MASK) { - gen_ie = kmalloc_obj(*gen_ie, GFP_KERNEL); + gen_ie = kmalloc_obj(*gen_ie); if (!gen_ie) return -ENOMEM; @@ -456,7 +456,7 @@ int mwifiex_del_mgmt_ies(struct mwifiex_private *priv) } if (priv->beacon_idx != MWIFIEX_AUTO_IDX_MASK) { - beacon_ie = kmalloc_obj(struct mwifiex_ie, GFP_KERNEL); + beacon_ie = kmalloc_obj(struct mwifiex_ie); if (!beacon_ie) { ret = -ENOMEM; goto done; @@ -466,7 +466,7 @@ int mwifiex_del_mgmt_ies(struct mwifiex_private *priv) beacon_ie->ie_length = 0; } if (priv->proberesp_idx != MWIFIEX_AUTO_IDX_MASK) { - pr_ie = kmalloc_obj(struct mwifiex_ie, GFP_KERNEL); + pr_ie = kmalloc_obj(struct mwifiex_ie); if (!pr_ie) { ret = -ENOMEM; goto done; @@ -476,7 +476,7 @@ int mwifiex_del_mgmt_ies(struct mwifiex_private *priv) pr_ie->ie_length = 0; } if (priv->assocresp_idx != MWIFIEX_AUTO_IDX_MASK) { - ar_ie = kmalloc_obj(struct mwifiex_ie, GFP_KERNEL); + ar_ie = kmalloc_obj(struct mwifiex_ie); if (!ar_ie) { ret = -ENOMEM; goto done; diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 28ffcc780eab..5c9a46e64d23 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -25,7 +25,7 @@ static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv) struct mwifiex_bss_prio_node *bss_prio; struct mwifiex_bss_prio_tbl *tbl = adapter->bss_prio_tbl; - bss_prio = kzalloc_obj(struct mwifiex_bss_prio_node, GFP_KERNEL); + bss_prio = kzalloc_obj(struct mwifiex_bss_prio_node); if (!bss_prio) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index d4c62fad8099..a8eab6b1e63b 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -60,7 +60,7 @@ static int mwifiex_register(void *card, struct device *dev, struct mwifiex_adapter *adapter; int i; - adapter = kzalloc_obj(struct mwifiex_adapter, GFP_KERNEL); + adapter = kzalloc_obj(struct mwifiex_adapter); if (!adapter) return -ENOMEM; @@ -82,7 +82,7 @@ static int mwifiex_register(void *card, struct device *dev, for (i = 0; i < MWIFIEX_MAX_BSS_NUM; i++) { /* Allocate memory for private structure */ adapter->priv[i] = - kzalloc_obj(struct mwifiex_private, GFP_KERNEL); + kzalloc_obj(struct mwifiex_private); if (!adapter->priv[i]) goto error; @@ -1180,7 +1180,7 @@ void mwifiex_drv_info_dump(struct mwifiex_adapter *adapter) p += adapter->if_ops.reg_dump(adapter, p); } p += sprintf(p, "\n=== more debug information\n"); - debug_info = kzalloc_obj(*debug_info, GFP_KERNEL); + debug_info = kzalloc_obj(*debug_info); if (debug_info) { for (i = 0; i < adapter->priv_num; i++) { if (!adapter->priv[i]->netdev) @@ -1346,7 +1346,7 @@ void mwifiex_init_priv_params(struct mwifiex_private *priv, if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA || GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) { - priv->hist_data = kmalloc_obj(*priv->hist_data, GFP_KERNEL); + priv->hist_data = kmalloc_obj(*priv->hist_data); if (priv->hist_data) mwifiex_hist_data_reset(priv); } diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index b4858c0002e0..ae9a63d8128d 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -1649,7 +1649,7 @@ static int mwifiex_save_hidden_ssid_channels(struct mwifiex_private *priv, int chid; /* Allocate and fill new bss descriptor */ - bss_desc = kzalloc_obj(*bss_desc, GFP_KERNEL); + bss_desc = kzalloc_obj(*bss_desc); if (!bss_desc) return -ENOMEM; @@ -1692,7 +1692,7 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, int ret; /* Allocate and fill new bss descriptor */ - bss_desc = kzalloc_obj(struct mwifiex_bssdescriptor, GFP_KERNEL); + bss_desc = kzalloc_obj(struct mwifiex_bssdescriptor); if (!bss_desc) return -ENOMEM; @@ -1931,7 +1931,7 @@ mwifiex_active_scan_req_for_passive_chan(struct mwifiex_private *priv) mwifiex_dbg(adapter, INFO, "No BSS with hidden SSID found on DFS channels\n"); return 0; } - user_scan_cfg = kzalloc_obj(*user_scan_cfg, GFP_KERNEL); + user_scan_cfg = kzalloc_obj(*user_scan_cfg); if (!user_scan_cfg) return -ENOMEM; @@ -2450,7 +2450,7 @@ int mwifiex_stop_bg_scan(struct mwifiex_private *priv) return 0; } - bgscan_cfg = kzalloc_obj(*bgscan_cfg, GFP_KERNEL); + bgscan_cfg = kzalloc_obj(*bgscan_cfg); if (!bgscan_cfg) return -ENOMEM; @@ -2777,7 +2777,7 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv, return -EBUSY; } - scan_cfg = kzalloc_obj(struct mwifiex_user_scan_cfg, GFP_KERNEL); + scan_cfg = kzalloc_obj(struct mwifiex_user_scan_cfg); if (!scan_cfg) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index b457ed6f18f5..70ce31d7c76e 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1516,7 +1516,7 @@ int mwifiex_send_rgpower_table(struct mwifiex_private *priv, const u8 *data, struct mwifiex_adapter *adapter = priv->adapter; struct mwifiex_ds_misc_cmd *hostcmd __free(kfree) = NULL; - hostcmd = kzalloc_obj(*hostcmd, GFP_KERNEL); + hostcmd = kzalloc_obj(*hostcmd); if (!hostcmd) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index 46476cb752dd..a6550548d3b4 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -330,7 +330,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, return -EINVAL; /* Allocate and fill new bss descriptor */ - bss_desc = kzalloc_obj(struct mwifiex_bssdescriptor, GFP_KERNEL); + bss_desc = kzalloc_obj(struct mwifiex_bssdescriptor); if (!bss_desc) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwifiex/uap_event.c b/drivers/net/wireless/marvell/mwifiex/uap_event.c index 9abd011aa295..703104fd1fbe 100644 --- a/drivers/net/wireless/marvell/mwifiex/uap_event.c +++ b/drivers/net/wireless/marvell/mwifiex/uap_event.c @@ -105,7 +105,7 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv) switch (eventcause) { case EVENT_UAP_STA_ASSOC: - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index c505c83f8abc..99321d180f34 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -1182,7 +1182,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) return -ENOMEM; } - rxq->buf = kzalloc_objs(*rxq->buf, MWL8K_RX_DESCS, GFP_KERNEL); + rxq->buf = kzalloc_objs(*rxq->buf, MWL8K_RX_DESCS); if (rxq->buf == NULL) { dma_free_coherent(&priv->pdev->dev, size, rxq->rxd, rxq->rxd_dma); @@ -1478,7 +1478,7 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index) return -ENOMEM; } - txq->skb = kzalloc_objs(*txq->skb, MWL8K_TX_DESCS, GFP_KERNEL); + txq->skb = kzalloc_objs(*txq->skb, MWL8K_TX_DESCS); if (txq->skb == NULL) { dma_free_coherent(&priv->pdev->dev, size, txq->txd, txq->txd_dma); @@ -2472,7 +2472,7 @@ static int mwl8k_cmd_get_hw_spec_sta(struct ieee80211_hw *hw) int rc; int i; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2537,7 +2537,7 @@ static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw) int rc, i; u32 api_version; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2639,7 +2639,7 @@ static int mwl8k_cmd_set_hw_spec(struct ieee80211_hw *hw) int rc; int i; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2753,7 +2753,7 @@ static int mwl8k_cmd_get_stat(struct ieee80211_hw *hw, struct mwl8k_cmd_get_stat *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2796,7 +2796,7 @@ mwl8k_cmd_radio_control(struct ieee80211_hw *hw, bool enable, bool force) if (enable == priv->radio_on && !force) return 0; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2854,7 +2854,7 @@ static int mwl8k_cmd_rf_tx_power(struct ieee80211_hw *hw, int dBm) struct mwl8k_cmd_rf_tx_power *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2895,7 +2895,7 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, int rc; int i; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -2948,7 +2948,7 @@ mwl8k_cmd_rf_antenna(struct ieee80211_hw *hw, int antenna, int mask) struct mwl8k_cmd_rf_antenna *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3066,7 +3066,7 @@ static int mwl8k_cmd_set_pre_scan(struct ieee80211_hw *hw) struct mwl8k_cmd_set_pre_scan *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3099,7 +3099,7 @@ mwl8k_cmd_bbp_reg_access(struct ieee80211_hw *hw, struct mwl8k_cmd_bbp_reg_access *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3135,7 +3135,7 @@ mwl8k_cmd_set_post_scan(struct ieee80211_hw *hw, const __u8 *mac) struct mwl8k_cmd_set_post_scan *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3228,7 +3228,7 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, struct mwl8k_priv *priv = hw->priv; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3314,7 +3314,7 @@ mwl8k_cmd_set_aid(struct ieee80211_hw *hw, u16 prot_mode; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3368,7 +3368,7 @@ mwl8k_cmd_set_rate(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct mwl8k_cmd_set_rate *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3402,7 +3402,7 @@ static int mwl8k_cmd_finalize_join(struct ieee80211_hw *hw, void *frame, int payload_len; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3440,7 +3440,7 @@ mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, struct mwl8k_cmd_set_rts_threshold *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3469,7 +3469,7 @@ static int mwl8k_cmd_set_slot(struct ieee80211_hw *hw, bool short_slot_time) struct mwl8k_cmd_set_slot *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3543,7 +3543,7 @@ mwl8k_cmd_set_edca_params(struct ieee80211_hw *hw, __u8 qnum, struct mwl8k_cmd_set_edca_params *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3583,7 +3583,7 @@ static int mwl8k_cmd_set_wmm_mode(struct ieee80211_hw *hw, bool enable) struct mwl8k_cmd_set_wmm_mode *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3615,7 +3615,7 @@ static int mwl8k_cmd_mimo_config(struct ieee80211_hw *hw, __u8 rx, __u8 tx) struct mwl8k_cmd_mimo_config *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3658,7 +3658,7 @@ static int mwl8k_cmd_use_fixed_rate_sta(struct ieee80211_hw *hw) struct mwl8k_cmd_use_fixed_rate_sta *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3698,7 +3698,7 @@ mwl8k_cmd_use_fixed_rate_ap(struct ieee80211_hw *hw, int mcast, int mgmt) struct mwl8k_cmd_use_fixed_rate_ap *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3727,7 +3727,7 @@ static int mwl8k_cmd_enable_sniffer(struct ieee80211_hw *hw, bool enable) struct mwl8k_cmd_enable_sniffer *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3782,7 +3782,7 @@ static int mwl8k_cmd_update_mac_addr(struct ieee80211_hw *hw, mac_type = MWL8K_MAC_TYPE_SECONDARY_AP; } - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3837,7 +3837,7 @@ static int mwl8k_cmd_set_rateadapt_mode(struct ieee80211_hw *hw, __u16 mode) struct mwl8k_cmd_set_rate_adapt_mode *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3865,7 +3865,7 @@ static int mwl8k_cmd_get_watchdog_bitmap(struct ieee80211_hw *hw, u8 *bitmap) struct mwl8k_cmd_get_watchdog_bitmap *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -3954,7 +3954,7 @@ static int mwl8k_cmd_bss_start(struct ieee80211_hw *hw, if (!enable && !(priv->running_bsses & (1 << mwl8k_vif->macid))) return 0; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4046,7 +4046,7 @@ mwl8k_check_ba(struct ieee80211_hw *hw, struct mwl8k_ampdu_stream *stream, struct mwl8k_cmd_bastream *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4078,7 +4078,7 @@ mwl8k_create_ba(struct ieee80211_hw *hw, struct mwl8k_ampdu_stream *stream, struct mwl8k_cmd_bastream *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4121,7 +4121,7 @@ static void mwl8k_destroy_ba(struct ieee80211_hw *hw, { struct mwl8k_cmd_bastream *cmd; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return; @@ -4173,7 +4173,7 @@ static int mwl8k_cmd_set_new_stn_add(struct ieee80211_hw *hw, u32 rates; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4211,7 +4211,7 @@ static int mwl8k_cmd_set_new_stn_add_self(struct ieee80211_hw *hw, struct mwl8k_cmd_set_new_stn *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4254,7 +4254,7 @@ static int mwl8k_cmd_set_new_stn_del(struct ieee80211_hw *hw, spin_unlock(&priv->stream_lock); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4341,7 +4341,7 @@ static int mwl8k_cmd_update_encryption_enable(struct ieee80211_hw *hw, struct mwl8k_cmd_update_encryption *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4410,7 +4410,7 @@ static int mwl8k_cmd_encryption_set_key(struct ieee80211_hw *hw, u8 idx; struct mwl8k_vif *mwl8k_vif = MWL8K_VIF(vif); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4467,7 +4467,7 @@ static int mwl8k_cmd_encryption_remove_key(struct ieee80211_hw *hw, int rc; struct mwl8k_vif *mwl8k_vif = MWL8K_VIF(vif); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4604,7 +4604,7 @@ static int mwl8k_cmd_update_stadb_add(struct ieee80211_hw *hw, u32 rates; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; @@ -4643,7 +4643,7 @@ static int mwl8k_cmd_update_stadb_del(struct ieee80211_hw *hw, struct mwl8k_cmd_update_stadb *cmd; int rc; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (cmd == NULL) return -ENOMEM; diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c index fee1f5ae0496..f16135f0b7f9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c @@ -966,7 +966,7 @@ mt7996_mac_sta_init_link(struct mt7996_dev *dev, mtxq->wcid = idx; } } else { - msta_link = kzalloc_obj(*msta_link, GFP_KERNEL); + msta_link = kzalloc_obj(*msta_link); if (!msta_link) return -ENOMEM; diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index edd4e570fe9f..0abf519243f5 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -1178,7 +1178,7 @@ static int mgmt_tx(struct wiphy *wiphy, if (!ieee80211_is_mgmt(mgmt->frame_control)) goto out; - mgmt_tx = kmalloc_obj(*mgmt_tx, GFP_KERNEL); + mgmt_tx = kmalloc_obj(*mgmt_tx); if (!mgmt_tx) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c index bbd1794acb27..f354b11cb919 100644 --- a/drivers/net/wireless/microchip/wilc1000/hif.c +++ b/drivers/net/wireless/microchip/wilc1000/hif.c @@ -387,7 +387,7 @@ wilc_parse_join_bss_param(struct cfg80211_bss *bss, u64 ies_tsf; int ret; - param = kzalloc_obj(*param, GFP_KERNEL); + param = kzalloc_obj(*param); if (!param) return NULL; @@ -1039,7 +1039,7 @@ int wilc_set_external_auth_param(struct wilc_vif *vif, wid.id = WID_EXTERNAL_AUTH_PARAM; wid.type = WID_BIN_DATA; wid.size = sizeof(*param); - param = kzalloc_obj(*param, GFP_KERNEL); + param = kzalloc_obj(*param); if (!param) return -EINVAL; @@ -1516,7 +1516,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) struct host_if_drv *hif_drv; struct wilc_vif *vif = netdev_priv(dev); - hif_drv = kzalloc_obj(*hif_drv, GFP_KERNEL); + hif_drv = kzalloc_obj(*hif_drv); if (!hif_drv) return -ENOMEM; diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c index 64b1490b793d..67dea1360f0a 100644 --- a/drivers/net/wireless/microchip/wilc1000/sdio.c +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c @@ -145,7 +145,7 @@ static int wilc_sdio_probe(struct sdio_func *func, int ret; - sdio_priv = kzalloc_obj(*sdio_priv, GFP_KERNEL); + sdio_priv = kzalloc_obj(*sdio_priv); if (!sdio_priv) return -ENOMEM; diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c index cad1fcf2e14f..e40b829f719d 100644 --- a/drivers/net/wireless/microchip/wilc1000/spi.c +++ b/drivers/net/wireless/microchip/wilc1000/spi.c @@ -211,7 +211,7 @@ static int wilc_bus_probe(struct spi_device *spi) struct wilc *wilc; int ret; - spi_priv = kzalloc_obj(*spi_priv, GFP_KERNEL); + spi_priv = kzalloc_obj(*spi_priv); if (!spi_priv) return -ENOMEM; diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index 15a2221892cd..3fa8592eb250 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1209,7 +1209,7 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status) offset += size; wilc->rx_buffer_offset = offset; - rqe = kmalloc_obj(*rqe, GFP_KERNEL); + rqe = kmalloc_obj(*rqe); if (!rqe) return; diff --git a/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c b/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c index 0163f0b17497..7664403c8d50 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c @@ -390,7 +390,7 @@ int wilc_wlan_cfg_init(struct wilc *wl) if (!wl->cfg.s) goto out_w; - str_vals = kzalloc_obj(*str_vals, GFP_KERNEL); + str_vals = kzalloc_obj(*str_vals); if (!str_vals) goto out_s; diff --git a/drivers/net/wireless/purelifi/plfxlc/usb.c b/drivers/net/wireless/purelifi/plfxlc/usb.c index 09303aa6c1d7..5724ec173e64 100644 --- a/drivers/net/wireless/purelifi/plfxlc/usb.c +++ b/drivers/net/wireless/purelifi/plfxlc/usb.c @@ -204,7 +204,7 @@ static int __lf_x_usb_enable_rx(struct plfxlc_usb *usb) int i, r; r = -ENOMEM; - urbs = kzalloc_objs(struct urb *, RX_URBS_COUNT, GFP_KERNEL); + urbs = kzalloc_objs(struct urb *, RX_URBS_COUNT); if (!urbs) goto error; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index b1908fa90cfa..db2e2bbab1b1 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -981,7 +981,7 @@ qtnf_parse_wowlan_info(struct qtnf_wmac *mac, const struct qlink_wowlan_support *data1; struct wiphy_wowlan_support *supp; - supp = kzalloc_obj(*supp, GFP_KERNEL); + supp = kzalloc_obj(*supp); if (!supp) return; diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 4cab8dee332b..0c106709ae29 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -212,7 +212,7 @@ static int qtnf_mac_init_single_band(struct wiphy *wiphy, { int ret; - wiphy->bands[band] = kzalloc_obj(*wiphy->bands[band], GFP_KERNEL); + wiphy->bands[band] = kzalloc_obj(*wiphy->bands[band]); if (!wiphy->bands[band]) return -ENOMEM; diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index c16cd1e5286a..2551d74ed56e 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -41,7 +41,7 @@ qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif, return -EPROTO; } - sinfo = kzalloc_obj(*sinfo, GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; diff --git a/drivers/net/wireless/quantenna/qtnfmac/util.c b/drivers/net/wireless/quantenna/qtnfmac/util.c index 5c1a5a8f87a6..4ad66cc1804d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/util.c @@ -59,7 +59,7 @@ struct qtnf_sta_node *qtnf_sta_list_add(struct qtnf_vif *vif, if (node) goto done; - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (unlikely(!node)) goto done; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c index f2b55db0b27b..cac191304bf5 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c @@ -1589,7 +1589,7 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information array */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c index a6b26c5ef4cf..fc35b60e422c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c @@ -1907,7 +1907,7 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information array */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c index 50f1eeddf913..58728df6666c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c @@ -1720,7 +1720,7 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information array */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 6041f029857b..bf2c30d0f5ff 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -11907,7 +11907,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information and survey arrays */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c index d1d94b0b0f31..15de3db12429 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c @@ -179,7 +179,7 @@ static int rt2800usb_autorun_detect(struct rt2x00_dev *rt2x00dev) u32 fw_mode; int ret; - reg = kmalloc_obj(*reg, GFP_KERNEL); + reg = kmalloc_obj(*reg); if (reg == NULL) return -ENOMEM; /* cannot use rt2x00usb_register_read here as it uses different diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c index edececd89572..e0bca06c7094 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c @@ -639,7 +639,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) struct dentry *queue_folder; struct dentry *register_folder; - intf = kzalloc_obj(struct rt2x00debug_intf, GFP_KERNEL); + intf = kzalloc_obj(struct rt2x00debug_intf); if (!intf) { rt2x00_err(rt2x00dev, "Failed to allocate debug handler\n"); return; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index dee01472747f..82fb230a73bb 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1020,11 +1020,11 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, if (spec->supported_rates & SUPPORT_RATE_OFDM) num_rates += 8; - channels = kzalloc_objs(*channels, spec->num_channels, GFP_KERNEL); + channels = kzalloc_objs(*channels, spec->num_channels); if (!channels) return -ENOMEM; - rates = kzalloc_objs(*rates, num_rates, GFP_KERNEL); + rates = kzalloc_objs(*rates, num_rates); if (!rates) goto exit_free_channels; diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c index 8fb336834ced..4b842497653c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c @@ -1244,7 +1244,7 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev) */ rt2x00dev->data_queues = 2 + rt2x00dev->ops->tx_queues + req_atim; - queue = kzalloc_objs(*queue, rt2x00dev->data_queues, GFP_KERNEL); + queue = kzalloc_objs(*queue, rt2x00dev->data_queues); if (!queue) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c index aea74b6b28e4..79e1fd0a1fbd 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c @@ -2712,7 +2712,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information array */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c index c47f4689ffdd..d6b7174d087a 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c @@ -2136,7 +2136,7 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) /* * Create channel information array */ - info = kzalloc_objs(*info, spec->num_channels, GFP_KERNEL); + info = kzalloc_objs(*info, spec->num_channels); if (!info) return -ENOMEM; diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c index 7a2a31af9a79..f7e0f6573180 100644 --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c @@ -1463,7 +1463,7 @@ static int rtl8187_probe(struct usb_interface *intf, priv->is_rtl8187b = (id->driver_info == DEVICE_RTL8187B); /* allocate "DMA aware" buffer for register accesses */ - priv->io_dmabuf = kmalloc_obj(*priv->io_dmabuf, GFP_KERNEL); + priv->io_dmabuf = kmalloc_obj(*priv->io_dmabuf); if (!priv->io_dmabuf) { err = -ENOMEM; goto err_free_dev; diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c index 721c95f13ec9..794187d28caa 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c @@ -7381,7 +7381,7 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw) } for (i = 0; i < RTL8XXXU_TX_URBS; i++) { - tx_urb = kmalloc_obj(struct rtl8xxxu_tx_urb, GFP_KERNEL); + tx_urb = kmalloc_obj(struct rtl8xxxu_tx_urb); if (!tx_urb) { if (!i) ret = -ENOMEM; @@ -7402,7 +7402,7 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw) spin_unlock_irqrestore(&priv->rx_urb_lock, flags); for (i = 0; i < RTL8XXXU_RX_URBS; i++) { - rx_urb = kmalloc_obj(struct rtl8xxxu_rx_urb, GFP_KERNEL); + rx_urb = kmalloc_obj(struct rtl8xxxu_rx_urb); if (!rx_urb) { if (!i) ret = -ENOMEM; diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c index 332f90e4d83f..bcd8bc270180 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c @@ -132,10 +132,10 @@ static void rtl_btc_alloc_variable(struct rtl_priv *rtlpriv, bool wifi_only) { if (wifi_only) rtlpriv->btcoexist.wifi_only_context = - kzalloc_obj(struct wifi_only_cfg, GFP_KERNEL); + kzalloc_obj(struct wifi_only_cfg); else rtlpriv->btcoexist.btc_context = - kzalloc_obj(struct btc_coexist, GFP_KERNEL); + kzalloc_obj(struct btc_coexist); } static void rtl_btc_free_variable(struct rtl_priv *rtlpriv) diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c index a3e5b0963cb7..48207052e3f8 100644 --- a/drivers/net/wireless/realtek/rtw88/fw.c +++ b/drivers/net/wireless/realtek/rtw88/fw.c @@ -1331,7 +1331,7 @@ static struct rtw_rsvd_page *rtw_alloc_rsvd_page(struct rtw_dev *rtwdev, { struct rtw_rsvd_page *rsvd_pkt = NULL; - rsvd_pkt = kzalloc_obj(*rsvd_pkt, GFP_KERNEL); + rsvd_pkt = kzalloc_obj(*rsvd_pkt); if (!rsvd_pkt) return NULL; diff --git a/drivers/net/wireless/realtek/rtw89/cam.c b/drivers/net/wireless/realtek/rtw89/cam.c index 949f304216e2..7c62ece137d0 100644 --- a/drivers/net/wireless/realtek/rtw89/cam.c +++ b/drivers/net/wireless/realtek/rtw89/cam.c @@ -420,7 +420,7 @@ static int rtw89_cam_sec_key_install(struct rtw89_dev *rtwdev, return ret; } - sec_cam = kzalloc_obj(*sec_cam, GFP_KERNEL); + sec_cam = kzalloc_obj(*sec_cam); if (!sec_cam) { ret = -ENOMEM; goto err_release_cam; diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 3295f76a0f1c..36e988277b2b 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -4220,7 +4220,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc) return 0; - wait = kzalloc_obj(*wait, GFP_KERNEL); + wait = kzalloc_obj(*wait); if (!wait) return -ENOMEM; @@ -5657,7 +5657,7 @@ rtw89_wait_for_cond_prep(struct rtw89_wait_info *wait, unsigned int cond) if (cur != RTW89_WAIT_COND_IDLE) return ERR_PTR(-EPERM); - prep = kzalloc_obj(*prep, GFP_KERNEL); + prep = kzalloc_obj(*prep); if (!prep) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index fb89660ba70c..012ead92f5f2 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -3524,7 +3524,7 @@ rtw89_debug_priv_early_h2c_set(struct rtw89_dev *rtwdev, goto out; } - early_h2c = kmalloc_obj(*early_h2c, GFP_KERNEL); + early_h2c = kmalloc_obj(*early_h2c); if (!early_h2c) { kfree(h2c); return -EFAULT; diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index 97c58a2fa399..c52f9e11a8b2 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -1099,12 +1099,12 @@ int rtw89_build_phy_tbl_from_elm(struct rtw89_dev *rtwdev, else if (*pp) return 1; /* ignore if an element is existing */ - tbl = kzalloc_obj(*tbl, GFP_KERNEL); + tbl = kzalloc_obj(*tbl); if (!tbl) return -ENOMEM; n_regs = le32_to_cpu(elm->size) / sizeof(tbl->regs[0]); - regs = kzalloc_objs(*regs, n_regs, GFP_KERNEL); + regs = kzalloc_objs(*regs, n_regs); if (!regs) goto out; @@ -1141,7 +1141,7 @@ int rtw89_fw_recognize_txpwr_from_elm(struct rtw89_dev *rtwdev, struct rtw89_txpwr_conf *conf; if (!rtwdev->rfe_data) { - rtwdev->rfe_data = kzalloc_obj(*rtwdev->rfe_data, GFP_KERNEL); + rtwdev->rfe_data = kzalloc_obj(*rtwdev->rfe_data); if (!rtwdev->rfe_data) return -ENOMEM; } @@ -1201,7 +1201,7 @@ int rtw89_build_txpwr_trk_tbl_from_elm(struct rtw89_dev *rtwdev, return -ENOENT; } - elm_info->txpwr_trk = kzalloc_obj(*elm_info->txpwr_trk, GFP_KERNEL); + elm_info->txpwr_trk = kzalloc_obj(*elm_info->txpwr_trk); if (!elm_info->txpwr_trk) return -ENOMEM; @@ -1250,7 +1250,7 @@ int rtw89_build_rfk_log_fmt_from_elm(struct rtw89_dev *rtwdev, if (elm_info->rfk_log_fmt) goto allocated; - elm_info->rfk_log_fmt = kzalloc_obj(*elm_info->rfk_log_fmt, GFP_KERNEL); + elm_info->rfk_log_fmt = kzalloc_obj(*elm_info->rfk_log_fmt); if (!elm_info->rfk_log_fmt) return 1; /* this is an optional element, so just ignore this */ @@ -2944,7 +2944,7 @@ static int rtw89_fw_h2c_add_general_pkt(struct rtw89_dev *rtwdev, struct sk_buff *skb; int ret; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; @@ -8138,7 +8138,7 @@ static int rtw89_append_probe_req_ie(struct rtw89_dev *rtwdev, skb_put_data(new, ies->ies[band], ies->len[band]); skb_put_data(new, ies->common_ies, ies->common_ie_len); - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) { ret = -ENOMEM; kfree_skb(new); @@ -8234,7 +8234,7 @@ static int rtw89_update_6ghz_rnr_chan_ax(struct rtw89_dev *rtwdev, hdr = (struct ieee80211_hdr *)skb->data; ether_addr_copy(hdr->addr3, params->bssid); - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) { ret = -ENOMEM; kfree_skb(skb); @@ -8527,7 +8527,7 @@ int rtw89_pno_scan_add_chan_list_ax(struct rtw89_dev *rtwdev, idx < nd_config->n_channels && list_len < RTW89_SCAN_LIST_LIMIT_AX; idx++, list_len++) { channel = nd_config->channels[idx]; - ch_info = kzalloc_obj(*ch_info, GFP_KERNEL); + ch_info = kzalloc_obj(*ch_info); if (!ch_info) { ret = -ENOMEM; goto out; @@ -8567,7 +8567,7 @@ static int rtw89_hw_scan_add_op_types_ax(struct rtw89_dev *rtwdev, { struct rtw89_mac_chinfo_ax *tmp; - tmp = kzalloc_obj(*tmp, GFP_KERNEL); + tmp = kzalloc_obj(*tmp); if (!tmp) return -ENOMEM; @@ -8613,7 +8613,7 @@ int rtw89_hw_scan_prep_chan_list_ax(struct rtw89_dev *rtwdev, for (idx = 0; idx < req->n_channels; idx++) { channel = req->channels[idx]; - ch_info = kzalloc_obj(*ch_info, GFP_KERNEL); + ch_info = kzalloc_obj(*ch_info); if (!ch_info) { ret = -ENOMEM; goto out; @@ -8745,7 +8745,7 @@ int rtw89_pno_scan_add_chan_list_be(struct rtw89_dev *rtwdev, idx < nd_config->n_channels && list_len < RTW89_SCAN_LIST_LIMIT_BE; idx++, list_len++) { channel = nd_config->channels[idx]; - ch_info = kzalloc_obj(*ch_info, GFP_KERNEL); + ch_info = kzalloc_obj(*ch_info); if (!ch_info) { ret = -ENOMEM; goto out; @@ -8807,7 +8807,7 @@ int rtw89_hw_scan_prep_chan_list_be(struct rtw89_dev *rtwdev, !cfg80211_channel_is_psc(channel) && chan_by_rnr) continue; - ch_info = kzalloc_obj(*ch_info, GFP_KERNEL); + ch_info = kzalloc_obj(*ch_info); if (!ch_info) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c index 594af3b7201b..0ea33743853e 100644 --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c @@ -1666,7 +1666,7 @@ int rtw89_ops_change_vif_links(struct ieee80211_hw *hw, return -EOPNOTSUPP; if (removing_links) { - snap = kzalloc_obj(*snap, GFP_KERNEL); + snap = kzalloc_obj(*snap); if (!snap) return -ENOMEM; diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c index eb2e2191408a..ee6ab2136b9a 100644 --- a/drivers/net/wireless/realtek/rtw89/phy.c +++ b/drivers/net/wireless/realtek/rtw89/phy.c @@ -1975,7 +1975,7 @@ void rtw89_phy_init_rf_reg(struct rtw89_dev *rtwdev, bool noio) struct rtw89_fw_h2c_rf_reg_info *rf_reg_info; u8 path; - rf_reg_info = kzalloc_obj(*rf_reg_info, GFP_KERNEL); + rf_reg_info = kzalloc_obj(*rf_reg_info); if (!rf_reg_info) return; diff --git a/drivers/net/wireless/realtek/rtw89/sar.c b/drivers/net/wireless/realtek/rtw89/sar.c index 994ebbd8d267..7886ffaf5695 100644 --- a/drivers/net/wireless/realtek/rtw89/sar.c +++ b/drivers/net/wireless/realtek/rtw89/sar.c @@ -501,7 +501,7 @@ static void rtw89_set_sar_from_acpi(struct rtw89_dev *rtwdev) struct rtw89_sar_cfg_acpi *cfg; int ret; - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) return; diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 6954ca8f0b35..368e08826f1e 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -1490,7 +1490,7 @@ static int rtw89_pno_scan_update_probe_req(struct rtw89_dev *rtwdev, skb_put_data(skb, basic_rate_ie, sizeof(basic_rate_ie)); skb_put_data(skb, nd_config->ie, nd_config->ie_len); - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) { kfree_skb(skb); rtw89_fw_release_pno_pkt_list(rtwdev, rtwvif_link); diff --git a/drivers/net/wireless/rsi/rsi_91x_coex.c b/drivers/net/wireless/rsi/rsi_91x_coex.c index 5bc8c30f2721..ee603a5173fb 100644 --- a/drivers/net/wireless/rsi/rsi_91x_coex.c +++ b/drivers/net/wireless/rsi/rsi_91x_coex.c @@ -140,7 +140,7 @@ int rsi_coex_attach(struct rsi_common *common) struct rsi_coex_ctrl_block *coex_cb; int cnt; - coex_cb = kzalloc_obj(*coex_cb, GFP_KERNEL); + coex_cb = kzalloc_obj(*coex_cb); if (!coex_cb) return -ENOMEM; diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c index ea1766b967ee..34836a200620 100644 --- a/drivers/net/wireless/rsi/rsi_91x_debugfs.c +++ b/drivers/net/wireless/rsi/rsi_91x_debugfs.c @@ -285,7 +285,7 @@ int rsi_init_dbgfs(struct rsi_hw *adapter) int ii; const struct rsi_dbg_files *files; - dev_dbgfs = kzalloc_obj(*dev_dbgfs, GFP_KERNEL); + dev_dbgfs = kzalloc_obj(*dev_dbgfs); if (!dev_dbgfs) return -ENOMEM; diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c index 9e65db2f6460..a0c36144eb0b 100644 --- a/drivers/net/wireless/rsi/rsi_91x_hal.c +++ b/drivers/net/wireless/rsi/rsi_91x_hal.c @@ -647,7 +647,7 @@ static int bl_write_header(struct rsi_hw *adapter, u8 *flash_content, u32 write_addr, write_len; int status; - bl_hdr = kzalloc_obj(*bl_hdr, GFP_KERNEL); + bl_hdr = kzalloc_obj(*bl_hdr); if (!bl_hdr) return -ENOMEM; diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c index c936e40ac871..662e42d1e5e8 100644 --- a/drivers/net/wireless/rsi/rsi_91x_main.c +++ b/drivers/net/wireless/rsi/rsi_91x_main.c @@ -304,11 +304,11 @@ struct rsi_hw *rsi_91x_init(u16 oper_mode) struct rsi_common *common = NULL; u8 ii = 0; - adapter = kzalloc_obj(*adapter, GFP_KERNEL); + adapter = kzalloc_obj(*adapter); if (!adapter) return NULL; - adapter->priv = kzalloc_obj(*common, GFP_KERNEL); + adapter->priv = kzalloc_obj(*common); if (adapter->priv == NULL) { rsi_dbg(ERR_ZONE, "%s: Failed in allocation of memory\n", __func__); diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 51932a434d89..bfa386b820d8 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -828,7 +828,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter, struct rsi_91x_sdiodev *rsi_91x_dev; int status; - rsi_91x_dev = kzalloc_obj(*rsi_91x_dev, GFP_KERNEL); + rsi_91x_dev = kzalloc_obj(*rsi_91x_dev); if (!rsi_91x_dev) return -ENOMEM; diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c index b0238103c13b..d83204701e27 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c @@ -620,7 +620,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter, struct rsi_91x_usbdev *rsi_dev; int status; - rsi_dev = kzalloc_obj(*rsi_dev, GFP_KERNEL); + rsi_dev = kzalloc_obj(*rsi_dev); if (!rsi_dev) return -ENOMEM; diff --git a/drivers/net/wireless/silabs/wfx/debug.c b/drivers/net/wireless/silabs/wfx/debug.c index 6475a4a42afc..454ec59fdc50 100644 --- a/drivers/net/wireless/silabs/wfx/debug.c +++ b/drivers/net/wireless/silabs/wfx/debug.c @@ -291,7 +291,7 @@ static ssize_t wfx_send_hif_msg_read(struct file *file, char __user *user_buf, static int wfx_send_hif_msg_open(struct inode *inode, struct file *file) { - struct dbgfs_hif_msg *context = kzalloc_obj(*context, GFP_KERNEL); + struct dbgfs_hif_msg *context = kzalloc_obj(*context); if (!context) return -ENOMEM; diff --git a/drivers/net/wireless/st/cw1200/cw1200_sdio.c b/drivers/net/wireless/st/cw1200/cw1200_sdio.c index b503112d3a3e..2b6afe221268 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_sdio.c +++ b/drivers/net/wireless/st/cw1200/cw1200_sdio.c @@ -287,7 +287,7 @@ static int cw1200_sdio_probe(struct sdio_func *func, if (func->num != 0x01) return -ENODEV; - self = kzalloc_obj(*self, GFP_KERNEL); + self = kzalloc_obj(*self); if (!self) { pr_err("Can't allocate SDIO hwbus_priv.\n"); return -ENOMEM; diff --git a/drivers/net/wireless/st/cw1200/pm.c b/drivers/net/wireless/st/cw1200/pm.c index ed2650b2a40b..120f0379f81d 100644 --- a/drivers/net/wireless/st/cw1200/pm.c +++ b/drivers/net/wireless/st/cw1200/pm.c @@ -207,7 +207,7 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) wsm_set_ether_type_filter(priv, &cw1200_ether_type_filter_on.hdr); /* Allocate state */ - state = kzalloc_obj(struct cw1200_suspend_state, GFP_KERNEL); + state = kzalloc_obj(struct cw1200_suspend_state); if (!state) goto revert3; diff --git a/drivers/net/wireless/st/cw1200/queue.c b/drivers/net/wireless/st/cw1200/queue.c index 717da9c2cad9..dc557ed80910 100644 --- a/drivers/net/wireless/st/cw1200/queue.c +++ b/drivers/net/wireless/st/cw1200/queue.c @@ -153,7 +153,7 @@ int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, spin_lock_init(&stats->lock); init_waitqueue_head(&stats->wait_link_id_empty); - stats->link_map_cache = kzalloc_objs(int, map_capacity, GFP_KERNEL); + stats->link_map_cache = kzalloc_objs(int, map_capacity); if (!stats->link_map_cache) return -ENOMEM; diff --git a/drivers/net/wireless/st/cw1200/wsm.c b/drivers/net/wireless/st/cw1200/wsm.c index 0b669b2f3ef4..d6529e5b73b2 100644 --- a/drivers/net/wireless/st/cw1200/wsm.c +++ b/drivers/net/wireless/st/cw1200/wsm.c @@ -922,7 +922,7 @@ static int wsm_event_indication(struct cw1200_common *priv, struct wsm_buf *buf) return 0; } - event = kzalloc_obj(struct cw1200_wsm_event, GFP_KERNEL); + event = kzalloc_obj(struct cw1200_wsm_event); if (!event) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c index b53ac17172c4..bff73be2e6e8 100644 --- a/drivers/net/wireless/ti/wl1251/acx.c +++ b/drivers/net/wireless/ti/wl1251/acx.c @@ -18,7 +18,7 @@ int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod, wl1251_debug(DEBUG_ACX, "acx frame rates"); - rates = kzalloc_obj(*rates, GFP_KERNEL); + rates = kzalloc_obj(*rates); if (!rates) return -ENOMEM; @@ -47,7 +47,7 @@ int wl1251_acx_station_id(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx dot11_station_id"); - mac = kzalloc_obj(*mac, GFP_KERNEL); + mac = kzalloc_obj(*mac); if (!mac) return -ENOMEM; @@ -67,7 +67,7 @@ int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id) wl1251_debug(DEBUG_ACX, "acx dot11_default_key (%d)", key_id); - default_key = kzalloc_obj(*default_key, GFP_KERNEL); + default_key = kzalloc_obj(*default_key); if (!default_key) return -ENOMEM; @@ -95,7 +95,7 @@ int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event, wl1251_debug(DEBUG_ACX, "acx wake up conditions"); - wake_up = kzalloc_obj(*wake_up, GFP_KERNEL); + wake_up = kzalloc_obj(*wake_up); if (!wake_up) return -ENOMEM; @@ -121,7 +121,7 @@ int wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth) wl1251_debug(DEBUG_ACX, "acx sleep auth"); - auth = kzalloc_obj(*auth, GFP_KERNEL); + auth = kzalloc_obj(*auth); if (!auth) return -ENOMEM; @@ -140,7 +140,7 @@ int wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len) wl1251_debug(DEBUG_ACX, "acx fw rev"); - rev = kzalloc_obj(*rev, GFP_KERNEL); + rev = kzalloc_obj(*rev); if (!rev) return -ENOMEM; @@ -167,7 +167,7 @@ int wl1251_acx_tx_power(struct wl1251 *wl, int power) if (power < 0 || power > 25) return -EINVAL; - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -191,7 +191,7 @@ int wl1251_acx_feature_cfg(struct wl1251 *wl, u32 data_flow_options) wl1251_debug(DEBUG_ACX, "acx feature cfg"); - feature = kzalloc_obj(*feature, GFP_KERNEL); + feature = kzalloc_obj(*feature); if (!feature) return -ENOMEM; @@ -233,7 +233,7 @@ int wl1251_acx_data_path_params(struct wl1251 *wl, wl1251_debug(DEBUG_ACX, "acx data path params"); - params = kzalloc_obj(*params, GFP_KERNEL); + params = kzalloc_obj(*params); if (!params) return -ENOMEM; @@ -279,7 +279,7 @@ int wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time) wl1251_debug(DEBUG_ACX, "acx rx msdu life time"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -303,7 +303,7 @@ int wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter) wl1251_debug(DEBUG_ACX, "acx rx config"); - rx_config = kzalloc_obj(*rx_config, GFP_KERNEL); + rx_config = kzalloc_obj(*rx_config); if (!rx_config) return -ENOMEM; @@ -329,7 +329,7 @@ int wl1251_acx_pd_threshold(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx data pd threshold"); - pd = kzalloc_obj(*pd, GFP_KERNEL); + pd = kzalloc_obj(*pd); if (!pd) return -ENOMEM; @@ -353,7 +353,7 @@ int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time) wl1251_debug(DEBUG_ACX, "acx slot"); - slot = kzalloc_obj(*slot, GFP_KERNEL); + slot = kzalloc_obj(*slot); if (!slot) return -ENOMEM; @@ -379,7 +379,7 @@ int wl1251_acx_group_address_tbl(struct wl1251 *wl, bool enable, wl1251_debug(DEBUG_ACX, "acx group address tbl"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -405,7 +405,7 @@ int wl1251_acx_service_period_timeout(struct wl1251 *wl) struct acx_rx_timeout *rx_timeout; int ret; - rx_timeout = kzalloc_obj(*rx_timeout, GFP_KERNEL); + rx_timeout = kzalloc_obj(*rx_timeout); if (!rx_timeout) return -ENOMEM; @@ -434,7 +434,7 @@ int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold) wl1251_debug(DEBUG_ACX, "acx rts threshold"); - rts = kzalloc_obj(*rts, GFP_KERNEL); + rts = kzalloc_obj(*rts); if (!rts) return -ENOMEM; @@ -458,7 +458,7 @@ int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter) wl1251_debug(DEBUG_ACX, "acx beacon filter opt"); - beacon_filter = kzalloc_obj(*beacon_filter, GFP_KERNEL); + beacon_filter = kzalloc_obj(*beacon_filter); if (!beacon_filter) return -ENOMEM; @@ -485,7 +485,7 @@ int wl1251_acx_beacon_filter_table(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx beacon filter table"); - ie_table = kzalloc_obj(*ie_table, GFP_KERNEL); + ie_table = kzalloc_obj(*ie_table); if (!ie_table) return -ENOMEM; @@ -513,7 +513,7 @@ int wl1251_acx_conn_monit_params(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx connection monitor parameters"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -540,7 +540,7 @@ int wl1251_acx_sg_enable(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx sg enable"); - pta = kzalloc_obj(*pta, GFP_KERNEL); + pta = kzalloc_obj(*pta); if (!pta) return -ENOMEM; @@ -564,7 +564,7 @@ int wl1251_acx_sg_cfg(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx sg cfg"); - param = kzalloc_obj(*param, GFP_KERNEL); + param = kzalloc_obj(*param); if (!param) return -ENOMEM; @@ -616,7 +616,7 @@ int wl1251_acx_cca_threshold(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx cca threshold"); - detection = kzalloc_obj(*detection, GFP_KERNEL); + detection = kzalloc_obj(*detection); if (!detection) return -ENOMEM; @@ -639,7 +639,7 @@ int wl1251_acx_bcn_dtim_options(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx bcn dtim options"); - bb = kzalloc_obj(*bb, GFP_KERNEL); + bb = kzalloc_obj(*bb); if (!bb) return -ENOMEM; @@ -666,7 +666,7 @@ int wl1251_acx_aid(struct wl1251 *wl, u16 aid) wl1251_debug(DEBUG_ACX, "acx aid"); - acx_aid = kzalloc_obj(*acx_aid, GFP_KERNEL); + acx_aid = kzalloc_obj(*acx_aid); if (!acx_aid) return -ENOMEM; @@ -690,7 +690,7 @@ int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask) wl1251_debug(DEBUG_ACX, "acx event mbox mask"); - mask = kzalloc_obj(*mask, GFP_KERNEL); + mask = kzalloc_obj(*mask); if (!mask) return -ENOMEM; @@ -719,7 +719,7 @@ int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight, wl1251_debug(DEBUG_ACX, "acx low rssi"); - rssi = kzalloc_obj(*rssi, GFP_KERNEL); + rssi = kzalloc_obj(*rssi); if (!rssi) return -ENOMEM; @@ -743,7 +743,7 @@ int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble) wl1251_debug(DEBUG_ACX, "acx_set_preamble"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -768,7 +768,7 @@ int wl1251_acx_cts_protect(struct wl1251 *wl, wl1251_debug(DEBUG_ACX, "acx_set_ctsprotect"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -790,7 +790,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime) struct acx_tsf_info *tsf_info; int ret; - tsf_info = kzalloc_obj(*tsf_info, GFP_KERNEL); + tsf_info = kzalloc_obj(*tsf_info); if (!tsf_info) return -ENOMEM; @@ -832,7 +832,7 @@ int wl1251_acx_mem_cfg(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx mem cfg"); - mem_conf = kzalloc_obj(*mem_conf, GFP_KERNEL); + mem_conf = kzalloc_obj(*mem_conf); if (!mem_conf) return -ENOMEM; @@ -877,7 +877,7 @@ int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim) wl1251_debug(DEBUG_ACX, "acx tbtt and dtim"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -904,7 +904,7 @@ int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode, wl1251_debug(DEBUG_ACX, "acx bet enable"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -929,7 +929,7 @@ int wl1251_acx_arp_ip_filter(struct wl1251 *wl, bool enable, __be32 address) wl1251_debug(DEBUG_ACX, "acx arp ip filter, enable: %d", enable); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -957,7 +957,7 @@ int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max, wl1251_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d " "aifs %d txop %d", ac, cw_min, cw_max, aifs, txop); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -990,7 +990,7 @@ int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue, "ps_scheme %d ack_policy %d", queue, type, tsid, ps_scheme, ack_policy); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl1251/cmd.c b/drivers/net/wireless/ti/wl1251/cmd.c index 19eb8806651f..a726a809b54a 100644 --- a/drivers/net/wireless/ti/wl1251/cmd.c +++ b/drivers/net/wireless/ti/wl1251/cmd.c @@ -133,7 +133,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity, wl1251_debug(DEBUG_CMD, "cmd vbm"); - vbm = kzalloc_obj(*vbm, GFP_KERNEL); + vbm = kzalloc_obj(*vbm); if (!vbm) return -ENOMEM; @@ -169,7 +169,7 @@ int wl1251_cmd_data_path_rx(struct wl1251 *wl, u8 channel, bool enable) wl1251_debug(DEBUG_CMD, "cmd data path"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -203,7 +203,7 @@ int wl1251_cmd_data_path_tx(struct wl1251 *wl, u8 channel, bool enable) wl1251_debug(DEBUG_CMD, "cmd data path"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -233,7 +233,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel, int ret, i; u8 *bssid; - join = kzalloc_obj(*join, GFP_KERNEL); + join = kzalloc_obj(*join); if (!join) return -ENOMEM; @@ -276,7 +276,7 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode) wl1251_debug(DEBUG_CMD, "cmd set ps mode"); - ps_params = kzalloc_obj(*ps_params, GFP_KERNEL); + ps_params = kzalloc_obj(*ps_params); if (!ps_params) return -ENOMEM; @@ -342,7 +342,7 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len, WARN_ON(n_channels > SCAN_MAX_NUM_OF_CHANNELS); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -409,7 +409,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout) wl1251_debug(DEBUG_CMD, "cmd trigger scan to"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl1251/debugfs.c b/drivers/net/wireless/ti/wl1251/debugfs.c index a68d57555318..60ab923b75db 100644 --- a/drivers/net/wireless/ti/wl1251/debugfs.c +++ b/drivers/net/wireless/ti/wl1251/debugfs.c @@ -444,7 +444,7 @@ void wl1251_debugfs_reset(struct wl1251 *wl) int wl1251_debugfs_init(struct wl1251 *wl) { - wl->stats.fw_stats = kzalloc_obj(*wl->stats.fw_stats, GFP_KERNEL); + wl->stats.fw_stats = kzalloc_obj(*wl->stats.fw_stats); if (!wl->stats.fw_stats) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index 6135d7c6d109..7575590446a3 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c @@ -208,7 +208,7 @@ int wl1251_event_handle(struct wl1251 *wl, u8 mbox_num) if (mbox_num > 1) return -EINVAL; - mbox = kmalloc_obj(*mbox, GFP_KERNEL); + mbox = kmalloc_obj(*mbox); if (!mbox) { wl1251_error("can not allocate mbox buffer"); return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl1251/init.c b/drivers/net/wireless/ti/wl1251/init.c index 0d7f08f0a41a..9134418ca3f2 100644 --- a/drivers/net/wireless/ti/wl1251/init.c +++ b/drivers/net/wireless/ti/wl1251/init.c @@ -194,7 +194,7 @@ int wl1251_hw_init_mem_config(struct wl1251 *wl) if (ret < 0) return ret; - wl->target_mem_map = kzalloc_obj(struct wl1251_acx_mem_map, GFP_KERNEL); + wl->target_mem_map = kzalloc_obj(struct wl1251_acx_mem_map); if (!wl->target_mem_map) { wl1251_error("couldn't allocate target memory map"); return -ENOMEM; @@ -260,7 +260,7 @@ static int wl1251_hw_init_tx_queue_config(struct wl1251 *wl) wl1251_debug(DEBUG_ACX, "acx tx queue config"); - config = kzalloc_obj(*config, GFP_KERNEL); + config = kzalloc_obj(*config); if (!config) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wl1251/io.c b/drivers/net/wireless/ti/wl1251/io.c index 84d497ebc7f2..6660b77f4ebb 100644 --- a/drivers/net/wireless/ti/wl1251/io.c +++ b/drivers/net/wireless/ti/wl1251/io.c @@ -123,7 +123,7 @@ void wl1251_set_partition(struct wl1251 *wl, { struct wl1251_partition_set *partition; - partition = kmalloc_obj(*partition, GFP_KERNEL); + partition = kmalloc_obj(*partition); if (!partition) { wl1251_error("can not allocate partition buffer"); return; diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 0a5ec19f8abc..0f3f22e729ce 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c @@ -878,7 +878,7 @@ static int wl1251_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, wl1251_debug(DEBUG_MAC80211, "mac80211 set key"); - wl_cmd = kzalloc_obj(*wl_cmd, GFP_KERNEL); + wl_cmd = kzalloc_obj(*wl_cmd); if (!wl_cmd) { ret = -ENOMEM; goto out; @@ -1640,7 +1640,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE; wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE; - wl->rx_descriptor = kmalloc_obj(*wl->rx_descriptor, GFP_KERNEL); + wl->rx_descriptor = kmalloc_obj(*wl->rx_descriptor); if (!wl->rx_descriptor) { wl1251_error("could not allocate memory for rx descriptor"); ieee80211_free_hw(hw); diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index 1ba35c9fb34b..8fdc7430c008 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -204,7 +204,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, wl = hw->priv; - wl_sdio = kzalloc_obj(*wl_sdio, GFP_KERNEL); + wl_sdio = kzalloc_obj(*wl_sdio); if (wl_sdio == NULL) { ret = -ENOMEM; goto out_free_hw; diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c index acd4834d8a54..2da8c0d5105b 100644 --- a/drivers/net/wireless/ti/wl1251/tx.c +++ b/drivers/net/wireless/ti/wl1251/tx.c @@ -451,7 +451,7 @@ void wl1251_tx_complete(struct wl1251 *wl) if (unlikely(wl->state != WL1251_STATE_ON)) return; - result = kmalloc_objs(*result, FW_TX_CMPLT_BLOCK_SIZE, GFP_KERNEL); + result = kmalloc_objs(*result, FW_TX_CMPLT_BLOCK_SIZE); if (!result) { wl1251_error("can not allocate result buffer"); return; diff --git a/drivers/net/wireless/ti/wl12xx/acx.c b/drivers/net/wireless/ti/wl12xx/acx.c index 74e16f8c8b22..c669d19b122f 100644 --- a/drivers/net/wireless/ti/wl12xx/acx.c +++ b/drivers/net/wireless/ti/wl12xx/acx.c @@ -17,7 +17,7 @@ int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap) struct wl1271_acx_host_config_bitmap *bitmap_conf; int ret; - bitmap_conf = kzalloc_obj(*bitmap_conf, GFP_KERNEL); + bitmap_conf = kzalloc_obj(*bitmap_conf); if (!bitmap_conf) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wl12xx/cmd.c b/drivers/net/wireless/ti/wl12xx/cmd.c index d57f420baa60..1a0755f3f37e 100644 --- a/drivers/net/wireless/ti/wl12xx/cmd.c +++ b/drivers/net/wireless/ti/wl12xx/cmd.c @@ -22,7 +22,7 @@ int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) if (!wl->nvs) return -ENODEV; - ext_radio_parms = kzalloc_obj(*ext_radio_parms, GFP_KERNEL); + ext_radio_parms = kzalloc_obj(*ext_radio_parms); if (!ext_radio_parms) return -ENOMEM; @@ -63,7 +63,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) return -EINVAL; } - gen_parms = kzalloc_obj(*gen_parms, GFP_KERNEL); + gen_parms = kzalloc_obj(*gen_parms); if (!gen_parms) return -ENOMEM; @@ -130,7 +130,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl) return -EINVAL; } - gen_parms = kzalloc_obj(*gen_parms, GFP_KERNEL); + gen_parms = kzalloc_obj(*gen_parms); if (!gen_parms) return -ENOMEM; @@ -191,7 +191,7 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) if (!wl->nvs) return -ENODEV; - radio_parms = kzalloc_obj(*radio_parms, GFP_KERNEL); + radio_parms = kzalloc_obj(*radio_parms); if (!radio_parms) return -ENOMEM; @@ -235,7 +235,7 @@ int wl128x_cmd_radio_parms(struct wl1271 *wl) if (!wl->nvs) return -ENODEV; - radio_parms = kzalloc_obj(*radio_parms, GFP_KERNEL); + radio_parms = kzalloc_obj(*radio_parms); if (!radio_parms) return -ENOMEM; @@ -280,7 +280,7 @@ int wl12xx_cmd_channel_switch(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "cmd channel switch"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index f766845e2451..30a1da72eb08 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c @@ -1882,7 +1882,7 @@ static int wl12xx_setup(struct wl1271 *wl) wl1271_error("Invalid tcxo parameter %s", tcxo_param); } - priv->rx_mem_addr = kmalloc_obj(*priv->rx_mem_addr, GFP_KERNEL); + priv->rx_mem_addr = kmalloc_obj(*priv->rx_mem_addr); if (!priv->rx_mem_addr) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl12xx/scan.c b/drivers/net/wireless/ti/wl12xx/scan.c index 021c547bbab8..ec2fb6ff8860 100644 --- a/drivers/net/wireless/ti/wl12xx/scan.c +++ b/drivers/net/wireless/ti/wl12xx/scan.c @@ -91,8 +91,8 @@ static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (!passive && wl->scan.req->n_ssids == 0) return WL1271_NOTHING_TO_SCAN; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); - trigger = kzalloc_obj(*trigger, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); + trigger = kzalloc_obj(*trigger); if (!cmd || !trigger) { ret = -ENOMEM; goto out; @@ -184,7 +184,7 @@ int wl12xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_CMD, "cmd scan stop"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -317,7 +317,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config"); - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) return -ENOMEM; @@ -348,7 +348,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, wl1271_debug(DEBUG_SCAN, "filter_type = %d", cfg->filter_type); - cfg_channels = kzalloc_obj(*cfg_channels, GFP_KERNEL); + cfg_channels = kzalloc_obj(*cfg_channels); if (!cfg_channels) { ret = -ENOMEM; goto out; @@ -425,7 +425,7 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif) test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags)) return -EBUSY; - start = kzalloc_obj(*start, GFP_KERNEL); + start = kzalloc_obj(*start); if (!start) return -ENOMEM; @@ -465,7 +465,7 @@ void wl12xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_CMD, "cmd periodic scan stop"); /* FIXME: what to do if alloc'ing to stop fails? */ - stop = kzalloc_obj(*stop, GFP_KERNEL); + stop = kzalloc_obj(*stop); if (!stop) { wl1271_error("failed to alloc memory to send sched scan stop"); return; diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c index f29dd27814f5..07f3008cf727 100644 --- a/drivers/net/wireless/ti/wl18xx/acx.c +++ b/drivers/net/wireless/ti/wl18xx/acx.c @@ -23,7 +23,7 @@ int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap, host_cfg_bitmap, sdio_blk_size, extra_mem_blks, len_field_size); - bitmap_conf = kzalloc_obj(*bitmap_conf, GFP_KERNEL); + bitmap_conf = kzalloc_obj(*bitmap_conf); if (!bitmap_conf) { ret = -ENOMEM; goto out; @@ -54,7 +54,7 @@ int wl18xx_acx_set_checksum_state(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx checksum state"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -80,7 +80,7 @@ int wl18xx_acx_clear_statistics(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx clear statistics"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -105,7 +105,7 @@ int wl18xx_acx_peer_ht_operation_mode(struct wl1271 *wl, u8 hlid, bool wide) wl1271_debug(DEBUG_ACX, "acx peer ht operation mode hlid %d bw %d", hlid, wide); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -146,7 +146,7 @@ int wl18xx_acx_set_peer_cap(struct wl1271 *wl, "acx set cap ht_supp: %d ht_cap: %d rates: 0x%x", ht_cap->ht_supported, ht_cap->cap, rate_set); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -192,7 +192,7 @@ int wl18xx_acx_interrupt_notify_config(struct wl1271 *wl, struct wl18xx_acx_interrupt_notify *acx; int ret = 0; - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -219,7 +219,7 @@ int wl18xx_acx_rx_ba_filter(struct wl1271 *wl, bool action) struct wl18xx_acx_rx_ba_filter *acx; int ret = 0; - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -247,7 +247,7 @@ int wl18xx_acx_ap_sleep(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx config ap sleep"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -277,7 +277,7 @@ int wl18xx_acx_dynamic_fw_traces(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx dynamic fw traces config %d", wl->dynamic_fw_traces); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -305,7 +305,7 @@ int wl18xx_acx_time_sync_cfg(struct wl1271 *wl) wl->conf.sg.params[WL18XX_CONF_SG_TIME_SYNC], wl->zone_master_mac_addr); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wl18xx/cmd.c b/drivers/net/wireless/ti/wl18xx/cmd.c index 5a1dc648fd57..20fe6b8601fb 100644 --- a/drivers/net/wireless/ti/wl18xx/cmd.c +++ b/drivers/net/wireless/ti/wl18xx/cmd.c @@ -22,7 +22,7 @@ int wl18xx_cmd_channel_switch(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "cmd channel switch (count=%d)", ch_switch->count); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -78,7 +78,7 @@ int wl18xx_cmd_smart_config_start(struct wl1271 *wl, u32 group_bitmap) wl1271_debug(DEBUG_CMD, "cmd smart config start group_bitmap=0x%x", group_bitmap); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -105,7 +105,7 @@ int wl18xx_cmd_smart_config_stop(struct wl1271 *wl) wl1271_debug(DEBUG_CMD, "cmd smart config stop"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -137,7 +137,7 @@ int wl18xx_cmd_smart_config_set_group_key(struct wl1271 *wl, u16 group_id, return -E2BIG; } - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -167,7 +167,7 @@ int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) wl1271_debug(DEBUG_CMD, "cmd cac (channel %d) %s", wlvif->channel, start ? "start" : "stop"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -198,7 +198,7 @@ int wl18xx_cmd_radar_detection_debug(struct wl1271 *wl, u8 channel) wl1271_debug(DEBUG_CMD, "cmd radar detection debug (chan %d)", channel); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -224,7 +224,7 @@ int wl18xx_cmd_dfs_master_restart(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_CMD, "cmd dfs master restart (role %d)", wlvif->role_id); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wl18xx/scan.c b/drivers/net/wireless/ti/wl18xx/scan.c index 7e61403aa374..1f4896eb0434 100644 --- a/drivers/net/wireless/ti/wl18xx/scan.c +++ b/drivers/net/wireless/ti/wl18xx/scan.c @@ -31,7 +31,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct wlcore_scan_channels *cmd_channels = NULL; int ret; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -67,7 +67,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, /* configure channels */ WARN_ON(req->n_ssids > 1); - cmd_channels = kzalloc_obj(*cmd_channels, GFP_KERNEL); + cmd_channels = kzalloc_obj(*cmd_channels); if (!cmd_channels) { ret = -ENOMEM; goto out; @@ -169,7 +169,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, if (filter_type < 0) return filter_type; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -201,7 +201,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, /* don't stop scanning automatically when something is found */ cmd->terminate_after = 0; - cmd_channels = kzalloc_obj(*cmd_channels, GFP_KERNEL); + cmd_channels = kzalloc_obj(*cmd_channels); if (!cmd_channels) { ret = -ENOMEM; goto out; @@ -301,7 +301,7 @@ static int __wl18xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_CMD, "cmd periodic scan stop"); - stop = kzalloc_obj(*stop, GFP_KERNEL); + stop = kzalloc_obj(*stop); if (!stop) { wl1271_error("failed to alloc memory to send sched scan stop"); return -ENOMEM; diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c index 65d1df37828d..9efa13638c45 100644 --- a/drivers/net/wireless/ti/wlcore/acx.c +++ b/drivers/net/wireless/ti/wlcore/acx.c @@ -28,7 +28,7 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx wake up conditions (wake_up_event %d listen_interval %d)", wake_up_event, listen_interval); - wake_up = kzalloc_obj(*wake_up, GFP_KERNEL); + wake_up = kzalloc_obj(*wake_up); if (!wake_up) { ret = -ENOMEM; goto out; @@ -57,7 +57,7 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth) wl1271_debug(DEBUG_ACX, "acx sleep auth %d", sleep_auth); - auth = kzalloc_obj(*auth, GFP_KERNEL); + auth = kzalloc_obj(*auth); if (!auth) { ret = -ENOMEM; goto out; @@ -90,7 +90,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (power < 0 || power > 25) return -EINVAL; - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -117,7 +117,7 @@ int wl1271_acx_feature_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "acx feature cfg"); - feature = kzalloc_obj(*feature, GFP_KERNEL); + feature = kzalloc_obj(*feature); if (!feature) { ret = -ENOMEM; goto out; @@ -162,7 +162,7 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx rx msdu life time"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -189,7 +189,7 @@ int wl1271_acx_slot(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx slot"); - slot = kzalloc_obj(*slot, GFP_KERNEL); + slot = kzalloc_obj(*slot); if (!slot) { ret = -ENOMEM; goto out; @@ -218,7 +218,7 @@ int wl1271_acx_group_address_tbl(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx group address tbl"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -248,7 +248,7 @@ int wl1271_acx_service_period_timeout(struct wl1271 *wl, struct acx_rx_timeout *rx_timeout; int ret; - rx_timeout = kzalloc_obj(*rx_timeout, GFP_KERNEL); + rx_timeout = kzalloc_obj(*rx_timeout); if (!rx_timeout) { ret = -ENOMEM; goto out; @@ -288,7 +288,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx rts threshold: %d", rts_threshold); - rts = kzalloc_obj(*rts, GFP_KERNEL); + rts = kzalloc_obj(*rts); if (!rts) { ret = -ENOMEM; goto out; @@ -316,7 +316,7 @@ int wl1271_acx_dco_itrim_params(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx dco itrim parameters"); - dco = kzalloc_obj(*dco, GFP_KERNEL); + dco = kzalloc_obj(*dco); if (!dco) { ret = -ENOMEM; goto out; @@ -350,7 +350,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED) goto out; - beacon_filter = kzalloc_obj(*beacon_filter, GFP_KERNEL); + beacon_filter = kzalloc_obj(*beacon_filter); if (!beacon_filter) { ret = -ENOMEM; goto out; @@ -387,7 +387,7 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "acx beacon filter table"); - ie_table = kzalloc_obj(*ie_table, GFP_KERNEL); + ie_table = kzalloc_obj(*ie_table); if (!ie_table) { ret = -ENOMEM; goto out; @@ -446,7 +446,7 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx connection monitor parameters: %s", enable ? "enabled" : "disabled"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -482,7 +482,7 @@ int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable) wl1271_debug(DEBUG_ACX, "acx sg enable"); - pta = kzalloc_obj(*pta, GFP_KERNEL); + pta = kzalloc_obj(*pta); if (!pta) { ret = -ENOMEM; goto out; @@ -512,7 +512,7 @@ int wl12xx_acx_sg_cfg(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx sg cfg"); - param = kzalloc_obj(*param, GFP_KERNEL); + param = kzalloc_obj(*param); if (!param) { ret = -ENOMEM; goto out; @@ -541,7 +541,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx cca threshold"); - detection = kzalloc_obj(*detection, GFP_KERNEL); + detection = kzalloc_obj(*detection); if (!detection) { ret = -ENOMEM; goto out; @@ -567,7 +567,7 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "acx bcn dtim options"); - bb = kzalloc_obj(*bb, GFP_KERNEL); + bb = kzalloc_obj(*bb); if (!bb) { ret = -ENOMEM; goto out; @@ -597,7 +597,7 @@ int wl1271_acx_aid(struct wl1271 *wl, struct wl12xx_vif *wlvif, u16 aid) wl1271_debug(DEBUG_ACX, "acx aid"); - acx_aid = kzalloc_obj(*acx_aid, GFP_KERNEL); + acx_aid = kzalloc_obj(*acx_aid); if (!acx_aid) { ret = -ENOMEM; goto out; @@ -624,7 +624,7 @@ int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask) wl1271_debug(DEBUG_ACX, "acx event mbox mask"); - mask = kzalloc_obj(*mask, GFP_KERNEL); + mask = kzalloc_obj(*mask); if (!mask) { ret = -ENOMEM; goto out; @@ -654,7 +654,7 @@ int wl1271_acx_set_preamble(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx_set_preamble"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -682,7 +682,7 @@ int wl1271_acx_cts_protect(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx_set_ctsprotect"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -727,7 +727,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "acx rate policies"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; @@ -798,7 +798,7 @@ int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c, wl1271_debug(DEBUG_ACX, "acx ap rate policy %d rates 0x%x", idx, c->enabled_rates); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -831,7 +831,7 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d " "aifs %d txop %d", ac, cw_min, cw_max, aifsn, txop); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; @@ -866,7 +866,7 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx tid config"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; @@ -907,7 +907,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl, u32 frag_threshold) wl1271_debug(DEBUG_ACX, "acx frag threshold: %d", frag_threshold); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; @@ -933,7 +933,7 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx tx config options"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; @@ -961,7 +961,7 @@ int wl12xx_acx_mem_cfg(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "wl1271 mem cfg"); - mem_conf = kzalloc_obj(*mem_conf, GFP_KERNEL); + mem_conf = kzalloc_obj(*mem_conf); if (!mem_conf) { ret = -ENOMEM; goto out; @@ -998,7 +998,7 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl) { int ret; - wl->target_mem_map = kzalloc_obj(struct wl1271_acx_mem_map, GFP_KERNEL); + wl->target_mem_map = kzalloc_obj(struct wl1271_acx_mem_map); if (!wl->target_mem_map) { wl1271_error("couldn't allocate target memory map"); return -ENOMEM; @@ -1031,7 +1031,7 @@ int wl1271_acx_init_rx_interrupt(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "wl1271 rx interrupt config"); - rx_conf = kzalloc_obj(*rx_conf, GFP_KERNEL); + rx_conf = kzalloc_obj(*rx_conf); if (!rx_conf) { ret = -ENOMEM; goto out; @@ -1065,7 +1065,7 @@ int wl1271_acx_bet_enable(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (enable && wl->conf.conn.bet_enable == CONF_BET_MODE_DISABLE) goto out; - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1094,7 +1094,7 @@ int wl1271_acx_arp_ip_filter(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx arp ip filter, enable: %d", enable); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1127,7 +1127,7 @@ int wl1271_acx_pm_config(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx pm config"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1156,7 +1156,7 @@ int wl1271_acx_keep_alive_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx keep alive mode: %d", enable); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1184,7 +1184,7 @@ int wl1271_acx_keep_alive_config(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx keep alive config"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1216,7 +1216,7 @@ int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx rssi snr trigger"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1258,7 +1258,7 @@ int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "acx rssi snr avg weights"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1293,7 +1293,7 @@ int wl1271_acx_set_ht_capabilities(struct wl1271 *wl, "sta supp: %d sta cap: %d", ht_cap->ht_supported, ht_cap->cap); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1339,7 +1339,7 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "acx ht information setting"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1375,7 +1375,7 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "acx ba initiator policy"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1411,7 +1411,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, wl1271_debug(DEBUG_ACX, "acx ba receiver session setting"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1450,7 +1450,7 @@ int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct wl12xx_acx_fw_tsf_information *tsf_info; int ret; - tsf_info = kzalloc_obj(*tsf_info, GFP_KERNEL); + tsf_info = kzalloc_obj(*tsf_info); if (!tsf_info) { ret = -ENOMEM; goto out; @@ -1482,7 +1482,7 @@ int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx ps rx streaming"); - rx_streaming = kzalloc_obj(*rx_streaming, GFP_KERNEL); + rx_streaming = kzalloc_obj(*rx_streaming); if (!rx_streaming) { ret = -ENOMEM; goto out; @@ -1529,7 +1529,7 @@ int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "acx ap max tx retry"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -1554,7 +1554,7 @@ int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "acx config ps"); - config_ps = kzalloc_obj(*config_ps, GFP_KERNEL); + config_ps = kzalloc_obj(*config_ps); if (!config_ps) { ret = -ENOMEM; goto out; @@ -1585,7 +1585,7 @@ int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, wl1271_debug(DEBUG_ACX, "acx set inconnaction sta %pM", addr); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -1611,7 +1611,7 @@ int wl1271_acx_fm_coex(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx fm coex setting"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1652,7 +1652,7 @@ int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx set rate mgmt params"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; @@ -1694,7 +1694,7 @@ int wl12xx_acx_config_hangover(struct wl1271 *wl) wl1271_debug(DEBUG_ACX, "acx config hangover"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1734,7 +1734,7 @@ int wlcore_acx_average_rssi(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_ACX, "acx roaming statistics"); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) { ret = -ENOMEM; goto out; @@ -1766,7 +1766,7 @@ int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable, wl1271_debug(DEBUG_ACX, "acx default rx filter en: %d act: %d", enable, action); - acx = kzalloc_obj(*acx, GFP_KERNEL); + acx = kzalloc_obj(*acx); if (!acx) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index ded64bf9c5a6..04d0bb8460fe 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c @@ -231,7 +231,7 @@ int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type, if (WARN_ON(*role_id != WL12XX_INVALID_ROLE_ID)) return -EBUSY; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -273,7 +273,7 @@ int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id) if (WARN_ON(*role_id == WL12XX_INVALID_ROLE_ID)) return -ENOENT; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -431,7 +431,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, struct wl12xx_cmd_role_start *cmd; int ret; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -483,7 +483,7 @@ static int wl12xx_cmd_role_stop_dev(struct wl1271 *wl, if (WARN_ON(wlvif->dev_hlid == WL12XX_INVALID_LINK_ID)) return -EINVAL; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -517,7 +517,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) u32 supported_rates; int ret; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -594,7 +594,7 @@ int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) if (WARN_ON(wlvif->sta.hlid == WL12XX_INVALID_LINK_ID)) return -EINVAL; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -641,7 +641,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) } } - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -736,7 +736,7 @@ int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) struct wl12xx_cmd_role_stop *cmd; int ret; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -769,7 +769,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; int ret; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -942,7 +942,7 @@ int wl1271_cmd_data_path(struct wl1271 *wl, bool enable) wl1271_debug(DEBUG_CMD, "cmd data path"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -993,7 +993,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_CMD, "cmd set ps mode"); - ps_params = kzalloc_obj(*ps_params, GFP_KERNEL); + ps_params = kzalloc_obj(*ps_params); if (!ps_params) { ret = -ENOMEM; goto out; @@ -1028,7 +1028,7 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u8 role_id, WARN_ON(buf_len > WL1271_CMD_TEMPL_MAX_SIZE); buf_len = min_t(size_t, buf_len, WL1271_CMD_TEMPL_MAX_SIZE); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1340,7 +1340,7 @@ int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid) wl1271_debug(DEBUG_CMD, "cmd set_default_wep_key %d", id); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1376,7 +1376,7 @@ int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) return 0; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1442,7 +1442,7 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, int ret = 0; u8 lid_type; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; @@ -1505,7 +1505,7 @@ int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_CMD, "cmd set peer state (hlid=%d)", hlid); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1540,7 +1540,7 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_CMD, "cmd add peer %d", (int)hlid); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1599,7 +1599,7 @@ int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_CMD, "cmd remove peer %d", (int)hlid); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1733,7 +1733,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) if (!memcmp(tmp_ch_bitmap, wl->reg_ch_conf_last, sizeof(tmp_ch_bitmap))) goto out; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1778,7 +1778,7 @@ int wl12xx_cmd_config_fwlog(struct wl1271 *wl) wl1271_debug(DEBUG_CMD, "cmd config firmware logger"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1810,7 +1810,7 @@ int wl12xx_cmd_stop_fwlog(struct wl1271 *wl) wl1271_debug(DEBUG_CMD, "cmd stop firmware logger"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1840,7 +1840,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (WARN_ON(role_id == WL12XX_INVALID_ROLE_ID)) return -EINVAL; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1882,7 +1882,7 @@ static int wl12xx_cmd_croc(struct wl1271 *wl, u8 role_id) wl1271_debug(DEBUG_CMD, "cmd croc (%d)", role_id); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -1951,7 +1951,7 @@ int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_ACX, "cmd stop channel switch"); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; @@ -2055,7 +2055,7 @@ int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, "cmd generic cfg (role %d feature %d enable %d value %d)", wlvif->role_id, feature, enable, value); - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) return -ENOMEM; diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c index 3f544a900f67..aa59ddd520f9 100644 --- a/drivers/net/wireless/ti/wlcore/init.c +++ b/drivers/net/wireless/ti/wlcore/init.c @@ -148,7 +148,7 @@ static int wl1271_ap_init_deauth_template(struct wl1271 *wl, int ret; u32 rate; - tmpl = kzalloc_obj(*tmpl, GFP_KERNEL); + tmpl = kzalloc_obj(*tmpl); if (!tmpl) { ret = -ENOMEM; goto out; @@ -175,7 +175,7 @@ static int wl1271_ap_init_null_template(struct wl1271 *wl, int ret; u32 rate; - nullfunc = kzalloc_obj(*nullfunc, GFP_KERNEL); + nullfunc = kzalloc_obj(*nullfunc); if (!nullfunc) { ret = -ENOMEM; goto out; @@ -208,7 +208,7 @@ static int wl1271_ap_init_qos_null_template(struct wl1271 *wl, int ret; u32 rate; - qosnull = kzalloc_obj(*qosnull, GFP_KERNEL); + qosnull = kzalloc_obj(*qosnull); if (!qosnull) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 82e035aea874..17dd417756f2 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -1070,11 +1070,11 @@ static int wl1271_setup(struct wl1271 *wl) if (!wl->raw_fw_status) goto err; - wl->fw_status = kzalloc_obj(*wl->fw_status, GFP_KERNEL); + wl->fw_status = kzalloc_obj(*wl->fw_status); if (!wl->fw_status) goto err; - wl->tx_res_if = kzalloc_obj(*wl->tx_res_if, GFP_KERNEL); + wl->tx_res_if = kzalloc_obj(*wl->tx_res_if); if (!wl->tx_res_if) goto err; @@ -1477,7 +1477,7 @@ wl1271_validate_wowlan_pattern(struct cfg80211_pkt_pattern *p) struct wl12xx_rx_filter *wl1271_rx_filter_alloc(void) { - return kzalloc_obj(struct wl12xx_rx_filter, GFP_KERNEL); + return kzalloc_obj(struct wl12xx_rx_filter); } void wl1271_rx_filter_free(struct wl12xx_rx_filter *filter) @@ -3346,7 +3346,7 @@ static int wl1271_record_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, if (i == MAX_NUM_KEYS) return -EBUSY; - ap_key = kzalloc_obj(*ap_key, GFP_KERNEL); + ap_key = kzalloc_obj(*ap_key); if (!ap_key) return -ENOMEM; @@ -6459,7 +6459,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size, goto err_fwlog; } - wl->buffer_32 = kmalloc_obj(*wl->buffer_32, GFP_KERNEL); + wl->buffer_32 = kmalloc_obj(*wl->buffer_32); if (!wl->buffer_32) { ret = -ENOMEM; goto err_mbox; diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index 7cd58bb0efb6..976d96495f28 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c @@ -389,7 +389,7 @@ wlcore_scan_sched_scan_ssid_list(struct wl1271 *wl, goto out; } - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out; diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c index caca2786d07c..8437038e4dd0 100644 --- a/drivers/net/wireless/ti/wlcore/testmode.c +++ b/drivers/net/wireless/ti/wlcore/testmode.c @@ -159,7 +159,7 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[]) if (ret < 0) goto out; - cmd = kzalloc_obj(*cmd, GFP_KERNEL); + cmd = kzalloc_obj(*cmd); if (!cmd) { ret = -ENOMEM; goto out_sleep; diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index f4f37f71285e..e89173f91637 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -6489,7 +6489,7 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) if (info->attrs[HWSIM_ATTR_PMSR_SUPPORT]) { struct cfg80211_pmsr_capabilities *pmsr_capa; - pmsr_capa = kmalloc_obj(*pmsr_capa, GFP_KERNEL); + pmsr_capa = kmalloc_obj(*pmsr_capa); if (!pmsr_capa) { ret = -ENOMEM; goto out_free; diff --git a/drivers/net/wireless/virtual/virt_wifi.c b/drivers/net/wireless/virtual/virt_wifi.c index eac81ebf9551..885dc7243e8d 100644 --- a/drivers/net/wireless/virtual/virt_wifi.c +++ b/drivers/net/wireless/virtual/virt_wifi.c @@ -558,7 +558,7 @@ static int virt_wifi_newlink(struct net_device *dev, netif_stacked_transfer_operstate(priv->lowerdev, dev); SET_NETDEV_DEV(dev, &priv->lowerdev->dev); - dev->ieee80211_ptr = kzalloc_obj(*dev->ieee80211_ptr, GFP_KERNEL); + dev->ieee80211_ptr = kzalloc_obj(*dev->ieee80211_ptr); if (!dev->ieee80211_ptr) { err = -ENOMEM; diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c index f5063efc8e42..03948f0b4628 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c @@ -722,7 +722,7 @@ static int zd_mac_config_beacon(struct ieee80211_hw *hw, struct sk_buff *beacon, /* Alloc memory for full beacon write at once. */ num_cmds = 1 + zd_chip_is_zd1211b(&mac->chip) + full_len; - ioreqs = kmalloc_objs(struct zd_ioreq32, num_cmds, GFP_KERNEL); + ioreqs = kmalloc_objs(struct zd_ioreq32, num_cmds); if (!ioreqs) { r = -ENOMEM; goto out_nofree; diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zydas/zd1211rw/zd_rf_uw2453.c index d15d95ff5aad..50aca6f681bf 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_rf_uw2453.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_rf_uw2453.c @@ -518,7 +518,7 @@ int zd_rf_init_uw2453(struct zd_rf *rf) /* we have our own TX integration code */ rf->update_channel_int = 0; - rf->priv = kmalloc_obj(struct uw2453_priv, GFP_KERNEL); + rf->priv = kmalloc_obj(struct uw2453_priv); if (rf->priv == NULL) return -ENOMEM; diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c index e5c3be14ae4e..966d8ccb0dbc 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c @@ -752,7 +752,7 @@ static int __zd_usb_enable_rx(struct zd_usb *usb) dev_dbg_f(zd_usb_dev(usb), "\n"); r = -ENOMEM; - urbs = kzalloc_objs(struct urb *, RX_URBS_COUNT, GFP_KERNEL); + urbs = kzalloc_objs(struct urb *, RX_URBS_COUNT); if (!urbs) goto error; for (i = 0; i < RX_URBS_COUNT; i++) { |
