[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240403080702.3509288-1-arnd@kernel.org>
Date: Wed, 3 Apr 2024 10:06:18 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>,
Michael Ellerman <mpe@...erman.id.au>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Damien Le Moal <dlemoal@...nel.org>,
Jiri Kosina <jikos@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Corey Minyard <minyard@....org>,
Peter Huewe <peterhuewe@....de>,
Jarkko Sakkinen <jarkko@...nel.org>,
Tero Kristo <kristo@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
John Allen <john.allen@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Vinod Koul <vkoul@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Moritz Fischer <mdf@...nel.org>,
Liviu Dudau <liviu.dudau@....com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Andi Shyti <andi.shyti@...nel.org>,
Michael Hennerich <michael.hennerich@...log.com>,
Peter Rosin <peda@...ntia.se>,
Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Markuss Broks <markuss.broks@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Lee Jones <lee@...nel.org>,
Jakub Kicinski <kuba@...nel.org>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Iyappan Subramanian <iyappan@...amperecomputing.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Stanislaw Gruszka <stf_xl@...pl>,
Kalle Valo <kvalo@...nel.org>,
Sebastian Reichel <sre@...nel.org>,
Tony Lindgren <tony@...mide.com>,
Mark Brown <broonie@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Xiang Chen <chenxiang66@...ilicon.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Heiko Stuebner <heiko@...ech.de>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Vaibhav Hiremath <hvaibhav.linux@...il.com>,
Alex Elder <elder@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>,
Jacky Huang <ychuang3@...oton.com>,
Helge Deller <deller@....de>,
Christoph Hellwig <hch@....de>,
Robin Murphy <robin.murphy@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Takashi Iwai <tiwai@...e.com>,
linuxppc-dev@...ts.ozlabs.org,
linux-ide@...r.kernel.org,
openipmi-developer@...ts.sourceforge.net,
linux-integrity@...r.kernel.org,
linux-omap@...r.kernel.org,
linux-clk@...r.kernel.org,
linux-pm@...r.kernel.org,
linux-crypto@...r.kernel.org,
dmaengine@...r.kernel.org,
linux-efi@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
linux-fpga@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-input@...r.kernel.org,
linux-i2c@...r.kernel.org,
linux-iio@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
netdev@...r.kernel.org,
linux-leds@...r.kernel.org,
linux-wireless@...r.kernel.org,
linux-rtc@...r.kernel.org,
linux-scsi@...r.kernel.org,
linux-spi@...r.kernel.org,
linux-amlogic@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
greybus-dev@...ts.linaro.org,
linux-staging@...ts.linux.dev,
linux-serial@...r.kernel.org,
linux-usb@...r.kernel.org,
linux-fbdev@...r.kernel.org,
iommu@...ts.linux.dev,
linux-trace-kernel@...r.kernel.org,
kasan-dev@...glegroups.com,
linux-hardening@...r.kernel.org,
linux-nfs@...r.kernel.org,
linux-kbuild@...r.kernel.org,
alsa-devel@...a-project.org,
linux-sound@...r.kernel.org
Subject: [PATCH 00/34] address all -Wunused-const warnings
From: Arnd Bergmann <arnd@...db.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@...erman.id.au>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Damien Le Moal <dlemoal@...nel.org>
Cc: Jiri Kosina <jikos@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Corey Minyard <minyard@....org>
Cc: Peter Huewe <peterhuewe@....de>
Cc: Jarkko Sakkinen <jarkko@...nel.org>
Cc: Tero Kristo <kristo@...nel.org>
Cc: Stephen Boyd <sboyd@...nel.org>
Cc: Ian Abbott <abbotti@....co.uk>
Cc: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: Len Brown <lenb@...nel.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: John Allen <john.allen@....com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Vinod Koul <vkoul@...nel.org>
Cc: Ard Biesheuvel <ardb@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>
Cc: Moritz Fischer <mdf@...nel.org>
Cc: Liviu Dudau <liviu.dudau@....com>
Cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: Andi Shyti <andi.shyti@...nel.org>
Cc: Michael Hennerich <michael.hennerich@...log.com>
Cc: Peter Rosin <peda@...ntia.se>
Cc: Lars-Peter Clausen <lars@...afoo.de>
Cc: Jonathan Cameron <jic23@...nel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Markuss Broks <markuss.broks@...il.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc: Lee Jones <lee@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@....com>
Cc: Iyappan Subramanian <iyappan@...amperecomputing.com>
Cc: Yisen Zhuang <yisen.zhuang@...wei.com>
Cc: Stanislaw Gruszka <stf_xl@...pl>
Cc: Kalle Valo <kvalo@...nel.org>
Cc: Sebastian Reichel <sre@...nel.org>
Cc: Tony Lindgren <tony@...mide.com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Xiang Chen <chenxiang66@...ilicon.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Neil Armstrong <neil.armstrong@...aro.org>
Cc: Heiko Stuebner <heiko@...ech.de>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Vaibhav Hiremath <hvaibhav.linux@...il.com>
Cc: Alex Elder <elder@...nel.org>
Cc: Jiri Slaby <jirislaby@...nel.org>
Cc: Jacky Huang <ychuang3@...oton.com>
Cc: Helge Deller <deller@....de>
Cc: Christoph Hellwig <hch@....de>
Cc: Robin Murphy <robin.murphy@....com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Kees Cook <keescook@...omium.org>
Cc: Trond Myklebust <trond.myklebust@...merspace.com>
Cc: Anna Schumaker <anna@...nel.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>
Cc: Nathan Chancellor <nathan@...nel.org>
Cc: Takashi Iwai <tiwai@...e.com>
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-ide@...r.kernel.org
Cc: openipmi-developer@...ts.sourceforge.net
Cc: linux-integrity@...r.kernel.org
Cc: linux-omap@...r.kernel.org
Cc: linux-clk@...r.kernel.org
Cc: linux-pm@...r.kernel.org
Cc: linux-crypto@...r.kernel.org
Cc: dmaengine@...r.kernel.org
Cc: linux-efi@...r.kernel.org
Cc: linux-arm-msm@...r.kernel.org
Cc: linux-fpga@...r.kernel.org
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-input@...r.kernel.org
Cc: linux-i2c@...r.kernel.org
Cc: linux-iio@...r.kernel.org
Cc: linux-stm32@...md-mailman.stormreply.com
Cc: linux-arm-kernel@...ts.infradead.org
Cc: netdev@...r.kernel.org
Cc: linux-leds@...r.kernel.org
Cc: linux-wireless@...r.kernel.org
Cc: linux-rtc@...r.kernel.org
Cc: linux-scsi@...r.kernel.org
Cc: linux-spi@...r.kernel.org
Cc: linux-amlogic@...ts.infradead.org
Cc: linux-rockchip@...ts.infradead.org
Cc: linux-samsung-soc@...r.kernel.org
Cc: greybus-dev@...ts.linaro.org
Cc: linux-staging@...ts.linux.dev
Cc: linux-serial@...r.kernel.org
Cc: linux-usb@...r.kernel.org
Cc: linux-fbdev@...r.kernel.org
Cc: iommu@...ts.linux.dev
Cc: linux-trace-kernel@...r.kernel.org
Cc: kasan-dev@...glegroups.com
Cc: linux-hardening@...r.kernel.org
Cc: linux-nfs@...r.kernel.org
Cc: linux-kbuild@...r.kernel.org
Cc: alsa-devel@...a-project.org
Cc: linux-sound@...r.kernel.org
Powered by blists - more mailing lists