From: Pkshih <pkshih@realtek.com>
To: "colin.king@canonical.com" <colin.king@canonical.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] staging: rtlwifi: remove redundant initialization of 'cfg_cmd'
Date: Mon, 29 Jan 2018 04:27:33 +0000 [thread overview]
Message-ID: <1517200053.21191.1.camel@realtek.com> (raw)
In-Reply-To: <20180126135255.18539-1-colin.king@canonical.com>
On Fri, 2018-01-26 at 13:52 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.com>
It looks good to me.
Acked-by: Ping-Ke Shih <pkshih@realtek.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.
prev parent reply other threads:[~2018-01-29 4:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 13:52 [PATCH] staging: rtlwifi: remove redundant initialization of 'cfg_cmd' Colin King
2018-01-29 4:27 ` Pkshih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517200053.21191.1.camel@realtek.com \
--to=pkshih@realtek.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox