Re: [PATCH v2 bpf-next] compiler-gcc: Suppress -Wmissing-prototypes warning for all supported GCC

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

 



On Fri, Nov 10, 2023 at 2:35 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Thu, Nov 9, 2023, at 19:23, Alexei Starovoitov wrote:
> > On Sun, Nov 5, 2023 at 7:18 PM Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> >> In the future, if you wish to suppress warnings that are only supported on
> >> higher GCC versions, it is advisable to explicitly use "__diag_ignore" to
> >> specify the GCC version you are targeting.
> >>
> >> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> >> Closes: https://lore.kernel.org/oe-kbuild-all/202311031651.A7crZEur-lkp@xxxxxxxxx/
> >> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx>
> >> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>
> >> Cc: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
> >> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> >> ---
> >>  include/linux/compiler-gcc.h | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
> >> index 7af9e34..80918bd 100644
> >> --- a/include/linux/compiler-gcc.h
> >> +++ b/include/linux/compiler-gcc.h
> >> @@ -138,7 +138,7 @@
> >>  #endif
> >>
> >>  #define __diag_ignore_all(option, comment) \
> >> -       __diag_GCC(8, ignore, option)
> >> +       __diag(__diag_GCC_ignore option)
> >
> > Arnd,
> > does this look good to you?
>
> Yes, this is good. We could do the same thing for
> clang already, but it doesn't make a huge difference.

The Minimum Clang version is 11.0.0, so I think we don't have to
change compiler-clang.h.

>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

Thanks for your review.

-- 
Regards
Yafang





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux