lkml.org 
[lkml]   [2020]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 21/30] net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipulations as its use
    Date
    The variable 'smt_pdef' is only used if LITTLE_ENDIAN is set, so only
    define it if this is the case.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/smt.c:1572:3: warning: ‘smt_pdef’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    ---
    drivers/net/fddi/skfp/smt.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/drivers/net/fddi/skfp/smt.c b/drivers/net/fddi/skfp/smt.c
    index b8c59d803ce68..a151d336b9046 100644
    --- a/drivers/net/fddi/skfp/smt.c
    +++ b/drivers/net/fddi/skfp/smt.c
    @@ -1561,7 +1561,7 @@ u_long smt_get_tid(struct s_smc *smc)
    return tid & 0x3fffffffL;
    }

    -
    +#ifdef LITTLE_ENDIAN
    /*
    * table of parameter lengths
    */
    @@ -1641,6 +1641,7 @@ static const struct smt_pdef {
    } ;

    #define N_SMT_PLEN ARRAY_SIZE(smt_pdef)
    +#endif

    int smt_check_para(struct s_smc *smc, struct smt_header *sm,
    const u_short list[])
    --
    2.25.1
    \
     
     \ /
      Last update: 2020-08-14 13:42    [W:6.632 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site