* [PATCH] staging: rtl8723bs: convert int16_t to s16
@ 2026-04-13 14:33 deep
2026-04-13 14:44 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: deep @ 2026-04-13 14:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Kenet Jovan Sokoli
From: Kenet Jovan Sokoli <deep@crimson.net.eu.org>
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@crimson.net.eu.org>
---
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;
struct regd_pair_mapping *regpair;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: convert int16_t to s16
2026-04-13 14:33 [PATCH] staging: rtl8723bs: convert int16_t to s16 deep
@ 2026-04-13 14:44 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-04-13 14:44 UTC (permalink / raw)
To: deep; +Cc: gregkh, linux-staging, linux-kernel
On Mon, Apr 13, 2026 at 04:33:20PM +0200, deep@crimson.net.eu.org wrote:
> From: Kenet Jovan Sokoli <deep@crimson.net.eu.org>
>
> 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@crimson.net.eu.org>
> ---
> 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;
> };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-13 14:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 14:33 [PATCH] staging: rtl8723bs: convert int16_t to s16 deep
2026-04-13 14:44 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox