From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Dan Carpenter" <error27@gmail.com>,
"Adith-Joshua" <adithalex29@gmail.com>
Cc: <gregkh@linuxfoundation.org>, <linux-staging@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, <straube.linux@gmail.com>
Subject: Re: [PATCH] staging: rtl8723bs: replace magic numbers with named constants
Date: Sat, 11 Apr 2026 19:20:50 +0200 [thread overview]
Message-ID: <DHQHYBE1WRCM.3TBPBI4T5CFS4@linux.dev> (raw)
In-Reply-To: <adoBQ8skQ7aRXKNr@stanley.mountain>
On Sat Apr 11, 2026 at 10:07 AM CEST, Dan Carpenter wrote:
> On Sat, Apr 11, 2026 at 10:58:17AM +0530, Adith-Joshua wrote:
>> Replace hardcoded magic numbers in rtl8723b_InitBeaconParameters()
>> with descriptive macros to improve readability and maintainability.
>>
>> No functional changes.
>>
>> Signed-off-by: Adith-Joshua <adithalex29@gmail.com>
>> ---
>
> Where did you find these numbers? Presumably there is a spec
> somewhere? What does BCNTCFG_CW mean? This really looks like an AI
> patch...
>
> regards,
> dan carpenter
Hi Dan,
I believe you are right about this patch being written by AI.
As I noted in my other reply, if you cross-reference these registers
with the primary upstream driver
(drivers/net/wireless/realtek/rtw88/reg.h), the field mappings
introduced in this patch are actually backwards. It looks like an AI saw
the 0x660F magic number and hallucinated that 0x66 was the aifs and 0x0F
was the cw, when in reality aifs occupies the lower 8 bits. It also
hallucinates an _MS suffix based on a loose code comment, completely
ignoring that 802.11 beacon offsets use time units (TU).
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-04-11 17:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 5:28 [PATCH] staging: rtl8723bs: replace magic numbers with named constants Adith-Joshua
2026-04-11 8:07 ` Dan Carpenter
2026-04-11 17:20 ` Luka Gejak [this message]
2026-04-11 17:15 ` Luka Gejak
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=DHQHYBE1WRCM.3TBPBI4T5CFS4@linux.dev \
--to=luka.gejak@linux.dev \
--cc=adithalex29@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@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