CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: "Tedd Ho-Jeong An" <[email protected]>
Hi Tedd, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on bluetooth/master] [also build test WARNING on v5.14-rc2 next-20210723] [cannot apply to bluetooth-next/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/Tedd-Ho-Jeong-An/Bluetooth-btintel-Refactoring-setup-routines/20210724-153223 base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master :::::: branch date: 32 hours ago :::::: commit date: 32 hours ago config: x86_64-randconfig-c001-20210723 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 3f2c1e99e44d028d5e9dd685f3c568f2661f2f68) 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 # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/eca1c570017a1accc1a7f6be7fe1fa0a390066f9 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Tedd-Ho-Jeong-An/Bluetooth-btintel-Refactoring-setup-routines/20210724-153223 git checkout eca1c570017a1accc1a7f6be7fe1fa0a390066f9 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross clang-analyzer ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^ drivers/iio/adc/ad7606.c:436:3: note: Returning without writing to 'st->sw_mode_en', which participates in a condition later return PTR_ERR(st->gpio_convst); ^ drivers/iio/adc/ad7606.c:436:3: note: Returning value, which participates in a condition later return PTR_ERR(st->gpio_convst); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:612:8: note: Returning from 'ad7606_request_gpios' ret = ad7606_request_gpios(st); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:613:6: note: Assuming 'ret' is 0 if (ret) ^~~ drivers/iio/adc/ad7606.c:613:2: note: Taking false branch if (ret) ^ drivers/iio/adc/ad7606.c:616:6: note: Assuming field 'gpio_os' is null if (st->gpio_os) { ^~~~~~~~~~~ drivers/iio/adc/ad7606.c:616:2: note: Taking false branch if (st->gpio_os) { ^ drivers/iio/adc/ad7606.c:622:7: note: Assuming field 'gpio_range' is non-null if (st->gpio_range) ^~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:622:3: note: Taking true branch if (st->gpio_range) ^ drivers/iio/adc/ad7606.c:632:2: note: Calling 'init_completion' init_completion(&st->completion); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/completion.h:87:2: note: Value assigned to field 'sw_mode_en', which participates in a condition later init_swait_queue_head(&x->wait); ^ include/linux/swait.h:75:3: note: expanded from macro 'init_swait_queue_head' __init_swait_queue_head((q), #q, &__key); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/completion.h:87:2: note: Loop condition is false. Exiting loop init_swait_queue_head(&x->wait); ^ include/linux/swait.h:73:2: note: expanded from macro 'init_swait_queue_head' do { \ ^ drivers/iio/adc/ad7606.c:632:2: note: Returning from 'init_completion' init_completion(&st->completion); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:634:8: note: Calling 'ad7606_reset' ret = ad7606_reset(st); ^~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:53:6: note: Assuming field 'gpio_reset' is null if (st->gpio_reset) { ^~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:53:2: note: Taking false branch if (st->gpio_reset) { ^ drivers/iio/adc/ad7606.c:60:2: note: Returning without writing to 'st->sw_mode_en', which participates in a condition later return -ENODEV; ^ drivers/iio/adc/ad7606.c:634:8: note: Returning from 'ad7606_reset' ret = ad7606_reset(st); ^~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:635:6: note: 'ret' is -19 if (ret) ^~~ drivers/iio/adc/ad7606.c:635:2: note: Taking true branch if (ret) ^ drivers/iio/adc/ad7606.c:639:6: note: Assuming field 'init_delay_ms' is 0 if (st->chip_info->init_delay_ms) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:639:2: note: Taking false branch if (st->chip_info->init_delay_ms) { ^ drivers/iio/adc/ad7606.c:647:6: note: Assuming field 'sw_mode_config' is null if (st->bops->sw_mode_config) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:647:2: note: Taking false branch if (st->bops->sw_mode_config) ^ drivers/iio/adc/ad7606.c:651:6: note: Assuming field 'sw_mode_en' is true if (st->sw_mode_en) { ^~~~~~~~~~~~~~ drivers/iio/adc/ad7606.c:651:2: note: Taking true branch if (st->sw_mode_en) { ^ drivers/iio/adc/ad7606.c:660:9: note: Called function pointer is null (null dereference) ret = st->bops->sw_mode_config(indio_dev); ^~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 3 warnings (3 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. drivers/bluetooth/hci_ag6xx.c:202:2: warning: Value stored to 'fw_ptr' is never read [clang-analyzer-deadcode.DeadStores] fw_ptr = fw->data; ^ ~~~~~~~~ drivers/bluetooth/hci_ag6xx.c:202:2: note: Value stored to 'fw_ptr' is never read fw_ptr = fw->data; ^ ~~~~~~~~ Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. >> drivers/bluetooth/btintel.c:422:6: warning: The left operand of '&' is a >> garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (INTEL_HW_PLATFORM(version->cnvi_bt) != 0x37) { ^ drivers/bluetooth/btintel.h:135:53: note: expanded from macro 'INTEL_HW_PLATFORM' #define INTEL_HW_PLATFORM(cnvx_bt) ((u8)(((cnvx_bt) & 0x0000ff00) >> 8)) ^ drivers/bluetooth/btintel.c:1383:2: note: Taking false branch BT_DBG("%s", hdev->name); ^ include/net/bluetooth/bluetooth.h:180:26: note: expanded from macro 'BT_DBG' #define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) ^ include/linux/printk.h:430:2: note: expanded from macro 'pr_debug' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:139:2: note: expanded from macro 'no_printk' if (0) \ ^ drivers/bluetooth/btintel.c:1392:2: note: Taking false branch if (IS_ERR(skb)) { ^ drivers/bluetooth/btintel.c:1399:6: note: Assuming the condition is false if (skb->data[0]) { ^~~~~~~~~~~~ drivers/bluetooth/btintel.c:1399:2: note: Taking false branch if (skb->data[0]) { ^ drivers/bluetooth/btintel.c:1407:6: note: Assuming the condition is false if (skb->data[1] == 0x37 && skb->len == sizeof(ver)) { ^~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.c:1407:27: note: Left side of '&&' is false if (skb->data[1] == 0x37 && skb->len == sizeof(ver)) { ^ drivers/bluetooth/btintel.c:1440:2: note: Calling 'btintel_parse_version_tlv' btintel_parse_version_tlv(hdev, &ver_tlv, skb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.c:506:2: note: Loop condition is false. Execution continues on line 583 while (skb->len) { ^ drivers/bluetooth/btintel.c:583:2: note: Returning without writing to 'version->cnvi_bt' return 0; ^ drivers/bluetooth/btintel.c:1440:2: note: Returning from 'btintel_parse_version_tlv' btintel_parse_version_tlv(hdev, &ver_tlv, skb); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.c:1443:2: note: Calling 'btintel_version_info_tlv' btintel_version_info_tlv(hdev, &ver_tlv); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.c:422:6: note: The left operand of '&' is a garbage value if (INTEL_HW_PLATFORM(version->cnvi_bt) != 0x37) { ^ drivers/bluetooth/btintel.h:135:53: note: expanded from macro 'INTEL_HW_PLATFORM' #define INTEL_HW_PLATFORM(cnvx_bt) ((u8)(((cnvx_bt) & 0x0000ff00) >> 8)) ~~~~~~~ ^ drivers/bluetooth/btintel.c:1436:3: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn] return err; ^ ~~~ drivers/bluetooth/btintel.c:1381:2: note: 'err' declared without an initial value int err; ^~~~~~~ drivers/bluetooth/btintel.c:1383:2: note: Taking false branch BT_DBG("%s", hdev->name); ^ include/net/bluetooth/bluetooth.h:180:26: note: expanded from macro 'BT_DBG' #define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) ^ include/linux/printk.h:430:2: note: expanded from macro 'pr_debug' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:139:2: note: expanded from macro 'no_printk' if (0) \ ^ drivers/bluetooth/btintel.c:1392:6: note: Calling 'IS_ERR' if (IS_ERR(skb)) { ^~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.c:1392:6: note: Returning from 'IS_ERR' if (IS_ERR(skb)) { ^~~~~~~~~~~ drivers/bluetooth/btintel.c:1392:2: note: Taking false branch if (IS_ERR(skb)) { ^ drivers/bluetooth/btintel.c:1399:6: note: Assuming the condition is false if (skb->data[0]) { ^~~~~~~~~~~~ drivers/bluetooth/btintel.c:1399:2: note: Taking false branch if (skb->data[0]) { ^ drivers/bluetooth/btintel.c:1407:6: note: Assuming the condition is true if (skb->data[1] == 0x37 && skb->len == sizeof(ver)) { vim +422 drivers/bluetooth/btintel.c 6c483de1b3c41e Loic Poulain 2015-12-06 414 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 415 int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *version) 57375beef71af9 Kiran K 2020-09-14 416 { 57375beef71af9 Kiran K 2020-09-14 417 const char *variant; 57375beef71af9 Kiran K 2020-09-14 418 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 419 /* The hardware platform number has a fixed value of 0x37 and 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 420 * for now only accept this single value. 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 421 */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 @422 if (INTEL_HW_PLATFORM(version->cnvi_bt) != 0x37) { 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 423 bt_dev_err(hdev, "Unsupported Intel hardware platform (0x%2x)", 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 424 INTEL_HW_PLATFORM(version->cnvi_bt)); 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 425 return -EINVAL; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 426 } 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 427 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 428 /* Check for supported iBT hardware variants of this firmware 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 429 * loading method. 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 430 * 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 431 * This check has been put in place to ensure correct forward 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 432 * compatibility options when newer hardware variants come along. 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 433 */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 434 switch (INTEL_HW_VARIANT(version->cnvi_bt)) { 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 435 case 0x17: /* TyP */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 436 case 0x18: /* Slr */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 437 case 0x19: /* Slr-F */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 438 break; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 439 default: 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 440 bt_dev_err(hdev, "Unsupported Intel hardware variant (0x%x)", 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 441 INTEL_HW_VARIANT(version->cnvi_bt)); 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 442 return -EINVAL; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 443 } 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 444 7de3a42cdc701f Lokendra Singh 2021-03-23 445 switch (version->img_type) { 7de3a42cdc701f Lokendra Singh 2021-03-23 446 case 0x01: 7de3a42cdc701f Lokendra Singh 2021-03-23 447 variant = "Bootloader"; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 448 /* It is required that every single firmware fragment is acknowledged 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 449 * with a command complete event. If the boot parameters indicate 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 450 * that this bootloader does not send them, then abort the setup. 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 451 */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 452 if (version->limited_cce != 0x00) { 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 453 bt_dev_err(hdev, "Unsupported Intel firmware loading method (0x%x)", 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 454 version->limited_cce); 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 455 return -EINVAL; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 456 } 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 457 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 458 /* Secure boot engine type should be either 1 (ECDSA) or 0 (RSA) */ 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 459 if (version->sbe_type > 0x01) { 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 460 bt_dev_err(hdev, "Unsupported Intel secure boot engine type (0x%x)", 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 461 version->sbe_type); 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 462 return -EINVAL; 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 463 } 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 464 57375beef71af9 Kiran K 2020-09-14 465 bt_dev_info(hdev, "Device revision is %u", version->dev_rev_id); 57375beef71af9 Kiran K 2020-09-14 466 bt_dev_info(hdev, "Secure boot is %s", 57375beef71af9 Kiran K 2020-09-14 467 version->secure_boot ? "enabled" : "disabled"); 57375beef71af9 Kiran K 2020-09-14 468 bt_dev_info(hdev, "OTP lock is %s", 57375beef71af9 Kiran K 2020-09-14 469 version->otp_lock ? "enabled" : "disabled"); 57375beef71af9 Kiran K 2020-09-14 470 bt_dev_info(hdev, "API lock is %s", 57375beef71af9 Kiran K 2020-09-14 471 version->api_lock ? "enabled" : "disabled"); 57375beef71af9 Kiran K 2020-09-14 472 bt_dev_info(hdev, "Debug lock is %s", 57375beef71af9 Kiran K 2020-09-14 473 version->debug_lock ? "enabled" : "disabled"); 57375beef71af9 Kiran K 2020-09-14 474 bt_dev_info(hdev, "Minimum firmware build %u week %u %u", 57375beef71af9 Kiran K 2020-09-14 475 version->min_fw_build_nn, version->min_fw_build_cw, 57375beef71af9 Kiran K 2020-09-14 476 2000 + version->min_fw_build_yy); 57375beef71af9 Kiran K 2020-09-14 477 break; 57375beef71af9 Kiran K 2020-09-14 478 case 0x03: 57375beef71af9 Kiran K 2020-09-14 479 variant = "Firmware"; 57375beef71af9 Kiran K 2020-09-14 480 break; 57375beef71af9 Kiran K 2020-09-14 481 default: 57375beef71af9 Kiran K 2020-09-14 482 bt_dev_err(hdev, "Unsupported image type(%02x)", version->img_type); 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 483 return -EINVAL; 57375beef71af9 Kiran K 2020-09-14 484 } 57375beef71af9 Kiran K 2020-09-14 485 57375beef71af9 Kiran K 2020-09-14 486 bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u", variant, 57375beef71af9 Kiran K 2020-09-14 487 2000 + (version->timestamp >> 8), version->timestamp & 0xff, 57375beef71af9 Kiran K 2020-09-14 488 version->build_type, version->build_num); 57375beef71af9 Kiran K 2020-09-14 489 0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 490 return 0; 57375beef71af9 Kiran K 2020-09-14 491 } 57375beef71af9 Kiran K 2020-09-14 492 EXPORT_SYMBOL_GPL(btintel_version_info_tlv); 57375beef71af9 Kiran K 2020-09-14 493 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
