Skip to contentSkip to conversation

serial: amba-pl011: mark vendor_zte as __maybe_unused

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 20, 2016 – Jan 21, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: amba-pl011: mark vendor_zte as __maybe_unused

The pl011 driver has gone back and forth on the definition of the ZTE specific variation of the hardware definitions, but the current state is that the vendor definition is left in place yet unused:

drivers/tty/serial/amba-pl011.c:190:27: warning: 'vendor_zte' defined but not used [-Wunused-variable]

I don't know what the plan forward is to get this code to work, but the current behavior is a bit annoying as we get a warning whenever we build this driver.

This patch does not help us to make it work, but at least shuts up the warning.

Fixes 7ec758718920 ("tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL)")
drivers/tty/serial/amba-pl011.c +1 -1
index c0da0ccbbcf5..4cdfe8f806df 100644
@@ -187,7 +187,7 @@ static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = {
 	[REG_DMACR] = ZX_UART011_DMACR,
 };
 
-static struct vendor_data vendor_zte = {
+static struct vendor_data vendor_zte __maybe_unused = {
 	.reg_offset		= pl011_zte_offsets,
 	.access_32b		= true,
 	.ifls			= UART011_IFLS_RX4_8|UART011_IFLS_TX4_8,
#1 lore raw

2016-01-20 18:40 GMT+08:00 Arnd Bergmann <[email protected]>:

Quoted 23 lines

The pl011 driver has gone back and forth on the definition of the ZTE specific variation of the hardware definitions, but the current state is that the vendor definition is left in place yet unused:

drivers/tty/serial/amba-pl011.c:190:27: warning: 'vendor_zte' defined but not used [-Wunused-variable]

I don't know what the plan forward is to get this code to work, but the current behavior is a bit annoying as we get a warning whenever we build this driver.

This patch does not help us to make it work, but at least shuts up the warning.

Fixes 7ec758718920 ("tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL)")
drivers/tty/serial/amba-pl011.c +0 -0
index c0da0ccbbcf5..4cdfe8f806df 100644

drivers/tty/serial/amba-pl011.c static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = { · line 193

Quoted 8 lines
drivers/tty/serial/amba-pl011.c +1 -1
@@ -187,7 +187,7 @@ static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = {
        [REG_DMACR] = ZX_UART011_DMACR,
 };
 
-static struct vendor_data vendor_zte = {
+static struct vendor_data vendor_zte __maybe_unused = {
        .reg_offset             = pl011_zte_offsets,
        .access_32b             = true,
        .ifls                   = UART011_IFLS_RX4_8|UART011_IFLS_TX4_8,

Thanks for handling this. I am OK with the patch. Will prepare a patch to make ZTE uart work after Timur's pending pl011 patch is merged.

Jun