Re: [PATCH v2 1/2] Bluetooth: Implement support for Mesh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master v5.18-rc6 next-20220509]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Brian-Gix/Add-Mesh-functionality-to-net-bluetooth/20220510-060608
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: arc-randconfig-s031-20220509 (https://download.01.org/0day-ci/archive/20220510/202205101155.NLcENnfd-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/intel-lab-lkp/linux/commit/ec86301e787dba99c6afd77e40a4b5af142ef944
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Brian-Gix/Add-Mesh-functionality-to-net-bluetooth/20220510-060608
        git checkout ec86301e787dba99c6afd77e40a4b5af142ef944
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash net/bluetooth/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
   net/bluetooth/mgmt.c:4102:29: sparse: sparse: restricted __le16 degrades to integer
   net/bluetooth/mgmt.c:4841:9: sparse: sparse: cast to restricted __le32
>> net/bluetooth/mgmt.c:10121:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 [usertype] instant @@     got unsigned int [usertype] instant @@
   net/bluetooth/mgmt.c:10121:21: sparse:     expected restricted __le64 [usertype] instant
   net/bluetooth/mgmt.c:10121:21: sparse:     got unsigned int [usertype] instant

vim +10121 net/bluetooth/mgmt.c

 10069	
 10070	static void mesh_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr,
 10071			       u8 addr_type, s8 rssi, u32 flags, u8 *eir, u16 eir_len,
 10072			       u8 *scan_rsp, u8 scan_rsp_len, u32 instant)
 10073	{
 10074		struct sk_buff *skb;
 10075		struct mgmt_ev_mesh_device_found *ev;
 10076		int i, j;
 10077	
 10078		if (!hdev->mesh_ad_types[0])
 10079			goto accepted;
 10080	
 10081		/* Scan for requested AD types */
 10082		if (eir_len > 0) {
 10083			for (i = 0; i + 1 < eir_len; i += eir[i] + 1) {
 10084				for (j = 0; j < sizeof(hdev->mesh_ad_types); j++) {
 10085					if (!hdev->mesh_ad_types[j])
 10086						break;
 10087	
 10088					if (hdev->mesh_ad_types[j] == eir[i + 1])
 10089						goto accepted;
 10090				}
 10091			}
 10092		}
 10093	
 10094		if (scan_rsp_len > 0) {
 10095			for (i = 0; i + 1 < scan_rsp_len; i += scan_rsp[i] + 1) {
 10096				for (j = 0; j < sizeof(hdev->mesh_ad_types); j++) {
 10097					if (!hdev->mesh_ad_types[j])
 10098						break;
 10099	
 10100					if (hdev->mesh_ad_types[j] == scan_rsp[i + 1])
 10101						goto accepted;
 10102				}
 10103			}
 10104		}
 10105	
 10106		return;
 10107	
 10108	
 10109	accepted:
 10110		skb = mgmt_alloc_skb(hdev, MGMT_EV_MESH_DEVICE_FOUND,
 10111				     sizeof(*ev) + eir_len + scan_rsp_len);
 10112		if (!skb)
 10113			return;
 10114	
 10115		ev = skb_put(skb, sizeof(*ev));
 10116	
 10117		bacpy(&ev->addr.bdaddr, bdaddr);
 10118		ev->addr.type = link_to_bdaddr(LE_LINK, addr_type);
 10119		ev->rssi = rssi;
 10120		ev->flags = cpu_to_le32(flags);
 10121		ev->instant = instant;
 10122	
 10123		if (eir_len > 0)
 10124			/* Copy EIR or advertising data into event */
 10125			skb_put_data(skb, eir, eir_len);
 10126	
 10127		if (scan_rsp_len > 0)
 10128			/* Append scan response data to event */
 10129			skb_put_data(skb, scan_rsp, scan_rsp_len);
 10130	
 10131		ev->eir_len = cpu_to_le16(eir_len + scan_rsp_len);
 10132	
 10133		mgmt_event_skb(skb, NULL);
 10134	}
 10135	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux