lkml.org 
[lkml]   [2012]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] tty: mxser: local variables should not be exposed globally
    Date
    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,

    \
     
     \ /
      Last update: 2012-05-03 03:41    [W:0.035 / U:0.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site