Skip to content

staging: rtl8723bs: replace and remove N_BYTE_ALIGMENT()

Leonardo Martins Martins linux-staging lkml 1 version New

Get series with b4
b4 am [email protected] change-id 20260813-staging-testing-b664ef41cd30

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2staging: rtl8723bs: replace N_BYTE_ALIGMENT() with PTR_ALIGN()drivers/staging/rtl8723bs/core/rtw_recv.c drivers/staging/rtl8723bs/core/rtw_xmit.c drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c+11 -80 replies
2/2staging: rtl8723bs: remove unused macro N_BYTE_ALIGMENT()drivers/staging/rtl8723bs/include/basic_types.h+0 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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.

---
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,

Signature · 1 line
Leonardo Martins Martins <[email protected]>