Commit b4fcf48a authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman

staging/goldfish: Use %zx for printing size_t variables

When building the driver, gcc emits the following warnings:
.../drivers/staging/goldfish/goldfish_nand.c:
In function 'goldfish_nand_read_oob':
goldfish_nand.c:159:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]
goldfish_nand.c:159:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 4 has type 'size_t' [-Wformat]

In function 'goldfish_nand_write_oob':
goldfish_nand.c:191:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]
goldfish_nand.c:191:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 4 has type 'size_t' [-Wformat]

In function 'goldfish_nand_read':
goldfish_nand.c:215:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]

In function 'goldfish_nand_write':
goldfish_nand.c:239:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]

-> As defined in the printk-formats use %zx for size_t variables
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37fa328f
...@@ -156,7 +156,7 @@ static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, ...@@ -156,7 +156,7 @@ static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs,
return 0; return 0;
invalid_arg: invalid_arg:
pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %x, ooblen %x, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
...@@ -188,7 +188,7 @@ static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs, ...@@ -188,7 +188,7 @@ static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs,
return 0; return 0;
invalid_arg: invalid_arg:
pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %x, ooblen %x, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
...@@ -212,7 +212,7 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -212,7 +212,7 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
return 0; return 0;
invalid_arg: invalid_arg:
pr_err("goldfish_nand_read: invalid read, start %llx, len %x, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_read: invalid read, start %llx, len %zx, dev_size %llx, write_size %x\n",
from, len, mtd->size, mtd->writesize); from, len, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
...@@ -236,7 +236,7 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -236,7 +236,7 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
return 0; return 0;
invalid_arg: invalid_arg:
pr_err("goldfish_nand_write: invalid write, start %llx, len %x, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_write: invalid write, start %llx, len %zx, dev_size %llx, write_size %x\n",
to, len, mtd->size, mtd->writesize); to, len, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment