Commit 9d6ba921 authored by Stephen Boyd's avatar Stephen Boyd Committed by Bjorn Andersson

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: default avatarGuenter Roeck <linux@roeck-us.net>
Fixes: d6815c5c ("soc: qcom: cmd-db: Add debugfs dumping file")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20200415062033.66406-1-swboyd@chromium.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent f29808b2
......@@ -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) {
......
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