* [PATCH 00/34] address all -Wunused-const warnings @ 2024-04-03 8:06 Arnd Bergmann 2024-04-03 8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann ` (3 more replies) 0 siblings, 4 replies; 6+ messages in thread From: Arnd Bergmann @ 2024-04-03 8:06 UTC (permalink / raw) To: linux-kernel Cc: Shyam Sundar S K, Heiko Stuebner, Rafael J. Wysocki, dri-devel, Benjamin Tissoires, Srinivas Pandruvada, Christoph Hellwig, linux-samsung-soc, linux-pm, linux-sound, Ian Abbott, linux-omap, Trond Myklebust, Alex Elder, Tero Kristo, Xiang Chen, Greg Kroah-Hartman, linux-usb, linux-wireless, linux-spi, H Hartley Sweeten, Iyappan Subramanian, linux-crypto, Andrew Morton, linux-trace-kernel, linux-hardening, Alexandre Be lloni, Markuss Broks, Vaibhav Hiremath, linux-i2c, Lars-Peter Clausen, Corey Minyard, Helge Deller, Lee Jones, linux-clk, linux-rockchip, iommu, Yisen Zhuang, Len Brown, Andi Shyti, Michael Hennerich, linux-kbuild, linux-arm-msm, greybus-dev, linux-amlogic, linux-arm-kernel, Neil Armstrong, Stephen Boyd, Jarkko Sakkinen, Anna Schumaker, linux-integrity, alsa-devel, Jonathan Cameron, linux-efi, linux-iio, linux-fpga, linux-fbdev, kasan-dev, Jiri Slaby, linux-rtc, Stanislaw Gruszka, Masahiro Yamada, linux-staging, linux-input, Jacky Huang, Kees Cook, Arnd Bergmann, Jiri Kosina, Robin Murphy, Steven Rostedt, Nathan Chancellor, Mark Brown, Moritz Fischer, openipmi-developer, linux-nfs, Martin K. Petersen, Dmitry Torokhov, Sebastian Reichel, Peter Rosin, linux-stm32, Tony Lindgren, Liviu Dudau, Alexandre Torgue, linux-ide From: Arnd Bergmann <arnd@arndb.de> 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 Arnd Bergmann (31): powerpc/fsl-soc: hide unused const variable ubsan: fix unused variable warning in test module platform: goldfish: remove ACPI_PTR() annotations i2c: pxa: hide unused icr_bits[] variable 3c515: remove unused 'mtu' variable tracing: hide unused ftrace_event_id_fops Input: synaptics: hide unused smbus_pnp_ids[] array power: rt9455: hide unused rt9455_boost_voltage_values efi: sysfb: don't build when EFI is disabled clk: ti: dpll: fix incorrect #ifdef checks apm-emulation: hide an unused variable sisfb: hide unused variables dma/congiguous: avoid warning about unused size_bytes leds: apu: remove duplicate DMI lookup data iio: ad5755: hook up of_device_id lookup to platform driver greybus: arche-ctrl: move device table to its right location lib: checksum: hide unused expected_csum_ipv6_magic[] sunrpc: suppress warnings for unused procfs functions comedi: ni_atmio: avoid warning for unused device_ids[] table iwlegacy: don't warn for unused variables with DEBUG_FS=n drm/komeda: don't warn for unused debugfs files firmware: qcom_scm: mark qcom_scm_qseecom_allowlist as __maybe_unused crypto: ccp - drop platform ifdef checks usb: gadget: omap_udc: remove unused variable isdn: kcapi: don't build unused procfs code cpufreq: intel_pstate: hide unused intel_pstate_cpu_oob_ids[] net: xgbe: remove extraneous #ifdef checks Input: imagis - remove incorrect ifdef checks sata: mv: drop unnecessary #ifdef checks ASoC: remove incorrect of_match_ptr/ACPI_PTR annotations spi: remove incorrect of_match_ptr annotations drivers: remove incorrect of_match_ptr/ACPI_PTR annotations kbuild: always enable -Wunused-const-variable Krzysztof Kozlowski (1): Input: stmpe-ts - mark OF related data as maybe unused arch/powerpc/sysdev/fsl_msi.c | 2 + drivers/ata/sata_mv.c | 64 +++++++++---------- drivers/char/apm-emulation.c | 5 +- drivers/char/ipmi/ipmb_dev_int.c | 2 +- drivers/char/tpm/tpm_ftpm_tee.c | 2 +- drivers/clk/ti/dpll.c | 10 ++- drivers/comedi/drivers/ni_atmio.c | 2 +- drivers/cpufreq/intel_pstate.c | 2 + drivers/crypto/ccp/sp-platform.c | 14 +--- drivers/dma/img-mdc-dma.c | 2 +- drivers/firmware/efi/Makefile | 3 +- drivers/firmware/efi/sysfb_efi.c | 2 - drivers/firmware/qcom/qcom_scm.c | 2 +- drivers/fpga/versal-fpga.c | 2 +- .../gpu/drm/arm/display/komeda/komeda_dev.c | 8 --- drivers/hid/hid-google-hammer.c | 6 +- drivers/i2c/busses/i2c-pxa.c | 2 +- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- drivers/i2c/muxes/i2c-mux-reg.c | 2 +- drivers/iio/dac/ad5755.c | 1 + drivers/input/mouse/synaptics.c | 2 + drivers/input/touchscreen/imagis.c | 4 +- drivers/input/touchscreen/stmpe-ts.c | 2 +- drivers/input/touchscreen/wdt87xx_i2c.c | 2 +- drivers/isdn/capi/Makefile | 3 +- drivers/isdn/capi/kcapi.c | 7 +- drivers/leds/leds-apu.c | 3 +- drivers/mux/adg792a.c | 2 +- drivers/net/ethernet/3com/3c515.c | 3 - drivers/net/ethernet/amd/xgbe/xgbe-platform.c | 8 --- drivers/net/ethernet/apm/xgene-v2/main.c | 2 +- drivers/net/ethernet/hisilicon/hns_mdio.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965-rs.c | 15 +---- drivers/net/wireless/intel/iwlegacy/common.h | 2 - drivers/platform/goldfish/goldfish_pipe.c | 2 +- drivers/power/supply/rt9455_charger.c | 2 + drivers/regulator/pbias-regulator.c | 2 +- drivers/regulator/twl-regulator.c | 2 +- drivers/regulator/twl6030-regulator.c | 2 +- drivers/rtc/rtc-fsl-ftm-alarm.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/spi/spi-armada-3700.c | 2 +- drivers/spi/spi-img-spfi.c | 2 +- drivers/spi/spi-meson-spicc.c | 2 +- drivers/spi/spi-meson-spifc.c | 2 +- drivers/spi/spi-orion.c | 2 +- drivers/spi/spi-pic32-sqi.c | 2 +- drivers/spi/spi-pic32.c | 2 +- drivers/spi/spi-rockchip.c | 2 +- drivers/spi/spi-s3c64xx.c | 2 +- drivers/spi/spi-st-ssc4.c | 2 +- drivers/staging/greybus/arche-apb-ctrl.c | 1 + drivers/staging/greybus/arche-platform.c | 9 +-- drivers/staging/pi433/pi433_if.c | 2 +- drivers/tty/serial/amba-pl011.c | 6 +- drivers/tty/serial/ma35d1_serial.c | 2 +- drivers/usb/gadget/udc/omap_udc.c | 10 +-- drivers/video/fbdev/sis/init301.c | 3 +- kernel/dma/contiguous.c | 2 +- kernel/trace/trace_events.c | 4 ++ lib/checksum_kunit.c | 2 + lib/test_ubsan.c | 2 +- net/sunrpc/cache.c | 10 +-- scripts/Makefile.extrawarn | 1 - sound/soc/atmel/sam9x5_wm8731.c | 2 +- sound/soc/codecs/rt5514-spi.c | 2 +- sound/soc/qcom/lpass-sc7280.c | 2 +- sound/soc/samsung/aries_wm8994.c | 2 +- 69 files changed, 121 insertions(+), 169 deletions(-) -- 2.39.2 Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Damien Le Moal <dlemoal@kernel.org> Cc: Jiri Kosina <jikos@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Corey Minyard <minyard@acm.org> Cc: Peter Huewe <peterhuewe@gmx.de> Cc: Jarkko Sakkinen <jarkko@kernel.org> Cc: Tero Kristo <kristo@kernel.org> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Len Brown <lenb@kernel.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: John Allen <john.allen@amd.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Vinod Koul <vkoul@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Bjorn Andersson <andersson@kernel.org> Cc: Moritz Fischer <mdf@kernel.org> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Andi Shyti <andi.shyti@kernel.org> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Peter Rosin <peda@axentia.se> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Markuss Broks <markuss.broks@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: Lee Jones <lee@kernel.org> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Cc: Iyappan Subramanian <iyappan@os.amperecomputing.com> Cc: Yisen Zhuang <yisen.zhuang@huawei.com> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Kalle Valo <kvalo@kernel.org> Cc: Sebastian Reichel <sre@kernel.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Mark Brown <broonie@kernel.org> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Xiang Chen <chenxiang66@hisilicon.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com> Cc: Alex Elder <elder@kernel.org> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Jacky Huang <ychuang3@nuvoton.com> Cc: Helge Deller <deller@gmx.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: Anna Schumaker <anna@kernel.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Takashi Iwai <tiwai@suse.com> Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-ide@vger.kernel.org Cc: openipmi-developer@lists.sourceforge.net Cc: linux-integrity@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: dmaengine@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-fpga@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-input@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Cc: linux-leds@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-spi@vger.kernel.org Cc: linux-amlogic@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: greybus-dev@lists.linaro.org Cc: linux-staging@lists.linux.dev Cc: linux-serial@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: iommu@lists.linux.dev Cc: linux-trace-kernel@vger.kernel.org Cc: kasan-dev@googlegroups.com Cc: linux-hardening@vger.kernel.org Cc: linux-nfs@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-sound@vger.kernel.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 01/34] powerpc/fsl-soc: hide unused const variable 2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann @ 2024-04-03 8:06 ` Arnd Bergmann 2024-04-03 8:19 ` Christophe Leroy 2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf ` (2 subsequent siblings) 3 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2024-04-03 8:06 UTC (permalink / raw) To: linux-kernel, Michael Ellerman, Alexander Graf, Stuart Yoder, Scott Wood Cc: Rob Herring, Arnd Bergmann, Aneesh Kumar K.V, Nicholas Piggin, Uwe Kleine-König, Naveen N. Rao, linuxppc-dev From: Arnd Bergmann <arnd@arndb.de> vmpic_msi_feature is only used conditionally, which triggers a rare -Werror=unused-const-variable= warning with gcc: arch/powerpc/sysdev/fsl_msi.c:567:37: error: 'vmpic_msi_feature' defined but not used [-Werror=unused-const-variable=] 567 | static const struct fsl_msi_feature vmpic_msi_feature = Hide this one in the same #ifdef as the reference so we can turn on the warning by default. Fixes: 305bcf26128e ("powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/powerpc/sysdev/fsl_msi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 8e6c84df4ca1..e205135ae1fe 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c @@ -564,10 +564,12 @@ static const struct fsl_msi_feature ipic_msi_feature = { .msiir_offset = 0x38, }; +#ifdef CONFIG_EPAPR_PARAVIRT static const struct fsl_msi_feature vmpic_msi_feature = { .fsl_pic_ip = FSL_PIC_IP_VMPIC, .msiir_offset = 0, }; +#endif static const struct of_device_id fsl_of_msi_ids[] = { { -- 2.39.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 01/34] powerpc/fsl-soc: hide unused const variable 2024-04-03 8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann @ 2024-04-03 8:19 ` Christophe Leroy 0 siblings, 0 replies; 6+ messages in thread From: Christophe Leroy @ 2024-04-03 8:19 UTC (permalink / raw) To: Arnd Bergmann, linux-kernel, Michael Ellerman, Alexander Graf, Stuart Yoder, Scott Wood Cc: Rob Herring, Arnd Bergmann, Nicholas Piggin, Aneesh Kumar K.V, Uwe Kleine-König, Naveen N. Rao, linuxppc-dev Le 03/04/2024 à 10:06, Arnd Bergmann a écrit : > From: Arnd Bergmann <arnd@arndb.de> > > vmpic_msi_feature is only used conditionally, which triggers a rare > -Werror=unused-const-variable= warning with gcc: > > arch/powerpc/sysdev/fsl_msi.c:567:37: error: 'vmpic_msi_feature' defined but not used [-Werror=unused-const-variable=] > 567 | static const struct fsl_msi_feature vmpic_msi_feature = > > Hide this one in the same #ifdef as the reference so we can turn on > the warning by default. > > Fixes: 305bcf26128e ("powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> > --- > arch/powerpc/sysdev/fsl_msi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c > index 8e6c84df4ca1..e205135ae1fe 100644 > --- a/arch/powerpc/sysdev/fsl_msi.c > +++ b/arch/powerpc/sysdev/fsl_msi.c > @@ -564,10 +564,12 @@ static const struct fsl_msi_feature ipic_msi_feature = { > .msiir_offset = 0x38, > }; > > +#ifdef CONFIG_EPAPR_PARAVIRT > static const struct fsl_msi_feature vmpic_msi_feature = { > .fsl_pic_ip = FSL_PIC_IP_VMPIC, > .msiir_offset = 0, > }; > +#endif > > static const struct of_device_id fsl_of_msi_ids[] = { > { ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/34] address all -Wunused-const warnings 2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann 2024-04-03 8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann @ 2024-04-06 5:20 ` patchwork-bot+netdevbpf 2024-04-10 8:02 ` (subset) " Sebastian Reichel 2024-04-22 8:16 ` Michael Ellerman 3 siblings, 0 replies; 6+ messages in thread From: patchwork-bot+netdevbpf @ 2024-04-06 5:20 UTC (permalink / raw) To: Arnd Bergmann Cc: Shyam-sundar.S-k, heiko, rafael, dri-devel, benjamin.tissoires, srinivas.pandruvada, hch, linux-samsung-soc, linux-pm, linux-sound, abbotti, linux-omap, trond.myklebust, elder, kristo, chenxiang66, gregkh, linux-usb, linux-wireless, linux-kernel, linux-spi, hsweeten, iyappan, linux-crypto, akpm, linux-trace-kernel, linux-hardening, alexandre.belloni, markuss.broks, hvaibhav.linux, linux-i2c, lars, minyard, deller, lee, linux-clk, linux-rockchip, iommu Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 3 Apr 2024 10:06:18 +0200 you wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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. > > [...] Here is the summary with links: - [05/34] 3c515: remove unused 'mtu' variable https://git.kernel.org/netdev/net-next/c/17b35355c2c6 - [19/34] sunrpc: suppress warnings for unused procfs functions (no matching commit) - [26/34] isdn: kcapi: don't build unused procfs code https://git.kernel.org/netdev/net-next/c/91188544af06 - [28/34] net: xgbe: remove extraneous #ifdef checks https://git.kernel.org/netdev/net-next/c/0ef416e045ad - [33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations (no matching commit) You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 00/34] address all -Wunused-const warnings 2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann 2024-04-03 8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann 2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf @ 2024-04-10 8:02 ` Sebastian Reichel 2024-04-22 8:16 ` Michael Ellerman 3 siblings, 0 replies; 6+ messages in thread From: Sebastian Reichel @ 2024-04-10 8:02 UTC (permalink / raw) To: linux-kernel, Arnd Bergmann Cc: Shyam Sundar S K, Heiko Stuebner, Rafael J. Wysocki, dri-devel, Benjamin Tissoires, Srinivas Pandruvada, Christoph Hellwig, linux-samsung-soc, linux-pm, linux-sound, Ian Abbott, linux-omap, Trond Myklebust, Alex Elder, Tero Kristo, Xiang Chen, Greg Kroah-Hartman, linux-usb, linux-wireless, linux-spi, H Hartley Sweeten, Iyappan Subramanian, linux-crypto, Andrew Morton, linux-trace-kernel, linux-hardening, Alexandre Be lloni, Markuss Broks, Vaibhav Hiremath, linux-i2c, Lars-Peter Clausen, Corey Minyard, Helge Deller, Lee Jones, linux-clk, linux-rockchip, iommu, Yisen Zhuang, Len Brown, Andi Shyti, Michael Hennerich, linux-kbuild, linux-arm-msm, greybus-dev, linux-amlogic, linux-arm-kernel, Neil Armstrong, Stephen Boyd, Jarkko Sakkinen, Anna Schumaker, linux-integrity, alsa-devel, Jonathan Cameron, linux-efi, linux-iio, linux-fpga, linux-fbdev, kasan-dev, Jiri Slaby, linux-rtc, Stanislaw Gruszka, Masahiro Yamada, linux-staging, linux-input, Jacky Huang, Kees Cook, Arnd Bergmann, Jiri Kosina, Robin Murphy, Steven Rostedt, Nathan Chancellor, Mark Brown, Moritz Fischer, openipmi-developer, linux-nfs, Martin K. Petersen, Dmitry Torokhov, Sebastian Reichel, Peter Rosin, linux-stm32, Tony Lindgren, Liviu Dudau, Alexandre Torgue, linux-ide On Wed, 03 Apr 2024 10:06:18 +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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. > > [...] Applied, thanks! [09/34] power: rt9455: hide unused rt9455_boost_voltage_values commit: 452d8950db3e839aba1bb13bc5378f4bac11fa04 Best regards, -- Sebastian Reichel <sebastian.reichel@collabora.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 00/34] address all -Wunused-const warnings 2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann ` (2 preceding siblings ...) 2024-04-10 8:02 ` (subset) " Sebastian Reichel @ 2024-04-22 8:16 ` Michael Ellerman 3 siblings, 0 replies; 6+ messages in thread From: Michael Ellerman @ 2024-04-22 8:16 UTC (permalink / raw) To: linux-kernel, Arnd Bergmann Cc: , Shyam Sundar S K, Heiko Stuebner, Rafael J. Wysocki, dri-devel, Benjamin Tissoires, Srinivas Pandruvada, Christoph Hellwig, linux-samsung-soc, g.com, linux-pm, linux-sound, Ian Abbott, linux-omap, Trond Myklebust, Alex Elder, Tero Kristo, Xiang Chen, Greg Kroah-Hartman, linux-usb, linux-wireless, linux-spi, H Hartley Sweeten, Iyappan Subramanian, linux-crypto, Andrew Morton, linux-trace-kernel, linux-hardening, Alexandre Belloni, Markuss Broks, Vaibhav Hiremath, linux-i2c, Lars-Peter Clausen, Helge Deller, Lee Jones, linux-clk, linux-rockchip, iommu, Yisen Zhuang, Len Brown, Andi Shyti, Corey Minyard, linux-kbuild, linux-arm-msm, Michael Hennerich, greybus-dev, org, linux-arm-kernel, Neil Armstrong, Stephen Boyd, Jarkko Sakkinen, Anna Schumaker, linux-integrity, alsa-devel, Jonathan Cameron, linux-efi, linux-iio, linux-fpga, linux-fbdev, kasan-dev, linux-amlogic, linux-rtc, Stanislaw Gruszka, Masahiro Yamada, linux-staging, Jiri Slaby, Jacky Huang, Kees Cook, Arnd Bergmann, linux-input, Steven Rostedt, Nathan Chancellor, Mark Brown, Moritz Fischer, openipmi-developer, linux-nfs, Martin K. Petersen, Dmitry Torokhov, Sebastian Reichel, netdev, Peter Rosin, Tony Lindgren, Liviu Dudau, Alexandre Torgue, linux-ide, Peter Huewe, Ard Biesheuvel, linux-leds, Herbert Xu, linux-scsi, Vinod Koul, linux-stm32, linux-serial, Jakub Kicinski, Masami Hiramatsu, Jiri Kosina, Kalle Valo, John Allen, eply.com, Robin Murphy, Bjorn Andersson, Takashi Iwai, Krzysztof Kozlowski, Damien Le Moal, dmaengine, linuxppc-dev On Wed, 03 Apr 2024 10:06:18 +0200, Arnd Bergmann wrote: > 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. > > [...] Applied to powerpc/next. [01/34] powerpc/fsl-soc: hide unused const variable https://git.kernel.org/powerpc/c/01acaf3aa75e1641442cc23d8fe0a7bb4226efb1 cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-22 8:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann 2024-04-03 8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann 2024-04-03 8:19 ` Christophe Leroy 2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf 2024-04-10 8:02 ` (subset) " Sebastian Reichel 2024-04-22 8:16 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).