Re: [PATCH] staging: rtl8723bs: use unsigned int in HAL interface

From: Dan Carpenter

Date: Sat Sep 26 2026 - 09:00:14 EST


On Sat, Sep 26, 2026 at 03:51:50PM +0300, Artem Shelenko wrote:
> The rtl8723bs TODO asks to convert remaining unusual variable types.
>
> Replace uses of the uint typedef with unsigned int in rtw_hal_init()
> and rtw_hal_deinit(), including their local status variables and
> declarations. uint is a typedef for unsigned int, so this does not
> change behavior.
>

This sort of patch isn't the correct thing. These functions should
be changed to return zero on success and standard negative error codes
on failure.

It's actually a good thing when bad code looks bad because then there
are tools which complain about it and it motivates people to fix it
correctly. That's the whole point of static checkers to complain about
bad code, so we're working against ourselves by silencing the checkers.

regards,
dan carpenter