Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2556848lqz; Wed, 3 Apr 2024 01:14:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYIUfU7/WnocctWJxQhchfjcY4CoLu3j1lwzBn1MmtkOAzzwKo6lNjPXlX//PMhcCsjSn7nEQz75e9/pnTQVDEft5OS0GjRdwZ4qQg8g== X-Google-Smtp-Source: AGHT+IHk/sQz8mqWDlZyC1taIcH89Ua6EcJ1cdKkb1gwQSX1Jg1IkUHVgAX/Yj+dTv5QNjSS0pwU X-Received: by 2002:a17:906:1cc9:b0:a46:c8e3:c9b9 with SMTP id i9-20020a1709061cc900b00a46c8e3c9b9mr1259491ejh.42.1712132073227; Wed, 03 Apr 2024 01:14:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712132073; cv=pass; d=google.com; s=arc-20160816; b=guzvHWi29nmNJSmDdXgU6AxKre9gsbJkjZupDQDxsJRLFBpg8v/fy1wzvLwcIZcePi FLtM5hYHdl5e5EA7Yue5ExhS0nwBaXadww2N0F2tbpZOk4Bo9LYXXhUYN2XO8pamGbm9 QHqXhmBSLIhy/aocFzQ8Ax74YcLRdzgu7Xma8sKHwRk0bXZEh7xAxs/QcvallpdQ4YxK f7xtkuATUzZD4xhozKn/uc4YuQveex81szUXqNSJ8zreh7IukqgCokDervjCS0NsoMNE XD03T45cr2Jsf4TPpnIv6BnW7ZW2z7wgSXzWwhyrbIrHTSmqh2JQg3uO9bnysa9Cw3K8 2gNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=zPQI3gKs/xYD8xNFhLrKzEKV+vfff/HWbqwJO21zJzM=; fh=+Cha03WazY+6q+yqqjwgFfJUCnejP3aPpYUiA2pdMoI=; b=TTD+XacoJk6qA5sVb/hiOaqooIaBURvMTDOzjkpm1LU4PCJYR/kfgMCXQoH4a8VV9K Vebn7vBXTfRDKytSxN4n8tWronfY8CfAeLxdZpQ6zGKMSQfpG+QXZyCcT6jLlgnhfJI/ /vYXh6l8FcSj/qdj/QCpAW2S59/waAXt7mr0l+1nPRg+/F8lp6Ewi3cBDt/FgAhkB7wY BTD5Wpw+tdbb9t/TrJfe7ipnDuRFh1KHc9toZetbZjgTfEX2sd8Rf7w1egKeg9RmcyYc LJlmVkuaWw7Aw4nDb7ny+Oat1mPsG7gGErhPaiXVGHn9YSrFWoTzgPqJwJccZk+epjKK MIOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9S2rWNS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id re8-20020a170906d8c800b00a4e8f6ca5c7si1260459ejb.558.2024.04.03.01.14.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 01:14:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9S2rWNS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A7AE61F273D2 for ; Wed, 3 Apr 2024 08:13:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6D6879B77; Wed, 3 Apr 2024 08:07:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i9S2rWNS" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D18966CDDB; Wed, 3 Apr 2024 08:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131649; cv=none; b=OrVdOvuQ6DQgAmvRW7m9scyyOCHXwaIHOmcnd2DQOMg5SQ7Twn680BFmDm6/wHKBH3rqFV3Of27iJyYxO7ySndSOAMbTINo38YlGdqej+y4KzBo6NNB6RRaBXXU+Z6OahRTo64wLBXJT/NBWXF50VWbiYUIJGRkWLyjleMaOOYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131649; c=relaxed/simple; bh=K2ePQOaggCQbp9MAuVhX6tyGJTkfITqYlV3FRyD1b2w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=JezOO/nkq485blJcO79UI2aEI9pmImzeBT9+F0QISHITGX2lbHoyWngZsBhrxLqlLf1/v8KdNrbI+63WxzaC8C7nlJbNGVxW3jBzfjC6WZDiCzaiAyAGd1aofoT/DCmOrN6XeKiyofXkCo60Ys1R/bTTKUO0S5jayMBIONTg1TI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i9S2rWNS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9555FC433C7; Wed, 3 Apr 2024 08:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131648; bh=K2ePQOaggCQbp9MAuVhX6tyGJTkfITqYlV3FRyD1b2w=; h=From:To:Cc:Subject:Date:From; b=i9S2rWNSxBnVceX/PhEYHUL/8obuw7YBD3dJv3NpxgtqFmbZ6YmcytIk5F3iE5aJR I5RYRukVlaohxFlUlx3DoVo8ioTOKPq24ESuwErVo02d8QkqEyqWnOCLJPy3IIKQQU hPSJJJ28UFYnjJaOw9nBVZfRfW9z44J6zH3uuTF5it8w/Z071qPjEqTUM2WnMMrizN fO98GSAxPEoZV8r5mdONzcx9Bk+cWCKiyR3aI2XXY3Z1B5LcdC6almvWr6dDKTwDko dlyuak8JP+s7GrNn1iYACGO+Vywch0Qm7yXwZNXpNcwyBGG5wOlDd55NN/VlxGiFO6 vEIx/q6HxkU2Q== From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Michael Ellerman , Christophe Leroy , Damien Le Moal , Jiri Kosina , Greg Kroah-Hartman , Corey Minyard , Peter Huewe , Jarkko Sakkinen , Tero Kristo , Stephen Boyd , Ian Abbott , H Hartley Sweeten , Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , John Allen , Herbert Xu , Vinod Koul , Ard Biesheuvel , Bjorn Andersson , Moritz Fischer , Liviu Dudau , Benjamin Tissoires , Andi Shyti , Michael Hennerich , Peter Rosin , Lars-Peter Clausen , Jonathan Cameron , Dmitry Torokhov , Markuss Broks , Alexandre Torgue , Lee Jones , Jakub Kicinski , Shyam Sundar S K , Iyappan Subramanian , Yisen Zhuang , Stanislaw Gruszka , Kalle Valo , Sebastian Reichel , Tony Lindgren , Mark Brown , Alexandre Belloni , Xiang Chen , "Martin K. Petersen" , Neil Armstrong , Heiko Stuebner , Krzysztof Kozlowski , Vaibhav Hiremath , Alex Elder , Jiri Slaby , Jacky Huang , Helge Deller , Christoph Hellwig , Robin Murphy , Steven Rostedt , Masami Hiramatsu , Andrew Morton , Kees Cook , Trond Myklebust , Anna Schumaker , Masahiro Yamada , Nathan Chancellor , Takashi Iwai , linuxppc-dev@lists.ozlabs.org, linux-ide@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-integrity@vger.kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fpga@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-input@vger.kernel.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-wireless@vger.kernel.org, linux-rtc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-spi@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, iommu@lists.linux.dev, linux-trace-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-hardening@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kbuild@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH 00/34] address all -Wunused-const warnings Date: Wed, 3 Apr 2024 10:06:18 +0200 Message-Id: <20240403080702.3509288-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann 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 Cc: Christophe Leroy Cc: Damien Le Moal Cc: Jiri Kosina Cc: Greg Kroah-Hartman Cc: Corey Minyard Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Tero Kristo Cc: Stephen Boyd Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Srinivas Pandruvada Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: John Allen Cc: Herbert Xu Cc: Vinod Koul Cc: Ard Biesheuvel Cc: Bjorn Andersson Cc: Moritz Fischer Cc: Liviu Dudau Cc: Benjamin Tissoires Cc: Andi Shyti Cc: Michael Hennerich Cc: Peter Rosin Cc: Lars-Peter Clausen Cc: Jonathan Cameron Cc: Dmitry Torokhov Cc: Markuss Broks Cc: Alexandre Torgue Cc: Lee Jones Cc: Jakub Kicinski Cc: Shyam Sundar S K Cc: Iyappan Subramanian Cc: Yisen Zhuang Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: Sebastian Reichel Cc: Tony Lindgren Cc: Mark Brown Cc: Alexandre Belloni Cc: Xiang Chen Cc: "Martin K. Petersen" Cc: Neil Armstrong Cc: Heiko Stuebner Cc: Krzysztof Kozlowski Cc: Vaibhav Hiremath Cc: Alex Elder Cc: Jiri Slaby Cc: Jacky Huang Cc: Helge Deller Cc: Christoph Hellwig Cc: Robin Murphy Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Kees Cook Cc: Trond Myklebust Cc: Anna Schumaker Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Takashi Iwai 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