Re: [PATCH 00/34] address all -Wunused-const warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 00/34] address all -Wunused-const warnings
- From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
- Date: Mon, 27 Jan 2025 15:24:55 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Damien Le Moal <dlemoal@xxxxxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Corey Minyard <minyard@xxxxxxx>, Peter Huewe <peterhuewe@xxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>, Tero Kristo <kristo@xxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Ian Abbott <abbotti@xxxxxxxxx>, H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>, Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, John Allen <john.allen@xxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Bjorn Andersson <andersson@xxxxxxxxxx>, Moritz Fischer <mdf@xxxxxxxxxx>, Liviu Dudau <liviu.dudau@xxxxxxx>, Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>, Andi Shyti <andi.shyti@xxxxxxxxxx>, Michael Hennerich <michael.hennerich@xxxxxxxxxx>, Peter Rosin <peda@xxxxxxxxxx>, Lars-Peter Clausen <lars@xxxxxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>, Markuss Broks <markuss.broks@xxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>, Lee Jones <lee@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>, Iyappan Subramanian <iyappan@xxxxxxxxxxxxxxxxxxxxxx>, Yisen Zhuang <yisen.zhuang@xxxxxxxxxx>, Stanislaw Gruszka <stf_xl@xxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Sebastian Reichel <sre@xxxxxxxxxx>, Tony Lindgren <tony@xxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Xiang Chen <chenxiang66@xxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Neil Armstrong <neil.armstrong@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>, Vaibhav Hiremath <hvaibhav.linux@xxxxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, Jiri Slaby <jirislaby@xxxxxxxxxx>, Jacky Huang <ychuang3@xxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Christoph Hellwig <hch@xxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna@xxxxxxxxxx>, Masahiro Yamada <masahiroy@xxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, linux-integrity@xxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, dmaengine@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, linux-fpga@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, linux-i2c@xxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-leds@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx, linux-amlogic@xxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, greybus-dev@xxxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, linux-hardening@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx
- In-reply-to: <20240403080702.3509288-1-arnd@kernel.org>
- Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
- References: <20240403080702.3509288-1-arnd@kernel.org>
On Wed, Apr 03, 2024 at 10:06:18AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Compilers traditionally warn for unused 'static' variables, but not
> if they are constant. The reason here is a custom for C++ programmers
> to define named constants as 'static const' variables in header files
> instead of using macros or enums.
>
> In W=1 builds, we get warnings only static const variables in C
> files, but not in headers, which is a good compromise, but this still
> produces warning output in at least 30 files. These warnings are
> almost all harmless, but also trivial to fix, and there is no
> good reason to warn only about the non-const variables being unused.
>
> I've gone through all the files that I found using randconfig and
> allmodconfig builds and created patches to avoid these warnings,
> with the goal of retaining a clean build once the option is enabled
> by default.
>
> Unfortunately, there is one fairly large patch ("drivers: remove
> incorrect of_match_ptr/ACPI_PTR annotations") that touches
> 34 individual drivers that all need the same one-line change.
> If necessary, I can split it up by driver or by subsystem,
> but at least for reviewing I would keep it as one piece for
> the moment.
>
> Please merge the individual patches through subsystem trees.
> I expect that some of these will have to go through multiple
> revisions before they are picked up, so anything that gets
> applied early saves me from resending.
Arnd, can you refresh this one? It seems some misses still...
I have got 3+ 0-day reports against one of the mux drivers.
https://lore.kernel.org/all/?q=adg792a.c
--
With Best Regards,
Andy Shevchenko
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|