[v2,4/4] mm/compaction: remove unnecessary "else continue" at end of loop in isolate_freepages_block

Message ID 20230803094901.2915942-5-shikemeng@huaweicloud.com
State New
Headers
Series Fixes and cleanups to compaction |

Commit Message

Kemeng Shi Aug. 3, 2023, 9:49 a.m. UTC
  There is no behavior change to remove "else continue" code at end of scan loop.
Just remove it to make code cleaner.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/compaction.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

David Hildenbrand Aug. 3, 2023, 10:32 a.m. UTC | #1
On 03.08.23 11:49, Kemeng Shi wrote:
> There is no behavior change to remove "else continue" code at end of scan loop.
> Just remove it to make code cleaner.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>   mm/compaction.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index cb1dd5c5bf3f..006fc35bffa1 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -666,8 +666,6 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
>   isolate_fail:
>   		if (strict)
>   			break;
> -		else
> -			continue;
>   
>   	}
>   

Reviewed-by: David Hildenbrand <david@redhat.com>
  

Patch

diff --git a/mm/compaction.c b/mm/compaction.c
index cb1dd5c5bf3f..006fc35bffa1 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -666,8 +666,6 @@  static unsigned long isolate_freepages_block(struct compact_control *cc,
 isolate_fail:
 		if (strict)
 			break;
-		else
-			continue;
 
 	}