]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: pci: use 'int' as return type of error code in poll_{tx,rx}dma_ch_idle()
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 9 Oct 2024 00:42:56 +0000 (08:42 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Sun, 20 Oct 2024 02:31:24 +0000 (10:31 +0800)
The return type of error code of read_poll_timeout() and
rtw89_pci_poll_{tx,rx}dma_ch_idle_ax() and must be 'int'.
Correct them accordingly.

Addresses-Coverity-ID: 1622341 ("Overflowed constant")
Addresses-Coverity-ID: 1627296 ("Overflowed constant")

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241009004300.8144-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c

index 5ed7eaa18c85b09c9acb5ee3abd064ea4475c605..b0753dd2e54c1279d60644c157f5cb40f28c0aad 100644 (file)
@@ -2671,9 +2671,10 @@ static void rtw89_pci_clr_idx_all_ax(struct rtw89_dev *rtwdev)
 static int rtw89_pci_poll_txdma_ch_idle_ax(struct rtw89_dev *rtwdev)
 {
        const struct rtw89_pci_info *info = rtwdev->pci_info;
-       u32 ret, check, dma_busy;
        u32 dma_busy1 = info->dma_busy1.addr;
        u32 dma_busy2 = info->dma_busy2_reg;
+       u32 check, dma_busy;
+       int ret;
 
        check = info->dma_busy1.mask;
 
@@ -2698,8 +2699,9 @@ static int rtw89_pci_poll_txdma_ch_idle_ax(struct rtw89_dev *rtwdev)
 static int rtw89_pci_poll_rxdma_ch_idle_ax(struct rtw89_dev *rtwdev)
 {
        const struct rtw89_pci_info *info = rtwdev->pci_info;
-       u32 ret, check, dma_busy;
        u32 dma_busy3 = info->dma_busy3_reg;
+       u32 check, dma_busy;
+       int ret;
 
        check = B_AX_RXQ_BUSY | B_AX_RPQ_BUSY;