ubifs: Fix the printing type of c->big_lpt
authorChengsong Ke <kechengsong@huawei.com>
Sat, 31 Oct 2020 08:54:20 +0000 (16:54 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 13 Dec 2020 20:57:10 +0000 (21:57 +0100)
Ubifs uses %d to print c->big_lpt, but c->big_lpt is a variable
of type unsigned int and should be printed with %u.

Signed-off-by: Chengsong Ke <kechengsong@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/debug.c
fs/ubifs/lpt.c

index a041ddd9b22aec9c2ad38187a7fd966a3b61081c..e69c999d28ca7b6bc18a4e447d26790b13e175dd 100644 (file)
@@ -764,7 +764,7 @@ void ubifs_dump_lpt_info(struct ubifs_info *c)
        pr_err("\tnnode_sz:      %d\n", c->nnode_sz);
        pr_err("\tltab_sz:       %d\n", c->ltab_sz);
        pr_err("\tlsave_sz:      %d\n", c->lsave_sz);
-       pr_err("\tbig_lpt:       %d\n", c->big_lpt);
+       pr_err("\tbig_lpt:       %u\n", c->big_lpt);
        pr_err("\tlpt_hght:      %d\n", c->lpt_hght);
        pr_err("\tpnode_cnt:     %d\n", c->pnode_cnt);
        pr_err("\tnnode_cnt:     %d\n", c->nnode_cnt);
index 6e0a153b719421c558de99610f9214db2a54a0cb..778a22bf9a92fb6a1cc467cff5919f216cf4b619 100644 (file)
@@ -851,7 +851,7 @@ int ubifs_create_dflt_lpt(struct ubifs_info *c, int *main_lebs, int lpt_first,
        dbg_lp("lsave_sz %d", c->lsave_sz);
        dbg_lp("lsave_cnt %d", c->lsave_cnt);
        dbg_lp("lpt_hght %d", c->lpt_hght);
-       dbg_lp("big_lpt %d", c->big_lpt);
+       dbg_lp("big_lpt %u", c->big_lpt);
        dbg_lp("LPT root is at %d:%d", c->lpt_lnum, c->lpt_offs);
        dbg_lp("LPT head is at %d:%d", c->nhead_lnum, c->nhead_offs);
        dbg_lp("LPT ltab is at %d:%d", c->ltab_lnum, c->ltab_offs);
@@ -1824,7 +1824,7 @@ static int lpt_init_rd(struct ubifs_info *c)
        dbg_lp("lsave_sz %d", c->lsave_sz);
        dbg_lp("lsave_cnt %d", c->lsave_cnt);
        dbg_lp("lpt_hght %d", c->lpt_hght);
-       dbg_lp("big_lpt %d", c->big_lpt);
+       dbg_lp("big_lpt %u", c->big_lpt);
        dbg_lp("LPT root is at %d:%d", c->lpt_lnum, c->lpt_offs);
        dbg_lp("LPT head is at %d:%d", c->nhead_lnum, c->nhead_offs);
        dbg_lp("LPT ltab is at %d:%d", c->ltab_lnum, c->ltab_offs);