Re: [PATCH 4/4] Bluetooth: btintel: Add helper function to help controller type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kiran,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20200611]
[cannot apply to bluetooth/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Kiran-K/Add-support-for-new-generation-Intel-controllers/20200611-194619
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: nds32-randconfig-r014-20200612 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from ./arch/nds32/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/nds32/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/bluetooth/btintel.c:9:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/nds32/include/asm/memory.h:82:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
82 | #define pfn_valid(pfn)  ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
|                                ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 |  int __ret_warn_once = !!(condition);            |                           ^~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
|                   ^~~~~~~~~
drivers/bluetooth/btintel.c: At top level:
drivers/bluetooth/btintel.c:229:6: warning: no previous prototype for 'btintel_boot_info' [-Wmissing-prototypes]
229 | void btintel_boot_info(struct hci_dev *hdev,
|      ^~~~~~~~~~~~~~~~~
drivers/bluetooth/btintel.c:252:6: warning: no previous prototype for 'btintel_boot_info_tlv' [-Wmissing-prototypes]
252 | void btintel_boot_info_tlv(struct hci_dev *hdev,
|      ^~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btintel.c:385:6: warning: no previous prototype for 'btintel_get_fw_name' [-Wmissing-prototypes]
385 | bool btintel_get_fw_name(struct intel_version *ver,
|      ^~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btintel.c:439:6: warning: no previous prototype for 'btintel_get_fw_name_tlv' [-Wmissing-prototypes]
439 | void btintel_get_fw_name_tlv(struct intel_version_tlv *ver,
|      ^~~~~~~~~~~~~~~~~~~~~~~
<<                  from drivers/bluetooth/btintel.c:9:
>> drivers/bluetooth/btintel.c:485:5: warning: no previous prototype for 'btintel_read_version_tlv' [-Wmissing-prototypes]
485 | int btintel_read_version_tlv(struct hci_dev *hdev, bool *is_tlv_format,
|     ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/btintel_read_version_tlv +485 drivers/bluetooth/btintel.c

   484	
 > 485	int btintel_read_version_tlv(struct hci_dev *hdev, bool *is_tlv_format,
   486				     struct sk_buff **skb_out)
   487	{
   488		u8 param;
   489		u8 status;
   490		u8 tlv_check_octet;
   491		u8 *data;
   492		struct sk_buff *skb;
   493	
   494		param = 0xFF;
   495		skb_out = NULL;
   496	
   497		skb = __hci_cmd_sync(hdev,  0xfc05, 1, &param, HCI_CMD_TIMEOUT);
   498		if (IS_ERR(skb)) {
   499			bt_dev_err(hdev, "Intel read version command failed (%ld)",
   500				   PTR_ERR(skb));
   501			return PTR_ERR(skb);
   502		}
   503	
   504		/* Check status */
   505		data = skb->data;
   506		status = *data;
   507		if (status) {
   508			bt_dev_err(hdev, "Intel Read Version failed (%02x)",
   509				   status);
   510			kfree_skb(skb);
   511			return -bt_to_errno(status);
   512		}
   513	
   514		/* There are two variants of HCI_Intel_Read_Version_Command_Complete
   515		 * depending on SKU type (legacy and TLV format).If the skb->len
   516		 * parameter is equal to INTEL_VERSION_LEN  and the first octet
   517		 * after the status parameter is 0x37 then it's the legacy format,
   518		 * otherwise it's TLV format
   519		 */
   520	
   521		/* Fetch the octet after status */
   522		tlv_check_octet = *(data + 1);
   523	
   524		if (skb->len == INTEL_VERSION_LEN && tlv_check_octet == 0x37) {
   525			bt_dev_dbg(hdev, "Using Legacy Intel Version command");
   526			*is_tlv_format = false;
   527		} else {
   528			bt_dev_dbg(hdev, "Using TLV format Version command");
   529			*is_tlv_format = true;
   530		}
   531		*skb_out = skb;
   532		return 0;
   533	}
   534	EXPORT_SYMBOL_GPL(btintel_read_version_tlv);
   535	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux