All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:openEuler-1.0-LTS 1743/1743] kernel/trace/bpf_trace.c:1273:5: warning: no previous prototype for 'bpf_event_notify'
@ 2025-08-04 13:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-04 13:08 UTC (permalink / raw)
  To: kernel, Xie XiuQi; +Cc: oe-kbuild-all

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

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

only message in thread, other threads:[~2025-08-04 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 13:08 [openeuler:openEuler-1.0-LTS 1743/1743] kernel/trace/bpf_trace.c:1273:5: warning: no previous prototype for 'bpf_event_notify' kernel test robot

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.