From: Kalle Valo <kvalo@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, Sascha Hauer <s.hauer@pengutronix.de>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: drivers/net/wireless/realtek/rtw88/mac.c:748 __rtw_download_firmware() warn: missing unwind goto?
Date: Tue, 06 Jun 2023 16:34:06 +0300 [thread overview]
Message-ID: <87r0qoiuk1.fsf@kernel.org> (raw)
In-Reply-To: <291c3208-39c1-4eb5-bbca-b1331c346782@kadam.mountain> (Dan Carpenter's message of "Tue, 6 Jun 2023 08:34:57 +0300")
Adding linux-wireless, top posting so that the whole report is included.
Dan Carpenter <dan.carpenter@linaro.org> writes:
> Hi Sascha,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 9561de3a55bed6bdd44a12820ba81ec416e705a7
> commit: 45794099f5e1d7abc5eb07e6eec7e1e5c6cb540d wifi: rtw88: Add
> rtw8822bu chipset support
> config: riscv-randconfig-m031-20230605
> (https://download.01.org/0day-ci/archive/20230605/202306052310.OVhcUjZ3-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 12.3.0
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202306052310.OVhcUjZ3-lkp@intel.com/
>
> smatch warnings:
> drivers/net/wireless/realtek/rtw88/mac.c:748 __rtw_download_firmware()
> warn: missing unwind goto?
>
> vim +748 drivers/net/wireless/realtek/rtw88/mac.c
>
> 3d8bf50860c7de Yan-Hsuan Chuang 2020-04-24 717 static int
> __rtw_download_firmware(struct rtw_dev *rtwdev,
> 3d8bf50860c7de Yan-Hsuan Chuang 2020-04-24 718 struct rtw_fw_state
> *fw)
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 719 {
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 720 struct rtw_backup_info
> bckp[DLFW_RESTORE_REG_NUM];
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 721 const u8 *data =
> fw->firmware->data;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 722 u32 size = fw->firmware->size;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 723 u32 ltecoex_bckp;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 724 int ret;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 725
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 726 if
> (!check_firmware_size(data, size))
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 727 return -EINVAL;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 728
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 729 if
> (!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 730 return -EBUSY;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 731
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 732 wlan_cpu_enable(rtwdev,
> false);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 733
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 734
> download_firmware_reg_backup(rtwdev, bckp);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 735
> download_firmware_reset_platform(rtwdev);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 736
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 737 ret =
> start_download_firmware(rtwdev, data, size);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 738 if (ret)
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 739 goto dlfw_fail;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 740
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 741
> download_firmware_reg_restore(rtwdev, bckp, DLFW_RESTORE_REG_NUM);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 742
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 743
> download_firmware_end_flow(rtwdev);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 744
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 745 wlan_cpu_enable(rtwdev, true);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 746
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 747 if
> (!ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp))
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 @748 return -EBUSY;
>
> All the other error paths goto dlfw_fail;
>
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 749
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 750 ret =
> download_firmware_validate(rtwdev);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 751 if (ret)
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 752 goto dlfw_fail;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 753
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 754 /* reset desc and index */
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 755 rtw_hci_setup(rtwdev);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 756
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 757 rtwdev->h2c.last_box_num = 0;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 758 rtwdev->h2c.seq = 0;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 759
> 3c519605850890 Yan-Hsuan Chuang 2019-10-02 760
> set_bit(RTW_FLAG_FW_RUNNING, rtwdev->flags);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 761
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 762 return 0;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 763
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 764 dlfw_fail:
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 765 /* Disable FWDL_EN */
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 766 rtw_write8_clr(rtwdev,
> REG_MCUFW_CTRL, BIT_MCUFWDL_EN);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 767 rtw_write8_set(rtwdev,
> REG_SYS_FUNC_EN + 1, BIT_FEN_CPUEN);
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 768
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 769 return ret;
> e3037485c68ec1 Yan-Hsuan Chuang 2019-04-26 770 }
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next parent reply other threads:[~2023-06-06 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <291c3208-39c1-4eb5-bbca-b1331c346782@kadam.mountain>
2023-06-06 13:34 ` Kalle Valo [this message]
2023-06-07 0:39 ` drivers/net/wireless/realtek/rtw88/mac.c:748 __rtw_download_firmware() warn: missing unwind goto? Ping-Ke Shih
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=87r0qoiuk1.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=s.hauer@pengutronix.de \
/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).