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-rc3 next-20210726] [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: 3 days ago :::::: commit date: 3 days 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 ARCH=x86_64 clang-analyzer 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 >>) 3 warnings generated. 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. 3 warnings generated. 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. 8 warnings generated. Suppressed 8 warnings (6 in non-user code, 2 with check filters). 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. Suppressed 8 warnings (6 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. drivers/gpu/drm/radeon/rv6xx_dpm.c:173:25: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (step->post_divider == 1) ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:1671:6: note: Assuming field 'thermal_protection' is false if (pi->thermal_protection) ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:1671:2: note: Taking false branch if (pi->thermal_protection) ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:1678:2: note: Calling 'rv6xx_generate_transition_stepping' rv6xx_generate_transition_stepping(rdev, new_ps, old_ps); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:1425:2: note: Calling 'rv6xx_generate_steps' rv6xx_generate_steps(rdev, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:248:2: note: Calling 'rv6xx_convert_clock_to_stepping' rv6xx_convert_clock_to_stepping(rdev, low, &cur); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:146:6: note: Assuming 'ret' is not equal to 0 if (ret) ^~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:146:2: note: Taking true branch if (ret) ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:147:3: note: Returning without writing to 'step->post_divider' return ret; ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:248:2: note: Returning from 'rv6xx_convert_clock_to_stepping' rv6xx_convert_clock_to_stepping(rdev, low, &cur); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:251:2: note: Calling 'rv6xx_output_stepping' rv6xx_output_stepping(rdev, step_index++, &cur); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:173:25: note: The left operand of '==' is a garbage value if (step->post_divider == 1) ~~~~~~~~~~~~~~~~~~ ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:253:41: warning: The left operand of '>=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] increasing_vco = (target.vco_frequency >= cur.vco_frequency); ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:1671:6: note: Assuming field 'thermal_protection' is false if (pi->thermal_protection) ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:1671:2: note: Taking false branch if (pi->thermal_protection) ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:1678:2: note: Calling 'rv6xx_generate_transition_stepping' rv6xx_generate_transition_stepping(rdev, new_ps, old_ps); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:1425:2: note: Calling 'rv6xx_generate_steps' rv6xx_generate_steps(rdev, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:249:2: note: Calling 'rv6xx_convert_clock_to_stepping' rv6xx_convert_clock_to_stepping(rdev, high, &target); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:146:6: note: Assuming 'ret' is not equal to 0 if (ret) ^~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:146:2: note: Taking true branch if (ret) ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:147:3: note: Returning without writing to 'step->vco_frequency' return ret; ^ drivers/gpu/drm/radeon/rv6xx_dpm.c:249:2: note: Returning from 'rv6xx_convert_clock_to_stepping' rv6xx_convert_clock_to_stepping(rdev, high, &target); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/rv6xx_dpm.c:253:41: note: The left operand of '>=' is a garbage value increasing_vco = (target.vco_frequency >= cur.vco_frequency); ~~~~~~~~~~~~~~~~~~~~ ^ Suppressed 7 warnings (6 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. 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. 4 warnings generated. 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. 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]
