linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
To: yu kuai <yukuai3@huawei.com>
Cc: perex@perex.cz, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com, zhengbin13@huawei.com,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] PNP: isapnp: remove set but not used variable 'checksum'
Date: Wed, 15 Jan 2020 11:56:55 +0100	[thread overview]
Message-ID: <2406530b-704b-2168-8f88-66c9b0fc6727@intel.com> (raw)
In-Reply-To: <20200103121710.4761-1-yukuai3@huawei.com>

On 1/3/2020 1:17 PM, yu kuai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/pnp/isapnp/core.c: In function ‘isapnp_build_device_list’:
> drivers/pnp/isapnp/core.c:777:27: warning: variable ‘checksum’ set
> but not used [-Wunused-but-set-variable]
>
> It is never used, and so can be removed.
>
> Signed-off-by: yu kuai <yukuai3@huawei.com>
> ---
>   drivers/pnp/isapnp/core.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
> index 179b737280e1..e39d49bceae0 100644
> --- a/drivers/pnp/isapnp/core.c
> +++ b/drivers/pnp/isapnp/core.c
> @@ -774,7 +774,7 @@ static unsigned char __init isapnp_checksum(unsigned char *data)
>   static int __init isapnp_build_device_list(void)
>   {
>   	int csn;
> -	unsigned char header[9], checksum;
> +	unsigned char header[9];
>   	struct pnp_card *card;
>   	u32 eisa_id;
>   	char id[8];
> @@ -784,7 +784,6 @@ static int __init isapnp_build_device_list(void)
>   	for (csn = 1; csn <= isapnp_csn_count; csn++) {
>   		isapnp_wake(csn);
>   		isapnp_peek(header, 9);
> -		checksum = isapnp_checksum(header);
>   		eisa_id = header[0] | header[1] << 8 |
>   			  header[2] << 16 | header[3] << 24;
>   		pnp_eisa_id_to_string(eisa_id, id);

Applied as 5.6 material, thanks!

Note that it is recommended to CC patches that touch the PNP code to 
linux-acpi@vger.kernel.org



      reply	other threads:[~2020-01-15 10:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 12:17 [PATCH] PNP: isapnp: remove set but not used variable 'checksum' yu kuai
2020-01-15 10:56 ` Rafael J. Wysocki [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=2406530b-704b-2168-8f88-66c9b0fc6727@intel.com \
    --to=rafael.j.wysocki@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    --cc=zhengbin13@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).