]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix "'ioam6_if_id_max' defined but not used" warn
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Thu, 22 Jul 2021 07:55:04 +0000 (09:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 09:23:47 +0000 (02:23 -0700)
commit4ff3d19644f6af860510287ee07480b0a2f9fc9d
treeae231eb9257efb9250f3854452614ffd725209da
parentab8be6fb529791adda03dd834e5a7c5addfba4e1
ipv6: fix "'ioam6_if_id_max' defined but not used" warn

When compiling without CONFIG_SYSCTL, this warning appears:

  net/ipv6/addrconf.c:99:12: error: 'ioam6_if_id_max' defined but not used [-Werror=unused-variable]
     99 | static u32 ioam6_if_id_max = U16_MAX;
        |            ^~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Simply moving the declaration of this variable under ...

  #ifdef CONFIG_SYSCTL

... with other similar variables fixes the issue.

Fixes: ebcc73ea1463 ("ipv6: ioam: Data plane support for Pre-allocated Trace")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c