* [PATCH 1/2] serial: sirf: make fifo functions static
@ 2016-06-07 18:06 Ben Dooks
2016-06-07 18:06 ` [PATCH 2/2] serial: sirf: make uart register info static Ben Dooks
0 siblings, 1 reply; 5+ messages in thread
From: Ben Dooks @ 2016-06-07 18:06 UTC (permalink / raw)
To: linux-arm-kernel
The fifo mask functions should be static as they are not
used outside of the driver. Fix the following warnings by
making them static:
drivers/tty/serial/sirfsoc_uart.h:109:5: warning: symbol 'uart_usp_ff_full_mask' was not declared. Should it be static?
drivers/tty/serial/sirfsoc_uart.h:117:5: warning: symbol 'uart_usp_ff_empty_mask' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-serial at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
drivers/tty/serial/sirfsoc_uart.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index c3a885b..43756bd 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -106,7 +106,7 @@ struct sirfsoc_uart_register {
enum sirfsoc_uart_type uart_type;
};
-u32 uart_usp_ff_full_mask(struct uart_port *port)
+static u32 uart_usp_ff_full_mask(struct uart_port *port)
{
u32 full_bit;
@@ -114,7 +114,7 @@ u32 uart_usp_ff_full_mask(struct uart_port *port)
return (1 << full_bit);
}
-u32 uart_usp_ff_empty_mask(struct uart_port *port)
+static u32 uart_usp_ff_empty_mask(struct uart_port *port)
{
u32 empty_bit;
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: sirf: make uart register info static
2016-06-07 18:06 [PATCH 1/2] serial: sirf: make fifo functions static Ben Dooks
@ 2016-06-07 18:06 ` Ben Dooks
2016-06-25 21:01 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Ben Dooks @ 2016-06-07 18:06 UTC (permalink / raw)
To: linux-arm-kernel
The driver does not export the two structures that
define the uart register mappings outside of the
driver, so make them static to avoid the following
warnings:
drivers/tty/serial/sirfsoc_uart.h:124:30: warning: symbol 'sirfsoc_usp' was not declared. Should it be static?
drivers/tty/serial/sirfsoc_uart.h:190:30: warning: symbol 'sirfsoc_uart' was not declared. Should it be static?
Note, we don't move these into the driver .c file as this would
be a larger change. However they really should not belong in the
header file like this.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-serial at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
drivers/tty/serial/sirfsoc_uart.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index 43756bd..2242008 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -121,7 +121,8 @@ static u32 uart_usp_ff_empty_mask(struct uart_port *port)
empty_bit = ilog2(port->fifosize) + 1;
return (1 << empty_bit);
}
-struct sirfsoc_uart_register sirfsoc_usp = {
+
+static struct sirfsoc_uart_register sirfsoc_usp = {
.uart_reg = {
.sirfsoc_mode1 = 0x0000,
.sirfsoc_mode2 = 0x0004,
@@ -187,7 +188,7 @@ struct sirfsoc_uart_register sirfsoc_usp = {
},
};
-struct sirfsoc_uart_register sirfsoc_uart = {
+static struct sirfsoc_uart_register sirfsoc_uart = {
.uart_reg = {
.sirfsoc_line_ctrl = 0x0040,
.sirfsoc_tx_rx_en = 0x004c,
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: sirf: make uart register info static
2016-06-07 18:06 ` [PATCH 2/2] serial: sirf: make uart register info static Ben Dooks
@ 2016-06-25 21:01 ` Greg Kroah-Hartman
2016-06-25 21:07 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-25 21:01 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 07, 2016 at 07:06:12PM +0100, Ben Dooks wrote:
> The driver does not export the two structures that
> define the uart register mappings outside of the
> driver, so make them static to avoid the following
> warnings:
>
> drivers/tty/serial/sirfsoc_uart.h:124:30: warning: symbol 'sirfsoc_usp' was not declared. Should it be static?
> drivers/tty/serial/sirfsoc_uart.h:190:30: warning: symbol 'sirfsoc_uart' was not declared. Should it be static?
>
> Note, we don't move these into the driver .c file as this would
> be a larger change. However they really should not belong in the
> header file like this.
Please do the correct thing here and move them into the .c file.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: sirf: make uart register info static
2016-06-25 21:01 ` Greg Kroah-Hartman
@ 2016-06-25 21:07 ` Arnd Bergmann
2016-06-27 9:25 ` Ben Dooks
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-06-25 21:07 UTC (permalink / raw)
To: linux-arm-kernel
On Saturday, June 25, 2016 2:01:50 PM CEST Greg Kroah-Hartman wrote:
> On Tue, Jun 07, 2016 at 07:06:12PM +0100, Ben Dooks wrote:
> > The driver does not export the two structures that
> > define the uart register mappings outside of the
> > driver, so make them static to avoid the following
> > warnings:
> >
> > drivers/tty/serial/sirfsoc_uart.h:124:30: warning: symbol 'sirfsoc_usp' was not declared. Should it be static?
> > drivers/tty/serial/sirfsoc_uart.h:190:30: warning: symbol 'sirfsoc_uart' was not declared. Should it be static?
> >
> > Note, we don't move these into the driver .c file as this would
> > be a larger change. However they really should not belong in the
> > header file like this.
>
> Please do the correct thing here and move them into the .c file.
I guess the entire sirfsoc_uart.h file can just get moved in there,
nothing else includes it (obviously, as the symbols above would
otherwise clash).
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: sirf: make uart register info static
2016-06-25 21:07 ` Arnd Bergmann
@ 2016-06-27 9:25 ` Ben Dooks
0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2016-06-27 9:25 UTC (permalink / raw)
To: linux-arm-kernel
On 25/06/16 22:07, Arnd Bergmann wrote:
> On Saturday, June 25, 2016 2:01:50 PM CEST Greg Kroah-Hartman wrote:
>> On Tue, Jun 07, 2016 at 07:06:12PM +0100, Ben Dooks wrote:
>>> The driver does not export the two structures that
>>> define the uart register mappings outside of the
>>> driver, so make them static to avoid the following
>>> warnings:
>>>
>>> drivers/tty/serial/sirfsoc_uart.h:124:30: warning: symbol 'sirfsoc_usp' was not declared. Should it be static?
>>> drivers/tty/serial/sirfsoc_uart.h:190:30: warning: symbol 'sirfsoc_uart' was not declared. Should it be static?
>>>
>>> Note, we don't move these into the driver .c file as this would
>>> be a larger change. However they really should not belong in the
>>> header file like this.
>>
>> Please do the correct thing here and move them into the .c file.
>
> I guess the entire sirfsoc_uart.h file can just get moved in there,
> nothing else includes it (obviously, as the symbols above would
> otherwise clash).
If no-one else objects then i'll sort a second revision.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-27 9:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07 18:06 [PATCH 1/2] serial: sirf: make fifo functions static Ben Dooks
2016-06-07 18:06 ` [PATCH 2/2] serial: sirf: make uart register info static Ben Dooks
2016-06-25 21:01 ` Greg Kroah-Hartman
2016-06-25 21:07 ` Arnd Bergmann
2016-06-27 9:25 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).