Hi Rocky,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linus/master v5.9-rc5 next-20200914]
[cannot apply to linux/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/Rocky-Liao/Bluetooth-btusb-Add-Q...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
master
config: mips-randconfig-s031-20200913 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1798:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1802:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1806:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1810:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:1814:18: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2324:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2333:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2334:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btusb.c:2335:25: sparse: sparse: cast to restricted __le16
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to
restricted __le32
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
> drivers/bluetooth/btusb.c:3584:28: sparse: sparse: cast to restricted __le32
#
https://github.com/0day-ci/linux/commit/9efa46880370bdf87d87ebc14f562fc9d...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Rocky-Liao/Bluetooth-btusb-Add-Qualcomm-Bluetooth-SoC-WCN6855-support/20200914-172810
git checkout 9efa46880370bdf87d87ebc14f562fc9d3cbfa01
vim +3584 drivers/bluetooth/btusb.c
3552
3553 static int btusb_setup_qca_load_rampatch(struct hci_dev *hdev,
3554 struct qca_version *ver,
3555 const struct qca_device_info *info)
3556 {
3557 struct qca_rampatch_version *rver;
3558 const struct firmware *fw;
3559 u32 ver_rom, ver_patch, rver_rom;
3560 u16 rver_rom_low, rver_rom_high, rver_patch;
3561 char fwname[64];
3562 int err;
3563
3564 ver_rom = le32_to_cpu(ver->rom_version);
3565 ver_patch = le32_to_cpu(ver->patch_version);
3566
3567 snprintf(fwname, sizeof(fwname), "qca/rampatch_usb_%08x.bin", ver_rom);
3568
3569 err = request_firmware(&fw, fwname, &hdev->dev);
3570 if (err) {
3571 bt_dev_err(hdev, "failed to request rampatch file: %s (%d)",
3572 fwname, err);
3573 return err;
3574 }
3575
3576 bt_dev_info(hdev, "using rampatch file: %s", fwname);
3577
3578 rver = (struct qca_rampatch_version *)(fw->data + info->ver_offset);
3579 rver_rom_low = le16_to_cpu(rver->rom_version);
3580 rver_patch = le16_to_cpu(rver->patch_version);
3581
3582 if (ver_rom & ~0xffffU) {
3583 rver_rom_high = le16_to_cpu(*(__le16 *)(fw->data + 16));
3584 rver_rom = le32_to_cpu(rver_rom_high << 16 |
rver_rom_low);
3585 } else {
3586 rver_rom = (__force u32)rver_rom_low;
3587 }
3588
3589 bt_dev_info(hdev, "QCA: patch rome 0x%x build 0x%x, "
3590 "firmware rome 0x%x build 0x%x",
3591 rver_rom, rver_patch, ver_rom, ver_patch);
3592
3593 if (rver_rom != ver_rom || rver_patch <= ver_patch) {
3594 bt_dev_err(hdev, "rampatch file version did not match with firmware");
3595 err = -EINVAL;
3596 goto done;
3597 }
3598
3599 err = btusb_setup_qca_download_fw(hdev, fw, info->rampatch_hdr);
3600
3601 done:
3602 release_firmware(fw);
3603
3604 return err;
3605 }
3606
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org