From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Kevin Tsai <ktsai@capellamicro.com>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v1 1/1] iio: light: cm32181: Remove duplicate ACPI handle check
Date: Sat, 7 Sep 2024 18:17:50 +0100 [thread overview]
Message-ID: <20240907181750.78b27e6f@jic23-huawei> (raw)
In-Reply-To: <20240904183646.1219485-1-andy.shevchenko@gmail.com>
On Wed, 4 Sep 2024 21:36:46 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> cm32181_acpi_parse_cpm_tables() is a no-op if ACPI handle
> is not available. Remove duplicate ACPI handle check at
> the caller side.
>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Hmmm. Not the most obvious code give it relies on an error
being definitely less than the header size, but indeed it
will error out if the handle isn't there.
Applied.
Jonathan
> ---
> drivers/iio/light/cm32181.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
> index 9df85b3999fa..aeae0566ec12 100644
> --- a/drivers/iio/light/cm32181.c
> +++ b/drivers/iio/light/cm32181.c
> @@ -217,8 +217,7 @@ static int cm32181_reg_init(struct cm32181_chip *cm32181)
> cm32181->lux_per_bit = CM32181_LUX_PER_BIT;
> cm32181->lux_per_bit_base_it = CM32181_LUX_PER_BIT_BASE_IT;
>
> - if (ACPI_HANDLE(cm32181->dev))
> - cm32181_acpi_parse_cpm_tables(cm32181);
> + cm32181_acpi_parse_cpm_tables(cm32181);
>
> /* Initialize registers*/
> for_each_set_bit(i, &cm32181->init_regs_bitmap, CM32181_CONF_REG_NUM) {
prev parent reply other threads:[~2024-09-07 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 18:36 [PATCH v1 1/1] iio: light: cm32181: Remove duplicate ACPI handle check Andy Shevchenko
2024-09-07 17:17 ` Jonathan Cameron [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=20240907181750.78b27e6f@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=ktsai@capellamicro.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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