Skip to contentSkip to conversation

fix warning in 8250.c

PATCH In review Denis Vlasenko 4 participants 5 messages Jan 3, 2006 – Jan 4, 2006 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix warning in 8250.c

CC drivers/serial/8250.o
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: 'transmit_chars' declared inline after being called /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: previous declaration of 'transmit_chars' was here

Since this function is not small, inlining effect is way below noise floor. Let's just remove _INLINE_.
--
vda

CC drivers/serial/8250.o
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: 'transmit_chars' declared inline after being called /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: previous declaration of 'transmit_chars' was here

drivers/serial/8250.c +1 -1
diff -urpN linux-2.6.15-rc7.src/drivers/serial/8250.c linux-2.6.15-rc7.fix/drivers/serial/8250.c
@@ -1217,7 +1217,7 @@ receive_chars(struct uart_8250_port *up,
 	*status = lsr;
 }
 
-static _INLINE_ void transmit_chars(struct uart_8250_port *up)
+static void transmit_chars(struct uart_8250_port *up)
 {
 	struct circ_buf *xmit = &up->port.info->xmit;
 	int count;
#1 lore raw
Quoted 6 lines · Denis Vlasenko

CC drivers/serial/8250.o
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: 'transmit_chars' declared inline after being called /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: previous declaration of 'transmit_chars' was here

Since this function is not small, inlining effect is way below noise floor. Let's just remove _INLINE_.

I think we want to remove _INLINE_ from both receive_chars and transmit_chars. Both functions aren't small, so...

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#2 lore raw
Quoted 10 lines · Russell King
Quoted 6 lines · Denis Vlasenko

CC drivers/serial/8250.o
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: 'transmit_chars' declared inline after being called /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: previous declaration of 'transmit_chars' was here

Since this function is not small, inlining effect is way below noise floor. Let's just remove _INLINE_.

I think we want to remove _INLINE_ from both receive_chars and transmit_chars. Both functions aren't small, so...

While we're at it can we please kill _INLINE_? Those functions that should be inlined can become inline, but this macro just obsfucates the serial code.

#3 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Russell King
Quoted 4 lines · Denis Vlasenko

CC drivers/serial/8250.o
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: 'transmit_chars' declared inline after being called /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/serial/8250.c:1085: warning: previous declaration of 'transmit_chars' was here

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Since this function is not small, inlining effect is way below noise floor. Let's just remove _INLINE_.

I think we want to remove _INLINE_ from both receive_chars and transmit_chars. Both functions aren't small, so...

While we're at it can we please kill _INLINE_? Those functions that should be inlined can become inline, but this macro just obsfucates the serial code.

No idea - I don't know about x86 nuances and why they wanted:

#if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486)) #define _INLINE_ inline
#else
#define _INLINE_
#endif

Maybe someone in the x86 world needs to comment? Does the above even mean that we'll ever inline anything marked _INLINE_ ?

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#4 lore raw
Quoted 6 lines · Russell King
Quoted 3 lines

While we're at it can we please kill _INLINE_? Those functions that should be inlined can become inline, but this macro just obsfucates the serial code.

No idea - I don't know about x86 nuances and why they wanted:

Quoted 8 lines

#if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486)) #define _INLINE_ inline
#else
#define _INLINE_
#endif

Maybe someone in the x86 world needs to comment? Does the above even mean that we'll ever inline anything marked _INLINE_ ?

I suspect the reasoning behind this is lost in the mists of pre-bk time. I'd be inclined to just nuke it and see what happens. Nothing, I expect.