From: Joe Perches <joe@perches.com>
To: Wei Li <liwei391@huawei.com>, Peter Kaestle <peter@piie.net>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, rui.xiang@huawei.com
Subject: Re: [PATCH] platform/x86: acerhdf: Cleanup str_starts_with()
Date: Fri, 25 Mar 2022 19:23:16 -0700 [thread overview]
Message-ID: <0641d577f58f836a6c14a73e78d4545e44e61631.camel@perches.com> (raw)
In-Reply-To: <20220326020249.3266561-1-liwei391@huawei.com>
On Sat, 2022-03-26 at 10:02 +0800, Wei Li wrote:
> Since there is already a generic function strstarts() that check if a
> string starts with a given prefix, cleanup str_starts_with().
[]
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> @@ -651,9 +636,9 @@ static int __init acerhdf_check_hardware(void)
> * check if actual hardware BIOS vendor, product and version
> * IDs start with the strings of BIOS table entry
> */
> - if (str_starts_with(vendor, bt->vendor) &&
> - str_starts_with(product, bt->product) &&
> - str_starts_with(version, bt->version)) {
> + if (strstarts(vendor, bt->vendor) &&
> + strstarts(product, bt->product) &&
> + strstarts(version, bt->version)) {
IMO: It'd be easier for humans to read if aligned like:
if (strstarts(vendor, bt->vendor) &&
strstarts(product, bt->product) &&
strstarts(version, bt->version)) {
next prev parent reply other threads:[~2022-03-26 2:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-26 2:02 Wei Li
2022-03-26 2:23 ` Joe Perches [this message]
2022-03-26 21:34 ` Peter Kästle
2022-04-04 14:25 ` Hans de Goede
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=0641d577f58f836a6c14a73e78d4545e44e61631.camel@perches.com \
--to=joe@perches.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=markgross@kernel.org \
--cc=peter@piie.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rui.xiang@huawei.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®