[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508011701.e7Owy62s-lkp@intel.com>
Date: Fri, 1 Aug 2025 17:31:18 +0800
From: kernel test robot <lkp@...el.com>
To: Amery Hung <ameryhung@...il.com>, bpf@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, alexei.starovoitov@...il.com,
andrii@...nel.org, daniel@...earbox.net, tj@...nel.org,
memxor@...il.com, martin.lau@...nel.org, ameryhung@...il.com,
kernel-team@...a.com
Subject: Re: [PATCH bpf-next v1 1/3] bpf: Allow getting bpf_map from
struct_ops kdata
Hi Amery,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Amery-Hung/bpf-Allow-getting-bpf_map-from-struct_ops-kdata/20250801-051108
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20250731210950.3927649-2-ameryhung%40gmail.com
patch subject: [PATCH bpf-next v1 1/3] bpf: Allow getting bpf_map from struct_ops kdata
config: arm-randconfig-001-20250801 (https://download.01.org/0day-ci/archive/20250801/202508011701.e7Owy62s-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 8f09b03aebb71c154f3bbe725c29e3f47d37c26e)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250801/202508011701.e7Owy62s-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508011701.e7Owy62s-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/bpf_struct_ops.c:1157:18: warning: unused variable 'map' [-Wunused-variable]
1157 | struct bpf_map *map;
| ^~~
1 warning generated.
vim +/map +1157 kernel/bpf/bpf_struct_ops.c
85d33df357b634 Martin KaFai Lau 2020-01-08 1149
85d33df357b634 Martin KaFai Lau 2020-01-08 1150 /* "const void *" because some subsystem is
85d33df357b634 Martin KaFai Lau 2020-01-08 1151 * passing a const (e.g. const struct tcp_congestion_ops *)
85d33df357b634 Martin KaFai Lau 2020-01-08 1152 */
eab8366be0bf63 Amery Hung 2025-07-31 1153 struct bpf_map *bpf_struct_ops_get(const void *kdata)
85d33df357b634 Martin KaFai Lau 2020-01-08 1154 {
85d33df357b634 Martin KaFai Lau 2020-01-08 1155 struct bpf_struct_ops_value *kvalue;
b671c2067a04c0 Kui-Feng Lee 2023-03-22 1156 struct bpf_struct_ops_map *st_map;
b671c2067a04c0 Kui-Feng Lee 2023-03-22 @1157 struct bpf_map *map;
85d33df357b634 Martin KaFai Lau 2020-01-08 1158
85d33df357b634 Martin KaFai Lau 2020-01-08 1159 kvalue = container_of(kdata, struct bpf_struct_ops_value, data);
b671c2067a04c0 Kui-Feng Lee 2023-03-22 1160 st_map = container_of(kvalue, struct bpf_struct_ops_map, kvalue);
85d33df357b634 Martin KaFai Lau 2020-01-08 1161
eab8366be0bf63 Amery Hung 2025-07-31 1162 return __bpf_map_inc_not_zero(&st_map->map, false);
eb18b49ea758ec Martin KaFai Lau 2021-08-24 1163 }
eab8366be0bf63 Amery Hung 2025-07-31 1164 EXPORT_SYMBOL_GPL(bpf_struct_ops_get);
eb18b49ea758ec Martin KaFai Lau 2021-08-24 1165
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists