tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 210f388d2ecd2c6aa08e0c97d0abb9f50a98e143
commit: aa8cabb7e77643809d00003ffa1f8187294b9ab2 [51/52] BACKPORT: UPSTREAM: Bluetooth:
btusb: Add support to read Intel debug feature
config: arm64-randconfig-r001-20200820 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b587ca93be114d07ec3bf654add97d7872325281)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout aa8cabb7e77643809d00003ffa1f8187294b9ab2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
include/linux/rhashtable.h:289:34: warning: comparison of integers of different signs:
'int' and 'const unsigned int' [-Wsign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
include/linux/rhashtable.h:302:34: warning: comparison of integers of different signs:
'int' and 'const unsigned int' [-Wsign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:51:
include/linux/netdevice.h:2413:34: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
skb_checksum_start_offset(skb) <
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/netdevice.h:3051:15: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
~~~~~ ^ ~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:58:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:182:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:51:
include/linux/netdevice.h:3325:37: warning: comparison of integers of different signs:
'int' and 'unsigned long' [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:58:
In file included from include/linux/memcontrol.h:30:
In file included from include/linux/writeback.h:192:
include/linux/bio.h:424:14: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
if (sectors >= bio_sectors(bio))
~~~~~~~ ^ ~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
In file included from include/net/sch_generic.h:12:
In file included from include/net/rtnetlink.h:5:
include/net/netlink.h:345:18: warning: comparison of integers of different signs:
'const __u32' (aka 'const unsigned int') and 'int'
[-Wsign-compare]
nlh->nlmsg_len <= remaining);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~
include/net/netlink.h:380:21: warning: comparison of integers of different signs:
'const __u32' (aka 'const unsigned int') and 'int'
[-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
include/net/netlink.h:413:21: warning: comparison of integers of different signs:
'const __u32' (aka 'const unsigned int') and 'int'
[-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
In file included from include/net/sch_generic.h:12:
include/net/rtnetlink.h:20:21: warning: comparison of integers of different signs:
'int' and 'unsigned long' [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
include/net/sch_generic.h:267:33: warning: comparison of integers of different signs:
'unsigned long' and 'int' [-Wsign-compare]
BUILD_BUG_ON(sizeof(qcb->data) < sz);
~~~~~~~~~~~~~~~~~ ^ ~~
include/linux/build_bug.h:71:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:47:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler.h:509:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler.h:497:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler.h:489:19: note: expanded from macro
'__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
include/linux/filter.h:517:16: warning: comparison of integers of different signs:
'const __u32' (aka 'const unsigned int') and 'int'
[-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
include/net/sock.h:1878:54: warning: comparison of integers of different signs:
'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (csum_and_copy_from_iter(to, copy, &csum, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
include/net/sock.h:1882:46: warning: comparison of integers of different signs:
'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (copy_from_iter_nocache(to, copy, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
include/net/sock.h:1884:44: warning: comparison of integers of different signs:
'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
} else if (copy_from_iter(to, copy, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
drivers/bluetooth/btintel.c:288:18: warning: comparison of integers of different signs:
'const size_t' (aka 'const unsigned long') and 'long'
[-Wsign-compare]
while (fw->size > fw_ptr - fw->data) {
~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
> drivers/bluetooth/btintel.c:715:27: warning: comparison of
integers of different signs: 'long' and 'const size_t' (aka 'const
unsigned long') [-Wsign-compare]
while (fw_ptr - fw->data <
fw->size) {
~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
26 warnings generated.
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout aa8cabb7e77643809d00003ffa1f8187294b9ab2
vim +715 drivers/bluetooth/btintel.c
677
678 int btintel_download_firmware(struct hci_dev *hdev, const struct firmware *fw,
679 u32 *boot_param)
680 {
681 int err;
682 const u8 *fw_ptr;
683 u32 frag_len;
684
685 /* Start the firmware download transaction with the Init fragment
686 * represented by the 128 bytes of CSS header.
687 */
688 err = btintel_secure_send(hdev, 0x00, 128, fw->data);
689 if (err < 0) {
690 bt_dev_err(hdev, "Failed to send firmware header (%d)", err);
691 goto done;
692 }
693
694 /* Send the 256 bytes of public key information from the firmware
695 * as the PKey fragment.
696 */
697 err = btintel_secure_send(hdev, 0x03, 256, fw->data + 128);
698 if (err < 0) {
699 bt_dev_err(hdev, "Failed to send firmware pkey (%d)", err);
700 goto done;
701 }
702
703 /* Send the 256 bytes of signature information from the firmware
704 * as the Sign fragment.
705 */
706 err = btintel_secure_send(hdev, 0x02, 256, fw->data + 388);
707 if (err < 0) {
708 bt_dev_err(hdev, "Failed to send firmware signature (%d)", err);
709 goto done;
710 }
711
712 fw_ptr = fw->data + 644;
713 frag_len = 0;
714
715 while (fw_ptr - fw->data < fw->size) {
716 struct hci_command_hdr *cmd = (void *)(fw_ptr + frag_len);
717
718 /* Each SKU has a different reset parameter to use in the
719 * HCI_Intel_Reset command and it is embedded in the firmware
720 * data. So, instead of using static value per SKU, check
721 * the firmware data and save it for later use.
722 */
723 if (le16_to_cpu(cmd->opcode) == 0xfc0e) {
724 /* The boot parameter is the first 32-bit value
725 * and rest of 3 octets are reserved.
726 */
727 *boot_param = __get_unaligned_cpu32(fw_ptr + sizeof(*cmd));
728
729
730 bt_dev_dbg(hdev, "boot_param=0x%x", *boot_param);
731 }
732
733 frag_len += sizeof(*cmd) + cmd->plen;
734
735 /* The parameter length of the secure send command requires
736 * a 4 byte alignment. It happens so that the firmware file
737 * contains proper Intel_NOP commands to align the fragments
738 * as needed.
739 *
740 * Send set of commands with 4 byte alignment from the
741 * firmware data buffer as a single Data fragement.
742 */
743 if (!(frag_len % 4)) {
744 err = btintel_secure_send(hdev, 0x01, frag_len, fw_ptr);
745 if (err < 0) {
746 bt_dev_err(hdev,
747 "Failed to send firmware data (%d)",
748 err);
749 goto done;
750 }
751
752 fw_ptr += frag_len;
753 frag_len = 0;
754 }
755 }
756
757 done:
758 return err;
759 }
760 EXPORT_SYMBOL_GPL(btintel_download_firmware);
761
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org