• Jakub Kicinski's avatar
    nfp: silence set but not used warning with IPV6=n · c0ead555
    Jakub Kicinski authored
    Test robot reports:
    
    drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_rx_resync_req':
    drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used [-Wunused-but-set-variable]
      477 |  struct ipv6hdr *ipv6h;
          |                  ^~~~~
    In file included from include/linux/compiler_types.h:65,
                        from <command-line>:
    drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
    include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
      208 | # define fallthrough                    __attribute__((__fallthrough__))
          |                                         ^~~~~~~~~~~~~
    drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
      299 |   fallthrough;
          |   ^~~~~~~~~~~
    
    Use the IPv6 header in the switch, it doesn't matter which header
    we use to read the version field.
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c0ead555
tls.c 15.2 KB