public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h
       [not found]     ` <5271B1D2.6020301@asianux.com>
@ 2013-10-31  1:44       ` Chen Gang
  2013-10-31  6:47         ` Vineet Gupta
       [not found]       ` <C2D7FE5348E1B147BCA15975FBA230751538D9@IN01WEMBXA.internal.synopsys.com>
  1 sibling, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-10-31  1:44 UTC (permalink / raw)
  To: Greg KH, vgupta@synopsys.com, Vineet Gupta
  Cc: w.d.hubbs, chris, kirk, samuel.thibault,
	devel@driverdev.osuosl.org, speakup, linux-kernel@vger.kernel.org

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')


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arc/include/asm/serial.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arc/include/asm/serial.h b/arch/arc/include/asm/serial.h
index 602b097..f18b772 100644
--- a/arch/arc/include/asm/serial.h
+++ b/arch/arc/include/asm/serial.h
@@ -32,4 +32,6 @@
 #define BASE_BAUD	(arc_get_core_freq() / 16 / 3)
 #endif
 
+#define			SERIAL_PORT_DFNS
+
 #endif /* _ASM_ARC_SERIAL_H */
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h
  2013-10-31  1:44       ` [PATCH] arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h Chen Gang
@ 2013-10-31  6:47         ` Vineet Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2013-10-31  6:47 UTC (permalink / raw)
  To: Chen Gang, Greg KH
  Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca,
	samuel.thibault@ens-lyon.org, devel@driverdev.osuosl.org,
	speakup@braille.uwo.ca, linux-kernel@vger.kernel.org

On 10/31/2013 07:15 AM, Chen Gang wrote:
> 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')
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

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

-Vineet

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] arch: * : include: asm: remove empty SERIAL_PORT_DFNS in serial.h
       [not found]         ` <527202EF.6080704@asianux.com>
@ 2013-10-31  7:37           ` Chen Gang
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-10-31  7:37 UTC (permalink / raw)
  To: Greg KH, dhowells@redhat.com, James E.J. Bottomley, Helge Deller,
	linux-kernel@vger.kernel.org, Parisc List
  Cc: Vineet Gupta, w.d.hubbs@gmail.com, chris@the-brannons.com,
	kirk@reisers.ca, samuel.thibault@ens-lyon.org,
	devel@driverdev.osuosl.org, speakup@braille.uwo.ca

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).

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/frv/include/asm/serial.h    |    2 --
 arch/parisc/include/asm/serial.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/frv/include/asm/serial.h b/arch/frv/include/asm/serial.h
index dbb8259..658ceea 100644
--- a/arch/frv/include/asm/serial.h
+++ b/arch/frv/include/asm/serial.h
@@ -14,5 +14,3 @@
 #define BASE_BAUD 0
 
 #define STD_COM_FLAGS		ASYNC_BOOT_AUTOCONF
-
-#define SERIAL_PORT_DFNS
diff --git a/arch/parisc/include/asm/serial.h b/arch/parisc/include/asm/serial.h
index d7e3cc6..77e9b67 100644
--- a/arch/parisc/include/asm/serial.h
+++ b/arch/parisc/include/asm/serial.h
@@ -6,5 +6,3 @@
  * This is used for 16550-compatible UARTs
  */
 #define BASE_BAUD ( 1843200 / 16 )
-
-#define SERIAL_PORT_DFNS
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-31  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5267406C.9030805@asianux.com>
     [not found] ` <20131025052926.GA26786@kroah.com>
     [not found]   ` <526BC113.3040003@asianux.com>
     [not found]     ` <5271B1D2.6020301@asianux.com>
2013-10-31  1:44       ` [PATCH] arc: include: asm: define empty SERIAL_PORT_DFNS in serial.h Chen Gang
2013-10-31  6:47         ` Vineet Gupta
     [not found]       ` <C2D7FE5348E1B147BCA15975FBA230751538D9@IN01WEMBXA.internal.synopsys.com>
     [not found]         ` <527202EF.6080704@asianux.com>
2013-10-31  7:37           ` [PATCH] arch: * : include: asm: remove " Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox