From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Bera Yüzlü" <b9788213@gmail.com>
Cc: gregkh@linuxfoundation.org, straube.linux@gmail.com,
Yeking@red54.com, hansg@kernel.org, ethantidmore06@gmail.com,
weibu@redadmin.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: change custom comparing function to strcmp()
Date: Tue, 17 Mar 2026 10:15:38 +0200 [thread overview]
Message-ID: <abkNqgwMPnATcHWT@ashevche-desk.local> (raw)
In-Reply-To: <20260309184556.846-2-b9788213@gmail.com>
On Mon, Mar 09, 2026 at 09:45:56PM +0300, Bera Yüzlü wrote:
> eqNByte() function is a redundant reimplementation of strcmp().
> Remove eqNByte() and switch its usages to strcmp().
> No functional change.
...
> + if (strcmp(Regulation, "FCC") == 0)
> regulation = 0;
> + else if (strcmp(Regulation, "MKK") == 0)
> regulation = 1;
> + else if (strcmp(Regulation, "ETSI") == 0)
> regulation = 2;
> + else if (strcmp(Regulation, "WW13") == 0)
> regulation = 3;
Now you can move it towards match_string().
static const char * const regulations[] = { "FCC", "MKK", "ETSI", "WW13" };
regulation = match_string(regulations, ARRAY_SIZE(regulations), Regulation);
if (regulation < 0)
...ai-ai-ai...
and so on for the rest.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-03-17 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 18:45 Bera Yüzlü
2026-03-17 8:15 ` Andy Shevchenko [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=abkNqgwMPnATcHWT@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Yeking@red54.com \
--cc=b9788213@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
--cc=weibu@redadmin.org \
/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®