From: Laura Nao <laura.nao@collabora.com>
To: andriy.shevchenko@linux.intel.com
Cc: bot@kernelci.org, brgl@bgdev.pl, kernel@collabora.com,
laura.nao@collabora.com, linus.walleij@linaro.org,
linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com
Subject: Re: [PATCH] gpiolib: acpi: Add ACPI device NULL check to
Date: Mon, 13 May 2024 12:02:00 +0200 [thread overview]
Message-ID: <20240513100200.218261-1-laura.nao@collabora.com> (raw)
In-Reply-To: <Zj4zNefxGUGKjxha@smile.fi.intel.com>
Hi Andy,
On 5/10/24 16:46, Andy Shevchenko wrote:
>
> Now we may remove that check from __acpi_find_gpio():
>
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -988,10 +988,10 @@ __acpi_find_gpio(struct fwnode_handle *fwnode,
> const char *con_id, unsigned int
> }
>
> /* Then from plain _CRS GPIOs */
> - if (!adev || !can_fallback)
> - return ERR_PTR(-ENOENT);
> + if (can_fallback)
> + return acpi_get_gpiod_by_index(adev, NULL, idx, info);
>
> - return acpi_get_gpiod_by_index(adev, NULL, idx, info);
> + return ERR_PTR(-ENOENT);
> }
>
> struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode,
>
>
> As a side effect it will make the comment better to understand.
>
> With above suggestion applied, feel free to add mine
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> You might need to rephrase the commit message to say that
>
> "We also move the check in additional to the moving the function
> call
> outside of __acpi_find_gpio()."
>
> or something similar, up to you.
>
Thanks for the feedback, I sent another patch with the suggestions above
applied:
https://lore.kernel.org/all/20240513095610.216668-1-laura.nao@collabora.com/T/#u
Best regards,
Laura Nao
prev parent reply other threads:[~2024-05-13 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 10:46 [PATCH] gpiolib: acpi: Add ACPI device NULL check to acpi_can_fallback_to_crs() Laura Nao
2024-05-09 12:55 ` AngeloGioacchino Del Regno
2024-05-10 14:46 ` Andy Shevchenko
2024-05-13 10:02 ` Laura Nao [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=20240513100200.218261-1-laura.nao@collabora.com \
--to=laura.nao@collabora.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bot@kernelci.org \
--cc=brgl@bgdev.pl \
--cc=kernel@collabora.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).