From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Mark Chen <Mark-YW.Chen@mediatek.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Marcel Holtmann <marcel@holtmann.org>
Subject: [kbuild] [linux-next:master 7132/11526] drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: uninitialized symbol 'fw_version'.
Date: Wed, 17 Feb 2021 10:49:46 +0300 [thread overview]
Message-ID: <20210217074946.GI2222@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 5264 bytes --]
[ 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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30386 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next reply other threads:[~2021-02-17 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 7:49 Dan Carpenter [this message]
2021-05-20 1:58 ` [kbuild-all] " Philip Li
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=20210217074946.GI2222@kadam \
--to=dan.carpenter@oracle.com \
--cc=Mark-YW.Chen@mediatek.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=marcel@holtmann.org \
/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