Skip to content

Commit 9519777

Browse files
arndbAndi Shyti
authored andcommitted
i2c: pxa: hide unused icr_bits[] variable
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: d6a7b5f ("[ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent 39cd87c commit 9519777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-pxa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ static void decode_ISR(unsigned int val)
324324
decode_bits(KERN_DEBUG "ISR", isr_bits, ARRAY_SIZE(isr_bits), val);
325325
}
326326

327+
#ifdef CONFIG_I2C_PXA_SLAVE
327328
static const struct bits icr_bits[] = {
328329
PXA_BIT(ICR_START, "START", NULL),
329330
PXA_BIT(ICR_STOP, "STOP", NULL),
@@ -342,7 +343,6 @@ static const struct bits icr_bits[] = {
342343
PXA_BIT(ICR_UR, "UR", "ur"),
343344
};
344345

345-
#ifdef CONFIG_I2C_PXA_SLAVE
346346
static void decode_ICR(unsigned int val)
347347
{
348348
decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val);

0 commit comments

Comments
 (0)