Skip to contentSkip to conversation

arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h

PATCH NAK Chen Gang 2 participants 3 messages Oct 31, 2013 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Chen Gang

author
#4 lore raw

PATCH 1/1 arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h

For some architectures (e.g. arc, openrisc), BASE_BAUD isn't constant And SERIAL_PORT_DFNS always use BASE_BAUND, and also all drivers use SERIAL_PORT_DFNS to initialize static variables, statically.

So need define SERIAL_PORT_DFNS as empty to tell drivers they don't support SERIAL_PORT_DFNS (mostly like frv and parisc did), or can not pass compiling

The related error (allmodconfig for arc with gcc-4.8.0):

CC [M] drivers/staging/speakup/serialio.o
drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant

    SERIAL_PORT_DFNS
    ^

drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[0].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[1].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[2].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base')

---
 arch/arc/include/asm/serial.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arc/include/asm/serial.h +2 -0
index 602b097..f18b772 100644
@@ -32,4 +32,6 @@
 #define BASE_BAUD	(arc_get_core_freq() / 16 / 3)
 #endif
 
+#define			SERIAL_PORT_DFNS
+
 #endif /* _ASM_ARC_SERIAL_H */
Signature · 1 line
1.7.7.6
#5 lore raw
Quoted 23 lines · Chen Gang

For some architectures (e.g. arc, openrisc), BASE_BAUD isn't constant And SERIAL_PORT_DFNS always use BASE_BAUND, and also all drivers use SERIAL_PORT_DFNS to initialize static variables, statically.

So need define SERIAL_PORT_DFNS as empty to tell drivers they don't support SERIAL_PORT_DFNS (mostly like frv and parisc did), or can not pass compiling

The related error (allmodconfig for arc with gcc-4.8.0):

CC [M] drivers/staging/speakup/serialio.o
drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant

    SERIAL_PORT_DFNS
    ^

drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[0].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[1].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[2].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base')

Quoted 1 line

NAK - as mentioned in prev email please fix the driver.

-Vineet

A message that is not in the archive (sent off-list or not yet received): C2D7FE5348E1B147BCA15975FBA230751538D9@IN01WEMBXA.internal.synopsys.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#8 lore raw

PATCH 1/1 arch: * : include: asm: remove empty SERIAL_PORT_DFNS in serial.h

If architectures don't support SERIAL_PORT_DFNS, they need not define it to "nothing", the related drivers need do it by themselves (e.g. 8250 serial driver).

---
 arch/frv/include/asm/serial.h    |    2 --
 arch/parisc/include/asm/serial.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
arch/frv/include/asm/serial.h +0 -2
index dbb8259..658ceea 100644
@@ -14,5 +14,3 @@
 #define BASE_BAUD 0
 
 #define STD_COM_FLAGS		ASYNC_BOOT_AUTOCONF
-
-#define SERIAL_PORT_DFNS
arch/parisc/include/asm/serial.h +0 -0
index d7e3cc6..77e9b67 100644
@@ -6,5 +6,3 @@
  * This is used for 16550-compatible UARTs
  */
 #define BASE_BAUD ( 1843200 / 16 )