From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Xie XiuQi <xiexiuqi@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 1743/1743] kernel/trace/bpf_trace.c:1273:5: warning: no previous prototype for 'bpf_event_notify'
Date: Mon, 4 Aug 2025 15:08:42 +0200 [thread overview]
Message-ID: <202508041528.hcdsgsEh-lkp@intel.com> (raw)
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: ba07135cf74b1424e2f7f0c60e59c5b206ab320c
commit: 00d0f1b149a5201c072e868915c76f909c11c38f [1743/1743] bpf: support raw tracepoints in modules
config: x86_64-buildonly-randconfig-2004-20250802 (https://download.01.org/0day-ci/archive/20250804/202508041528.hcdsgsEh-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250804/202508041528.hcdsgsEh-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/202508041528.hcdsgsEh-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/trace/bpf_trace.c:1273:5: warning: no previous prototype for 'bpf_event_notify' [-Wmissing-prototypes]
1273 | int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
| ^~~~~~~~~~~~~~~~
>> kernel/trace/bpf_trace.c:1312:12: warning: no previous prototype for 'bpf_event_init' [-Wmissing-prototypes]
1312 | int __init bpf_event_init(void)
| ^~~~~~~~~~~~~~
vim +/bpf_event_notify +1273 kernel/trace/bpf_trace.c
1271
1272 #ifdef CONFIG_MODULES
> 1273 int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
1274 {
1275 struct bpf_trace_module *btm, *tmp;
1276 struct module *mod = module;
1277
1278 if (mod->num_bpf_raw_events == 0 ||
1279 (op != MODULE_STATE_COMING && op != MODULE_STATE_GOING))
1280 return 0;
1281
1282 mutex_lock(&bpf_module_mutex);
1283
1284 switch (op) {
1285 case MODULE_STATE_COMING:
1286 btm = kzalloc(sizeof(*btm), GFP_KERNEL);
1287 if (btm) {
1288 btm->module = module;
1289 list_add(&btm->list, &bpf_trace_modules);
1290 }
1291 break;
1292 case MODULE_STATE_GOING:
1293 list_for_each_entry_safe(btm, tmp, &bpf_trace_modules, list) {
1294 if (btm->module == module) {
1295 list_del(&btm->list);
1296 kfree(btm);
1297 break;
1298 }
1299 }
1300 break;
1301 }
1302
1303 mutex_unlock(&bpf_module_mutex);
1304
1305 return 0;
1306 }
1307
1308 static struct notifier_block bpf_module_nb = {
1309 .notifier_call = bpf_event_notify,
1310 };
1311
> 1312 int __init bpf_event_init(void)
1313 {
1314 register_module_notifier(&bpf_module_nb);
1315 return 0;
1316 }
1317
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-08-04 13:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202508041528.hcdsgsEh-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xiexiuqi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.