[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eb1ba911-a34d-4c18-a7f6-dbc75a5b4e0d@RTKEXHMBS06.realtek.com.tw>
Date: Mon, 1 Sep 2025 11:39:33 +0800
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Qianfeng Rong <rongqianfeng@...o.com>, Ping-Ke Shih <pkshih@...ltek.com>,
<linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Qianfeng Rong <rongqianfeng@...o.com>
Subject: Re: [PATCH v2] wifi: rtw89: use int type to store negative error codes
Qianfeng Rong <rongqianfeng@...o.com> wrote:
> The 'ret' variable stores returns from other functions, which return
> either zero on success or negative error codes on failure. Storing
> error codes in u32 (an unsigned type) causes no runtime issues but is
> stylistically inconsistent and very ugly. Change 'ret' from u32 to
> int - this has no runtime impact.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>
> Acked-by: Ping-Ke Shih <pkshih@...ltek.com>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
a650d86bcaf5 wifi: rtw89: use int type to store negative error codes
With below changes because of smatch warning:
rtw89/mac.c:1197 rtw89_mac_hfc_init() warn: missing error code? 'ret'
Changes:
The change of 'int' type seemingly give smatch a hint to treat 'ret'
as error code, detecting if we miss to assign proper error code.
@@ -1194,7 +1194,7 @@ int rtw89_mac_hfc_init(struct rtw89_dev *rtwdev, bool reset, bool en, bool h2c_e
if (!en && h2c_en) {
mac->hfc_h2c_cfg(rtwdev);
mac->hfc_func_en(rtwdev, en, h2c_en);
- return ret;
+ return 0;
}
for (ch = RTW89_DMA_ACH0; ch < RTW89_DMA_H2C; ch++) {
---
https://github.com/pkshih/rtw.git
Powered by blists - more mailing lists