projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39cd87c
)
i2c: pxa: hide unused icr_bits[] variable
author
Arnd Bergmann
<arnd@arndb.de>
Wed, 3 Apr 2024 08:06:22 +0000
(10:06 +0200)
committer
Andi Shyti
<andi.shyti@kernel.org>
Wed, 3 Apr 2024 23:07:57 +0000
(
01:07
+0200)
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@arndb.de>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-pxa.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/busses/i2c-pxa.c
b/drivers/i2c/busses/i2c-pxa.c
index 76f79b68cef84548b86def688b6ba95f4aa46335..888ca636f3f3b009ca542747ddca2119a79daa61 100644
(file)
--- 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);