diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-03 14:56:30 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-07 17:07:18 +0300 |
commit | 72a9ff3bf7fbd7e887d4e6bbc1c04817da2b9887 (patch) | |
tree | ea886cd7d7a609ea9617b163864689a04b8e54d5 /drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h | |
parent | b38f7aaef852c88b90caa115f1f64434bc347222 (diff) | |
download | linux-72a9ff3bf7fbd7e887d4e6bbc1c04817da2b9887.tar.xz |
media: atomisp: get rid of -Wsuggest-attribute=format warnings
There are some warnings reported by gcc:
drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:164:2: warning: function ‘atomisp_css2_dbg_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:170:2: warning: function ‘atomisp_css2_dbg_ftrace_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:170:2: warning: function ‘atomisp_css2_dbg_ftrace_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:176:2: warning: function ‘atomisp_css2_err_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
drivers/staging/media/atomisp/pci/sh_css.c:1685:16: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
That are due to the usage of printf-like messages without
enabling the error checking logic.
Add the proper attributes in order to shut up such warnings.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h')
-rw-r--r-- | drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h index a1f7a5839560..749f5c3725bd 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h @@ -20,7 +20,8 @@ extern int (*sh_css_printf)(const char *fmt, va_list args); /* depends on host supplied print function in ia_css_init() */ -static inline void ia_css_print(const char *fmt, ...) +static inline __attribute__((format (printf, 1, 0))) +void ia_css_print(const char *fmt, ...) { va_list ap; |