mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Yaroslav Shevchenko <yros22776@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove unused macros from wifi.h
Date: Thu, 22 Oct 2026 06:39:07 +0200	[thread overview]
Message-ID: <2026102202-venomous-nuclei-8d6a@gregkh> (raw)
In-Reply-To: <20261021204633.33067-1-yros22776@gmail.com>

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@gmail.com>
> Assisted-by: LLM

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

      reply	other threads:[~2026-10-22  4:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 20:46 Yaroslav Shevchenko
2026-10-22  4:39 ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026102202-venomous-nuclei-8d6a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=yros22776@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®