From: kernel test robot <lkp@intel.com>
To: Benjamin Tissoires <bentiss@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-input@vger.kernel.org,
Peter Hutterer <peter.hutterer@who-t.net>
Subject: [hid:for-6.12/bpf 6/15] drivers/hid/hid-core.c:2689:52: error: passing 'const __u8 *' (aka 'const unsigned char *') to parameter of type 'u8 *' (aka 'unsigned char *') discards qualifiers
Date: Sat, 14 Sep 2024 04:10:18 +0800 [thread overview]
Message-ID: <202409140413.DizXFslQ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.12/bpf
head: d46a60c7a795ef0a115e27235b88dcecc78b8c26
commit: f10a11b7b599467153f679d35ed4712bbbec918f [6/15] HID: bpf: move HID-BPF report descriptor fixup earlier
config: arm-jornada720_defconfig (https://download.01.org/0day-ci/archive/20240914/202409140413.DizXFslQ-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bf684034844c660b778f0eba103582f582b710c9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140413.DizXFslQ-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/202409140413.DizXFslQ-lkp@intel.com/
Note: the hid/for-6.12/bpf HEAD d46a60c7a795ef0a115e27235b88dcecc78b8c26 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from drivers/hid/hid-core.c:21:
In file included from include/linux/mm.h:2228:
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/hid/hid-core.c:2689:52: error: passing 'const __u8 *' (aka 'const unsigned char *') to parameter of type 'u8 *' (aka 'unsigned char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
2689 | hdev->bpf_rdesc = call_hid_bpf_rdesc_fixup(hdev, hdev->dev_rdesc,
| ^~~~~~~~~~~~~~~
include/linux/hid_bpf.h:231:73: note: passing argument to parameter 'rdesc' here
231 | static inline u8 *call_hid_bpf_rdesc_fixup(struct hid_device *hdev, u8 *rdesc,
| ^
1 warning and 1 error generated.
vim +2689 drivers/hid/hid-core.c
2681
2682 static int __hid_device_probe(struct hid_device *hdev, struct hid_driver *hdrv)
2683 {
2684 const struct hid_device_id *id;
2685 int ret;
2686
2687 if (!hdev->bpf_rsize) {
2688 hdev->bpf_rsize = hdev->dev_rsize;
> 2689 hdev->bpf_rdesc = call_hid_bpf_rdesc_fixup(hdev, hdev->dev_rdesc,
2690 &hdev->bpf_rsize);
2691 }
2692
2693 if (!hid_check_device_match(hdev, hdrv, &id))
2694 return -ENODEV;
2695
2696 hdev->devres_group_id = devres_open_group(&hdev->dev, NULL, GFP_KERNEL);
2697 if (!hdev->devres_group_id)
2698 return -ENOMEM;
2699
2700 /* reset the quirks that has been previously set */
2701 hdev->quirks = hid_lookup_quirk(hdev);
2702 hdev->driver = hdrv;
2703
2704 if (hdrv->probe) {
2705 ret = hdrv->probe(hdev, id);
2706 } else { /* default probe */
2707 ret = hid_open_report(hdev);
2708 if (!ret)
2709 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
2710 }
2711
2712 /*
2713 * Note that we are not closing the devres group opened above so
2714 * even resources that were attached to the device after probe is
2715 * run are released when hid_device_remove() is executed. This is
2716 * needed as some drivers would allocate additional resources,
2717 * for example when updating firmware.
2718 */
2719
2720 if (ret) {
2721 devres_release_group(&hdev->dev, hdev->devres_group_id);
2722 hid_close_report(hdev);
2723 hdev->driver = NULL;
2724 }
2725
2726 return ret;
2727 }
2728
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-09-13 20:11 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=202409140413.DizXFslQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=bentiss@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peter.hutterer@who-t.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox