From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Corentin Chary" <corentin.chary@gmail.com>,
"João Paulo Rechi Vita" <jprvita@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Mark Gross" <markgross@kernel.org>
Subject: Re: [PATCH v2 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device()
Date: Fri, 6 Oct 2023 18:51:02 +0300 [thread overview]
Message-ID: <ZSAs5ocT6kEIXb0S@smile.fi.intel.com> (raw)
In-Reply-To: <9ebb5ae0-2ec0-198c-3843-e44ce84493d2@redhat.com>
On Fri, Oct 06, 2023 at 05:32:10PM +0200, Hans de Goede wrote:
> On 10/6/23 17:27, Andy Shevchenko wrote:
> > + id = acpi_match_device(device_ids, adev);
> > + if (id)
> > + data->hswc_params = (const struct hswc_params *)id->driver_data;
> > if (!data->hswc_params)
> > return 0;
>
> Thanks, but the error checking looks a bit weird now. How about:
>
> id = acpi_match_device(device_ids, adev);
> if (!id)
> return 0;
>
> data->hswc_params = (const struct hswc_params *)id->driver_data;
>
> That seems to better convey what the code's intention is.
Indeed, otherwise the hswc_params seems to stay NULL anyway (due to kzalloc()
use). I'll send a v3 with your suggestion being incorporated, thank you!
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-10-06 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 15:27 [PATCH v2 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device() Andy Shevchenko
2023-10-06 15:32 ` Hans de Goede
2023-10-06 15:51 ` 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=ZSAs5ocT6kEIXb0S@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jprvita@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.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