Re: [ast:btf_vmlinux 1/7] net/mac80211/./trace.h:253:1: warning: redefinition of typedef 'btf_trace_local_only_evt' is a C11 feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2019 at 1:01 PM Nathan Chancellor
<natechancellor@xxxxxxxxx> wrote:
>
> On Thu, Oct 03, 2019 at 10:48:31PM +0800, kbuild test robot wrote:
> > CC: kbuild-all@xxxxxx
> > TO: Alexei Starovoitov <ast@xxxxxxxxxx>
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git btf_vmlinux
> > head:   cc9b0a180111f856b93a805fdfc2fb288c41fab2
> > commit: 82b70116b6ba453e1dda06c7126e100d594b8e0a [1/7] bpf: add typecast to help vmlinux BTF generation
> > config: x86_64-rhel-7.6 (attached as .config)
> > compiler: clang version 10.0.0 (git://gitmirror/llvm_project 38ac6bdb83a9bb76c109901960c20d1714339891)
> > reproduce:
> >         git checkout 82b70116b6ba453e1dda06c7126e100d594b8e0a
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> >
> > All warnings (new ones prefixed by >>):
> >
> >    In file included from net/mac80211/trace.c:11:
> >    In file included from net/mac80211/./trace.h:2717:
> >    In file included from include/trace/define_trace.h:104:
> >    In file included from include/trace/bpf_probe.h:110:
> > >> net/mac80211/./trace.h:253:1: warning: redefinition of typedef 'btf_trace_local_only_evt' is a C11 feature [-Wtypedef-redefinition]
> >    DEFINE_EVENT(local_only_evt, drv_start,
> >    ^
> >    include/trace/bpf_probe.h:104:2: note: expanded from macro 'DEFINE_EVENT'
> >            __DEFINE_EVENT(template, call, PARAMS(proto), PARAMS(args), 0)
> >            ^
> >    include/trace/bpf_probe.h:77:16: note: expanded from macro '__DEFINE_EVENT'
> >    typedef void (*btf_trace_##template)(void *__data, proto);              \
>
> Hi Alexei,
>
> The 0day team has been running clang builds for us for a little bit and
> this one popped up. It looks like there are certain tracepoints that use
> the same template so clang warns because there are two identical
> typedefs. Is there any way to improve this so we don't get noisey
> builds? This still occurs as of your latest btf_vmlinux branch even
> though this report is from a week ago.

Thanks for headsup. That was indeed a valid bug in my branch.
Interestingly gcc didn't complain.
I knew that 0day bot is testing my development tree, but
I didn't know it's doing it with clang.
And for some reason I didn't receive any reports
about this breakage.
More so I got 'build success' email from 0day for my branch.
Something to improve in the bot, I guess.

If you're curious the fix was:
-typedef void (*btf_trace_##template)(void *__data, proto);             \
+typedef void (*btf_trace_##call)(void *__data, proto);                 \

I forced pushed my btf_vmlinux branch.
Please let me know if you still see this issue.

Thanks!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux