mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
wifi: brcmfmac: fix gnu_printf warnings
With GCC 13.1 and W=1 brcmfmac has warnings like this: ./include/trace/perf.h:26:16: warning: function 'perf_trace_brcmf_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] Add a workaround which disables -Wsuggest-attribute=format in tracepoint.h. I see similar workarounds in other drivers as well. Compile tested only. Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230613140918.389690-2-kvalo@kernel.org
This commit is contained in:
parent
5bc9a34ce8
commit
56714e5f12
|
|
@ -28,6 +28,11 @@ static inline void trace_ ## name(proto) {}
|
|||
|
||||
#define MAX_MSG_LEN 100
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifndef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
|
||||
#endif
|
||||
|
||||
TRACE_EVENT(brcmf_err,
|
||||
TP_PROTO(const char *func, struct va_format *vaf),
|
||||
TP_ARGS(func, vaf),
|
||||
|
|
@ -123,6 +128,8 @@ TRACE_EVENT(brcmf_sdpcm_hdr,
|
|||
__entry->len, ((u8 *)__get_dynamic_array(hdr))[4])
|
||||
);
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#ifdef CONFIG_BRCM_TRACING
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user