Re: [PATCH] Bluetooth: Expose debugfs entry to force resolvable private address

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

 



Hi Mike,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[cannot apply to bluetooth/master v5.4 v5.4-rc8 v5.4-rc7 next-20191129 v5.4 next-20191129]
[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/Mike-Ryan/Bluetooth-Expose-debugfs-entry-to-force-resolvable-private-address/20191202-055959
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

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

All errors (new ones prefixed by >>):

   net/bluetooth/hci_debugfs.c: In function 'force_rpa_write':
>> net/bluetooth/hci_debugfs.c:741:6: error: implicit declaration of function 'str2ba'; did you mean 'strspn'? [-Werror=implicit-function-declaration]
     if (str2ba(buf, &rpa))
         ^~~~~~
         strspn
   cc1: some warnings being treated as errors

vim +741 net/bluetooth/hci_debugfs.c

   725	
   726	static ssize_t force_rpa_write(struct file *file, const char __user *user_buf,
   727				       size_t count, loff_t *ppos)
   728	{
   729		struct hci_dev *hdev = file->private_data;
   730		char buf[18];
   731		size_t buf_size = min(count, (sizeof(buf)-1));
   732		bdaddr_t rpa;
   733	
   734		if (test_bit(HCI_UP, &hdev->flags))
   735			return -EBUSY;
   736	
   737		if (copy_from_user(buf, user_buf, buf_size))
   738			return -EFAULT;
   739	
   740		buf[buf_size] = '\0';
 > 741		if (str2ba(buf, &rpa))
   742			return -EINVAL;
   743	
   744		/* The two most significant bits shall be 01 unless the address is
   745		 * 00:00:00:00:00:00.
   746	         */
   747		if ((rpa.b[5] & 0xc0) != 0x40 && bacmp(&rpa, BDADDR_ANY))
   748			return -EINVAL;
   749	
   750		if (!bacmp(&hdev->force_rpa, &rpa))
   751			return -EALREADY;
   752	
   753		bacpy(&hdev->force_rpa, &rpa);
   754	
   755		return count;
   756	}
   757	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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