* [PATCH] nilfs2: remove redundant continue statement in a while-loop
@ 2021-06-21 10:05 Colin King
2021-06-24 17:34 ` Ryusuke Konishi
0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2021-06-21 10:05 UTC (permalink / raw)
To: Ryusuke Konishi, linux-nilfs; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The continue statement at the end of the while-loop is redundant,
remove it.
Addresses-Coverity: ("Continue has no effect")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/nilfs2/btree.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index f42ab57201e7..ab9ec073330f 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -738,7 +738,6 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree,
if (ptr2 != ptr + cnt || ++cnt == maxblocks)
goto end;
index++;
- continue;
}
if (level == maxlevel)
break;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nilfs2: remove redundant continue statement in a while-loop
2021-06-21 10:05 [PATCH] nilfs2: remove redundant continue statement in a while-loop Colin King
@ 2021-06-24 17:34 ` Ryusuke Konishi
0 siblings, 0 replies; 4+ messages in thread
From: Ryusuke Konishi @ 2021-06-24 17:34 UTC (permalink / raw)
To: Colin King; +Cc: linux-nilfs, kernel-janitors, LKML
Thank you. This change is correct also in view of the expected
behavior of the function
(it really is unnecessary).
I will send this to upstream.
Regards,
Ryusuke Konishi
On Mon, Jun 21, 2021 at 7:05 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The continue statement at the end of the while-loop is redundant,
> remove it.
>
> Addresses-Coverity: ("Continue has no effect")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> fs/nilfs2/btree.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
> index f42ab57201e7..ab9ec073330f 100644
> --- a/fs/nilfs2/btree.c
> +++ b/fs/nilfs2/btree.c
> @@ -738,7 +738,6 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree,
> if (ptr2 != ptr + cnt || ++cnt == maxblocks)
> goto end;
> index++;
> - continue;
> }
> if (level == maxlevel)
> break;
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nilfs2: remove redundant continue statement in a while-loop
2021-06-24 18:01 Ryusuke Konishi
@ 2021-06-24 18:03 ` Ryusuke Konishi
0 siblings, 0 replies; 4+ messages in thread
From: Ryusuke Konishi @ 2021-06-24 18:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-nilfs, LKML
Hi Andrew,
Please queue this for the next merge window.
Thank you,
Ryusuke Konishi
On Fri, Jun 25, 2021 at 3:01 AM Ryusuke Konishi
<konishi.ryusuke@gmail.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The continue statement at the end of the while-loop is redundant,
> remove it.
>
> Addresses-Coverity: ("Continue has no effect")
> Link: https://lkml.kernel.org/r/20210621100519.10257-1-colin.king@canonical.com
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
> ---
> fs/nilfs2/btree.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
> index f42ab57201e7..ab9ec073330f 100644
> --- a/fs/nilfs2/btree.c
> +++ b/fs/nilfs2/btree.c
> @@ -738,7 +738,6 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree,
> if (ptr2 != ptr + cnt || ++cnt == maxblocks)
> goto end;
> index++;
> - continue;
> }
> if (level == maxlevel)
> break;
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] nilfs2: remove redundant continue statement in a while-loop
@ 2021-06-24 18:01 Ryusuke Konishi
2021-06-24 18:03 ` Ryusuke Konishi
0 siblings, 1 reply; 4+ messages in thread
From: Ryusuke Konishi @ 2021-06-24 18:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-nilfs, LKML
From: Colin Ian King <colin.king@canonical.com>
The continue statement at the end of the while-loop is redundant,
remove it.
Addresses-Coverity: ("Continue has no effect")
Link: https://lkml.kernel.org/r/20210621100519.10257-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
---
fs/nilfs2/btree.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index f42ab57201e7..ab9ec073330f 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -738,7 +738,6 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree,
if (ptr2 != ptr + cnt || ++cnt == maxblocks)
goto end;
index++;
- continue;
}
if (level == maxlevel)
break;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-24 18:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 10:05 [PATCH] nilfs2: remove redundant continue statement in a while-loop Colin King
2021-06-24 17:34 ` Ryusuke Konishi
2021-06-24 18:01 Ryusuke Konishi
2021-06-24 18:03 ` Ryusuke Konishi
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).