Re: [PATCH] staging: rtl8723bs: convert int16_t to s16
From: Dan Carpenter
Date: Mon Apr 13 2026 - 10:50:11 EST
On Mon, Apr 13, 2026 at 04:33:20PM +0200, deep@xxxxxxxxxxxxxxxxxx wrote:
> From: Kenet Jovan Sokoli <deep@xxxxxxxxxxxxxxxxxx>
>
> The TODO list for the rtl8723bs driver mentions the conversion of
> unusual variable types to the preferred kernel style. Convert the
> "power_limit" variable in include/wifi.h from int16_t to s16.
>
> Signed-off-by: Kenet Jovan Sokoli <deep@xxxxxxxxxxxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/include/wifi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h
> index 230b2c4ffd3b..8ab0cb6ba344 100644
> --- a/drivers/staging/rtl8723bs/include/wifi.h
> +++ b/drivers/staging/rtl8723bs/include/wifi.h
> @@ -457,7 +457,7 @@ struct rtw_regulatory {
> u32 tp_scale;
> u16 current_rd;
> u16 current_rd_ext;
> - int16_t power_limit;
> + s16 power_limit;
Generally, variables like s16 and s32 should only be used when they
are defined by a hardware or protocol spec. You should just use
short and int for normal code.
In this case, the rtw_regulatory is never really used. There are
a few functions which take it as a parameter they aren't used and
we always pass NULL pointers to them.
Cleanup the functions and then delete the whole struct rtw_regulatory
and struct.
regards,
dan carpenter
> struct regd_pair_mapping *regpair;
> };