From: Borislav Petkov <bp@alien8.de>
To: YueHaibing <yuehaibing@huawei.com>
Cc: linux-edac@vger.kernel.org, ravi@jetztechnologies.com,
arvino55@gmail.com, mchehab@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] edac: i82975x: remove set but not used variable 'dtype'
Date: Tue, 6 Nov 2018 19:05:26 +0100 [thread overview]
Message-ID: <20181106180526.GL13712@zn.tnic> (raw)
In-Reply-To: <20181101022604.7312-1-yuehaibing@huawei.com>
On Thu, Nov 01, 2018 at 10:26:04AM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/edac/i82975x_edac.c:378:16: warning:
> variable ‘dtype’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 084a4fccef39 ("edac: move dimm properties to struct dimm_info")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/edac/i82975x_edac.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
> index 892815e..ae0d8fa 100644
> --- a/drivers/edac/i82975x_edac.c
> +++ b/drivers/edac/i82975x_edac.c
> @@ -375,7 +375,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
> u32 cumul_size, nr_pages;
> int index, chan;
> struct dimm_info *dimm;
> - enum dev_type dtype;
>
> last_cumul_size = 0;
>
> @@ -413,7 +412,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
> * [0-7] for single-channel; i.e. csrow->nr_channels = 1
> * [0-3] for dual-channel; i.e. csrow->nr_channels = 2
> */
> - dtype = i82975x_dram_type(mch_window, index);
Please get rid of that silly function too and move the comment and the
assignment to the single place where it is done:
/*
* ECC is possible on i92975x ONLY with DEV_X8
*/
dimm->dtype = DEV_X8;
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
WARNING: multiple messages have this Message-ID
From: Borislav Petkov <bp@alien8.de>
To: YueHaibing <yuehaibing@huawei.com>
Cc: linux-edac@vger.kernel.org, ravi@jetztechnologies.com,
arvino55@gmail.com, mchehab@kernel.org,
linux-kernel@vger.kernel.org
Subject: [-next] edac: i82975x: remove set but not used variable 'dtype'
Date: Tue, 6 Nov 2018 19:05:26 +0100 [thread overview]
Message-ID: <20181106180526.GL13712@zn.tnic> (raw)
On Thu, Nov 01, 2018 at 10:26:04AM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/edac/i82975x_edac.c:378:16: warning:
> variable ‘dtype’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 084a4fccef39 ("edac: move dimm properties to struct dimm_info")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/edac/i82975x_edac.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
> index 892815e..ae0d8fa 100644
> --- a/drivers/edac/i82975x_edac.c
> +++ b/drivers/edac/i82975x_edac.c
> @@ -375,7 +375,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
> u32 cumul_size, nr_pages;
> int index, chan;
> struct dimm_info *dimm;
> - enum dev_type dtype;
>
> last_cumul_size = 0;
>
> @@ -413,7 +412,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
> * [0-7] for single-channel; i.e. csrow->nr_channels = 1
> * [0-3] for dual-channel; i.e. csrow->nr_channels = 2
> */
> - dtype = i82975x_dram_type(mch_window, index);
Please get rid of that silly function too and move the comment and the
assignment to the single place where it is done:
/*
* ECC is possible on i92975x ONLY with DEV_X8
*/
dimm->dtype = DEV_X8;
Thx.
next prev parent reply other threads:[~2018-11-06 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 2:26 YueHaibing
2018-11-01 2:26 ` [-next] " YueHaibing
2018-11-06 18:05 ` Borislav Petkov [this message]
2018-11-06 18:05 ` Borislav Petkov
2018-11-07 1:28 ` [PATCH -next] " YueHaibing
2018-11-07 1:28 ` [-next] " YueHaibing
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=20181106180526.GL13712@zn.tnic \
--to=bp@alien8.de \
--cc=arvino55@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ravi@jetztechnologies.com \
--cc=yuehaibing@huawei.com \
--subject='Re: [PATCH -next] edac: i82975x: remove set but not used variable '\''dtype'\''' \
/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
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.