]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom: cmd-db: Cast sizeof() to int to silence field width warning
authorStephen Boyd <swboyd@chromium.org>
Wed, 15 Apr 2020 06:20:33 +0000 (23:20 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 20 Apr 2020 06:06:17 +0000 (23:06 -0700)
commitb4548fa3b1b0ef8655001e67320c6783b74a88fb
tree7162c8a2b0d223e58ec9ca5bb7adbf6337781776
parentd5ffafd637fb4ac5f17b35ddf33908c4466f8ce7
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 <linux@roeck-us.net>
Fixes: 3e48737c7580 ("soc: qcom: cmd-db: Add debugfs dumping file")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20200415062033.66406-1-swboyd@chromium.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/soc/qcom/cmd-db.c