The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: Use PTR_ALIGN for rsp_buf alignment
@ 2026-06-03 18:26 Parsal Baral
  2026-07-07 10:58 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Parsal Baral @ 2026-06-03 18:26 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Parsal Baral

Replace manual pointer alignment calculation with the standard PTR_ALIGN
macro for rsp_buf in rtw_init_cmd_priv()

Follows modernization of cmd_buf alignment in commit 69dc48dc5506
("staging: rtl8723bs: use PTR_ALIGN for buffer alignment")

Compile-tested only

Signed-off-by: Parsal Baral <parsalbaral@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c1185c25e..38ce3156c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -184,7 +184,7 @@ 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 = PTR_ALIGN(pcmdpriv->rsp_allocated_buf, 4);
 
 	pcmdpriv->cmd_issued_cnt = 0;
 	pcmdpriv->cmd_done_cnt = 0;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-07 12:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 18:26 [PATCH] staging: rtl8723bs: Use PTR_ALIGN for rsp_buf alignment Parsal Baral
2026-07-07 10:58 ` Greg KH
2026-07-07 12:03   ` Parsal Baral

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox