OSDN Git Service

nfp: flower: fix 'variable 'flow6' set but not used'
authorLouis Peens <louis.peens@corigine.com>
Tue, 10 May 2022 07:48:45 +0000 (09:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 May 2022 22:15:12 +0000 (15:15 -0700)
commit61004d1d4badb5ba31d57d49003c17cfcdfed027
tree3593b76446a51458879cc294918f2c15abede613
parentecd17a87eb78b5bd5ca6d1aa20c39f2bc3591337
nfp: flower: fix 'variable 'flow6' set but not used'

Kernel test robot reported an issue after a recent patch about an
unused variable when CONFIG_IPV6 is disabled. Move the variable
declaration to be inside the #ifdef, and do a bit more cleanup. There
is no need to use a temporary ipv6 bool value, it is just checked once,
remove the extra variable and just do the check directly.

Fixes: 9d5447ed44b5 ("nfp: flower: fixup ipv6/ipv4 route lookup for neigh events")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20220510074845.41457-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c