From: D Scott Phillips <scott@os.amperecomputing.com>
To: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
Darren Hart <darren@os.amperecomputing.com>,
patches@amperecomputing.com
Subject: Re: [PATCH v2 1/2] PCI: acpiphp: Allow built-in attention drivers
Date: Tue, 10 Oct 2023 17:13:22 -0700 [thread overview]
Message-ID: <861qe2qan1.fsf@scott-ph-mail.amperecomputing.com> (raw)
In-Reply-To: <20230930002036.6491-1-scott@os.amperecomputing.com>
D Scott Phillips <scott@os.amperecomputing.com> writes:
> Starting from the introduction of the attention callback in acpiphp, a
> non-zero struct module *owner field has been required in
> acpiphp_register_attention(). Then intent seemed to be that the core code
> could then hold a refcount on the module while invoking a callback.
>
> This check accidentally precludes the possiblity of attention callbacks to
> drivers which are built-in.
>
> Remove the check on `struct module *owner` in acpiphp_register_attention()
> so that attention callbacks can also be registered from built-in drivers.
Hi Bjorn, ping on these, thanks
Scott
>
> Signed-off-by: D Scott Phillips <scott@os.amperecomputing.com>
> ---
> Changes since v1:
> - new patch in the series
>
> drivers/pci/hotplug/acpiphp_core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
> index c02257f4b61c4..9dad14e80bcf2 100644
> --- a/drivers/pci/hotplug/acpiphp_core.c
> +++ b/drivers/pci/hotplug/acpiphp_core.c
> @@ -78,8 +78,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
> {
> int retval = -EINVAL;
>
> - if (info && info->owner && info->set_attn &&
> - info->get_attn && !attention_info) {
> + if (info && info->set_attn && info->get_attn && !attention_info) {
> retval = 0;
> attention_info = info;
> }
> --
> 2.41.0
prev parent reply other threads:[~2023-10-11 0:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-30 0:20 [PATCH v2 1/2] PCI: acpiphp: Allow built-in attention drivers D Scott Phillips
2023-09-30 0:20 ` [PATCH v2 2/2] PCI: hotplug: Add extension driver for Ampere Altra hotplug LED control D Scott Phillips
2023-10-03 18:32 ` Rafael J. Wysocki
2023-10-25 17:22 ` Bjorn Helgaas
2023-10-25 17:41 ` D Scott Phillips
2023-10-25 18:06 ` Bjorn Helgaas
2023-10-26 10:47 ` Anders Roxell
2023-10-26 11:04 ` Bjorn Helgaas
2023-10-11 0:13 ` D Scott Phillips [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=861qe2qan1.fsf@scott-ph-mail.amperecomputing.com \
--to=scott@os.amperecomputing.com \
--cc=darren@os.amperecomputing.com \
--cc=helgaas@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=patches@amperecomputing.com \
--cc=rafael@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