Re: [PATCH] staging: ks7010: remove useless variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux