From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michael Huang <tehsiu.huang@gmail.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
Joe Perches <joe@perches.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: refactor BSS Coexistence channel report logic
Date: Thu, 29 Jan 2026 09:54:35 +0100 [thread overview]
Message-ID: <2026012943-danger-tweed-8f81@gregkh> (raw)
In-Reply-To: <20260129080110.73884-1-tehsiu.huang@gmail.com>
On Thu, Jan 29, 2026 at 12:01:10AM -0800, Michael Huang wrote:
> Refactor the 'ICS' array in issue_action_BSSCoexistPacket() to improve
> readability and maintainability. This addresses technical debt related
> to magic numbers and ambiguous array usage.
>
> The original implementation used a multi-purpose 2D array (ICS[8][15])
> where magic numbers were prevalent and the first element of each row
> was overloaded as a status flag. This patch:
>
> - Introduces descriptive macros: BSS_COEX_MAX_CLASSES,
> BSS_COEX_MAX_CHANNELS, and BSS_COEX_MAX_INFO_LEN.
> - Splits the overloaded array into two distinct boolean arrays:
> 'class_active' (for group status) and 'ch_present' (for channel data).
> - Converts the logic to use 'bool' types and 0-indexed loops,
> conforming to standard C programming practices.
> - Adds defensive boundary checks (ch > 0 && ch < MAX) to ensure
> robustness against unexpected channel data.
That's a lot of different things all in one single patch. SHouldn't
this be split up into different ones?
And did you use AI to generate this patch?
Also, how was this tested? What prompted you to want to make this
change in the first place?
thanks,
greg k-h
next prev parent reply other threads:[~2026-01-29 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 20:45 [PATCH] staging: rtl8723bs: refactor BSS Coexistence channel report logic Michael Huang
2026-01-29 6:55 ` Dan Carpenter
2026-01-29 8:01 ` [PATCH v2] " Michael Huang
2026-01-29 8:54 ` Greg Kroah-Hartman [this message]
2026-01-29 9:54 ` Te-Hsiu Huang
2026-01-29 14:14 ` Greg Kroah-Hartman
2026-01-29 18:46 ` Te-Hsiu Huang
2026-01-30 8:30 ` Dan Carpenter
2026-01-30 9:46 ` Te-Hsiu Huang
2026-01-29 8:05 ` [PATCH] " Te-Hsiu Huang
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=2026012943-danger-tweed-8f81@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dan.carpenter@linaro.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=tehsiu.huang@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