* [PATCH] mwifiex: remove some useless code
@ 2023-11-15 9:23 Su Hui
2023-11-15 21:26 ` Brian Norris
2023-11-22 15:50 ` wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Su Hui @ 2023-11-15 9:23 UTC (permalink / raw)
To: kvalo, nathan, ndesaulniers, trix
Cc: Su Hui, briannorris, lukas, linux-wireless, linux-kernel, llvm,
kernel-janitors
Clang static analyzer complains that value stored to 'priv' is never read.
'priv' is useless, so remove it to save space.
Signed-off-by: Su Hui <suhui@nfschina.com>
---
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index 3756aa247e77..9eff29a25544 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -1244,8 +1244,6 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
u8 *pbuf, u32 upld_len)
{
struct host_cmd_ds_command *cmd = (struct host_cmd_ds_command *) pbuf;
- struct mwifiex_private *priv =
- mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
uint16_t result = le16_to_cpu(cmd->result);
uint16_t command = le16_to_cpu(cmd->command);
uint16_t seq_num = le16_to_cpu(cmd->seq_num);
@@ -1260,12 +1258,6 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
"cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n",
command, result, le16_to_cpu(cmd->size), seq_num);
- /* Get BSS number and corresponding priv */
- priv = mwifiex_get_priv_by_id(adapter, HostCmd_GET_BSS_NO(seq_num),
- HostCmd_GET_BSS_TYPE(seq_num));
- if (!priv)
- priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
-
/* Update sequence number */
seq_num = HostCmd_GET_SEQ_NO(seq_num);
/* Clear RET_BIT from HostCmd */
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mwifiex: remove some useless code
2023-11-15 9:23 [PATCH] mwifiex: remove some useless code Su Hui
@ 2023-11-15 21:26 ` Brian Norris
2023-11-22 15:50 ` wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2023-11-15 21:26 UTC (permalink / raw)
To: Su Hui
Cc: kvalo, nathan, ndesaulniers, trix, lukas, linux-wireless,
linux-kernel, llvm, kernel-janitors
On Wed, Nov 15, 2023 at 05:23:29PM +0800, Su Hui wrote:
> Clang static analyzer complains that value stored to 'priv' is never read.
> 'priv' is useless, so remove it to save space.
>
> Signed-off-by: Su Hui <suhui@nfschina.com>
> ---
> drivers/net/wireless/marvell/mwifiex/cmdevt.c | 8 --------
> 1 file changed, 8 deletions(-)
Acked-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable
2023-11-15 9:23 [PATCH] mwifiex: remove some useless code Su Hui
2023-11-15 21:26 ` Brian Norris
@ 2023-11-22 15:50 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-11-22 15:50 UTC (permalink / raw)
To: Su Hui
Cc: nathan, ndesaulniers, trix, Su Hui, briannorris, lukas,
linux-wireless, linux-kernel, llvm, kernel-janitors
Su Hui <suhui@nfschina.com> wrote:
> Clang static analyzer complains that value stored to 'priv' is never read.
> 'priv' is useless, so remove it to save space.
>
> Signed-off-by: Su Hui <suhui@nfschina.com>
> Acked-by: Brian Norris <briannorris@chromium.org>
Patch applied to wireless-next.git, thanks.
a85198c9f068 wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable
--
https://patchwork.kernel.org/project/linux-wireless/patch/20231115092328.1048103-1-suhui@nfschina.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-22 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 9:23 [PATCH] mwifiex: remove some useless code Su Hui
2023-11-15 21:26 ` Brian Norris
2023-11-22 15:50 ` wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.