Re: [PATCH v4 1/4] Bluetooth: hci_sock: Add support for BT_{SND,RCV}BUF

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

 



Hi Luiz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on bluetooth/master]
[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/0day-ci/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth-hci_sock-Add-support-for-BT_-SND-RCV-BUF/20210916-073730
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/8298fef36eee7525d4e8c7d2c8da9f9473342308
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Luiz-Augusto-von-Dentz/Bluetooth-hci_sock-Add-support-for-BT_-SND-RCV-BUF/20210916-073730
        git checkout 8298fef36eee7525d4e8c7d2c8da9f9473342308
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips 

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

All warnings (new ones prefixed by >>):

   net/bluetooth/hci_sock.c: In function 'hci_sock_getsockopt':
>> net/bluetooth/hci_sock.c:2058:13: warning: variable 'len' set but not used [-Wunused-but-set-variable]
    2058 |         int len, err = 0;
         |             ^~~


vim +/len +2058 net/bluetooth/hci_sock.c

  2053	
  2054	static int hci_sock_getsockopt(struct socket *sock, int level, int optname,
  2055				       char __user *optval, int __user *optlen)
  2056	{
  2057		struct sock *sk = sock->sk;
> 2058		int len, err = 0;
  2059	
  2060		BT_DBG("sk %p, opt %d", sk, optname);
  2061	
  2062		if (level == SOL_HCI)
  2063			return hci_sock_getsockopt_old(sock, level, optname, optval,
  2064						       optlen);
  2065	
  2066		if (level != SOL_BLUETOOTH)
  2067			return -ENOPROTOOPT;
  2068	
  2069		if (get_user(len, optlen))
  2070			return -EFAULT;
  2071	
  2072		lock_sock(sk);
  2073	
  2074		switch (optname) {
  2075		case BT_SNDMTU:
  2076		case BT_RCVMTU:
  2077			if (put_user(hci_pi(sk)->mtu, (u32 __user *)optval))
  2078				err = -EFAULT;
  2079			break;
  2080	
  2081		default:
  2082			err = -ENOPROTOOPT;
  2083			break;
  2084		}
  2085	
  2086		release_sock(sk);
  2087		return err;
  2088	}
  2089	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

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