[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111270132.Dq7VKYca-lkp@intel.com>
Date: Sat, 27 Nov 2021 01:20:44 +0800
From: kernel test robot <lkp@...el.com>
To: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Tero Kristo <tero.kristo@...ux.intel.com>
Subject: [t-kristo-pm:usi-5.16-rfc-v2-bpf 13/30]
drivers/hid/hid-bpf.c:229:24: warning: no previous prototype for
'hid_bpf_add_report'
tree: https://github.com/t-kristo/linux-pm usi-5.16-rfc-v2-bpf
head: 241207b4769fca049dfcc4dbde0bda92e4f67027
commit: db3fbbad76f810554bcb2c098f8c9beb02724702 [13/30] HID: bpf: add a helper to parse a given report descriptor
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211127/202111270132.Dq7VKYca-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/t-kristo/linux-pm/commit/db3fbbad76f810554bcb2c098f8c9beb02724702
git remote add t-kristo-pm https://github.com/t-kristo/linux-pm
git fetch --no-tags t-kristo-pm usi-5.16-rfc-v2-bpf
git checkout db3fbbad76f810554bcb2c098f8c9beb02724702
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash drivers/hid/
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/hid/hid-bpf.c:141:5: warning: no previous prototype for 'hid_bpf_prog_detach' [-Wmissing-prototypes]
141 | int hid_bpf_prog_detach(struct hid_device *hdev, struct bpf_prog *prog)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/hid/hid-bpf.c:229:24: warning: no previous prototype for 'hid_bpf_add_report' [-Wmissing-prototypes]
229 | struct hid_bpf_report *hid_bpf_add_report(struct hid_bpf_parser_and_data *data,
| ^~~~~~~~~~~~~~~~~~
>> drivers/hid/hid-bpf.c:257:6: warning: no previous prototype for 'hid_bpf_free_reports' [-Wmissing-prototypes]
257 | void hid_bpf_free_reports(struct hid_bpf_parser_and_data *data)
| ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-bpf.c: In function '____bpf_hid_foreach_rdesc_item':
drivers/hid/hid-bpf.c:403:9: error: implicit declaration of function 'BPF_CAST_CALL'; did you mean 'BPF_EMIT_CALL'? [-Werror=implicit-function-declaration]
403 | ret = BPF_CAST_CALL(callback_fn)((u64)(long)ctx,
| ^~~~~~~~~~~~~
| BPF_EMIT_CALL
drivers/hid/hid-bpf.c:403:9: error: called object is not a function or function pointer
cc1: some warnings being treated as errors
vim +/hid_bpf_add_report +229 drivers/hid/hid-bpf.c
228
> 229 struct hid_bpf_report *hid_bpf_add_report(struct hid_bpf_parser_and_data *data,
230 unsigned int type, unsigned int id,
231 unsigned int application)
232 {
233 struct hid_bpf_report_enum *report_enum = data->report_enum + type;
234 struct hid_bpf_report *report;
235
236 if (id >= HID_MAX_IDS)
237 return NULL;
238 if (report_enum->report_id_hash[id])
239 return report_enum->report_id_hash[id];
240
241 report = kzalloc(sizeof(struct hid_bpf_report), GFP_KERNEL);
242 if (!report)
243 return NULL;
244
245 if (id != 0)
246 report_enum->numbered = 1;
247
248 report->id = id;
249 report->type = type;
250 report->size = 0;
251 report->application = application;
252 report_enum->report_id_hash[id] = report;
253
254 return report;
255 }
256
> 257 void hid_bpf_free_reports(struct hid_bpf_parser_and_data *data)
258 {
259 unsigned i, j;
260
261 for (i = 0; i < HID_REPORT_TYPES; i++) {
262 struct hid_bpf_report_enum *report_enum = data->report_enum + i;
263
264 for (j = 0; j < HID_MAX_IDS; j++) {
265 struct hid_bpf_report *report = report_enum->report_id_hash[j];
266 kfree(report);
267 }
268 memset(report_enum, 0, sizeof(*report_enum));
269 }
270 }
271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists