Re: [PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally

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

 



On Thu, Aug 10, 2023, at 16:59, Christophe Leroy wrote:
> Le 10/08/2023 à 16:19, Arnd Bergmann a écrit :
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>> 
>> I have cleaned up the -Wmissing-prototypes warnings for most of the major architectures
>> as well as all drivers that get enabled for CONFIG_COMPILE_TEST, so now these should be
>> close to fixed on x86, arm, arm64, powerpc, s390, and riscv.
>> 
>> The other architectures tend to have a lot of these warning in architecture specific
>> code, primarily from functions that are only called from assembler code and do
>> not otherwise need a declaration but still cause a warning without one. Other cases
>> are simply functions that should just be static or are missing an #include statement.
>> 
>> In order to be able to turn the warning on globally by default without breaking all
>> these architectures, add a list of exceptions for architecture directories that
>> can revert back to the old behavior of not warning based on a new
>> CONFIG_WNO_MISSING_PROTOTYPES option.
>
> Some architectures only have a few of those errors/warnings.
>
> For instance microblaze and parisc only have one each. Isn't it better 
> to fix them rather then turn the errors off ?

The list was only the 'defconfig' warnings, there are a couple more
that I saw with 'allmodconfig', and I'm sure there are even more
when dealing with other random configurations.

I did send other fixes for microblaze and parisc specific drivers,
and I could also send patches for the two defconfig warnings if
the maintainers are happy with fixing those but leaving allmodconfig
to still warn, but I feel that it's easier for them to just
do the last fixes themselves and then remove my hack again.

I'll wait for Michal and Helge on these.

> Others like loongarch which is a recent actively maintained 
> architecture, I'd expect the 30 errors to be easy to fix.

Agreed, they probably are.

> Many of the alpha ones seems to be brought by your commit e19d4ebc536d 
> ("alpha: add full ioread64/iowrite64 implementation")

As far as I can see, those already existing before that patch, though
I did touch the same lines there.

In the end it's a matter of where to stop, as there are endless
configurations to test if I want to do a complete job. I drew the
line between powerpc (which I tried to fix) and mips (which I left
alone), mainly because the powerpc side was already exhausting
and mips has even more obscure configurations. The other ones on
the list are all less actively maintained than these two.

     Arnd




[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