• Fabio Estevam's avatar
    net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not selected · cb03db9d
    Fabio Estevam authored
    net_secret() is only used when CONFIG_IPV6 or CONFIG_INET are selected.
    
    Building a defconfig with both of these symbols unselected (Using the ARM
    at91sam9rl_defconfig, for example) leads to the following build warning:
    
    $ make at91sam9rl_defconfig
    #
    # configuration written to .config
    #
    
    $ make net/core/secure_seq.o
    scripts/kconfig/conf --silentoldconfig Kconfig
      CHK     include/config/kernel.release
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
      CALL    scripts/checksyscalls.sh
      CC      net/core/secure_seq.o
    net/core/secure_seq.c:17:13: warning: 'net_secret_init' defined but not used [-Wunused-function]
    
    Fix this warning by protecting the definition of net_secret() with these
    symbols.
    Reported-by: default avatarOlof Johansson <olof@lixom.net>
    Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cb03db9d
secure_seq.c 4.64 KB