[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006121854.uoCfEdvy%lkp@intel.com>
Date: Fri, 12 Jun 2020 18:33:30 +0800
From: kernel test robot <lkp@...el.com>
To: Miao-chen Chou <mcchou@...omium.org>,
Bluetooth Kernel Mailing List
<linux-bluetooth@...r.kernel.org>
Cc: kbuild-all@...ts.01.org, Marcel Holtmann <marcel@...tmann.org>,
Luiz Augusto von Dentz <luiz.von.dentz@...el.com>,
Alain Michaud <alainm@...omium.org>,
Michael Sun <michaelfsun@...gle.com>,
Yoni Shavit <yshavit@...omium.org>,
Miao-chen Chou <mcchou@...omium.org>,
Jakub Kicinski <kuba@...nel.org>,
Johan Hedberg <johan.hedberg@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/7] Bluetooth: Add handler of
MGMT_OP_REMOVE_ADV_MONITOR
Hi Miao-chen,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on net-next/master sparc-next/master net/master next-20200611]
[cannot apply to bluetooth/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Miao-chen-Chou/Bluetooth-Add-definitions-for-advertisement-monitor-features/20200612-141848
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: m68k-randconfig-s031-20200612 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=m68k CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
net/bluetooth/mgmt.c:3599:29: sparse: sparse: restricted __le16 degrades to integer
>> net/bluetooth/mgmt.c:4009:46: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] handle @@ got restricted __le16 [usertype] monitor_handle @@
>> net/bluetooth/mgmt.c:4009:46: sparse: expected unsigned short [usertype] handle
>> net/bluetooth/mgmt.c:4009:46: sparse: got restricted __le16 [usertype] monitor_handle
>> net/bluetooth/mgmt.c:4018:29: sparse: sparse: cast from restricted __le16
>> net/bluetooth/mgmt.c:4018:29: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] val @@ got restricted __le16 [usertype] monitor_handle @@
>> net/bluetooth/mgmt.c:4018:29: sparse: expected unsigned short [usertype] val
net/bluetooth/mgmt.c:4018:29: sparse: got restricted __le16 [usertype] monitor_handle
>> net/bluetooth/mgmt.c:4018:29: sparse: sparse: cast from restricted __le16
>> net/bluetooth/mgmt.c:4018:29: sparse: sparse: cast from restricted __le16
vim +4009 net/bluetooth/mgmt.c
3997
3998 static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
3999 void *data, u16 len)
4000 {
4001 struct mgmt_cp_remove_adv_monitor *cp = data;
4002 struct mgmt_rp_remove_adv_monitor rp;
4003 int err;
4004
4005 BT_DBG("request for %s", hdev->name);
4006
4007 hci_dev_lock(hdev);
4008
> 4009 err = hci_remove_adv_monitor(hdev, cp->monitor_handle);
4010 if (err == -ENOENT) {
4011 err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_REMOVE_ADV_MONITOR,
4012 MGMT_STATUS_INVALID_INDEX);
4013 goto unlock;
4014 }
4015
4016 hci_dev_unlock(hdev);
4017
> 4018 rp.monitor_handle = cpu_to_le16(cp->monitor_handle);
4019
4020 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_ADV_MONITOR,
4021 MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
4022
4023 unlock:
4024 hci_dev_unlock(hdev);
4025 return err;
4026 }
4027
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (24801 bytes)
Powered by blists - more mailing lists