From: Dan Carpenter <error27@gmail.com>
To: Serhat Kumral <serhatkumral1@gmail.com>
Cc: linux-staging@lists.linux.dev, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, lgs201920130244@gmail.com,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH v2] staging: rtl8723bs: simplify rtw_spt_band_alloc
Date: Tue, 23 Jun 2026 08:21:12 +0300 [thread overview]
Message-ID: <ajoXyBs3CvAzea0r@stanley.mountain> (raw)
In-Reply-To: <20260622160947.7970-1-serhatkumral1@gmail.com>
On Mon, Jun 22, 2026 at 07:09:47PM +0300, Serhat Kumral wrote:
> The function only supports NL80211_BAND_2GHZ and falls through to
> exit for any other band. Replace the n_channels and n_bitrates local
> variables with the compile-time constants RTW_2G_CHANNELS_NUM and
> RTW_G_RATES_NUM directly.
>
> Use simple addition in kzalloc() instead of chained size_add() calls,
> since the sizes are derived from compile-time constants and cannot
> overflow. Replace the intermediate alloc_sz variable accordingly.
>
> Remove the redundant second band check before the init calls, as
> the early exit at the top of the function guarantees that only the
> 2GHz case can reach that point.
>
> No functional change intended.
>
> Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
>
> Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
> ---
Thanks!
Reviewed-by: Dan Carpenter <error27@gmail.com>
regards,
dan carpenter
prev parent reply other threads:[~2026-06-23 5:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 16:09 [PATCH v2] staging: rtl8723bs: simplify rtw_spt_band_alloc Serhat Kumral
2026-06-23 5:21 ` Dan Carpenter [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=ajoXyBs3CvAzea0r@stanley.mountain \
--to=error27@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=serhatkumral1@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