2021-06-24 18:02:17

by Ryusuke Konishi

[permalink] [raw]
Subject: [PATCH] nilfs2: remove redundant continue statement in a while-loop

From: Colin Ian King <[email protected]>

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/[email protected]
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
---
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


2021-06-24 18:05:03

by Ryusuke Konishi

[permalink] [raw]
Subject: Re: [PATCH] nilfs2: remove redundant continue statement in a while-loop

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
<[email protected]> wrote:
>
> From: Colin Ian King <[email protected]>
>
> 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/[email protected]
> Signed-off-by: Colin Ian King <[email protected]>
> Signed-off-by: Ryusuke Konishi <[email protected]>
> ---
> 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
>