All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Brian Gix <brian.gix@intel.com>, linux-bluetooth@vger.kernel.org
Cc: kbuild-all@lists.01.org, marcel@holtmann.org,
	luiz.dentz@gmail.com, brian.gix@intel.com
Subject: Re: [PATCH v3 1/2] Bluetooth: Implement support for Mesh
Date: Wed, 11 May 2022 14:14:17 +0800	[thread overview]
Message-ID: <202205111458.9JnirKIH-lkp@intel.com> (raw)
In-Reply-To: <20220510214325.633935-2-brian.gix@intel.com>

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-20220510]
[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/20220511-054524
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: i386-randconfig-s002-20220509 (https://download.01.org/0day-ci/archive/20220511/202205111458.9JnirKIH-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/intel-lab-lkp/linux/commit/bea4eccd2f7e8b93f2fba58d72cd4803105baf4f
        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/20220511-054524
        git checkout bea4eccd2f7e8b93f2fba58d72cd4803105baf4f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/bluetooth/

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


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

vim +10112 net/bluetooth/mgmt.c

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

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

  parent reply	other threads:[~2022-05-11  6:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 21:43 [PATCH v3 0/2] Add Mesh functionality to net/bluetooth Brian Gix
2022-05-10 21:43 ` [PATCH v3 1/2] Bluetooth: Implement support for Mesh Brian Gix
2022-05-10 23:01   ` Add Mesh functionality to net/bluetooth bluez.test.bot
2022-05-11  6:14   ` kernel test robot [this message]
2022-05-10 21:43 ` [PATCH v3 2/2] Bluetooth: Add experimental wrapper for MGMT based mesh Brian Gix

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=202205111458.9JnirKIH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brian.gix@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /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 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.