[ Why is linux-mm CC'd on these patches??? - dan ] tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6553715b6db5ff5d4898895dad1b2926cfe406cf commit: fc342c4dc408754f50f19dc832152fbb4b73f1e6 [7132/11526] Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices config: parisc-randconfig-m031-20210216 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> New smatch warnings: drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: uninitialized symbol 'fw_version'. Old smatch warnings: drivers/bluetooth/btusb.c:2201 btusb_setup_intel() warn: inconsistent indenting vim +/fw_version +3775 drivers/bluetooth/btusb.c a1c49c434e15050 Sean Wang 2019-06-02 3729 static int btusb_mtk_setup(struct hci_dev *hdev) a1c49c434e15050 Sean Wang 2019-06-02 3730 { a1c49c434e15050 Sean Wang 2019-06-02 3731 struct btusb_data *data = hci_get_drvdata(hdev); a1c49c434e15050 Sean Wang 2019-06-02 3732 struct btmtk_hci_wmt_params wmt_params; a1c49c434e15050 Sean Wang 2019-06-02 3733 ktime_t calltime, delta, rettime; a1c49c434e15050 Sean Wang 2019-06-02 3734 struct btmtk_tci_sleep tci_sleep; a1c49c434e15050 Sean Wang 2019-06-02 3735 unsigned long long duration; a1c49c434e15050 Sean Wang 2019-06-02 3736 struct sk_buff *skb; a1c49c434e15050 Sean Wang 2019-06-02 3737 const char *fwname; a1c49c434e15050 Sean Wang 2019-06-02 3738 int err, status; a1c49c434e15050 Sean Wang 2019-06-02 3739 u32 dev_id; fc342c4dc408754 Mark Chen 2021-02-02 3740 char fw_bin_name[64]; fc342c4dc408754 Mark Chen 2021-02-02 3741 u32 fw_version; a1c49c434e15050 Sean Wang 2019-06-02 3742 u8 param; a1c49c434e15050 Sean Wang 2019-06-02 3743 a1c49c434e15050 Sean Wang 2019-06-02 3744 calltime = ktime_get(); a1c49c434e15050 Sean Wang 2019-06-02 3745 48c13301e6baba5 Mark Chen 2021-02-02 3746 err = btusb_mtk_id_get(data, 0x80000008, &dev_id); a1c49c434e15050 Sean Wang 2019-06-02 3747 if (err < 0) { a1c49c434e15050 Sean Wang 2019-06-02 3748 bt_dev_err(hdev, "Failed to get device id (%d)", err); a1c49c434e15050 Sean Wang 2019-06-02 3749 return err; a1c49c434e15050 Sean Wang 2019-06-02 3750 } a1c49c434e15050 Sean Wang 2019-06-02 3751 fc342c4dc408754 Mark Chen 2021-02-02 3752 if (!dev_id) { fc342c4dc408754 Mark Chen 2021-02-02 3753 err = btusb_mtk_id_get(data, 0x70010200, &dev_id); fc342c4dc408754 Mark Chen 2021-02-02 3754 if (err < 0) { fc342c4dc408754 Mark Chen 2021-02-02 3755 bt_dev_err(hdev, "Failed to get device id (%d)", err); fc342c4dc408754 Mark Chen 2021-02-02 3756 return err; fc342c4dc408754 Mark Chen 2021-02-02 3757 } fc342c4dc408754 Mark Chen 2021-02-02 3758 err = btusb_mtk_id_get(data, 0x80021004, &fw_version); fc342c4dc408754 Mark Chen 2021-02-02 3759 if (err < 0) { fc342c4dc408754 Mark Chen 2021-02-02 3760 bt_dev_err(hdev, "Failed to get fw version (%d)", err); fc342c4dc408754 Mark Chen 2021-02-02 3761 return err; fc342c4dc408754 Mark Chen 2021-02-02 3762 } fc342c4dc408754 Mark Chen 2021-02-02 3763 } "fw_version" not initialized on else path. fc342c4dc408754 Mark Chen 2021-02-02 3764 a1c49c434e15050 Sean Wang 2019-06-02 3765 switch (dev_id) { 9ce67c3235be71e Sean Wang 2019-06-02 3766 case 0x7663: 9ce67c3235be71e Sean Wang 2019-06-02 3767 fwname = FIRMWARE_MT7663; 9ce67c3235be71e Sean Wang 2019-06-02 3768 break; a1c49c434e15050 Sean Wang 2019-06-02 3769 case 0x7668: a1c49c434e15050 Sean Wang 2019-06-02 3770 fwname = FIRMWARE_MT7668; a1c49c434e15050 Sean Wang 2019-06-02 3771 break; fc342c4dc408754 Mark Chen 2021-02-02 3772 case 0x7961: fc342c4dc408754 Mark Chen 2021-02-02 3773 snprintf(fw_bin_name, sizeof(fw_bin_name), fc342c4dc408754 Mark Chen 2021-02-02 3774 "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin", fc342c4dc408754 Mark Chen 2021-02-02 @3775 dev_id & 0xffff, (fw_version & 0xff) + 1); ^^^^^^^^^^ fc342c4dc408754 Mark Chen 2021-02-02 3776 err = btusb_mtk_setup_firmware_79xx(hdev, fw_bin_name); fc342c4dc408754 Mark Chen 2021-02-02 3777 fc342c4dc408754 Mark Chen 2021-02-02 3778 /* Enable Bluetooth protocol */ fc342c4dc408754 Mark Chen 2021-02-02 3779 param = 1; fc342c4dc408754 Mark Chen 2021-02-02 3780 wmt_params.op = BTMTK_WMT_FUNC_CTRL; fc342c4dc408754 Mark Chen 2021-02-02 3781 wmt_params.flag = 0; fc342c4dc408754 Mark Chen 2021-02-02 3782 wmt_params.dlen = sizeof(param); fc342c4dc408754 Mark Chen 2021-02-02 3783 wmt_params.data = ¶m; fc342c4dc408754 Mark Chen 2021-02-02 3784 wmt_params.status = NULL; fc342c4dc408754 Mark Chen 2021-02-02 3785 fc342c4dc408754 Mark Chen 2021-02-02 3786 err = btusb_mtk_hci_wmt_sync(hdev, &wmt_params); fc342c4dc408754 Mark Chen 2021-02-02 3787 if (err < 0) { fc342c4dc408754 Mark Chen 2021-02-02 3788 bt_dev_err(hdev, "Failed to send wmt func ctrl (%d)", err); --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@xxxxxxxxxxxx To unsubscribe send an email to kbuild-leave@xxxxxxxxxxxx