[05/10] ext4: remove unnecessary return for void function

Message ID 20230721171007.2065423-6-shikemeng@huaweicloud.com
State New
Headers
Series A few fixes and cleanups to mballoc |

Commit Message

Kemeng Shi July 21, 2023, 5:10 p.m. UTC
  The return at end of void function is nunecessary, just remove it.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 fs/ext4/mballoc.c | 6 ------
 1 file changed, 6 deletions(-)
  

Comments

Ritesh Harjani (IBM) July 21, 2023, 3:43 p.m. UTC | #1
Kemeng Shi <shikemeng@huaweicloud.com> writes:

> The return at end of void function is nunecessary, just remove it.

s/nunecessary/unnecessary

Note, while applying this patch series on ted's dev branch, I got a
conflict in this patch. It's eaier to resolve, however you might want to
make sure that it is cleanly applicable on a given tree in v2. 

>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>  fs/ext4/mballoc.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index b838944b5f09..78160bf5b533 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -4880,7 +4880,6 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
>  		mb_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
>  		n = rb_next(n);
>  	}
> -	return;
>  }
>  
>  /*
> @@ -5634,12 +5633,10 @@ static void ext4_mb_show_ac(struct ext4_allocation_context *ac)
>  #else
>  static inline void ext4_mb_show_pa(struct super_block *sb)
>  {
> -	return;
>  }
>  static inline void ext4_mb_show_ac(struct ext4_allocation_context *ac)
>  {
>  	ext4_mb_show_pa(ac->ac_sb);
> -	return;
>  }
>  #endif
>  
> @@ -5885,7 +5882,6 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)
>  						  order, lg_prealloc_count);
>  		return;

Why not kill this ^^ return too?

>  	}
> -	return ;
>  }
>  
>  /*
> @@ -6470,7 +6466,6 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
>  	}
>  error_return:
>  	ext4_std_error(sb, err);
> -	return;
>  }
>  
>  /**
> @@ -6573,7 +6568,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
>  	}
>  
>  	ext4_mb_clear_bb(handle, inode, block, count, flags);
> -	return;
>  }
>  
>  /**
> -- 
> 2.30.0

With above addressed, feel free to add: 

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

-ritesh
  

Patch

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b838944b5f09..78160bf5b533 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4880,7 +4880,6 @@  static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
 		mb_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
 		n = rb_next(n);
 	}
-	return;
 }
 
 /*
@@ -5634,12 +5633,10 @@  static void ext4_mb_show_ac(struct ext4_allocation_context *ac)
 #else
 static inline void ext4_mb_show_pa(struct super_block *sb)
 {
-	return;
 }
 static inline void ext4_mb_show_ac(struct ext4_allocation_context *ac)
 {
 	ext4_mb_show_pa(ac->ac_sb);
-	return;
 }
 #endif
 
@@ -5885,7 +5882,6 @@  static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)
 						  order, lg_prealloc_count);
 		return;
 	}
-	return ;
 }
 
 /*
@@ -6470,7 +6466,6 @@  static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
 	}
 error_return:
 	ext4_std_error(sb, err);
-	return;
 }
 
 /**
@@ -6573,7 +6568,6 @@  void ext4_free_blocks(handle_t *handle, struct inode *inode,
 	}
 
 	ext4_mb_clear_bb(handle, inode, block, count, flags);
-	return;
 }
 
 /**