Qianfeng Rong <rongqianfeng@xxxxxxxx> 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@xxxxxxxx> > Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> 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