mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 17:14:14 +08:00
0ec29ccf94
When compiling with -Wformat, clang emits the following warnings: drivers/soc/qcom/smem.c:847:41: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] dev_err(smem->dev, "bad host %hu\n", remote_host); ~~~ ^~~~~~~~~~~ %u ./include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ ./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ drivers/soc/qcom/smem.c:852:47: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] dev_err(smem->dev, "duplicate host %hu\n", remote_host); ~~~ ^~~~~~~~~~~ %u ./include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ ./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ The types of these arguments are unconditionally defined, so this patch updates the format character to the correct one and change type of remote_host to "u16" to match with other types. Signed-off-by: Bill Wendling <morbo@google.com> Tested-by: Justin Stitt <jstitt007@gmail.com> Reviewed-by: Justin Stitt <jstitt007@gmail.com> Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Arnd Bergmann <arnd@arndb.de> |
||
---|---|---|
.. | ||
apr.c | ||
cmd-db.c | ||
cpr.c | ||
Kconfig | ||
kryo-l2-accessors.c | ||
llcc-qcom.c | ||
Makefile | ||
mdt_loader.c | ||
ocmem.c | ||
pdr_interface.c | ||
pdr_internal.h | ||
qcom_aoss.c | ||
qcom_gsbi.c | ||
qcom_stats.c | ||
qcom-geni-se.c | ||
qmi_encdec.c | ||
qmi_interface.c | ||
rmtfs_mem.c | ||
rpmh-internal.h | ||
rpmh-rsc.c | ||
rpmh.c | ||
rpmhpd.c | ||
rpmpd.c | ||
smd-rpm.c | ||
smem_state.c | ||
smem.c | ||
smp2p.c | ||
smsm.c | ||
socinfo.c | ||
spm.c | ||
trace-rpmh.h | ||
wcnss_ctrl.c |