Commit 56714e5f authored by Kalle Valo's avatar Kalle Valo
Browse files

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: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230613140918.389690-2-kvalo@kernel.org
parent 5bc9a34c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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