public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Wang Zhaolong <wangzhaolong1@huawei.com>, <richard@nod.at>,
	<miquel.raynal@bootlin.com>, <vigneshr@ti.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<yi.zhang@huawei.com>
Subject: Re: [PATCH] mtd: ubi: remove unused parameter 'pnum' from add_volume()
Date: Mon, 26 Aug 2024 09:17:42 +0800	[thread overview]
Message-ID: <7ef4f6c2-feae-e98b-cc85-a9f92eadaa67@huawei.com> (raw)
In-Reply-To: <20240825083515.4074081-1-wangzhaolong1@huawei.com>

在 2024/8/25 16:35, Wang Zhaolong 写道:
> The parameter 'pnum' in the function add_volume() is not used inside the
> function body. This patch removes this unused parameter to clean up the
> code and improve readability.
> 
> This change does not affect the functionality of add_volume() or any other
> part of the UBI subsystem, as the removed parameter is not utilized.
> 
> Signed-off-by: Wang Zhaolong <wangzhaolong1@huawei.com>
> ---
>   drivers/mtd/ubi/attach.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
> 
> diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
> index ae5abe492b52..fe9784c90ea4 100644
> --- a/drivers/mtd/ubi/attach.c
> +++ b/drivers/mtd/ubi/attach.c
> @@ -393,8 +393,7 @@ static int validate_vid_hdr(const struct ubi_device *ubi,
>    * to the allocated "av" object in case of success and a negative error code in
>    * case of failure.
>    */
> -static struct ubi_ainf_volume *add_volume(struct ubi_attach_info *ai,
> -					  int vol_id, int pnum,
> +static struct ubi_ainf_volume *add_volume(struct ubi_attach_info *ai, int vol_id,
>   					  const struct ubi_vid_hdr *vid_hdr)
>   {
>   	struct ubi_ainf_volume *av;
> @@ -576,7 +575,7 @@ int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum,
>   	dbg_bld("PEB %d, LEB %d:%d, EC %d, sqnum %llu, bitflips %d",
>   		pnum, vol_id, lnum, ec, sqnum, bitflips);
>   
> -	av = add_volume(ai, vol_id, pnum, vid_hdr);
> +	av = add_volume(ai, vol_id, vid_hdr);
>   	if (IS_ERR(av))
>   		return PTR_ERR(av);
>   
> 


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2024-08-26  1:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-25  8:35 [PATCH] mtd: ubi: remove unused parameter 'pnum' from add_volume() Wang Zhaolong
2024-08-26  1:17 ` Zhihao Cheng [this message]
2024-08-27  3:26 ` kernel test robot
2024-08-27  3:52   ` Zhihao Cheng

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=7ef4f6c2-feae-e98b-cc85-a9f92eadaa67@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=wangzhaolong1@huawei.com \
    --cc=yi.zhang@huawei.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