* [PATCH] fat: remove redundant assignment of 0 to slots
@ 2017-10-17 14:02 Colin King
2017-10-18 3:32 ` OGAWA Hirofumi
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-17 14:02 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: kernel-janitors, linux-kernel
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>
---
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))
--
2.14.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fat: remove redundant assignment of 0 to slots
2017-10-17 14:02 [PATCH] fat: remove redundant assignment of 0 to slots Colin King
@ 2017-10-18 3:32 ` OGAWA Hirofumi
0 siblings, 0 replies; 2+ messages in thread
From: OGAWA Hirofumi @ 2017-10-18 3:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: Colin King, kernel-janitors, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-18 4:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 14:02 [PATCH] fat: remove redundant assignment of 0 to slots Colin King
2017-10-18 3:32 ` OGAWA Hirofumi
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®