Commit 00df4073 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: cmd_seq is write-only

The cmd_seq component of struct cmd_priv is set and incremented but never
read. It can be removed.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221230180646.91008-4-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 55074f02
...@@ -65,8 +65,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) ...@@ -65,8 +65,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
pcmdpriv->cmd_seq = 1;
pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
GFP_KERNEL); GFP_KERNEL);
...@@ -233,8 +231,6 @@ int rtw_cmd_thread(void *context) ...@@ -233,8 +231,6 @@ int rtw_cmd_thread(void *context)
ret = cmd_hdl(pcmd->padapter, pcmdbuf); ret = cmd_hdl(pcmd->padapter, pcmdbuf);
pcmd->res = ret; pcmd->res = ret;
} }
pcmdpriv->cmd_seq++;
} else { } else {
pcmd->res = H2C_PARAMETERS_ERROR; pcmd->res = H2C_PARAMETERS_ERROR;
} }
......
...@@ -32,7 +32,6 @@ struct cmd_priv { ...@@ -32,7 +32,6 @@ struct cmd_priv {
struct completion start_cmd_thread; struct completion start_cmd_thread;
struct completion stop_cmd_thread; struct completion stop_cmd_thread;
struct __queue cmd_queue; struct __queue cmd_queue;
u8 cmd_seq;
u8 *cmd_buf; /* shall be non-paged, and 4 bytes aligned */ u8 *cmd_buf; /* shall be non-paged, and 4 bytes aligned */
u8 *cmd_allocated_buf; u8 *cmd_allocated_buf;
u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */ u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment