* [PATCH] staging: rtl8712: Change type of local variable
@ 2024-03-20 18:53 Ayush Tiwari
2024-03-20 19:19 ` Fabio M. De Francesco
0 siblings, 1 reply; 2+ messages in thread
From: Ayush Tiwari @ 2024-03-20 18:53 UTC (permalink / raw)
To: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel, linux-staging
Cc: outreachy
Change data type of local variable blnPending from u8 to bool since it
only assumes 0 or 1 values.
Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com>
---
drivers/staging/rtl8712/rtl8712_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index bb7db96ed821..32d9927981aa 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -284,7 +284,7 @@ int r8712_cmd_thread(void *context)
pcmd = cmd_hdl_filter(padapter, pcmd);
if (pcmd) { /* if pcmd != NULL, cmd will be handled by f/w */
struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
- u8 blnPending = 0;
+ bool blnPending = 0;
u16 cmdcode = pcmd->cmdcode;
pcmdpriv->cmd_issued_cnt++;
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8712: Change type of local variable
2024-03-20 18:53 [PATCH] staging: rtl8712: Change type of local variable Ayush Tiwari
@ 2024-03-20 19:19 ` Fabio M. De Francesco
0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. De Francesco @ 2024-03-20 19:19 UTC (permalink / raw)
To: Ayush Tiwari
Cc: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel,
linux-staging, outreachy
On Wednesday, 20 March 2024 19:53:50 CET Ayush Tiwari wrote:
> Change data type of local variable blnPending from u8 to bool since it
> only assumes 0 or 1 values.
>
> Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com>
> ---
> drivers/staging/rtl8712/rtl8712_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c
> b/drivers/staging/rtl8712/rtl8712_cmd.c index bb7db96ed821..32d9927981aa
> 100644
> --- a/drivers/staging/rtl8712/rtl8712_cmd.c
> +++ b/drivers/staging/rtl8712/rtl8712_cmd.c
> @@ -284,7 +284,7 @@ int r8712_cmd_thread(void *context)
> pcmd = cmd_hdl_filter(padapter, pcmd);
> if (pcmd) { /* if pcmd != NULL, cmd will be handled by
f/w */
> struct dvobj_priv *pdvobj = &padapter-
>dvobjpriv;
> - u8 blnPending = 0;
> + bool blnPending = 0;
bool types should take only 'true' and 'false' values. Therefore, if you
change a type to 'bool' you should also convert the values it is assigned
throughout its lifetime.
Fabio
P.S.: I just recalled that Dan has asked you to drop that 'b' prefix and do
exactly what I wrote above. Are you going to ignore his comments?
> u16 cmdcode = pcmd->cmdcode;
>
> pcmdpriv->cmd_issued_cnt++;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-20 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 18:53 [PATCH] staging: rtl8712: Change type of local variable Ayush Tiwari
2024-03-20 19:19 ` Fabio M. De Francesco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).