lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204190943.X9eY78sK-lkp@intel.com>
Date:   Tue, 19 Apr 2022 09:42:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2137/2356]
 drivers/net/ethernet/marvell/prestera/prestera_router.c:58:45: warning:
 declaration of 'struct fib_entry_notifier_info' will not be visible outside
 of this function

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   af93551cf39027d176f30b9beafc60a4c130998a
commit: a543fd04d10eb15cb62b4163c8495b88fee40856 [2137/2356] headers/deps: net: Optimize <net/ip_fib.h> dependencies, remove <net/ip_fib_api.h> inclusion
config: i386-randconfig-a016-20220418 (https://download.01.org/0day-ci/archive/20220419/202204190943.X9eY78sK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=a543fd04d10eb15cb62b4163c8495b88fee40856
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout a543fd04d10eb15cb62b4163c8495b88fee40856
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/bluetooth/ drivers/misc/ drivers/net/bonding/ drivers/net/ethernet/marvell/prestera/ drivers/net/ethernet/microchip/lan966x/ drivers/net/netdevsim/ drivers/net/phy/ drivers/power/supply/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/marvell/prestera/prestera_router.c:58:45: warning: declaration of 'struct fib_entry_notifier_info' will not be visible outside of this function [-Wvisibility]
   prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
                                               ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:62:41: error: incomplete definition of type 'struct fib_entry_notifier_info'
           key->addr.u.ipv4 = cpu_to_be32(fen_info->dst);
                                          ~~~~~~~~^
   include/linux/byteorder/generic.h:94:21: note: expanded from macro 'cpu_to_be32'
   #define cpu_to_be32 __cpu_to_be32
                       ^
   include/uapi/linux/byteorder/little_endian.h:40:53: note: expanded from macro '__cpu_to_be32'
   #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
                                                       ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:58:45: note: forward declaration of 'struct fib_entry_notifier_info'
   prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
                                               ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:63:28: error: incomplete definition of type 'struct fib_entry_notifier_info'
           key->prefix_len = fen_info->dst_len;
                             ~~~~~~~~^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:58:45: note: forward declaration of 'struct fib_entry_notifier_info'
   prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
                                               ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:64:28: error: incomplete definition of type 'struct fib_entry_notifier_info'
           key->kern_tb_id = fen_info->tb_id;
                             ~~~~~~~~^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:58:45: note: forward declaration of 'struct fib_entry_notifier_info'
   prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
                                               ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:83:2: error: implicit declaration of function 'fib_info_put' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           fib_info_put(fib_cache->fi);
           ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:83:2: note: did you mean 'fib_rule_put'?
   include/net/fib_rules.h:110:20: note: 'fib_rule_put' declared here
   static inline void fib_rule_put(struct fib_rule *rule)
                      ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:106:2: error: implicit declaration of function 'fib_info_hold' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           fib_info_hold(fi);
           ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:120:2: error: implicit declaration of function 'fib_info_put' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           fib_info_put(fi);
           ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:131:21: error: variable has incomplete type 'struct fib_rt_info'
           struct fib_rt_info fri;
                              ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:131:9: note: forward declaration of 'struct fib_rt_info'
           struct fib_rt_info fri;
                  ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:147:2: error: implicit declaration of function 'fib_alias_hw_flags_set' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           fib_alias_hw_flags_set(&init_net, &fri);
           ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:281:17: warning: declaration of 'struct fib_entry_notifier_info' will not be visible outside of this function [-Wvisibility]
                          struct fib_entry_notifier_info *fen_info)
                                 ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:288:39: error: incompatible pointer types passing 'struct fib_entry_notifier_info *' to parameter of type 'struct fib_entry_notifier_info *' [-Werror,-Wincompatible-pointer-types]
           prestera_util_fen_info2fib_cache_key(fen_info, &fc_key);
                                                ^~~~~~~~
   drivers/net/ethernet/marvell/prestera/prestera_router.c:58:70: note: passing argument to parameter 'fen_info' here
   prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
                                                                        ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:312:19: error: incomplete definition of type 'struct fib_entry_notifier_info'
                                                              fen_info->fi,
                                                              ~~~~~~~~^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:281:17: note: forward declaration of 'struct fib_entry_notifier_info'
                          struct fib_entry_notifier_info *fen_info)
                                 ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:313:19: error: incomplete definition of type 'struct fib_entry_notifier_info'
                                                              fen_info->tos,
                                                              ~~~~~~~~^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:281:17: note: forward declaration of 'struct fib_entry_notifier_info'
                          struct fib_entry_notifier_info *fen_info)
                                 ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:314:19: error: incomplete definition of type 'struct fib_entry_notifier_info'
                                                              fen_info->type);
                                                              ~~~~~~~~^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:281:17: note: forward declaration of 'struct fib_entry_notifier_info'
                          struct fib_entry_notifier_info *fen_info)
                                 ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:461:33: error: field has incomplete type 'struct fib_entry_notifier_info'
           struct fib_entry_notifier_info fen_info;
                                          ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:461:9: note: forward declaration of 'struct fib_entry_notifier_info'
           struct fib_entry_notifier_info fen_info;
                  ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:496:2: error: implicit declaration of function 'fib_info_put' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           fib_info_put(fib_work->fen_info.fi);
           ^
   drivers/net/ethernet/marvell/prestera/prestera_router.c:518:14: error: incomplete definition of type 'struct fib_entry_notifier_info'
                   fen_info = container_of(info, struct fib_entry_notifier_info,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:19:47: note: expanded from macro 'container_of'
           static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:293:74: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                            ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
   #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'


vim +58 drivers/net/ethernet/marvell/prestera/prestera_router.c

15fa9e8c5ffbe0 Yevhen Orlov 2021-12-27  56  
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  57  static void
4394fbcb78cfe1 Yevhen Orlov 2022-02-16 @58  prestera_util_fen_info2fib_cache_key(struct fib_entry_notifier_info *fen_info,
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  59  				     struct prestera_kern_fib_cache_key *key)
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  60  {
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  61  	memset(key, 0, sizeof(*key));
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  62  	key->addr.u.ipv4 = cpu_to_be32(fen_info->dst);
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  63  	key->prefix_len = fen_info->dst_len;
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  64  	key->kern_tb_id = fen_info->tb_id;
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  65  }
4394fbcb78cfe1 Yevhen Orlov 2022-02-16  66  

:::::: The code at line 58 was first introduced by commit
:::::: 4394fbcb78cfe190988d2c1beaaaccc97dcf8c5f net: marvell: prestera: handle fib notifications

:::::: TO: Yevhen Orlov <yevhen.orlov@...ision.eu>
:::::: CC: David S. Miller <davem@...emloft.net>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ