Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [gustavoars:testing/wfamnae-next20250124 17/17] kernel/bpf/core.c:2510:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *')
@ 2025-01-27 11:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-27 11:05 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: llvm, oe-kbuild-all, Gustavo A. R. Silva, LKML

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20250124
head:   9fcf89847632bd963953b2f945fb3ce2277f1f97
commit: 54447c8c7cc239e559f3b58a7a70d9b776ed9b03 [17/17] treewide_some: fix multiple -Wfamnae warnings that must be audited separately
config: s390-randconfig-002-20250127 (https://download.01.org/0day-ci/archive/20250127/202501271904.pGWAyWKF-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250127/202501271904.pGWAyWKF-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501271904.pGWAyWKF-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/bpf/core.c:21:
   In file included from include/linux/filter.h:21:
   In file included from include/linux/if_vlan.h:10:
   In file included from include/linux/netdevice.h:44:
   In file included from include/uapi/linux/neighbour.h:6:
   In file included from include/linux/netlink.h:9:
   In file included from include/net/scm.h:13:
   include/net/compat.h:33:25: error: field has incomplete type 'struct sockaddr_legacy'
      33 |         struct sockaddr_legacy  rt_dst;         /* target address               */
         |                                 ^
   include/net/compat.h:33:9: note: forward declaration of 'struct sockaddr_legacy'
      33 |         struct sockaddr_legacy  rt_dst;         /* target address               */
         |                ^
   include/net/compat.h:34:25: error: field has incomplete type 'struct sockaddr_legacy'
      34 |         struct sockaddr_legacy  rt_gateway;     /* gateway addr (RTF_GATEWAY)   */
         |                                 ^
   include/net/compat.h:33:9: note: forward declaration of 'struct sockaddr_legacy'
      33 |         struct sockaddr_legacy  rt_dst;         /* target address               */
         |                ^
   include/net/compat.h:35:25: error: field has incomplete type 'struct sockaddr_legacy'
      35 |         struct sockaddr_legacy  rt_genmask;     /* target network mask (IP)     */
         |                                 ^
   include/net/compat.h:33:9: note: forward declaration of 'struct sockaddr_legacy'
      33 |         struct sockaddr_legacy  rt_dst;         /* target address               */
         |                ^
>> kernel/bpf/core.c:2510:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *') [-Wcompare-distinct-pointer-types]
    2510 |         if (!progs || progs == &bpf_empty_prog_array.hdr)
         |                       ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 3 errors generated.


vim +2510 kernel/bpf/core.c

8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2507  
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2508  void bpf_prog_array_free_sleepable(struct bpf_prog_array *progs)
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2509  {
8c7dcb84e3b744 Delyan Kratunov 2022-06-14 @2510  	if (!progs || progs == &bpf_empty_prog_array.hdr)
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2511  		return;
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2512  	call_rcu_tasks_trace(&progs->rcu, __bpf_prog_array_free_sleepable_cb);
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2513  }
8c7dcb84e3b744 Delyan Kratunov 2022-06-14  2514  

:::::: The code at line 2510 was first introduced by commit
:::::: 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 bpf: implement sleepable uprobes by chaining gps

:::::: TO: Delyan Kratunov <delyank@fb.com>
:::::: CC: Alexei Starovoitov <ast@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-27 11:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 11:05 [gustavoars:testing/wfamnae-next20250124 17/17] kernel/bpf/core.c:2510:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *') kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox