* [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c
@ 2026-05-25 20:10 Krzysztof Woś
2026-05-25 20:23 ` Ahmet Sezgin Duran
2026-06-02 23:29 ` Andy Shevchenko
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Woś @ 2026-05-25 20:10 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging
Cc: linux-kernel, khushalchitturi, architanant5, s9430939,
andriy.shevchenko, kees, Krzysztof Woś
Fix spdx comment style and indentation in rtw_cmd.c to resolve
errors and warnings reported by checkpatch.pl.
Signed-off-by: Krzysztof Woś <krzysztofina2022@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c1185c25ed36..dac7a615d158 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -184,7 +184,8 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
return -ENOMEM;
}
- pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
+ pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
+ ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
pcmdpriv->cmd_issued_cnt = 0;
pcmdpriv->cmd_done_cnt = 0;
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c
2026-05-25 20:10 [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c Krzysztof Woś
@ 2026-05-25 20:23 ` Ahmet Sezgin Duran
2026-06-02 23:29 ` Andy Shevchenko
1 sibling, 0 replies; 4+ messages in thread
From: Ahmet Sezgin Duran @ 2026-05-25 20:23 UTC (permalink / raw)
To: Krzysztof Woś, Greg Kroah-Hartman, linux-staging
Cc: linux-kernel, khushalchitturi, architanant5, s9430939,
andriy.shevchenko, kees
On 5/25/26 11:10 PM, Krzysztof Woś wrote:
> Fix spdx comment style and indentation in rtw_cmd.c to resolve
> errors and warnings reported by checkpatch.pl.
>
> Signed-off-by: Krzysztof Woś <krzysztofina2022@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index c1185c25ed36..dac7a615d158 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -184,7 +184,8 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
> return -ENOMEM;
> }
>
> - pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
> + pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
> + ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
>
> pcmdpriv->cmd_issued_cnt = 0;
> pcmdpriv->cmd_done_cnt = 0;
Does not apply to staging-testing branch.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c
2026-05-25 20:10 [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c Krzysztof Woś
2026-05-25 20:23 ` Ahmet Sezgin Duran
@ 2026-06-02 23:29 ` Andy Shevchenko
2026-06-03 0:15 ` Andy Shevchenko
1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2026-06-02 23:29 UTC (permalink / raw)
To: Krzysztof Woś
Cc: Greg Kroah-Hartman, linux-staging, linux-kernel, khushalchitturi,
architanant5, s9430939, kees
On Mon, May 25, 2026 at 10:10:01PM +0200, Krzysztof Woś wrote:
> Fix spdx comment style and indentation in rtw_cmd.c to resolve
> errors and warnings reported by checkpatch.pl.
...
> - pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
> + pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
> + ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
Is this the only single issue of the type in the entire driver?
Also, now it's harder to read. What this code does is as simple as
pcmdpriv->rsp_buf = ALIGN(pcmdpriv->rsp_allocated_buf, 4);
(need linux/align.h to be included).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c
2026-06-02 23:29 ` Andy Shevchenko
@ 2026-06-03 0:15 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-06-03 0:15 UTC (permalink / raw)
To: Krzysztof Woś
Cc: Greg Kroah-Hartman, linux-staging, linux-kernel, khushalchitturi,
architanant5, s9430939, kees
On Wed, Jun 03, 2026 at 02:29:50AM +0300, Andy Shevchenko wrote:
> On Mon, May 25, 2026 at 10:10:01PM +0200, Krzysztof Woś wrote:
...
> > - pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
> > + pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
> > + ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
>
> Is this the only single issue of the type in the entire driver?
>
> Also, now it's harder to read. What this code does is as simple as
>
> pcmdpriv->rsp_buf = ALIGN(pcmdpriv->rsp_allocated_buf, 4);
Actually it is off-by-one kinda case, so, please double check the result for
last two bits being 0. If the rsp_allocated_buf is byte type (or void *), the
proper one most likely will be
pcmdpriv->rsp_buf = ALIGN(pcmdpriv->rsp_allocated_buf + 1, 4);
> (need linux/align.h to be included).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-03 0:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25 20:10 [PATCH] staging: rtl8723bs: fix coding style in rtw_cmd.c Krzysztof Woś
2026-05-25 20:23 ` Ahmet Sezgin Duran
2026-06-02 23:29 ` Andy Shevchenko
2026-06-03 0:15 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox