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 v2 1/2] Bluetooth: Implement support for Mesh
Date: Tue, 10 May 2022 11:59:17 +0800	[thread overview]
Message-ID: <202205101155.NLcENnfd-lkp@intel.com> (raw)
In-Reply-To: <20220509220512.482695-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-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@intel.com/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@intel.com>


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

  parent reply	other threads:[~2022-05-10  3:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 22:05 [PATCH v2 0/2] Add Mesh functionality to net/bluetooth Brian Gix
2022-05-09 22:05 ` [PATCH v2 1/2] Bluetooth: Implement support for Mesh Brian Gix
2022-05-09 23:08   ` Add Mesh functionality to net/bluetooth bluez.test.bot
2022-05-10  3:59   ` kernel test robot [this message]
2022-05-10  6:31   ` [PATCH v2 1/2] Bluetooth: Implement support for Mesh kernel test robot
2022-05-09 22:05 ` [PATCH v2 2/2] Bluetooth: Add experimental wrapper for MGMT based mesh Brian Gix
2022-05-10  7:52   ` kernel test robot

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=202205101155.NLcENnfd-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.