All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
@ 2021-07-25 15:47 kernel test robot
  2021-07-26  3:46 ` kernel test robot
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-07-25 15:47 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 19778 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210724073005.714003-3-hj.tedd.an@gmail.com>
References: <20210724073005.714003-3-hj.tedd.an@gmail.com>
TO: "Tedd Ho-Jeong An" <hj.tedd.an@gmail.com>

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 <lkp@intel.com>


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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35485 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
  2021-07-25 15:47 [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions kernel test robot
@ 2021-07-26  3:46 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-07-26  3:46 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 19890 bytes --]


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


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/kbuild-all(a)lists.01.org


[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35485 bytes --]

[-- Attachment #3: AttachedMessagePart.ksh --]
[-- Type: text/plain, Size: 150 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
  2021-07-27  4:38 kernel test robot
@ 2021-07-28  0:30 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-07-28  0:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 21229 bytes --]


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 <lkp@intel.com>


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/kbuild-all(a)lists.01.org


[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35485 bytes --]

[-- Attachment #3: AttachedMessagePart.ksh --]
[-- Type: text/plain, Size: 150 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
@ 2021-07-27 17:05 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-07-27 17:05 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 19820 bytes --]

CC: clang-built-linux(a)googlegroups.com
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210724073005.714003-3-hj.tedd.an@gmail.com>
References: <20210724073005.714003-3-hj.tedd.an@gmail.com>
TO: "Tedd Ho-Jeong An" <hj.tedd.an@gmail.com>

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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                  ^
   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/nvmem/core.c:1618:6: note: Returning from 'IS_ERR'
           if (IS_ERR(cell))
               ^~~~~~~~~~~~
   drivers/nvmem/core.c:1618:2: note: Taking false branch
           if (IS_ERR(cell))
           ^
   drivers/nvmem/core.c:1622:8: note: Calling 'nvmem_cell_read'
           buf = nvmem_cell_read(cell, len);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/nvmem/core.c:1414:6: note: Assuming 'nvmem' is non-null
           if (!nvmem)
               ^~~~~~
   drivers/nvmem/core.c:1414:2: note: Taking false branch
           if (!nvmem)
           ^
   drivers/nvmem/core.c:1418:6: note: Assuming 'buf' is non-null
           if (!buf)
               ^~~~
   drivers/nvmem/core.c:1418:2: note: Taking false branch
           if (!buf)
           ^
   drivers/nvmem/core.c:1421:7: note: Calling '__nvmem_cell_read'
           rc = __nvmem_cell_read(nvmem, cell, buf, len);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/nvmem/core.c:1385:6: note: Assuming 'rc' is not equal to 0
           if (rc)
               ^~
   drivers/nvmem/core.c:1385:2: note: Taking true branch
           if (rc)
           ^
   drivers/nvmem/core.c:1421:7: note: Returning from '__nvmem_cell_read'
           rc = __nvmem_cell_read(nvmem, cell, buf, len);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/nvmem/core.c:1422:6: note: 'rc' is not equal to 0
           if (rc) {
               ^~
   drivers/nvmem/core.c:1422:2: note: Taking true branch
           if (rc) {
           ^
   drivers/nvmem/core.c:1622:8: note: Returning from 'nvmem_cell_read'
           buf = nvmem_cell_read(cell, len);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/nvmem/core.c:1624:6: note: Calling 'IS_ERR'
           if (IS_ERR(buf))
               ^~~~~~~~~~~
   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/nvmem/core.c:1624:6: note: Returning from 'IS_ERR'
           if (IS_ERR(buf))
               ^~~~~~~~~~~
   drivers/nvmem/core.c:1624:2: note: Taking false branch
           if (IS_ERR(buf))
           ^
   drivers/nvmem/core.c:1631:6: note: Assuming 'nbits' is 0
           if (nbits)
               ^~~~~
   drivers/nvmem/core.c:1631:2: note: Taking false branch
           if (nbits)
           ^
   drivers/nvmem/core.c:1634:11: note: The left operand of '>' is a garbage value
           if (*len > max_len) {
               ~~~~ ^
   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.
   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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35481 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
@ 2021-07-27  4:38 kernel test robot
  2021-07-28  0:30 ` kernel test robot
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-07-27  4:38 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 21076 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210724073005.714003-3-hj.tedd.an@gmail.com>
References: <20210724073005.714003-3-hj.tedd.an@gmail.com>
TO: "Tedd Ho-Jeong An" <hj.tedd.an@gmail.com>

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 <lkp@intel.com>


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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35485 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
  2021-07-24  7:29 ` [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions Tedd Ho-Jeong An
@ 2021-07-24  7:36   ` K, Kiran
  0 siblings, 0 replies; 7+ messages in thread
From: K, Kiran @ 2021-07-24  7:36 UTC (permalink / raw)
  To: Tedd Ho-Jeong An, linux-bluetooth; +Cc: An, Tedd

Hi Tedd,

There is already a patch published to have a generic setup function for RAM products.
https://patchwork.kernel.org/project/bluetooth/patch/20210713032755.19351-1-kiran.k@intel.com/

Thanks,
Kiran


> -----Original Message-----
> From: Tedd Ho-Jeong An <hj.tedd.an@gmail.com>
> Sent: Saturday, July 24, 2021 1:00 PM
> To: linux-bluetooth@vger.kernel.org
> Cc: An, Tedd <tedd.an@intel.com>
> Subject: [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and
> shutdown functions
> 
> From: Tedd Ho-Jeong An <tedd.an@intel.com>
> 
> There are multiple setup and shutdown functions for Intel device and the
> setup function to use is depends on the USB PID/VID, which makes difficult
> to maintain the code and increases the code size.
> 
> This patch adds combined setup and shutdown functions to provide a single
> entry point for all Intel devices and choose the setup functions based on the
> information read with HCI_Intel_Read_Version command.
> 
> Starting from TyP device, for HCI_Intel_Read_Version command, the
> command parameter and response are changed even though OCF remains
> same. Luckly the legacy devices still can handle the command without error
> even if it has a extra parameter, so it uses the new command format to
> support both legacy and new (tlv based) format.
> 
> Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
> ---
>  drivers/bluetooth/btintel.c | 210 ++++++++++++++++++++++++++++++++++++
>  drivers/bluetooth/btintel.h |  12 +++
>  2 files changed, 222 insertions(+)
> 
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index
> e44b6993cf91..5513a2ba2504 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -236,6 +236,8 @@ int btintel_version_info(struct hci_dev *hdev, struct
> intel_version *ver)
>  	 * compatibility options when newer hardware variants come along.
>  	 */
>  	switch (ver->hw_variant) {
> +	case 0x07:	/* WP - Legacy ROM */
> +	case 0x08:	/* StP - Legacy ROM */
>  	case 0x0b:      /* SfP */
>  	case 0x0c:      /* WsP */
>  	case 0x11:      /* JfP */
> @@ -250,9 +252,15 @@ int btintel_version_info(struct hci_dev *hdev, struct
> intel_version *ver)
>  	}
> 
>  	switch (ver->fw_variant) {
> +	case 0x01:
> +		variant = "Legacy ROM 2.5";
> +		break;
>  	case 0x06:
>  		variant = "Bootloader";
>  		break;
> +	case 0x22:
> +		variant = "Legacy ROM 2.x";
> +		break;
>  	case 0x23:
>  		variant = "Firmware";
>  		break;
> @@ -483,6 +491,98 @@ int btintel_version_info_tlv(struct hci_dev *hdev,
> struct intel_version_tlv *ver  }
> EXPORT_SYMBOL_GPL(btintel_version_info_tlv);
> 
> +static int btintel_parse_version_tlv(struct hci_dev *hdev,
> +				     struct intel_version_tlv *version,
> +				     struct sk_buff *skb)
> +{
> +	/* Consume Command Complete Status field */
> +	skb_pull(skb, 1);
> +
> +	/* Event parameters contatin multiple TLVs. Read each of them
> +	 * and only keep the required data. Also, it use existing legacy
> +	 * version field like hw_platform, hw_variant, and fw_variant
> +	 * to keep the existing setup flow
> +	 */
> +	while (skb->len) {
> +		struct intel_tlv *tlv;
> +
> +		tlv = (struct intel_tlv *)skb->data;
> +		switch (tlv->type) {
> +		case INTEL_TLV_CNVI_TOP:
> +			version->cnvi_top = get_unaligned_le32(tlv->val);
> +			break;
> +		case INTEL_TLV_CNVR_TOP:
> +			version->cnvr_top = get_unaligned_le32(tlv->val);
> +			break;
> +		case INTEL_TLV_CNVI_BT:
> +			version->cnvi_bt = get_unaligned_le32(tlv->val);
> +			break;
> +		case INTEL_TLV_CNVR_BT:
> +			version->cnvr_bt = get_unaligned_le32(tlv->val);
> +			break;
> +		case INTEL_TLV_DEV_REV_ID:
> +			version->dev_rev_id = get_unaligned_le16(tlv->val);
> +			break;
> +		case INTEL_TLV_IMAGE_TYPE:
> +			version->img_type = tlv->val[0];
> +			break;
> +		case INTEL_TLV_TIME_STAMP:
> +			/* If image type is Operational firmware (0x03), then
> +			 * running FW Calendar Week and Year information
> can
> +			 * be extracted from Timestamp information
> +			 */
> +			version->min_fw_build_cw = tlv->val[0];
> +			version->min_fw_build_yy = tlv->val[1];
> +			version->timestamp = get_unaligned_le16(tlv->val);
> +			break;
> +		case INTEL_TLV_BUILD_TYPE:
> +			version->build_type = tlv->val[0];
> +			break;
> +		case INTEL_TLV_BUILD_NUM:
> +			/* If image type is Operational firmware (0x03), then
> +			 * running FW build number can be extracted from
> the
> +			 * Build information
> +			 */
> +			version->min_fw_build_nn = tlv->val[0];
> +			version->build_num = get_unaligned_le32(tlv->val);
> +			break;
> +		case INTEL_TLV_SECURE_BOOT:
> +			version->secure_boot = tlv->val[0];
> +			break;
> +		case INTEL_TLV_OTP_LOCK:
> +			version->otp_lock = tlv->val[0];
> +			break;
> +		case INTEL_TLV_API_LOCK:
> +			version->api_lock = tlv->val[0];
> +			break;
> +		case INTEL_TLV_DEBUG_LOCK:
> +			version->debug_lock = tlv->val[0];
> +			break;
> +		case INTEL_TLV_MIN_FW:
> +			version->min_fw_build_nn = tlv->val[0];
> +			version->min_fw_build_cw = tlv->val[1];
> +			version->min_fw_build_yy = tlv->val[2];
> +			break;
> +		case INTEL_TLV_LIMITED_CCE:
> +			version->limited_cce = tlv->val[0];
> +			break;
> +		case INTEL_TLV_SBE_TYPE:
> +			version->sbe_type = tlv->val[0];
> +			break;
> +		case INTEL_TLV_OTP_BDADDR:
> +			memcpy(&version->otp_bd_addr, tlv->val, tlv->len);
> +			break;
> +		default:
> +			/* Ignore rest of information */
> +			break;
> +		}
> +		/* consume the current tlv and move to next*/
> +		skb_pull(skb, tlv->len + sizeof(*tlv));
> +	}
> +
> +	return 0;
> +}
> +
>  int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv
> *version)  {
>  	struct sk_buff *skb;
> @@ -1272,6 +1372,116 @@ int btintel_set_debug_features(struct hci_dev
> *hdev,  }  EXPORT_SYMBOL_GPL(btintel_set_debug_features);
> 
> +int btintel_setup_combined(struct hci_dev *hdev) {
> +	const u8 param[1] = { 0xFF };
> +	struct intel_version ver;
> +	struct intel_version_tlv ver_tlv;
> +	struct sk_buff *skb;
> +	int err;
> +
> +	BT_DBG("%s", hdev->name);
> +
> +	/* Starting from TyP device, the command parameter and response
> are
> +	 * changed even though the OCF for HCI_Intel_Read_Version
> command
> +	 * remains same. The legacy devices can handle even if the
> +	 * command has a parameter and returns a correct version
> information.
> +	 * So, it uses new format to support both legacy and new format.
> +	 */
> +	skb = __hci_cmd_sync(hdev, 0xfc05, 1, param, HCI_CMD_TIMEOUT);
> +	if (IS_ERR(skb)) {
> +		bt_dev_err(hdev, "Reading Intel version command failed
> (%ld)",
> +			   PTR_ERR(skb));
> +		return PTR_ERR(skb);
> +	}
> +
> +	/* Check the status */
> +	if (skb->data[0]) {
> +		bt_dev_err(hdev, "Intel Read Version command failed
> (%02x)",
> +			   skb->data[0]);
> +		kfree_skb(skb);
> +		return -EIO;
> +	}
> +
> +	/* For Legacy device, check the HW platform value and size */
> +	if (skb->data[1] == 0x37 && skb->len == sizeof(ver)) {
> +		bt_dev_dbg(hdev, "Read the legacy Intel version
> information");
> +
> +		memcpy(&ver, skb->data, sizeof(ver));
> +
> +		/* Display version information */
> +		btintel_version_info(hdev, &ver);
> +
> +		/* Identify the device type based on the read version */
> +		switch (ver.hw_variant) {
> +		case 0x07:	/* WP */
> +		case 0x08:	/* StP */
> +			/* Legacy ROM product */
> +			/* TODO: call setup routine for legacy rom product */
> +			break;
> +		case 0x0b:      /* SfP */
> +		case 0x0c:      /* WsP */
> +		case 0x11:      /* JfP */
> +		case 0x12:      /* ThP */
> +		case 0x13:      /* HrP */
> +		case 0x14:      /* CcP */
> +			/* TODO: call setup routine for bootloader product
> */
> +			break;
> +		default:
> +			bt_dev_err(hdev, "Unsupported Intel hw variant
> (%u)",
> +				   ver.hw_variant);
> +			return -EINVAL;
> +		}
> +
> +		return err;
> +	}
> +
> +	/* For TLV type device, parse the tlv data */
> +	btintel_parse_version_tlv(hdev, &ver_tlv, skb);
> +
> +	/* Display version information of TLV type */
> +	btintel_version_info_tlv(hdev, &ver_tlv);
> +
> +	/* TODO: Need to filter the device for new generation */
> +	/* TODO: call setup routine for tlv based bootloader product */
> +
> +	return err;
> +}
> +EXPORT_SYMBOL_GPL(btintel_setup_combined);
> +
> +int btintel_shutdown_combined(struct hci_dev *hdev) {
> +	struct sk_buff *skb;
> +
> +	/* Send HCI Reset to the controller to stop any BT activity which
> +	 * were triggered. This will help to save power and maintain the
> +	 * sync b/w Host and controller
> +	 */
> +	skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL,
> HCI_INIT_TIMEOUT);
> +	if (IS_ERR(skb)) {
> +		bt_dev_err(hdev, "HCI reset during shutdown failed");
> +		return PTR_ERR(skb);
> +	}
> +	kfree_skb(skb);
> +
> +	/* Fix me: All legacy ROM and RAM works?
> +	 * This code was only for legacy ROM
> +	 */
> +	/* Some platforms have an issue with BT LED when the interface is
> +	 * down or BT radio is turned off, which takes 5 seconds to BT LED
> +	 * goes off. This command turns off the BT LED immediately.
> +	 */
> +	skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
> +	if (IS_ERR(skb)) {
> +		bt_dev_err(hdev, "turning off Intel device LED failed");
> +		return PTR_ERR(skb);
> +	}
> +	kfree_skb(skb);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(btintel_shutdown_combined);
> +
>  MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
> MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION);
> MODULE_VERSION(VERSION); diff --git a/drivers/bluetooth/btintel.h
> b/drivers/bluetooth/btintel.h index d184064a5e7c..68ffa84fa87a 100644
> --- a/drivers/bluetooth/btintel.h
> +++ b/drivers/bluetooth/btintel.h
> @@ -165,6 +165,8 @@ int btintel_read_boot_params(struct hci_dev *hdev,
>  			     struct intel_boot_params *params);  int
> btintel_download_firmware(struct hci_dev *dev, struct intel_version *ver,
>  			      const struct firmware *fw, u32 *boot_param);
> +int btintel_setup_combined(struct hci_dev *hdev); int
> +btintel_shutdown_combined(struct hci_dev *hdev);
>  int btintel_download_firmware_newgen(struct hci_dev *hdev,
>  				     struct intel_version_tlv *ver,
>  				     const struct firmware *fw,
> @@ -283,6 +285,16 @@ static inline int btintel_download_firmware(struct
> hci_dev *dev,
>  	return -EOPNOTSUPP;
>  }
> 
> +static inline int btintel_setup_combined(struct hci_dev *hdev) {
> +	return -EOPNOTSUPP;
> +}
> +
> +static inline int btintel_shutdown_combined(struct hci_dev *hdev) {
> +	return -EOPNOTSUPP;
> +}
> +
>  static inline int btintel_download_firmware_newgen(struct hci_dev *hdev,
>  						   const struct firmware *fw,
>  						   u32 *boot_param,
> --
> 2.26.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions
  2021-07-24  7:29 [RFC PATCH v3 0/9] Bluetooth: btintel: Refactoring setup routines Tedd Ho-Jeong An
@ 2021-07-24  7:29 ` Tedd Ho-Jeong An
  2021-07-24  7:36   ` K, Kiran
  0 siblings, 1 reply; 7+ messages in thread
From: Tedd Ho-Jeong An @ 2021-07-24  7:29 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Tedd Ho-Jeong An

From: Tedd Ho-Jeong An <tedd.an@intel.com>

There are multiple setup and shutdown functions for Intel device and the
setup function to use is depends on the USB PID/VID, which makes
difficult to maintain the code and increases the code size.

This patch adds combined setup and shutdown functions to provide a
single entry point for all Intel devices and choose the setup functions
based on the information read with HCI_Intel_Read_Version command.

Starting from TyP device, for HCI_Intel_Read_Version command, the
command parameter and response are changed even though OCF remains
same. Luckly the legacy devices still can handle the command without
error even if it has a extra parameter, so it uses the new command
format to support both legacy and new (tlv based) format.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
---
 drivers/bluetooth/btintel.c | 210 ++++++++++++++++++++++++++++++++++++
 drivers/bluetooth/btintel.h |  12 +++
 2 files changed, 222 insertions(+)

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index e44b6993cf91..5513a2ba2504 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -236,6 +236,8 @@ int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
 	 * compatibility options when newer hardware variants come along.
 	 */
 	switch (ver->hw_variant) {
+	case 0x07:	/* WP - Legacy ROM */
+	case 0x08:	/* StP - Legacy ROM */
 	case 0x0b:      /* SfP */
 	case 0x0c:      /* WsP */
 	case 0x11:      /* JfP */
@@ -250,9 +252,15 @@ int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
 	}
 
 	switch (ver->fw_variant) {
+	case 0x01:
+		variant = "Legacy ROM 2.5";
+		break;
 	case 0x06:
 		variant = "Bootloader";
 		break;
+	case 0x22:
+		variant = "Legacy ROM 2.x";
+		break;
 	case 0x23:
 		variant = "Firmware";
 		break;
@@ -483,6 +491,98 @@ int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
 }
 EXPORT_SYMBOL_GPL(btintel_version_info_tlv);
 
+static int btintel_parse_version_tlv(struct hci_dev *hdev,
+				     struct intel_version_tlv *version,
+				     struct sk_buff *skb)
+{
+	/* Consume Command Complete Status field */
+	skb_pull(skb, 1);
+
+	/* Event parameters contatin multiple TLVs. Read each of them
+	 * and only keep the required data. Also, it use existing legacy
+	 * version field like hw_platform, hw_variant, and fw_variant
+	 * to keep the existing setup flow
+	 */
+	while (skb->len) {
+		struct intel_tlv *tlv;
+
+		tlv = (struct intel_tlv *)skb->data;
+		switch (tlv->type) {
+		case INTEL_TLV_CNVI_TOP:
+			version->cnvi_top = get_unaligned_le32(tlv->val);
+			break;
+		case INTEL_TLV_CNVR_TOP:
+			version->cnvr_top = get_unaligned_le32(tlv->val);
+			break;
+		case INTEL_TLV_CNVI_BT:
+			version->cnvi_bt = get_unaligned_le32(tlv->val);
+			break;
+		case INTEL_TLV_CNVR_BT:
+			version->cnvr_bt = get_unaligned_le32(tlv->val);
+			break;
+		case INTEL_TLV_DEV_REV_ID:
+			version->dev_rev_id = get_unaligned_le16(tlv->val);
+			break;
+		case INTEL_TLV_IMAGE_TYPE:
+			version->img_type = tlv->val[0];
+			break;
+		case INTEL_TLV_TIME_STAMP:
+			/* If image type is Operational firmware (0x03), then
+			 * running FW Calendar Week and Year information can
+			 * be extracted from Timestamp information
+			 */
+			version->min_fw_build_cw = tlv->val[0];
+			version->min_fw_build_yy = tlv->val[1];
+			version->timestamp = get_unaligned_le16(tlv->val);
+			break;
+		case INTEL_TLV_BUILD_TYPE:
+			version->build_type = tlv->val[0];
+			break;
+		case INTEL_TLV_BUILD_NUM:
+			/* If image type is Operational firmware (0x03), then
+			 * running FW build number can be extracted from the
+			 * Build information
+			 */
+			version->min_fw_build_nn = tlv->val[0];
+			version->build_num = get_unaligned_le32(tlv->val);
+			break;
+		case INTEL_TLV_SECURE_BOOT:
+			version->secure_boot = tlv->val[0];
+			break;
+		case INTEL_TLV_OTP_LOCK:
+			version->otp_lock = tlv->val[0];
+			break;
+		case INTEL_TLV_API_LOCK:
+			version->api_lock = tlv->val[0];
+			break;
+		case INTEL_TLV_DEBUG_LOCK:
+			version->debug_lock = tlv->val[0];
+			break;
+		case INTEL_TLV_MIN_FW:
+			version->min_fw_build_nn = tlv->val[0];
+			version->min_fw_build_cw = tlv->val[1];
+			version->min_fw_build_yy = tlv->val[2];
+			break;
+		case INTEL_TLV_LIMITED_CCE:
+			version->limited_cce = tlv->val[0];
+			break;
+		case INTEL_TLV_SBE_TYPE:
+			version->sbe_type = tlv->val[0];
+			break;
+		case INTEL_TLV_OTP_BDADDR:
+			memcpy(&version->otp_bd_addr, tlv->val, tlv->len);
+			break;
+		default:
+			/* Ignore rest of information */
+			break;
+		}
+		/* consume the current tlv and move to next*/
+		skb_pull(skb, tlv->len + sizeof(*tlv));
+	}
+
+	return 0;
+}
+
 int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *version)
 {
 	struct sk_buff *skb;
@@ -1272,6 +1372,116 @@ int btintel_set_debug_features(struct hci_dev *hdev,
 }
 EXPORT_SYMBOL_GPL(btintel_set_debug_features);
 
+int btintel_setup_combined(struct hci_dev *hdev)
+{
+	const u8 param[1] = { 0xFF };
+	struct intel_version ver;
+	struct intel_version_tlv ver_tlv;
+	struct sk_buff *skb;
+	int err;
+
+	BT_DBG("%s", hdev->name);
+
+	/* Starting from TyP device, the command parameter and response are
+	 * changed even though the OCF for HCI_Intel_Read_Version command
+	 * remains same. The legacy devices can handle even if the
+	 * command has a parameter and returns a correct version information.
+	 * So, it uses new format to support both legacy and new format.
+	 */
+	skb = __hci_cmd_sync(hdev, 0xfc05, 1, param, HCI_CMD_TIMEOUT);
+	if (IS_ERR(skb)) {
+		bt_dev_err(hdev, "Reading Intel version command failed (%ld)",
+			   PTR_ERR(skb));
+		return PTR_ERR(skb);
+	}
+
+	/* Check the status */
+	if (skb->data[0]) {
+		bt_dev_err(hdev, "Intel Read Version command failed (%02x)",
+			   skb->data[0]);
+		kfree_skb(skb);
+		return -EIO;
+	}
+
+	/* For Legacy device, check the HW platform value and size */
+	if (skb->data[1] == 0x37 && skb->len == sizeof(ver)) {
+		bt_dev_dbg(hdev, "Read the legacy Intel version information");
+
+		memcpy(&ver, skb->data, sizeof(ver));
+
+		/* Display version information */
+		btintel_version_info(hdev, &ver);
+
+		/* Identify the device type based on the read version */
+		switch (ver.hw_variant) {
+		case 0x07:	/* WP */
+		case 0x08:	/* StP */
+			/* Legacy ROM product */
+			/* TODO: call setup routine for legacy rom product */
+			break;
+		case 0x0b:      /* SfP */
+		case 0x0c:      /* WsP */
+		case 0x11:      /* JfP */
+		case 0x12:      /* ThP */
+		case 0x13:      /* HrP */
+		case 0x14:      /* CcP */
+			/* TODO: call setup routine for bootloader product */
+			break;
+		default:
+			bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
+				   ver.hw_variant);
+			return -EINVAL;
+		}
+
+		return err;
+	}
+
+	/* For TLV type device, parse the tlv data */
+	btintel_parse_version_tlv(hdev, &ver_tlv, skb);
+
+	/* Display version information of TLV type */
+	btintel_version_info_tlv(hdev, &ver_tlv);
+
+	/* TODO: Need to filter the device for new generation */
+	/* TODO: call setup routine for tlv based bootloader product */
+
+	return err;
+}
+EXPORT_SYMBOL_GPL(btintel_setup_combined);
+
+int btintel_shutdown_combined(struct hci_dev *hdev)
+{
+	struct sk_buff *skb;
+
+	/* Send HCI Reset to the controller to stop any BT activity which
+	 * were triggered. This will help to save power and maintain the
+	 * sync b/w Host and controller
+	 */
+	skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
+	if (IS_ERR(skb)) {
+		bt_dev_err(hdev, "HCI reset during shutdown failed");
+		return PTR_ERR(skb);
+	}
+	kfree_skb(skb);
+
+	/* Fix me: All legacy ROM and RAM works?
+	 * This code was only for legacy ROM
+	 */
+	/* Some platforms have an issue with BT LED when the interface is
+	 * down or BT radio is turned off, which takes 5 seconds to BT LED
+	 * goes off. This command turns off the BT LED immediately.
+	 */
+	skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
+	if (IS_ERR(skb)) {
+		bt_dev_err(hdev, "turning off Intel device LED failed");
+		return PTR_ERR(skb);
+	}
+	kfree_skb(skb);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(btintel_shutdown_combined);
+
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION);
 MODULE_VERSION(VERSION);
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index d184064a5e7c..68ffa84fa87a 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -165,6 +165,8 @@ int btintel_read_boot_params(struct hci_dev *hdev,
 			     struct intel_boot_params *params);
 int btintel_download_firmware(struct hci_dev *dev, struct intel_version *ver,
 			      const struct firmware *fw, u32 *boot_param);
+int btintel_setup_combined(struct hci_dev *hdev);
+int btintel_shutdown_combined(struct hci_dev *hdev);
 int btintel_download_firmware_newgen(struct hci_dev *hdev,
 				     struct intel_version_tlv *ver,
 				     const struct firmware *fw,
@@ -283,6 +285,16 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
 	return -EOPNOTSUPP;
 }
 
+static inline int btintel_setup_combined(struct hci_dev *hdev)
+{
+	return -EOPNOTSUPP;
+}
+
+static inline int btintel_shutdown_combined(struct hci_dev *hdev)
+{
+	return -EOPNOTSUPP;
+}
+
 static inline int btintel_download_firmware_newgen(struct hci_dev *hdev,
 						   const struct firmware *fw,
 						   u32 *boot_param,
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-28  0:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 15:47 [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions kernel test robot
2021-07-26  3:46 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-07-27 17:05 kernel test robot
2021-07-27  4:38 kernel test robot
2021-07-28  0:30 ` kernel test robot
2021-07-24  7:29 [RFC PATCH v3 0/9] Bluetooth: btintel: Refactoring setup routines Tedd Ho-Jeong An
2021-07-24  7:29 ` [RFC PATCH v3 2/9] Bluetooth: btintel: Add combined setup and shutdown functions Tedd Ho-Jeong An
2021-07-24  7:36   ` K, Kiran

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.