All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 6/8] Bluetooth: ISO: Add broadcast support
Date: Fri, 6 May 2022 10:25:34 +0800	[thread overview]
Message-ID: <202205061022.2EG8sVaE-lkp@intel.com> (raw)
In-Reply-To: <20220505230550.3450617-6-luiz.dentz@gmail.com>

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 v5.18-rc5 next-20220505]
[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/Luiz-Augusto-von-Dentz/Bluetooth-eir-Add-helpers-for-managing-service-data/20220506-070828
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220506/202205061022.2EG8sVaE-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/c9952abdb0e8adbeadc722ce26b2ee5a64244860
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Luiz-Augusto-von-Dentz/Bluetooth-eir-Add-helpers-for-managing-service-data/20220506-070828
        git checkout c9952abdb0e8adbeadc722ce26b2ee5a64244860
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/bluetooth/

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

All warnings (new ones prefixed by >>):

   net/bluetooth/iso.c: In function 'iso_sock_getsockopt':
>> net/bluetooth/iso.c:1214:13: warning: variable 'base' set but not used [-Wunused-but-set-variable]
    1214 |         u8 *base;
         |             ^~~~


vim +/base +1214 net/bluetooth/iso.c

  1206	
  1207	static int iso_sock_getsockopt(struct socket *sock, int level, int optname,
  1208				       char __user *optval, int __user *optlen)
  1209	{
  1210		struct sock *sk = sock->sk;
  1211		int len, err = 0;
  1212		struct bt_iso_qos qos;
  1213		u8 base_len;
> 1214		u8 *base;
  1215	
  1216		BT_DBG("sk %p", sk);
  1217	
  1218		if (get_user(len, optlen))
  1219			return -EFAULT;
  1220	
  1221		lock_sock(sk);
  1222	
  1223		switch (optname) {
  1224	
  1225		case BT_DEFER_SETUP:
  1226			if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
  1227				err = -EINVAL;
  1228				break;
  1229			}
  1230	
  1231			if (put_user(test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags),
  1232				     (u32 __user *)optval))
  1233				err = -EFAULT;
  1234	
  1235			break;
  1236	
  1237		case BT_ISO_QOS:
  1238			if (sk->sk_state == BT_CONNECTED)
  1239				qos = iso_pi(sk)->conn->hcon->iso_qos;
  1240			else
  1241				qos = iso_pi(sk)->qos;
  1242	
  1243			len = min_t(unsigned int, len, sizeof(qos));
  1244			if (copy_to_user(optval, (char *)&qos, len))
  1245				err = -EFAULT;
  1246	
  1247			break;
  1248	
  1249		case BT_ISO_BASE:
  1250			if (sk->sk_state == BT_CONNECTED) {
  1251				base_len = iso_pi(sk)->conn->hcon->le_per_adv_data_len;
  1252				base = iso_pi(sk)->conn->hcon->le_per_adv_data;
  1253			} else {
  1254				base_len = iso_pi(sk)->base_len;
  1255				base = iso_pi(sk)->base;
  1256			}
  1257	
  1258			len = min_t(unsigned int, len, base_len);
  1259			if (copy_to_user(optval, (char *)&qos, len))
  1260				err = -EFAULT;
  1261	
  1262			break;
  1263	
  1264		default:
  1265			err = -ENOPROTOOPT;
  1266			break;
  1267		}
  1268	
  1269		release_sock(sk);
  1270		return err;
  1271	}
  1272	

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

  reply	other threads:[~2022-05-06  2:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 23:05 [PATCH 1/8] Bluetooth: eir: Add helpers for managing service data Luiz Augusto von Dentz
2022-05-05 23:05 ` [PATCH 2/8] Bluetooth: hci_core: Introduce hci_recv_event_data Luiz Augusto von Dentz
2022-05-05 23:05 ` [PATCH 3/8] Bluetooth: Add initial implementation of CIS connections Luiz Augusto von Dentz
2022-05-06  1:44   ` kernel test robot
2022-05-05 23:05 ` [PATCH 4/8] Bluetooth: Add BTPROTO_ISO socket type Luiz Augusto von Dentz
2022-05-06  1:13   ` kernel test robot
2022-05-05 23:05 ` [PATCH 5/8] Bluetooth: Add initial implementation of BIS connections Luiz Augusto von Dentz
2022-05-06  0:41   ` kernel test robot
2022-05-05 23:05 ` [PATCH 6/8] Bluetooth: ISO: Add broadcast support Luiz Augusto von Dentz
2022-05-06  2:25   ` kernel test robot [this message]
2022-05-05 23:05 ` [PATCH 7/8] Bluetooth: btusb: Add support for ISO packets Luiz Augusto von Dentz
2022-05-05 23:05 ` [PATCH 8/8] Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet Luiz Augusto von Dentz
2022-05-06  0:10 ` [1/8] Bluetooth: eir: Add helpers for managing service data bluez.test.bot

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=202205061022.2EG8sVaE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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.