From: kernel test robot <lkp@intel.com>
To: Iulia Tanasescu <iulia.tanasescu@nxp.com>,
linux-bluetooth@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: Re: [PATCH 1/1] Bluetooth: Split bt_iso_qos into dedicated structures
Date: Tue, 21 Mar 2023 06:49:22 +0800 [thread overview]
Message-ID: <202303210652.rxBfO9uo-lkp@intel.com> (raw)
In-Reply-To: <20230320143608.25399-2-iulia.tanasescu@nxp.com>
Hi Iulia,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dd41882582a9ab19938598179386b81b793b4a5c]
url: https://github.com/intel-lab-lkp/linux/commits/Iulia-Tanasescu/Bluetooth-Split-bt_iso_qos-into-dedicated-structures/20230320-223805
base: dd41882582a9ab19938598179386b81b793b4a5c
patch link: https://lore.kernel.org/r/20230320143608.25399-2-iulia.tanasescu%40nxp.com
patch subject: [PATCH 1/1] Bluetooth: Split bt_iso_qos into dedicated structures
config: x86_64-randconfig-a005-20230320 (https://download.01.org/0day-ci/archive/20230321/202303210652.rxBfO9uo-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/656a3f84716d5b683951fe8c2cdc3fd17a09950c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Iulia-Tanasescu/Bluetooth-Split-bt_iso_qos-into-dedicated-structures/20230320-223805
git checkout 656a3f84716d5b683951fe8c2cdc3fd17a09950c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303210652.rxBfO9uo-lkp@intel.com/
All errors (new ones prefixed by >>):
>> net/bluetooth/iso.c:1306:3: error: expected expression
struct bt_iso_unicast_qos unicast_qos;
^
>> net/bluetooth/iso.c:1314:36: error: use of undeclared identifier 'unicast_qos'
len = min_t(unsigned int, sizeof(unicast_qos), optlen);
^
>> net/bluetooth/iso.c:1314:36: error: use of undeclared identifier 'unicast_qos'
net/bluetooth/iso.c:1315:21: error: use of undeclared identifier 'unicast_qos'
if (len != sizeof(unicast_qos)) {
^
net/bluetooth/iso.c:1320:34: error: use of undeclared identifier 'unicast_qos'
memset(&unicast_qos, 0, sizeof(unicast_qos));
^
net/bluetooth/iso.c:1320:11: error: use of undeclared identifier 'unicast_qos'
memset(&unicast_qos, 0, sizeof(unicast_qos));
^
net/bluetooth/iso.c:1320:11: error: use of undeclared identifier 'unicast_qos'
net/bluetooth/iso.c:1320:11: error: use of undeclared identifier 'unicast_qos'
net/bluetooth/iso.c:1322:26: error: use of undeclared identifier 'unicast_qos'
if (copy_from_sockptr(&unicast_qos, optval, len)) {
^
net/bluetooth/iso.c:1327:27: error: use of undeclared identifier 'unicast_qos'
if (!check_unicast_qos(&unicast_qos)) {
^
net/bluetooth/iso.c:1332:29: error: use of undeclared identifier 'unicast_qos'
iso_pi(sk)->unicast_qos = unicast_qos;
^
net/bluetooth/iso.c:1337:3: error: expected expression
struct bt_iso_bcast_sink_qos sink_qos;
^
>> net/bluetooth/iso.c:1345:36: error: use of undeclared identifier 'sink_qos'
len = min_t(unsigned int, sizeof(sink_qos), optlen);
^
>> net/bluetooth/iso.c:1345:36: error: use of undeclared identifier 'sink_qos'
net/bluetooth/iso.c:1346:21: error: use of undeclared identifier 'sink_qos'
if (len != sizeof(sink_qos)) {
^
net/bluetooth/iso.c:1351:31: error: use of undeclared identifier 'sink_qos'
memset(&sink_qos, 0, sizeof(sink_qos));
^
net/bluetooth/iso.c:1351:11: error: use of undeclared identifier 'sink_qos'
memset(&sink_qos, 0, sizeof(sink_qos));
^
net/bluetooth/iso.c:1351:11: error: use of undeclared identifier 'sink_qos'
net/bluetooth/iso.c:1351:11: error: use of undeclared identifier 'sink_qos'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +1306 net/bluetooth/iso.c
1275
1276 static int iso_sock_setsockopt(struct socket *sock, int level, int optname,
1277 sockptr_t optval, unsigned int optlen)
1278 {
1279 struct sock *sk = sock->sk;
1280 int len, err = 0;
1281 u32 opt;
1282
1283 BT_DBG("sk %p", sk);
1284
1285 lock_sock(sk);
1286
1287 switch (optname) {
1288 case BT_DEFER_SETUP:
1289 if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
1290 err = -EINVAL;
1291 break;
1292 }
1293
1294 if (copy_from_sockptr(&opt, optval, sizeof(u32))) {
1295 err = -EFAULT;
1296 break;
1297 }
1298
1299 if (opt)
1300 set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
1301 else
1302 clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
1303 break;
1304
1305 case BT_ISO_UNICAST_QOS:
> 1306 struct bt_iso_unicast_qos unicast_qos;
1307
1308 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
1309 sk->sk_state != BT_CONNECT2) {
1310 err = -EINVAL;
1311 break;
1312 }
1313
> 1314 len = min_t(unsigned int, sizeof(unicast_qos), optlen);
1315 if (len != sizeof(unicast_qos)) {
1316 err = -EINVAL;
1317 break;
1318 }
1319
1320 memset(&unicast_qos, 0, sizeof(unicast_qos));
1321
1322 if (copy_from_sockptr(&unicast_qos, optval, len)) {
1323 err = -EFAULT;
1324 break;
1325 }
1326
1327 if (!check_unicast_qos(&unicast_qos)) {
1328 err = -EINVAL;
1329 break;
1330 }
1331
1332 iso_pi(sk)->unicast_qos = unicast_qos;
1333
1334 break;
1335
1336 case BT_ISO_BCAST_SINK_QOS:
1337 struct bt_iso_bcast_sink_qos sink_qos;
1338
1339 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
1340 sk->sk_state != BT_CONNECT2) {
1341 err = -EINVAL;
1342 break;
1343 }
1344
> 1345 len = min_t(unsigned int, sizeof(sink_qos), optlen);
1346 if (len != sizeof(sink_qos)) {
1347 err = -EINVAL;
1348 break;
1349 }
1350
1351 memset(&sink_qos, 0, sizeof(sink_qos));
1352
1353 if (copy_from_sockptr(&sink_qos, optval, len)) {
1354 err = -EFAULT;
1355 break;
1356 }
1357
1358 if (!check_bcast_sink_qos(&sink_qos)) {
1359 err = -EINVAL;
1360 break;
1361 }
1362
1363 iso_pi(sk)->sink_qos = sink_qos;
1364
1365 break;
1366
1367 case BT_ISO_BCAST_SOURCE_QOS:
1368 struct bt_iso_bcast_source_qos source_qos;
1369
1370 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
1371 sk->sk_state != BT_CONNECT2) {
1372 err = -EINVAL;
1373 break;
1374 }
1375
1376 len = min_t(unsigned int, sizeof(source_qos), optlen);
1377 if (len != sizeof(source_qos)) {
1378 err = -EINVAL;
1379 break;
1380 }
1381
1382 memset(&source_qos, 0, sizeof(source_qos));
1383
1384 if (copy_from_sockptr(&source_qos, optval, len)) {
1385 err = -EFAULT;
1386 break;
1387 }
1388
1389 if (!check_bcast_source_qos(&source_qos)) {
1390 err = -EINVAL;
1391 break;
1392 }
1393
1394 iso_pi(sk)->source_qos = source_qos;
1395
1396 break;
1397
1398 case BT_ISO_BASE:
1399 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
1400 sk->sk_state != BT_CONNECT2) {
1401 err = -EINVAL;
1402 break;
1403 }
1404
1405 if (optlen > sizeof(iso_pi(sk)->base)) {
1406 err = -EOVERFLOW;
1407 break;
1408 }
1409
1410 len = min_t(unsigned int, sizeof(iso_pi(sk)->base), optlen);
1411
1412 if (copy_from_sockptr(iso_pi(sk)->base, optval, len)) {
1413 err = -EFAULT;
1414 break;
1415 }
1416
1417 iso_pi(sk)->base_len = len;
1418
1419 break;
1420
1421 default:
1422 err = -ENOPROTOOPT;
1423 break;
1424 }
1425
1426 release_sock(sk);
1427 return err;
1428 }
1429
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-03-20 22:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 14:36 [PATCH 0/1] Split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:36 ` [PATCH 1/1] Bluetooth: " Iulia Tanasescu
2023-03-20 15:03 ` bluez.test.bot
2023-03-20 18:43 ` [PATCH 1/1] Bluetooth: " Luiz Augusto von Dentz
2023-03-21 8:08 ` Iulia Tanasescu
2023-03-22 15:23 ` Iulia Tanasescu
2023-03-22 17:38 ` Luiz Augusto von Dentz
2023-03-23 15:06 ` Iulia Tanasescu
2023-03-20 22:49 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-20 23:30 kernel test robot
2023-03-27 13:45 [PATCH 0/1] " Iulia Tanasescu
2023-03-27 13:45 ` [PATCH 1/1] Bluetooth: " Iulia Tanasescu
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=202303210652.rxBfO9uo-lkp@intel.com \
--to=lkp@intel.com \
--cc=iulia.tanasescu@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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.