From patchwork Wed Apr 3 08:06:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 786598 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 C513584FBA; Wed, 3 Apr 2024 08:08:39 +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=1712131719; cv=none; b=p/1m3M1E5RxwrtiIWG48aNV/sUEElzyBvpfCY2I6LQa4khjoZf8VyxdZqUhiuzvKCVciKprMTl0hK0hdKD0DKiH2usHsygxgtUS7qRzM4YQ8ZT47/wYIJUb57coNNx0avjSVsPkfF7Xl0kF/vxn+IV4yBeAN17RMY2ILTkO3qac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131719; c=relaxed/simple; bh=3FgSuQ7tiSYGFrQ5YgtJKC7vrKzdmqUOX9CzJzQDHso=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PI37arfRXglia+LPQUTpcpxFo3RCZ2gZ5fqYTDsjfrgVFmsGSyBCiLFQegNIA+n5ohU7IQU3bJ1W5wCQvusb8lsyHVyWGp0CM2T/WkXYY1vxjYPbCLm5rXUDD83rqol9BF+VAPvCJBExKlG/lDq/XCeEt14uou3IjCuwwqopT+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nxMBY/dL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nxMBY/dL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D1BBC433C7; Wed, 3 Apr 2024 08:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131719; bh=3FgSuQ7tiSYGFrQ5YgtJKC7vrKzdmqUOX9CzJzQDHso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nxMBY/dLT6CayFR5A/KNDA9+vTisu7sftWa5Fvqb/eWp5hcNJVBZxE9PlPmmG0QXZ PMutL9J0QSHGMavbJbyARu2AUBjoIc+3iSnRqlG0axBXj/qfXEED6BpTlolCLYUMOj ezmb4Sd4u19bTzrzPZBjQ267Nwk8617FXcMyq6nCqmafQWbowELlaEoijdQv6RWuKJ ULjhPLhit5npJ+VXlpwMZ7Xdy6KT9Qph/ZBNCTOBM1xBHql8FNz7ybTgT3dzMFonXw T1Ga5mqfORgR30VA1C3RLnZnowT51tCaV2hczw1rvEgp7DBkjzev151PGQBnGvDbs3 QJ2+o6Xmk6guw== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Dmitry Torokhov , Maxime Coquelin , Alexandre Torgue Cc: Krzysztof Kozlowski , Arnd Bergmann , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-input@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/34] Input: stmpe-ts - mark OF related data as maybe unused Date: Wed, 3 Apr 2024 10:06:25 +0200 Message-Id: <20240403080702.3509288-8-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Krzysztof Kozlowski When compile tested with W=1 on x86_64 with driver as built-in: stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/stmpe-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index b204fdb2d22c..022b3e94266d 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -366,7 +366,7 @@ static struct platform_driver stmpe_ts_driver = { }; module_platform_driver(stmpe_ts_driver); -static const struct of_device_id stmpe_ts_ids[] = { +static const struct of_device_id stmpe_ts_ids[] __maybe_unused = { { .compatible = "st,stmpe-ts", }, { }, }; From patchwork Wed Apr 3 08:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 785568 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 B97DA839F7; Wed, 3 Apr 2024 08:08:46 +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=1712131726; cv=none; b=T2fHEObanKcY/TCei58VdxDb9WxOpL3fuea49phwh2K9ccgucmLnYLOGCbh1fonJSdEZ/pX6qHcE422EazH6jkzzDGxkWZlhoPoi68XJRzxgmcEs3U3EwVyowVSzy02LLIo+IoTR2bxxU/9AIhEUGzz9NfSxeYhJhHa3IWOVPLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131726; c=relaxed/simple; bh=FdHqMqMo9sUCpqipxuKBSJYP0dDiQNo82fvPaq1PpTc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CJXR2LjZHxzQC6NZZ8hqT+omf+qy5YSfc43crrnRCL7dh6cPV97Knq9JrCeaVXUS+oFhMVuR6siMwSj1ulNCXk1HGlNBNyZe2FcBbIg1Xk0dmUHHgEi+h8uXJjFCReK8HkcolKoTh7CKLbBszFMTE2bE8mRkbPOcVimknyhZB0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cr/P1UqD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cr/P1UqD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE870C433F1; Wed, 3 Apr 2024 08:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131726; bh=FdHqMqMo9sUCpqipxuKBSJYP0dDiQNo82fvPaq1PpTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cr/P1UqDYRkzPKqWmBayNR3jsXD6jMn0kadZyFxqYE7IyvhZShvACgtnZHttX24IG r1JUFlP+XeTxLhjkf9rioOJNZDuspkIFHOuD9cjXIRhHsLmaiigk3Da/7Dui2ehupf nwl2kb0SRVwce6S20DGkI7cUjKWszmAY7dAiBNij74+qwVb7bS/ZkUweB77DTFIgbJ 3C0HVjZAaX13S9UvkBLXDa1GUYxy0hSgmFu3aU9eSzT+AnfaZhKidYmlZtxl1cueEw +Um7ksYhBu/qR2i+ILNCm8u5Mj993Z+Ln7r4uL+NW3t2VrrExsYg/XvJROJrSjLbDg hFlY7HeYvOqxg== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Dmitry Torokhov , Benjamin Tissoires Cc: Arnd Bergmann , =?utf-8?q?Jos=C3=A9_Pekkarinen?= , Raul Rangel , Jeffery Miller , linux-input@vger.kernel.org Subject: [PATCH 08/34] Input: synaptics: hide unused smbus_pnp_ids[] array Date: Wed, 3 Apr 2024 10:06:26 +0200 Message-Id: <20240403080702.3509288-9-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann When SMBUS is disabled, this is never referenced, causing a W=1 warning: drivers/input/mouse/synaptics.c:164:27: error: 'smbus_pnp_ids' defined but not used [-Werror=unused-const-variable=] Hide the array behind the same #ifdef as the code referencing it. Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices") Signed-off-by: Arnd Bergmann --- drivers/input/mouse/synaptics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 7a303a9d6bf7..bc22b75e64a7 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -161,6 +161,7 @@ static const char * const topbuttonpad_pnp_ids[] = { NULL }; +#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS static const char * const smbus_pnp_ids[] = { /* all of the topbuttonpad_pnp_ids are valid, we just add some extras */ "LEN0048", /* X1 Carbon 3 */ @@ -195,6 +196,7 @@ static const char * const smbus_pnp_ids[] = { "SYN3257", /* HP Envy 13-ad105ng */ NULL }; +#endif static const char * const forcepad_pnp_ids[] = { "SYN300D", From patchwork Wed Apr 3 08:06:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 786597 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 5508B13329B; Wed, 3 Apr 2024 08:11:58 +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=1712131918; cv=none; b=TjgzEulotaOgTrXX5jeQ+nN321nImyoN7ffmUSTcraBCfE6sn07m4KoRGA2udEwTFxhThHpu49upJhkrGNpKtbMBbu+gEom9oCGGrt7RtX+1C3DFrsU28hwvw78WDYNdGi2WUoBdj2863ax1aEFbrLQgCYD35UiJ7fMtXiOY1aY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131918; c=relaxed/simple; bh=eTAXLTfSMqPzmGg1LsuyAG1Zp31dv3Dky44SOxHYxuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cvz0JBAf2Uo0koZcHoKM74VyVdZFIb408kxpe9ooDm/G4d+umxuMJxdgYohIxSVimq6AYqov/0hGecGOsvQwFeQpW8jxqjy8KEGaSF37WeXH7ELre6JdT5+O+QGF8SA9aga6vq8G+UybWHEz+nN18G5/wVPAo39YDciWkZaWkO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aWrRnUv4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aWrRnUv4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F0ADC433C7; Wed, 3 Apr 2024 08:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131918; bh=eTAXLTfSMqPzmGg1LsuyAG1Zp31dv3Dky44SOxHYxuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWrRnUv4lYXxKle69MNfRfBQK7ESJOlsoX3+1O6jaAa58kXkx/76YpEzDKxB4A0Kp HYpcT/Kz5LFT66zC94llHyVuTtej8K5hH8XeTdVyHAhvHCAydmsJRkTVMZpmKNQAGp ayrMPDNVedGE1y5Bs39aIdNRSYstABuoExbqWsoiVBOxvFLHgKuFAdOwbpRWgeHtt5 mLfyGf3RfYEvyUmLaYJM0ly9RhDoMwCSyJW3C60zerG9frwgZ6tHYBM3JbDcue/FsO wgC4Flt/z8UE7l/iJBMLwf+swLeJIPB8K90gVjaJ8Ex9yFl265ysKntswFJjsdEzK7 XhXWqQlQ65q6g== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Markuss Broks , Dmitry Torokhov , Karel Balej Cc: Arnd Bergmann , =?utf-8?q?Duje_Mihanovi=C4=87?= , =?utf-8?q?Uwe_Kl?= =?utf-8?q?eine-K=C3=B6nig?= , linux-input@vger.kernel.org Subject: [PATCH 29/34] Input: imagis - remove incorrect ifdef checks Date: Wed, 3 Apr 2024 10:06:47 +0200 Message-Id: <20240403080702.3509288-30-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann When CONFIG_OF is disabled, three variables become unused: drivers/input/touchscreen/imagis.c:391:39: error: unused variable 'imagis_3032c_data' [-Werror,-Wunused-const-variable] drivers/input/touchscreen/imagis.c:399:39: error: unused variable 'imagis_3038b_data' [-Werror,-Wunused-const-variable] drivers/input/touchscreen/imagis.c:407:39: error: unused variable 'imagis_3038c_data' [-Werror,-Wunused-const-variable] There is no real point in building this driver without CONFIG_OF, so just remove the #ifdef checks and just always build this to avoids the warnings. Fixes: 10ad7d7a428f ("input/touchscreen: imagis: Add support for Imagis IST3038B") Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/imagis.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 074dd6c342ec..d09b10f77a19 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -411,7 +411,6 @@ static const struct imagis_properties imagis_3038c_data = { .whoami_val = IST3038C_WHOAMI, }; -#ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { { .compatible = "imagis,ist3032c", .data = &imagis_3032c_data }, { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, @@ -419,13 +418,12 @@ static const struct of_device_id imagis_of_match[] = { { }, }; MODULE_DEVICE_TABLE(of, imagis_of_match); -#endif static struct i2c_driver imagis_ts_driver = { .driver = { .name = "imagis-touchscreen", .pm = pm_sleep_ptr(&imagis_pm_ops), - .of_match_table = of_match_ptr(imagis_of_match), + .of_match_table = imagis_of_match, }, .probe = imagis_probe, }; From patchwork Wed Apr 3 08:06:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 785567 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 72BBF6EB69; Wed, 3 Apr 2024 08:15:10 +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=1712132110; cv=none; b=cKM0lAb/YbKmpM02PmdE8w/7dalS1Znbs3B2jhsyDmFmBWOmJayTAdhJS/AR/0L767DKnXAA88++HVry0H1XlL22zwBeZlqTKL1qTgNUXltAbTgMumMT/bU013W3oDYXR2KSmlkXRZdEPAD4cLqHckabDu4hWbYdkGpoYzcbjaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712132110; c=relaxed/simple; bh=RuQRkHrQ9e3cp/Msr4bhBQotSNWJFjViuqNekUfGnHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A1XIq0QqLjiYe+2Pqd8hkejyTFFblv8pu8eNshjYZmWIxvh0BTO7yqwXkWBeEGPHOp8KBgBlm9sKd4HrNOYBc5mJdnB2A0vdODUkfnFO9mLsl+d9oFlTB6U0SJvDmkk4N7YqNln2XJ6hitN9as/OvDBmRgPPS1fnuDx1f3pZmAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ItNhRIO2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ItNhRIO2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E04A9C43390; Wed, 3 Apr 2024 08:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712132110; bh=RuQRkHrQ9e3cp/Msr4bhBQotSNWJFjViuqNekUfGnHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ItNhRIO25oVeA7GZkONi09iRrqNBHIydMSlFqXa22rbvpiOpF/t/5Zf0w1AP3mFo6 O9Kzb/WTl2tJ4EjZFPzTm2IN46cCsU5xufjehvrzvGRB9VCVUMJdCeHMMTkG8eBTV9 dpUfvhvhuL3MZ/Uvri9wE8FnVBM2zaSwt65z3teAtgNRm3atfXoTM1/I9dwIfXnw2m alDJkBocPoMKNGLVXN/wV7I9YT+4kmwrbOi0i+R+rIyddSYM2A45JFA2o2y4jA6NBq bdE1Ox/06zB7V1Qdugd0BsqMEj2MWn2Gg5AGnI/kD7I2blxByZ82zuDr76AyDfCX7s FY1DVZoMH/odg== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Corey Minyard , Peter Huewe , Jarkko Sakkinen , Vinod Koul , Moritz Fischer , Wu Hao , Xu Yilun , Jiri Kosina , Benjamin Tissoires , Michael Hennerich , Peter Rosin , Dmitry Torokhov , Iyappan Subramanian , Keyur Chudgar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yisen Zhuang , Salil Mehta , Tony Lindgren , Liam Girdwood , Mark Brown , Alexandre Belloni , Xiang Chen , "James E.J. Bottomley" , "Martin K. Petersen" , Greg Kroah-Hartman , Russell King , Jiri Slaby , Jacky Huang , Shan-Chun Hung Cc: Arnd Bergmann , Jason Gunthorpe , Tom Rix , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Randy Dunlap , Rob Herring , Linus Walleij , openipmi-developer@lists.sourceforge.net, linux-integrity@vger.kernel.org, dmaengine@vger.kernel.org, linux-fpga@vger.kernel.org, linux-input@vger.kernel.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-rtc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations Date: Wed, 3 Apr 2024 10:06:51 +0200 Message-Id: <20240403080702.3509288-34-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann When building with CONFIG_OF and/or CONFIG_ACPI disabled but W=1 extra warnings enabled, a lot of driver cause a warning about an unused ID table: drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable] drivers/dma/img-mdc-dma.c:863:34: error: unused variable 'mdc_dma_of_match' [-Werror,-Wunused-const-variable] drivers/fpga/versal-fpga.c:62:34: error: unused variable 'versal_fpga_of_match' [-Werror,-Wunused-const-variable] drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable] drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable 'i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable] drivers/memory/pl353-smc.c:62:34: error: unused variable 'pl353_smc_supported_children' [-Werror,-Wunused-const-variable] drivers/regulator/pbias-regulator.c:136:34: error: unused variable 'pbias_of_match' [-Werror,-Wunused-const-variable] drivers/regulator/twl-regulator.c:552:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable] drivers/regulator/twl6030-regulator.c:645:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable] drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:3635:36: error: unused variable 'sas_v2_acpi_match' [-Werror,-Wunused-const-variable] drivers/staging/pi433/pi433_if.c:1359:34: error: unused variable 'pi433_dt_ids' [-Werror,-Wunused-const-variable] drivers/tty/serial/amba-pl011.c:2945:34: error: unused variable 'sbsa_uart_of_match' [-Werror,-Wunused-const-variable] The fix is always to just remove the of_match_ptr() and ACPI_PTR() wrappers that remove the reference, rather than adding another #ifdef just for build testing for a configuration that doesn't matter in practice. I considered splitting up the large patch into per subsystem patches, but since it's really just the same thing everywhere it feels better to do it all at once. Signed-off-by: Arnd Bergmann Reviewed-by: Jarkko Sakkinen Acked-by: Xu Yilun Acked-by: Peter Rosin --- drivers/char/ipmi/ipmb_dev_int.c | 2 +- drivers/char/tpm/tpm_ftpm_tee.c | 2 +- drivers/dma/img-mdc-dma.c | 2 +- drivers/fpga/versal-fpga.c | 2 +- drivers/hid/hid-google-hammer.c | 6 ++---- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- drivers/i2c/muxes/i2c-mux-reg.c | 2 +- drivers/input/touchscreen/wdt87xx_i2c.c | 2 +- drivers/mux/adg792a.c | 2 +- drivers/net/ethernet/apm/xgene-v2/main.c | 2 +- drivers/net/ethernet/hisilicon/hns_mdio.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/staging/pi433/pi433_if.c | 2 +- drivers/tty/serial/amba-pl011.c | 6 +++--- drivers/tty/serial/ma35d1_serial.c | 2 +- 20 files changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c index 49100845fcb7..5e7bfc7c26e2 100644 --- a/drivers/char/ipmi/ipmb_dev_int.c +++ b/drivers/char/ipmi/ipmb_dev_int.c @@ -364,7 +364,7 @@ MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id); static struct i2c_driver ipmb_driver = { .driver = { .name = "ipmb-dev", - .acpi_match_table = ACPI_PTR(acpi_ipmb_id), + .acpi_match_table = acpi_ipmb_id, }, .probe = ipmb_probe, .remove = ipmb_remove, diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c index 2ea4882251cf..0c453f3f928d 100644 --- a/drivers/char/tpm/tpm_ftpm_tee.c +++ b/drivers/char/tpm/tpm_ftpm_tee.c @@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids); static struct platform_driver ftpm_tee_plat_driver = { .driver = { .name = "ftpm-tee", - .of_match_table = of_match_ptr(of_ftpm_tee_ids), + .of_match_table = of_ftpm_tee_ids, }, .shutdown = ftpm_plat_tee_shutdown, .probe = ftpm_plat_tee_probe, diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c index 0532dd2640dc..6931c8a65415 100644 --- a/drivers/dma/img-mdc-dma.c +++ b/drivers/dma/img-mdc-dma.c @@ -1073,7 +1073,7 @@ static struct platform_driver mdc_dma_driver = { .driver = { .name = "img-mdc-dma", .pm = &img_mdc_pm_ops, - .of_match_table = of_match_ptr(mdc_dma_of_match), + .of_match_table = mdc_dma_of_match, }, .probe = mdc_dma_probe, .remove_new = mdc_dma_remove, diff --git a/drivers/fpga/versal-fpga.c b/drivers/fpga/versal-fpga.c index 3710e8f01be2..e6189106c468 100644 --- a/drivers/fpga/versal-fpga.c +++ b/drivers/fpga/versal-fpga.c @@ -69,7 +69,7 @@ static struct platform_driver versal_fpga_driver = { .probe = versal_fpga_probe, .driver = { .name = "versal_fpga_manager", - .of_match_table = of_match_ptr(versal_fpga_of_match), + .of_match_table = versal_fpga_of_match, }, }; module_platform_driver(versal_fpga_driver); diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c index c6bdb9c4ef3e..886cc5748b7d 100644 --- a/drivers/hid/hid-google-hammer.c +++ b/drivers/hid/hid-google-hammer.c @@ -275,21 +275,19 @@ static const struct acpi_device_id cbas_ec_acpi_ids[] = { }; MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids); -#ifdef CONFIG_OF static const struct of_device_id cbas_ec_of_match[] = { { .compatible = "google,cros-cbas" }, { }, }; MODULE_DEVICE_TABLE(of, cbas_ec_of_match); -#endif static struct platform_driver cbas_ec_driver = { .probe = cbas_ec_probe, .remove = cbas_ec_remove, .driver = { .name = "cbas_ec", - .acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids), - .of_match_table = of_match_ptr(cbas_ec_of_match), + .acpi_match_table = cbas_ec_acpi_ids, + .of_match_table = cbas_ec_of_match, .pm = &cbas_ec_pm_ops, }, }; diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c index 23766d853e76..c6d70788161a 100644 --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c @@ -303,7 +303,7 @@ static void ltc4306_remove(struct i2c_client *client) static struct i2c_driver ltc4306_driver = { .driver = { .name = "ltc4306", - .of_match_table = of_match_ptr(ltc4306_of_match), + .of_match_table = ltc4306_of_match, }, .probe = ltc4306_probe, .remove = ltc4306_remove, diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c index 8489971babd3..0f1b39964743 100644 --- a/drivers/i2c/muxes/i2c-mux-reg.c +++ b/drivers/i2c/muxes/i2c-mux-reg.c @@ -250,7 +250,7 @@ static struct platform_driver i2c_mux_reg_driver = { .remove_new = i2c_mux_reg_remove, .driver = { .name = "i2c-mux-reg", - .of_match_table = of_match_ptr(i2c_mux_reg_of_match), + .of_match_table = i2c_mux_reg_of_match, }, }; diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c index 32c7be54434c..9f3a4092e47c 100644 --- a/drivers/input/touchscreen/wdt87xx_i2c.c +++ b/drivers/input/touchscreen/wdt87xx_i2c.c @@ -1166,7 +1166,7 @@ static struct i2c_driver wdt87xx_driver = { .name = WDT87XX_NAME, .dev_groups = wdt87xx_groups, .pm = pm_sleep_ptr(&wdt87xx_pm_ops), - .acpi_match_table = ACPI_PTR(wdt87xx_acpi_id), + .acpi_match_table = wdt87xx_acpi_id, }, }; module_i2c_driver(wdt87xx_driver); diff --git a/drivers/mux/adg792a.c b/drivers/mux/adg792a.c index 4da5aecb9fc6..a5afe29e3cf1 100644 --- a/drivers/mux/adg792a.c +++ b/drivers/mux/adg792a.c @@ -141,7 +141,7 @@ MODULE_DEVICE_TABLE(of, adg792a_of_match); static struct i2c_driver adg792a_driver = { .driver = { .name = "adg792a", - .of_match_table = of_match_ptr(adg792a_of_match), + .of_match_table = adg792a_of_match, }, .probe = adg792a_probe, .id_table = adg792a_id, diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c index 9e90c2381491..64370057ba3d 100644 --- a/drivers/net/ethernet/apm/xgene-v2/main.c +++ b/drivers/net/ethernet/apm/xgene-v2/main.c @@ -731,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match); static struct platform_driver xge_driver = { .driver = { .name = "xgene-enet-v2", - .acpi_match_table = ACPI_PTR(xge_acpi_match), + .acpi_match_table = xge_acpi_match, }, .probe = xge_probe, .remove_new = xge_remove, diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c index ed73707176c1..f8caf59bd759 100644 --- a/drivers/net/ethernet/hisilicon/hns_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns_mdio.c @@ -639,7 +639,7 @@ static struct platform_driver hns_mdio_driver = { .driver = { .name = MDIO_DRV_NAME, .of_match_table = hns_mdio_match, - .acpi_match_table = ACPI_PTR(hns_mdio_acpi_match), + .acpi_match_table = hns_mdio_acpi_match, }, }; diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c index cd5a0d7e4455..2eeb99e7b850 100644 --- a/drivers/regulator/pbias-regulator.c +++ b/drivers/regulator/pbias-regulator.c @@ -231,7 +231,7 @@ static struct platform_driver pbias_regulator_driver = { .driver = { .name = "pbias-regulator", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(pbias_of_match), + .of_match_table = pbias_of_match, }, }; diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 5bacfcebf59a..4ed91e88e1eb 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -656,7 +656,7 @@ static struct platform_driver twlreg_driver = { .driver = { .name = "twl4030_reg", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(twl_of_match), + .of_match_table = twl_of_match, }, }; diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c index 6eed0f6e0adb..8a84048a66d7 100644 --- a/drivers/regulator/twl6030-regulator.c +++ b/drivers/regulator/twl6030-regulator.c @@ -765,7 +765,7 @@ static struct platform_driver twlreg_driver = { .driver = { .name = "twl6030_reg", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(twl_of_match), + .of_match_table = twl_of_match, }, }; diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c index a72c4ad0cec6..12da7d36e520 100644 --- a/drivers/rtc/rtc-fsl-ftm-alarm.c +++ b/drivers/rtc/rtc-fsl-ftm-alarm.c @@ -320,7 +320,7 @@ static struct platform_driver ftm_rtc_driver = { .driver = { .name = "ftm-alarm", .of_match_table = ftm_rtc_match, - .acpi_match_table = ACPI_PTR(ftm_imx_acpi_ids), + .acpi_match_table = ftm_imx_acpi_ids, }, }; diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 161feae3acab..c6f313c9605b 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1788,7 +1788,7 @@ static struct platform_driver hisi_sas_v1_driver = { .driver = { .name = DRV_NAME, .of_match_table = sas_v1_of_match, - .acpi_match_table = ACPI_PTR(sas_v1_acpi_match), + .acpi_match_table = sas_v1_acpi_match, }, }; diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index d89e97e8f5c2..ce3b5e1680f5 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3635,7 +3635,7 @@ static struct platform_driver hisi_sas_v2_driver = { .driver = { .name = DRV_NAME, .of_match_table = sas_v2_of_match, - .acpi_match_table = ACPI_PTR(sas_v2_acpi_match), + .acpi_match_table = sas_v2_acpi_match, }, }; diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 81de98c0245a..30fd6da3e8d8 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -1367,7 +1367,7 @@ static struct spi_driver pi433_spi_driver = { .driver = { .name = "pi433", .owner = THIS_MODULE, - .of_match_table = of_match_ptr(pi433_dt_ids), + .of_match_table = pi433_dt_ids, }, .probe = pi433_probe, .remove = pi433_remove, diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 2fa3fb30dc6c..dd1d1a2cc5f5 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2948,7 +2948,7 @@ static const struct of_device_id sbsa_uart_of_match[] = { }; MODULE_DEVICE_TABLE(of, sbsa_uart_of_match); -static const struct acpi_device_id __maybe_unused sbsa_uart_acpi_match[] = { +static const struct acpi_device_id sbsa_uart_acpi_match[] = { { "ARMH0011", 0 }, { "ARMHB000", 0 }, {}, @@ -2961,8 +2961,8 @@ static struct platform_driver arm_sbsa_uart_platform_driver = { .driver = { .name = "sbsa-uart", .pm = &pl011_dev_pm_ops, - .of_match_table = of_match_ptr(sbsa_uart_of_match), - .acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match), + .of_match_table = sbsa_uart_of_match, + .acpi_match_table = sbsa_uart_acpi_match, .suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011), }, }; diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c index 19f0a305cc43..e326d0fb06b2 100644 --- a/drivers/tty/serial/ma35d1_serial.c +++ b/drivers/tty/serial/ma35d1_serial.c @@ -798,7 +798,7 @@ static struct platform_driver ma35d1serial_driver = { .resume = ma35d1serial_resume, .driver = { .name = "ma35d1-uart", - .of_match_table = of_match_ptr(ma35d1_serial_of_match), + .of_match_table = ma35d1_serial_of_match, }, };