All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable
Date: Fri, 10 Apr 2020 14:45:47 -0500	[thread overview]
Message-ID: <20200410194547.GA7293@google.com> (raw)
In-Reply-To: <20200410131442.22842-1-hdegoede@redhat.com>

On Fri, Apr 10, 2020 at 03:14:42PM +0200, Hans de Goede wrote:
> The case ACPI_RESOURCE_TYPE_EXTENDED_IRQ inside acpi_pci_link_set()
> is correctly using resource->res.data.extended_irq.foo for most settings,
> but for the sharable setting it sofar has accidentally been using
> resource->res.data.irq.shareable instead of
> resource->res.data.extended_irq.shareable.
> 
> Note that the old code happens to also work because the sharable field
> offset is the same for both the acpi_resource_irq and
> acpi_resource_extended_irq structs.

s/sharable/shareable/ several times above
s/sofar/so far/

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/acpi/pci_link.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> index 00a6da2121be..ed3d2182cf2c 100644
> --- a/drivers/acpi/pci_link.c
> +++ b/drivers/acpi/pci_link.c
> @@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
>  		resource->res.data.extended_irq.polarity =
>  		    link->irq.polarity;
>  		if (link->irq.triggering == ACPI_EDGE_SENSITIVE)
> -			resource->res.data.irq.shareable =
> +			resource->res.data.extended_irq.shareable =
>  			    ACPI_EXCLUSIVE;
>  		else
> -			resource->res.data.irq.shareable = ACPI_SHARED;
> +			resource->res.data.extended_irq.shareable = ACPI_SHARED;

Ouch, looks like that copy/paste error has been there since the
beginning of git.  Nice catch!

>  		resource->res.data.extended_irq.interrupt_count = 1;
>  		resource->res.data.extended_irq.interrupts[0] = irq;
>  		/* ignore resource_source, it's optional */
> -- 
> 2.26.0
> 

  reply	other threads:[~2020-04-10 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 13:14 [PATCH] ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable Hans de Goede
2020-04-10 19:45 ` Bjorn Helgaas [this message]
2020-04-13 13:08   ` 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=20200410194547.GA7293@google.com \
    --to=helgaas@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.