summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-01-31 14:08:20 +0000
committerRichard Weinberger <richard@nod.at>2019-05-06 21:57:06 +0200
commit3008ba87093852f3756c5d33f584602e5e2a4aa4 (patch)
tree7db3dcffd23a73d4fdbd311f331e9bee121559e0 /drivers/mtd/mtdpart.c
parentfae4973c9a58858bc63a842cdaf7810955503399 (diff)
mtd: part: fix incorrect format specifier for an unsigned long long
An unsigned long long is being formatted with %lld instead of the unsigned version %llu. Fix this. Clean up cppcheck warning: %lld in format string (no. 1) requires 'long long' but the argument type is 'unsigned long long'. Fixes: a62c24d75529 ("mtd: part: Add sysfs variable for offset of partition") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 37f174ccbcec..dfa241ad018b 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -572,7 +572,7 @@ static ssize_t mtd_partition_offset_show(struct device *dev,
{
struct mtd_info *mtd = dev_get_drvdata(dev);
struct mtd_part *part = mtd_to_part(mtd);
- return snprintf(buf, PAGE_SIZE, "%lld\n", part->offset);
+ return snprintf(buf, PAGE_SIZE, "%llu\n", part->offset);
}
static DEVICE_ATTR(offset, S_IRUGO, mtd_partition_offset_show, NULL);