lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1517200053.21191.1.camel@realtek.com>
Date:   Mon, 29 Jan 2018 04:27:33 +0000
From:   Pkshih <pkshih@...ltek.com>
To:     "colin.king@...onical.com" <colin.king@...onical.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] staging: rtlwifi: remove redundant initialization of 'cfg_cmd'

On Fri, 2018-01-26 at 13:52 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The initialization of cfg_cmd is redundant as the value is never read
> and it is being re-assigned to cfg_cmd = pwrcfgcmd[ary_idx] inside a
> loop, hence it can be removed.
> 
> Cleans up clang warning:
> drivers/staging/rtlwifi/core.c:1819:22: warning: Value stored to
> 'cfg_cmd' during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

It looks good to me.

Acked-by: Ping-Ke Shih <pkshih@...ltek.com>

> ---
>  drivers/staging/rtlwifi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtlwifi/core.c b/drivers/staging/rtlwifi/core.c
> index a43d37452e8b..3ec039498208 100644
> --- a/drivers/staging/rtlwifi/core.c
> +++ b/drivers/staging/rtlwifi/core.c
> @@ -1816,7 +1816,7 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv,
> u8 cut_version,
>  			      u8 faversion, u8 interface_type,
>  			      struct wlan_pwr_cfg pwrcfgcmd[])
>  {
> -	struct wlan_pwr_cfg cfg_cmd = {0};
> +	struct wlan_pwr_cfg cfg_cmd;
>  	bool polling_bit = false;
>  	u32 ary_idx = 0;
>  	u8 value = 0;
> -- 
> 2.15.1
> 
> 
> ------Please consider the environment before printing this e-mail.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ