mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Rex Nie <rexnie3@gmail.com>,
	ericvh@kernel.org, lucho@ionkov.net, asmadeus@codewreck.org,
	linux_oss@crudebyte.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p/fs: Different branch return the same value
Date: Sat, 16 Nov 2024 17:54:52 +0100	[thread overview]
Message-ID: <fe670aff-461f-417f-a9b7-7b714e84b5e2@wanadoo.fr> (raw)
In-Reply-To: <20241116152612.2423-1-rexnie3@gmail.com>

Le 16/11/2024 à 16:26, Rex Nie a écrit :
> The same code is executed when the condition ret < 0 is true or false.
> Remove the if branch and just return v9fs_init_inode_cache(). This
> does not change the semantics of the original code.
> 
> Signed-off-by: Rex Nie <rexnie3@gmail.com>
> ---
>   fs/9p/v9fs.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index 281a1ed03a04..ee0a374e0d9d 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -661,12 +661,7 @@ static void v9fs_destroy_inode_cache(void)
>   
>   static int v9fs_cache_register(void)
>   {
> -	int ret;
> -
> -	ret = v9fs_init_inode_cache();
> -	if (ret < 0)
> -		return ret;
> -	return ret;
> +	return v9fs_init_inode_cache();
>   }
>   
>   static void v9fs_cache_unregister(void)

Hi,

a similar patch has already been sent.

See [1], which is the v2 of the patch and goes one step further.

CJ

[1]: 
https://lore.kernel.org/linux-kernel/20241107095756.10261-1-colin.i.king@gmail.com/

      parent reply	other threads:[~2024-11-16 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-16 15:26 Rex Nie
2024-11-16 16:06 ` Christian Schoenebeck
2024-11-16 16:54 ` Christophe JAILLET [this message]

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=fe670aff-461f-417f-a9b7-7b714e84b5e2@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=asmadeus@codewreck.org \
    --cc=ericvh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=rexnie3@gmail.com \
    /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

all inboxes | Powered by JetHome®