[PATCH 0/2] staging: rtl8723bs: replace and remove N_BYTE_ALIGMENT()

From: Leonardo Martins Martins

Date: Thu Aug 13 2026 - 20:26:43 EST


The macro N_BYTE_ALIGMENT() is used throughout the driver to perform
byte alignment on pointers with manual castings to unsigned long and
back to the pointer's type, making the code quite verbose.

This series replaces the macro N_BYTE_ALIGMENT() with the standard
PTR_ALIGN() macro.

Note: I've noticed that several of these alignments are called right
after kzalloc() or vzalloc() while aligning to 4, with kzalloc()
guaranteeing at least 8-byte alignment, this alignment is redundant.
I've left it as is since I don't have the hardware to test on and I
couldn't find out whether vzalloc() also guarantees byte alignment.
Please let me know if this change is desired.

Signed-off-by: Leonardo Martins Martins <dev.lmmrtns@xxxxxxxxx>
---
Leonardo Martins Martins (2):
staging: rtl8723bs: replace N_BYTE_ALIGMENT() with PTR_ALIGN()
staging: rtl8723bs: remove unused macro N_BYTE_ALIGMENT()

drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 13 +++++++------
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 3 ++-
drivers/staging/rtl8723bs/include/basic_types.h | 3 ---
4 files changed, 11 insertions(+), 11 deletions(-)
---
base-commit: c6eb4dc5964fdf4086b73b7f0f5dc0d595fb5cf3
change-id: 20260813-staging-testing-b664ef41cd30

Best regards,
--
Leonardo Martins Martins <dev.lmmrtns@xxxxxxxxx>