arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h
Subsystems (2)
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]
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
@@ -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
Vineet Gupta
NAKQuoted 23 lines · Chen Gang
For some architectures (e.g. arc, openrisc),
BASE_BAUDisn't constant AndSERIAL_PORT_DFNSalways useBASE_BAUND, and also all drivers useSERIAL_PORT_DFNSto initialize static variables, statically.So need define
SERIAL_PORT_DFNSas empty to tell drivers they don't supportSERIAL_PORT_DFNS(mostly like frv and parisc did), or can not pass compilingThe 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 constantSERIAL_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 constantdrivers/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 constantdrivers/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 constantdrivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base')
Quoted 1 line
Signed-off-by Chen Gang <[email protected]>
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]
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
@@ -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
@@ -6,5 +6,3 @@* This is used for 16550-compatible UARTs */ #define BASE_BAUD ( 1843200 / 16 )