mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Colin King <colin.king@canonical.com>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: remove redundant assignment of 0 to slots
Date: Wed, 18 Oct 2017 12:32:52 +0900	[thread overview]
Message-ID: <874lqxuo4b.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20171017140258.22536-1-colin.king@canonical.com> (Colin King's message of "Tue, 17 Oct 2017 15:02:58 +0100")

Colin King <colin.king@canonical.com> writes:

> From: Colin Ian King <colin.king@canonical.com>
>
> The variable slots is being assigned a value of zero that is never
> read, slots is being updated again a few lines later. Remove this
> redundant assignment.
> Cleans clang warning: Value stored to 'slots' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Looks like good (if old gcc didn't have false positive warning).

Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

> ---
>  fs/fat/dir.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index 81cecbe6d7cf..b833ffeee1e1 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -291,7 +291,6 @@ static int fat_parse_long(struct inode *dir, loff_t *pos,
>  		}
>  	}
>  parse_long:
> -	slots = 0;
>  	ds = (struct msdos_dir_slot *)*de;
>  	id = ds->id;
>  	if (!(id & 0x40))

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

      reply	other threads:[~2017-10-18  4:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 14:02 Colin King
2017-10-18  3:32 ` OGAWA Hirofumi [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=874lqxuo4b.fsf@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=colin.king@canonical.com \
    --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

all inboxes | Powered by JetHome®