* [PATCH] wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx
@ 2023-08-21 11:52 Dmitry Antipov
2023-08-25 23:48 ` Brian Norris
2023-09-21 6:29 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Antipov @ 2023-08-21 11:52 UTC (permalink / raw)
To: Brian Norris; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov
Drop filled with NULL pointers but otherwise unused 'skb_arr'
array of 'struct mwifiex_sdio_mpa_rx', adjust related code.
Fixes: 960d6d08e395 ("mwifiex: delay skb allocation for RX until cmd53 over")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
drivers/net/wireless/marvell/mwifiex/sdio.c | 10 ----------
drivers/net/wireless/marvell/mwifiex/sdio.h | 4 ----
2 files changed, 14 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index a24bd40dd41a..daf2078420af 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -2554,20 +2554,11 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
if (!card->mp_regs)
return -ENOMEM;
- /* Allocate skb pointer buffers */
- card->mpa_rx.skb_arr = kcalloc(card->mp_agg_pkt_limit, sizeof(void *),
- GFP_KERNEL);
- if (!card->mpa_rx.skb_arr) {
- kfree(card->mp_regs);
- return -ENOMEM;
- }
-
card->mpa_rx.len_arr = kcalloc(card->mp_agg_pkt_limit,
sizeof(*card->mpa_rx.len_arr),
GFP_KERNEL);
if (!card->mpa_rx.len_arr) {
kfree(card->mp_regs);
- kfree(card->mpa_rx.skb_arr);
return -ENOMEM;
}
@@ -2622,7 +2613,6 @@ static void mwifiex_cleanup_sdio(struct mwifiex_adapter *adapter)
cancel_work_sync(&card->work);
kfree(card->mp_regs);
- kfree(card->mpa_rx.skb_arr);
kfree(card->mpa_rx.len_arr);
kfree(card->mpa_tx.buf);
kfree(card->mpa_rx.buf);
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h
index ae94c172310f..b86a9263a6a8 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.h
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.h
@@ -164,10 +164,7 @@ struct mwifiex_sdio_mpa_rx {
u32 pkt_cnt;
u32 ports;
u16 start_port;
-
- struct sk_buff **skb_arr;
u32 *len_arr;
-
u8 enabled;
u32 buf_size;
u32 pkt_aggr_limit;
@@ -372,7 +369,6 @@ static inline void mp_rx_aggr_setup(struct sdio_mmc_card *card,
else
card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt + 1);
}
- card->mpa_rx.skb_arr[card->mpa_rx.pkt_cnt] = NULL;
card->mpa_rx.len_arr[card->mpa_rx.pkt_cnt] = rx_len;
card->mpa_rx.pkt_cnt++;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx
2023-08-21 11:52 [PATCH] wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx Dmitry Antipov
@ 2023-08-25 23:48 ` Brian Norris
2023-09-21 6:29 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2023-08-25 23:48 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless
On Mon, Aug 21, 2023 at 02:52:50PM +0300, Dmitry Antipov wrote:
> Drop filled with NULL pointers but otherwise unused 'skb_arr'
> array of 'struct mwifiex_sdio_mpa_rx', adjust related code.
>
> Fixes: 960d6d08e395 ("mwifiex: delay skb allocation for RX until cmd53 over")
This is not the appropriate Fixes line. These fields continued to be
used afterward, so it would be actively harmful to tell people (or bots)
to backport this patch that far.
I'm not even going to tell you what the last commit that used it was,
because that would still just be nonsense. It's better to have no Fixes
line than to conjure up a garbage one, especially for something for
trivial.
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
The contents look good though:
Acked-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx
2023-08-21 11:52 [PATCH] wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx Dmitry Antipov
2023-08-25 23:48 ` Brian Norris
@ 2023-09-21 6:29 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-09-21 6:29 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Brian Norris, linux-wireless, Dmitry Antipov
Dmitry Antipov <dmantipov@yandex.ru> wrote:
> Drop filled with NULL pointers but otherwise unused 'skb_arr'
> array of 'struct mwifiex_sdio_mpa_rx', adjust related code.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> Acked-by: Brian Norris <briannorris@chromium.org>
Patch applied to wireless-next.git, thanks.
3ffd23d121de wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230821115254.167552-1-dmantipov@yandex.ru/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-21 19:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-21 11:52 [PATCH] wifi: mwifiex: cleanup struct mwifiex_sdio_mpa_rx Dmitry Antipov
2023-08-25 23:48 ` Brian Norris
2023-09-21 6:29 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).