All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Kees Cook <keescook@chromium.org>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Frederick Lawler <fred@fredlawl.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot'
Date: Wed, 26 Sep 2018 14:24:53 -0500	[thread overview]
Message-ID: <20180926192453.GD28024@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <1537959962-83251-1-git-send-email-yuehaibing@huawei.com>

On Wed, Sep 26, 2018 at 11:06:02AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/pci/hotplug/cpqphp_core.c: In function 'init_SERR':
> drivers/pci/hotplug/cpqphp_core.c:124:5: warning:
>  variable 'physical_slot' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to pci/hotplug for v4.20, thanks!

> ---
>  drivers/pci/hotplug/cpqphp_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
> index 95b7d60..16bbb18 100644
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -121,7 +121,6 @@ static int init_SERR(struct controller *ctrl)
>  {
>  	u32 tempdword;
>  	u32 number_of_slots;
> -	u8 physical_slot;
>  
>  	if (!ctrl)
>  		return 1;
> @@ -131,7 +130,6 @@ static int init_SERR(struct controller *ctrl)
>  	number_of_slots = readb(ctrl->hpc_reg + SLOT_MASK) & 0x0F;
>  	/* Loop through slots */
>  	while (number_of_slots) {
> -		physical_slot = tempdword;
>  		writeb(0, ctrl->hpc_reg + SLOT_SERR);
>  		tempdword++;
>  		number_of_slots--;
> 

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Kees Cook <keescook@chromium.org>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Frederick Lawler <fred@fredlawl.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot'
Date: Wed, 26 Sep 2018 19:24:53 +0000	[thread overview]
Message-ID: <20180926192453.GD28024@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <1537959962-83251-1-git-send-email-yuehaibing@huawei.com>

On Wed, Sep 26, 2018 at 11:06:02AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/pci/hotplug/cpqphp_core.c: In function 'init_SERR':
> drivers/pci/hotplug/cpqphp_core.c:124:5: warning:
>  variable 'physical_slot' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to pci/hotplug for v4.20, thanks!

> ---
>  drivers/pci/hotplug/cpqphp_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
> index 95b7d60..16bbb18 100644
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -121,7 +121,6 @@ static int init_SERR(struct controller *ctrl)
>  {
>  	u32 tempdword;
>  	u32 number_of_slots;
> -	u8 physical_slot;
>  
>  	if (!ctrl)
>  		return 1;
> @@ -131,7 +130,6 @@ static int init_SERR(struct controller *ctrl)
>  	number_of_slots = readb(ctrl->hpc_reg + SLOT_MASK) & 0x0F;
>  	/* Loop through slots */
>  	while (number_of_slots) {
> -		physical_slot = tempdword;
>  		writeb(0, ctrl->hpc_reg + SLOT_SERR);
>  		tempdword++;
>  		number_of_slots--;
> 

  reply	other threads:[~2018-09-26 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 10:57 [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot' YueHaibing
2018-09-26 11:06 ` YueHaibing
2018-09-26 19:24 ` Bjorn Helgaas [this message]
2018-09-26 19:24   ` Bjorn Helgaas

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=20180926192453.GD28024@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=elfring@users.sourceforge.net \
    --cc=fred@fredlawl.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tyreld@linux.vnet.ibm.com \
    --cc=yuehaibing@huawei.com \
    /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 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.