* [PATCH] tty: mxser: local variables should not be exposed globally
@ 2012-05-03 0:57 H Hartley Sweeten
2012-05-03 8:45 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2012-05-03 0:57 UTC (permalink / raw)
To: Linux Kernel; +Cc: jirislaby, gregkh
The variable 'mxser_port_ops' is only referenced in this file and
should be marked static to prevent it from being exposed globally.
Quites the sparse warning:
warning: symbol 'mxser_port_ops' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index c6f372d..90cc680 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2326,7 +2326,7 @@ static const struct tty_operations mxser_ops = {
.get_icount = mxser_get_icount,
};
-struct tty_port_operations mxser_port_ops = {
+static struct tty_port_operations mxser_port_ops = {
.carrier_raised = mxser_carrier_raised,
.dtr_rts = mxser_dtr_rts,
.activate = mxser_activate,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tty: mxser: local variables should not be exposed globally
2012-05-03 0:57 [PATCH] tty: mxser: local variables should not be exposed globally H Hartley Sweeten
@ 2012-05-03 8:45 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2012-05-03 8:45 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, jirislaby, gregkh
On Wed, 2 May 2012 17:57:17 -0700
H Hartley Sweeten <hartleys@visionengravers.com> wrote:
> The variable 'mxser_port_ops' is only referenced in this file and
> should be marked static to prevent it from being exposed globally.
Acked-by: Alan Cox <alan@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-03 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-03 0:57 [PATCH] tty: mxser: local variables should not be exposed globally H Hartley Sweeten
2012-05-03 8:45 ` Alan Cox
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).