mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <cgel.zte@gmail.com>, <richard@nod.at>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<chi.minghao@zte.com.cn>, <zealci@zte.com.cn>
Subject: Re: [PATCH] UBIFS: simplify the return expression of run_gc()
Date: Fri, 29 Apr 2022 07:02:28 +0000	[thread overview]
Message-ID: <0de6c8c0-a936-7845-b4ce-51355661e736@microchip.com> (raw)
In-Reply-To: <20220429054556.3851784-1-chi.minghao@zte.com.cn>

On 4/29/22 08:45, cgel.zte@gmail.com wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Simplify the return expression.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  fs/ubifs/budget.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
> index c0b84e960b20..e8b9b756f0ac 100644
> --- a/fs/ubifs/budget.c
> +++ b/fs/ubifs/budget.c
> @@ -65,7 +65,7 @@ static void shrink_liability(struct ubifs_info *c, int nr_to_write)
>   */
>  static int run_gc(struct ubifs_info *c)
>  {
> -       int err, lnum;
> +       int lnum;
> 
>         /* Make some free space by garbage-collecting dirty space */
>         down_read(&c->commit_sem);
> @@ -76,10 +76,7 @@ static int run_gc(struct ubifs_info *c)
> 
>         /* GC freed one LEB, return it to lprops */
>         dbg_budg("GC freed LEB %d", lnum);
> -       err = ubifs_return_leb(c, lnum);
> -       if (err)
> -               return err;
> -       return 0;
> +       return ubifs_return_leb(c, lnum);
>  }
> 
>  /**
> --
> 2.25.1
> 
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


      reply	other threads:[~2022-04-29  7:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  5:45 cgel.zte
2022-04-29  7:02 ` Tudor.Ambarus [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=0de6c8c0-a936-7845-b4ce-51355661e736@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=zealci@zte.com.cn \
    /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®