* [PATCH] mtd: cfi_cmdset_0002: remove redundant variable timeo
@ 2018-07-03 7:43 Colin King
2018-07-07 10:03 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-03 7:43 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, linux-mtd
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable is_local is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'timeo' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 1b64ac8c5bc8..72428b6bfc47 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1216,7 +1216,6 @@ static inline int do_read_secsi_onechip(struct map_info *map,
size_t grouplen)
{
DECLARE_WAITQUEUE(wait, current);
- unsigned long timeo = jiffies + HZ;
retry:
mutex_lock(&chip->mutex);
@@ -1229,7 +1228,6 @@ static inline int do_read_secsi_onechip(struct map_info *map,
schedule();
remove_wait_queue(&chip->wq, &wait);
- timeo = jiffies + HZ;
goto retry;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: cfi_cmdset_0002: remove redundant variable timeo
2018-07-03 7:43 [PATCH] mtd: cfi_cmdset_0002: remove redundant variable timeo Colin King
@ 2018-07-07 10:03 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-07-07 10:03 UTC (permalink / raw)
To: Colin King
Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
linux-mtd, kernel-janitors, linux-kernel
On Tue, 3 Jul 2018 08:43:39 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable is_local is being assigned but is never used hence it is
> redundant and can be removed.
>
> Cleans up clang warning:
> warning: variable 'timeo' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
Thanks,
Boris
> ---
> drivers/mtd/chips/cfi_cmdset_0002.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 1b64ac8c5bc8..72428b6bfc47 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -1216,7 +1216,6 @@ static inline int do_read_secsi_onechip(struct map_info *map,
> size_t grouplen)
> {
> DECLARE_WAITQUEUE(wait, current);
> - unsigned long timeo = jiffies + HZ;
>
> retry:
> mutex_lock(&chip->mutex);
> @@ -1229,7 +1228,6 @@ static inline int do_read_secsi_onechip(struct map_info *map,
>
> schedule();
> remove_wait_queue(&chip->wq, &wait);
> - timeo = jiffies + HZ;
>
> goto retry;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-07 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 7:43 [PATCH] mtd: cfi_cmdset_0002: remove redundant variable timeo Colin King
2018-07-07 10:03 ` Boris Brezillon
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).