aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <[email protected]>2020-04-14 23:20:33 -0700
committerBjorn Andersson <[email protected]>2020-04-19 23:06:17 -0700
commit9d6ba921acf43bf1894564eb3d51ced2145e0147 (patch)
tree7162c8a2b0d223e58ec9ca5bb7adbf6337781776
parentf29808b2fb85a7ff2d4830aa1cb736c8c9b986f4 (diff)
soc: qcom: cmd-db: Cast sizeof() to int to silence field width warning
We pass the result of sizeof() here to tell the printk format specifier how many bytes to print. That expects an int though and sizeof() isn't that type. Cast to int to silence this warning: drivers/soc/qcom/cmd-db.c: In function 'cmd_db_debugfs_dump': drivers/soc/qcom/cmd-db.c:281:30: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] Reviewed-by: Guenter Roeck <[email protected]> Fixes: d6815c5c43d4 ("soc: qcom: cmd-db: Add debugfs dumping file") Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
-rw-r--r--drivers/soc/qcom/cmd-db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
index 8b2b7357b6da..57382b64f1da 100644
--- a/drivers/soc/qcom/cmd-db.c
+++ b/drivers/soc/qcom/cmd-db.c
@@ -279,7 +279,7 @@ static int cmd_db_debugfs_dump(struct seq_file *seq, void *p)
ent = rsc_to_entry_header(rsc);
for (j = 0; j < le16_to_cpu(rsc->cnt); j++, ent++) {
seq_printf(seq, "0x%08x: %*pEp", le32_to_cpu(ent->addr),
- sizeof(ent->id), ent->id);
+ (int)sizeof(ent->id), ent->id);
len = le16_to_cpu(ent->len);
if (len) {