[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240403080702.3509288-5-arnd@kernel.org>
Date: Wed, 3 Apr 2024 10:06:22 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: linux-kernel@...r.kernel.org,
Andi Shyti <andi.shyti@...nel.org>,
Russell King <rmk+kernel@....linux.org.uk>,
Holger Schurig <h.schurig@...solutions.de>
Cc: Arnd Bergmann <arnd@...db.de>,
Wolfram Sang <wsa@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Heiko Stuebner <heiko@...ech.de>,
Yangtao Li <frank.li@...o.com>,
Robert Marko <robert.marko@...tura.hr>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Liao Chang <liaochang1@...wei.com>,
Paul Cercueil <paul@...pouillou.net>,
Rob Herring <robh@...nel.org>,
linux-i2c@...r.kernel.org
Subject: [PATCH 04/34] i2c: pxa: hide unused icr_bits[] variable
From: Arnd Bergmann <arnd@...db.de>
The function using this is hidden in an #ifdef, so the variable
needs the same one for a clean W=1 build:
drivers/i2c/busses/i2c-pxa.c:327:26: error: 'icr_bits' defined but not used [-Werror=unused-const-variable=]
Fixes: d6a7b5f84b5c ("[ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/i2c/busses/i2c-pxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 76f79b68cef8..888ca636f3f3 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -324,6 +324,7 @@ static void decode_ISR(unsigned int val)
decode_bits(KERN_DEBUG "ISR", isr_bits, ARRAY_SIZE(isr_bits), val);
}
+#ifdef CONFIG_I2C_PXA_SLAVE
static const struct bits icr_bits[] = {
PXA_BIT(ICR_START, "START", NULL),
PXA_BIT(ICR_STOP, "STOP", NULL),
@@ -342,7 +343,6 @@ static const struct bits icr_bits[] = {
PXA_BIT(ICR_UR, "UR", "ur"),
};
-#ifdef CONFIG_I2C_PXA_SLAVE
static void decode_ICR(unsigned int val)
{
decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val);
--
2.39.2
Powered by blists - more mailing lists