Re: [PATCH] staging: rtl8723bs: remove unused macros from wifi.h

From: Greg Kroah-Hartman

Date: Thu Oct 22 2026 - 00:42:29 EST


On Wed, Oct 21, 2026 at 10:46:33PM +0200, Yaroslav Shevchenko wrote:
> SetFrameType(), SetFragNum(), GetOrderBit(), ACT_CAT_VENDOR,
> _IEEE8021X_MGT_ and _IEEE8021X_PSK_ are defined in wifi.h but have no
> users anywhere in the tree.
>
> Three of them are also broken. GetOrderBit() duplicates GetOrder(),
> which is used by rtw_recv.c, but casts the frame header to
> "unsigned short" instead of __le16 while masking it against a
> cpu_to_le16() value. SetFrameType() has the same type confusion,
> whereas the SetFrameSubType() macro next to it casts to __le16 as it
> should. SetFragNum() passes a constant mask through le16_to_cpu()
> where cpu_to_le16() is needed.
>
> Since these macros are never expanded, neither the compiler nor sparse
> flags any of this, so the first user of them would inherit the bugs.
> Drop them rather than fix dead code.
>
> No functional change intended. Built for arm64 with W=1, no new
> warnings.
>
> Signed-off-by: Yaroslav Shevchenko <yros22776@xxxxxxxxx>
> Assisted-by: LLM

Please read https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh