* [PATCH] staging: ks7010: remove useless variable
@ 2021-04-08 9:51 Jiapeng Chong
2021-04-08 10:48 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-08 9:51 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Jiapeng Chong
Fix the following gcc warning:
drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set
but not used [-Wunused-but-set-variable].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/staging/ks7010/ks_hostif.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 8bc3b7d..499161d 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -926,14 +926,13 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
void hostif_phy_information_confirm(struct ks_wlan_private *priv)
{
struct iw_statistics *wstats = &priv->wstats;
- u8 rssi, signal, noise;
+ u8 rssi, signal;
u8 link_speed;
u32 transmitted_frame_count, received_fragment_count;
u32 failed_count, fcs_error_count;
rssi = get_byte(priv);
signal = get_byte(priv);
- noise = get_byte(priv);
link_speed = get_byte(priv);
transmitted_frame_count = get_dword(priv);
received_fragment_count = get_dword(priv);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: ks7010: remove useless variable
2021-04-08 9:51 [PATCH] staging: ks7010: remove useless variable Jiapeng Chong
@ 2021-04-08 10:48 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-04-08 10:48 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: linux-staging, linux-kernel
On Thu, Apr 08, 2021 at 05:51:19PM +0800, Jiapeng Chong wrote:
> Fix the following gcc warning:
>
> drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set
> but not used [-Wunused-but-set-variable].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 8bc3b7d..499161d 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -926,14 +926,13 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
> void hostif_phy_information_confirm(struct ks_wlan_private *priv)
> {
> struct iw_statistics *wstats = &priv->wstats;
> - u8 rssi, signal, noise;
> + u8 rssi, signal;
> u8 link_speed;
> u32 transmitted_frame_count, received_fragment_count;
> u32 failed_count, fcs_error_count;
>
> rssi = get_byte(priv);
> signal = get_byte(priv);
> - noise = get_byte(priv);
Are you sure you did not just break the functionality of the device
here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-08 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 9:51 [PATCH] staging: ks7010: remove useless variable Jiapeng Chong
2021-04-08 10:48 ` Greg KH
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.