public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/8] ext4: remove unused return value of __mb_check_buddy
Date: Tue, 2 Jan 2024 14:00:46 +0100	[thread overview]
Message-ID: <20240102130046.uc4iubviimhgpmis@quack3> (raw)
In-Reply-To: <20231125161143.3945726-2-shikemeng@huaweicloud.com>

On Sun 26-11-23 00:11:36, Kemeng Shi wrote:
> Remove unused return value of __mb_check_buddy.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/mballoc.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 454d56126..9f9b8dd06 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -677,7 +677,7 @@ do {									\
>  	}								\
>  } while (0)
>  
> -static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
> +static void __mb_check_buddy(struct ext4_buddy *e4b, char *file,
>  				const char *function, int line)
>  {
>  	struct super_block *sb = e4b->bd_sb;
> @@ -696,7 +696,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
>  	void *buddy2;
>  
>  	if (e4b->bd_info->bb_check_counter++ % 10)
> -		return 0;
> +		return;
>  
>  	while (order > 1) {
>  		buddy = mb_find_buddy(e4b, order, &max);
> @@ -758,7 +758,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
>  
>  	grp = ext4_get_group_info(sb, e4b->bd_group);
>  	if (!grp)
> -		return NULL;
> +		return;
>  	list_for_each(cur, &grp->bb_prealloc_list) {
>  		ext4_group_t groupnr;
>  		struct ext4_prealloc_space *pa;
> @@ -768,7 +768,6 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
>  		for (i = 0; i < pa->pa_len; i++)
>  			MB_CHECK_ASSERT(mb_test_bit(k + i, buddy));
>  	}
> -	return 0;
>  }
>  #undef MB_CHECK_ASSERT
>  #define mb_check_buddy(e4b) __mb_check_buddy(e4b,	\
> -- 
> 2.30.0
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-01-02 13:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 16:11 [PATCH 0/8] Some random cleanups to mballoc Kemeng Shi
2023-11-25 16:11 ` [PATCH 1/8] ext4: remove unused return value of __mb_check_buddy Kemeng Shi
2024-01-02 13:00   ` Jan Kara [this message]
2023-11-25 16:11 ` [PATCH 2/8] ext4: remove unused parameter group in ext4_mb_choose_next_group_*() Kemeng Shi
2024-01-02 13:01   ` Jan Kara
2023-11-25 16:11 ` [PATCH 3/8] ext4: remove unneeded return value of ext4_mb_release_context Kemeng Shi
2024-01-02 13:02   ` Jan Kara
2023-11-25 16:11 ` [PATCH 4/8] ext4: remove unused ext4_allocation_context::ac_groups_considered Kemeng Shi
2024-01-02 13:03   ` Jan Kara
2023-11-25 16:11 ` [PATCH 5/8] ext4: remove unused return value of ext4_mb_release Kemeng Shi
2024-01-02 13:04   ` Jan Kara
2023-11-25 16:11 ` [PATCH 6/8] ext4: remove unused return value of ext4_mb_release_inode_pa Kemeng Shi
2024-01-02 13:05   ` Jan Kara
2023-11-25 16:11 ` [PATCH 7/8] ext4: remove unused return value of ext4_mb_release_group_pa Kemeng Shi
2024-01-02 13:06   ` Jan Kara
2023-11-25 16:11 ` [PATCH 8/8] ext4: remove unnecessary parameter "needed" in ext4_discard_preallocations Kemeng Shi
2024-01-02 13:10   ` Jan Kara
2024-01-03  1:27     ` Kemeng Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102130046.uc4iubviimhgpmis@quack3 \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shikemeng@huaweicloud.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox