From: kernel test robot <lkp@intel.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-bluetooth@vger.kernel.org,
"Luiz Augusto von Dentz" <luiz.von.dentz@intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [bluetooth-next:master 33/71] drivers/bluetooth/btnxpuart.c:844:36: sparse: sparse: incorrect type in argument 3 (different base types)
Date: Sun, 16 Apr 2023 07:32:02 +0800 [thread overview]
Message-ID: <202304160736.Tsa0zTBU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head: 492cf2b505d66b2bc0b50dae1d5e5921978f4802
commit: 2e9632009158054bcb6c1766c6748476db0561a0 [33/71] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets
config: riscv-randconfig-s053-20230416 (https://download.01.org/0day-ci/archive/20230416/202304160736.Tsa0zTBU-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=2e9632009158054bcb6c1766c6748476db0561a0
git remote add bluetooth-next https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
git fetch --no-tags bluetooth-next master
git checkout 2e9632009158054bcb6c1766c6748476db0561a0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/bluetooth/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304160736.Tsa0zTBU-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zihintpause'
drivers/bluetooth/btnxpuart.c:681:23: sparse: sparse: restricted __le16 degrades to integer
drivers/bluetooth/btnxpuart.c:690:82: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:690:82: sparse: expected unsigned short [usertype] req_len
drivers/bluetooth/btnxpuart.c:690:82: sparse: got restricted __le16 [usertype] len
drivers/bluetooth/btnxpuart.c:694:84: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:694:84: sparse: expected unsigned short [usertype] req_len
drivers/bluetooth/btnxpuart.c:694:84: sparse: got restricted __le16 [usertype] len
drivers/bluetooth/btnxpuart.c:708:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] requested_len @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:708:23: sparse: expected unsigned int [usertype] requested_len
drivers/bluetooth/btnxpuart.c:708:23: sparse: got restricted __le16 [usertype] len
drivers/bluetooth/btnxpuart.c:787:78: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] chipid @@ got restricted __le16 [usertype] chip_id @@
drivers/bluetooth/btnxpuart.c:787:78: sparse: expected unsigned short [usertype] chipid
drivers/bluetooth/btnxpuart.c:787:78: sparse: got restricted __le16 [usertype] chip_id
drivers/bluetooth/btnxpuart.c:810:74: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:810:74: sparse: expected unsigned short [usertype] req_len
drivers/bluetooth/btnxpuart.c:810:74: sparse: got restricted __le16 [usertype] len
drivers/bluetooth/btnxpuart.c:815:76: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:815:76: sparse: expected unsigned short [usertype] req_len
drivers/bluetooth/btnxpuart.c:815:76: sparse: got restricted __le16 [usertype] len
drivers/bluetooth/btnxpuart.c:834:16: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:843:55: sparse: sparse: restricted __le32 degrades to integer
>> drivers/bluetooth/btnxpuart.c:844:36: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long [usertype] @@ got restricted __le16 [usertype] len @@
drivers/bluetooth/btnxpuart.c:844:36: sparse: expected unsigned long [usertype]
drivers/bluetooth/btnxpuart.c:844:36: sparse: got restricted __le16 [usertype] len
vim +844 drivers/bluetooth/btnxpuart.c
794
795 static int nxp_recv_fw_req_v3(struct hci_dev *hdev, struct sk_buff *skb)
796 {
797 struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
798 struct v3_data_req *req;
799
800 if (!process_boot_signature(nxpdev))
801 goto free_skb;
802
803 req = (struct v3_data_req *)skb_pull_data(skb, sizeof(struct v3_data_req));
804 if (!req || !nxpdev->fw)
805 goto free_skb;
806
807 nxp_send_ack(NXP_ACK_V3, hdev);
808
809 if (!nxpdev->timeout_changed) {
810 nxpdev->timeout_changed = nxp_fw_change_timeout(hdev, req->len);
811 goto free_skb;
812 }
813
814 if (!nxpdev->baudrate_changed) {
815 nxpdev->baudrate_changed = nxp_fw_change_baudrate(hdev, req->len);
816 if (nxpdev->baudrate_changed) {
817 serdev_device_set_baudrate(nxpdev->serdev,
818 HCI_NXP_SEC_BAUDRATE);
819 serdev_device_set_flow_control(nxpdev->serdev, 1);
820 nxpdev->current_baudrate = HCI_NXP_SEC_BAUDRATE;
821 }
822 goto free_skb;
823 }
824
825 if (req->len == 0) {
826 bt_dev_dbg(hdev, "FW Downloaded Successfully: %zu bytes", nxpdev->fw->size);
827 clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
828 wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q);
829 goto free_skb;
830 }
831 if (req->error)
832 bt_dev_dbg(hdev, "FW Download received err 0x%02x from chip", req->error);
833
834 if (req->offset < nxpdev->fw_v3_offset_correction) {
835 /* This scenario should ideally never occur. But if it ever does,
836 * FW is out of sync and needs a power cycle.
837 */
838 bt_dev_err(hdev, "Something went wrong during FW download. Please power cycle and try again");
839 goto free_skb;
840 }
841
842 serdev_device_write_buf(nxpdev->serdev,
843 nxpdev->fw->data + req->offset - nxpdev->fw_v3_offset_correction,
> 844 req->len);
845
846 free_skb:
847 kfree_skb(skb);
848 return 0;
849 }
850
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-04-15 23:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202304160736.Tsa0zTBU-lkp@intel.com \
--to=lkp@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.com \
--cc=neeraj.sanjaykale@nxp.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).