[PATCH] mtd: ubi: remove unused parameter 'pnum' from add_volume()
Wang Zhaolong
wangzhaolong1 at huawei.com
Sun Aug 25 01:35:15 PDT 2024
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 at huawei.com>
---
drivers/mtd/ubi/attach.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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);
--
2.34.3
More information about the linux-mtd
mailing list