drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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
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
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
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
© 2016 - 2026 Red Hat, Inc.