* Re: [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [not found] ` <ed665ca3-fa87-fee6-7284-9aed257264e4@intel.com> @ 2022-10-24 14:35 ` Steven Rostedt 2022-10-25 0:49 ` Chen, Rong A 0 siblings, 1 reply; 3+ messages in thread From: Steven Rostedt @ 2022-10-24 14:35 UTC (permalink / raw) To: Chen, Rong A Cc: kernel test robot, kbuild-all, linux-kernel, Gregory Greenman, linux-wireless On Mon, 24 Oct 2022 15:26:00 +0800 "Chen, Rong A" <rong.a.chen@intel.com> wrote: > On 10/21/2022 10:10 PM, Steven Rostedt wrote: > > On Fri, 21 Oct 2022 22:07:17 +0800 > > kernel test robot <lkp@intel.com> wrote: > > > >> Hi Steven, > >> > >> FYI, the error/warning still remains. > > > > WONT FIX > > > > I thought we already discussed getting rid of this warning? > > Hi Steve, > > Sorry for the noise, the bot doesn't ignore this warning with prefix > 'error:', we will fix it. Ug. Let me guess, is this compiled with -Werror? Because a warning about a macro that may or may not create printf formatting, where gcc thinks it needs a gcc printf attribute and warns about it, is not something to fail the build on. For any build that fails on warnings, that specific warning needs to be silenced. I mean, "-Werror=suggest-attribute=format", really? -- Steve > > > >> > >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > >> head: e35184f321518acadb681928a016da21a9a20c13 > >> commit: c7c37bb87590886e08d24dec53089f74b89f5fbb tracing/iwlwifi: Use the new __vstring() helper > >> date: 3 months ago > >> config: x86_64-sof-customedconfig-edison-defconfig > >> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 > >> reproduce (this is a W=1 build): > >> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c7c37bb87590886e08d24dec53089f74b89f5fbb > >> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > >> git fetch --no-tags linus master > >> git checkout c7c37bb87590886e08d24dec53089f74b89f5fbb > >> # save the config file > >> mkdir build_dir && cp config build_dir/.config > >> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/intel/iwlwifi/ > >> > >> If you fix the issue, kindly add following tag where applicable > >> | Reported-by: kernel test robot <lkp@intel.com> > >> > >> All errors (new ones prefixed by >>): > >> > >> In file included from include/trace/define_trace.h:102, > >> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h:71, > >> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h:91, > >> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15: > >> drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h: In function 'trace_event_get_offsets_iwlwifi_dbg': > >>>> include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] > >> 261 | struct trace_event_raw_##call __maybe_unused *entry; \ > >> | ^~~~~~~~~~~~~~~~ > >> include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' > >> 40 | DECLARE_EVENT_CLASS(name, \ > >> | ^~~~~~~~~~~~~~~~~~~ > >> drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h:49:1: note: in expansion of macro 'TRACE_EVENT' > >> 49 | TRACE_EVENT(iwlwifi_dbg, > >> | ^~~~~~~~~~~ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute 2022-10-24 14:35 ` [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute Steven Rostedt @ 2022-10-25 0:49 ` Chen, Rong A 2022-10-25 1:00 ` Steven Rostedt 0 siblings, 1 reply; 3+ messages in thread From: Chen, Rong A @ 2022-10-25 0:49 UTC (permalink / raw) To: Steven Rostedt Cc: kernel test robot, kbuild-all, linux-kernel, Gregory Greenman, linux-wireless On 10/24/2022 10:35 PM, Steven Rostedt wrote: > On Mon, 24 Oct 2022 15:26:00 +0800 > "Chen, Rong A" <rong.a.chen@intel.com> wrote: > >> On 10/21/2022 10:10 PM, Steven Rostedt wrote: >>> On Fri, 21 Oct 2022 22:07:17 +0800 >>> kernel test robot <lkp@intel.com> wrote: >>> >>>> Hi Steven, >>>> >>>> FYI, the error/warning still remains. >>> >>> WONT FIX >>> >>> I thought we already discussed getting rid of this warning? >> >> Hi Steve, >> >> Sorry for the noise, the bot doesn't ignore this warning with prefix >> 'error:', we will fix it. > > Ug. Let me guess, is this compiled with -Werror? > > Because a warning about a macro that may or may not create printf > formatting, where gcc thinks it needs a gcc printf attribute and warns > about it, is not something to fail the build on. > > For any build that fails on warnings, that specific warning needs to be > silenced. > > I mean, "-Werror=suggest-attribute=format", really? yes, it's compiled with -Werror if using 'W=1' option: >>>>>> include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] Best Regards, Rong Chen > > -- Steve > >>> >>>> >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>>> head: e35184f321518acadb681928a016da21a9a20c13 >>>> commit: c7c37bb87590886e08d24dec53089f74b89f5fbb tracing/iwlwifi: Use the new __vstring() helper >>>> date: 3 months ago >>>> config: x86_64-sof-customedconfig-edison-defconfig >>>> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 >>>> reproduce (this is a W=1 build): >>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c7c37bb87590886e08d24dec53089f74b89f5fbb >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >>>> git fetch --no-tags linus master >>>> git checkout c7c37bb87590886e08d24dec53089f74b89f5fbb >>>> # save the config file >>>> mkdir build_dir && cp config build_dir/.config >>>> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/intel/iwlwifi/ >>>> >>>> If you fix the issue, kindly add following tag where applicable >>>> | Reported-by: kernel test robot <lkp@intel.com> >>>> >>>> All errors (new ones prefixed by >>): >>>> >>>> In file included from include/trace/define_trace.h:102, >>>> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h:71, >>>> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h:91, >>>> from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15: >>>> drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h: In function 'trace_event_get_offsets_iwlwifi_dbg': >>>>>> include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] >>>> 261 | struct trace_event_raw_##call __maybe_unused *entry; \ >>>> | ^~~~~~~~~~~~~~~~ >>>> include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' >>>> 40 | DECLARE_EVENT_CLASS(name, \ >>>> | ^~~~~~~~~~~~~~~~~~~ >>>> drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h:49:1: note: in expansion of macro 'TRACE_EVENT' >>>> 49 | TRACE_EVENT(iwlwifi_dbg, >>>> | ^~~~~~~~~~~ > _______________________________________________ > kbuild-all mailing list -- kbuild-all@lists.01.org > To unsubscribe send an email to kbuild-all-leave@lists.01.org > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute 2022-10-25 0:49 ` Chen, Rong A @ 2022-10-25 1:00 ` Steven Rostedt 0 siblings, 0 replies; 3+ messages in thread From: Steven Rostedt @ 2022-10-25 1:00 UTC (permalink / raw) To: Chen, Rong A Cc: kernel test robot, kbuild-all, linux-kernel, Gregory Greenman, linux-wireless On Tue, 25 Oct 2022 08:49:41 +0800 "Chen, Rong A" <rong.a.chen@intel.com> wrote: > > For any build that fails on warnings, that specific warning needs to be > > silenced. > > > > I mean, "-Werror=suggest-attribute=format", really? > > yes, it's compiled with -Werror if using 'W=1' option: > > >>>>>> include/trace/trace_events.h:261:16: error: function > 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for > 'gnu_printf' format attribute [-Werror=suggest-attribute=format] Is there a way we can silent this particular error when W=1? Ooh! Doing a search of this I found: include/trace/events/qla.h:#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" Perhaps I should just make that part of trace_events.h ? -- Steve (untested) diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index c2f9cabf154d..63db95559647 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -18,6 +18,11 @@ * in the structure. */ +#pragma GCC diagnostic push +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" +#endif + #include <linux/trace_events.h> #ifndef TRACE_SYSTEM_VAR @@ -467,3 +472,5 @@ static struct trace_event_call __used \ __section("_ftrace_events") *__event_##call = &event_##call #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +#pragma GCC diagnostic pop ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-25 1:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202210212134.QTpb11ug-lkp@intel.com>
[not found] ` <20221021101026.1708a426@gandalf.local.home>
[not found] ` <ed665ca3-fa87-fee6-7284-9aed257264e4@intel.com>
2022-10-24 14:35 ` [kbuild-all] Re: include/trace/trace_events.h:261:16: error: function 'trace_event_get_offsets_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute Steven Rostedt
2022-10-25 0:49 ` Chen, Rong A
2022-10-25 1:00 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox