2014-02-23 21:41:23

by Thomas Gleixner

[permalink] [raw]
Subject: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

There is no reason to care about irq_desc in that context, escpecially
as irq_data for that interrupt is retrieved as well.

Use the proper accessor for the msi descriptor

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Mohit Kumar <[email protected]>
Cc: pci <[email protected]>
---
drivers/pci/host/pcie-designware.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: tip/drivers/pci/host/pcie-designware.c
===================================================================
--- tip.orig/drivers/pci/host/pcie-designware.c
+++ tip/drivers/pci/host/pcie-designware.c
@@ -294,14 +294,12 @@ no_valid_irq:
static void clear_irq(unsigned int irq)
{
unsigned int pos, nvec;
- struct irq_desc *desc;
struct msi_desc *msi;
struct pcie_port *pp;
struct irq_data *data = irq_get_irq_data(irq);

/* get the port structure */
- desc = irq_to_desc(irq);
- msi = irq_desc_get_msi_desc(desc);
+ msi = irq_data_get_msi(data);
pp = sys_to_pcie(msi->dev->bus->sysdata);
if (!pp) {
BUG();


2014-02-23 23:33:23

by Jingoo Han

[permalink] [raw]
Subject: Re: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

On Monday, February 24, 2014 6:40 AM, Thomas Gleixner wrote:
>
> There is no reason to care about irq_desc in that context, escpecially
> as irq_data for that interrupt is retrieved as well.
>
> Use the proper accessor for the msi descriptor
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Bjorn Helgaas <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: Mohit Kumar <[email protected]>
> Cc: pci <[email protected]>

Acked-by: Jingoo Han <[email protected]>

A few days ago, I noticed that irq_data_get_msi() can be used.
However, I did not submit the same patch. I really appreciate
your patch. :-)

Best regards,
Jingoo Han

> ---
> drivers/pci/host/pcie-designware.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Index: tip/drivers/pci/host/pcie-designware.c
> ===================================================================
> --- tip.orig/drivers/pci/host/pcie-designware.c
> +++ tip/drivers/pci/host/pcie-designware.c
> @@ -294,14 +294,12 @@ no_valid_irq:
> static void clear_irq(unsigned int irq)
> {
> unsigned int pos, nvec;
> - struct irq_desc *desc;
> struct msi_desc *msi;
> struct pcie_port *pp;
> struct irq_data *data = irq_get_irq_data(irq);
>
> /* get the port structure */
> - desc = irq_to_desc(irq);
> - msi = irq_desc_get_msi_desc(desc);
> + msi = irq_data_get_msi(data);
> pp = sys_to_pcie(msi->dev->bus->sysdata);
> if (!pp) {
> BUG();????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-02-24 21:38:34

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

On Sun, Feb 23, 2014 at 4:33 PM, Jingoo Han <[email protected]> wrote:
> On Monday, February 24, 2014 6:40 AM, Thomas Gleixner wrote:
>>
>> There is no reason to care about irq_desc in that context, escpecially
>> as irq_data for that interrupt is retrieved as well.
>>
>> Use the proper accessor for the msi descriptor
>>
>> Signed-off-by: Thomas Gleixner <[email protected]>
>> Cc: Bjorn Helgaas <[email protected]>
>> Cc: Jingoo Han <[email protected]>
>> Cc: Mohit Kumar <[email protected]>
>> Cc: pci <[email protected]>
>
> Acked-by: Jingoo Han <[email protected]>

Acked-by: Bjorn Helgaas <[email protected]>

Thomas, I assume you'll merge this along with the rest of your series.
I don't have any pending changes in this area.

Bjorn

> A few days ago, I noticed that irq_data_get_msi() can be used.
> However, I did not submit the same patch. I really appreciate
> your patch. :-)
>
> Best regards,
> Jingoo Han
>
>> ---
>> drivers/pci/host/pcie-designware.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> Index: tip/drivers/pci/host/pcie-designware.c
>> ===================================================================
>> --- tip.orig/drivers/pci/host/pcie-designware.c
>> +++ tip/drivers/pci/host/pcie-designware.c
>> @@ -294,14 +294,12 @@ no_valid_irq:
>> static void clear_irq(unsigned int irq)
>> {
>> unsigned int pos, nvec;
>> - struct irq_desc *desc;
>> struct msi_desc *msi;
>> struct pcie_port *pp;
>> struct irq_data *data = irq_get_irq_data(irq);
>>
>> /* get the port structure */
>> - desc = irq_to_desc(irq);
>> - msi = irq_desc_get_msi_desc(desc);
>> + msi = irq_data_get_msi(data);
>> pp = sys_to_pcie(msi->dev->bus->sysdata);
>> if (!pp) {
>> BUG();

2014-02-24 22:06:54

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

On Mon, 24 Feb 2014, Bjorn Helgaas wrote:
> On Sun, Feb 23, 2014 at 4:33 PM, Jingoo Han <[email protected]> wrote:
> > On Monday, February 24, 2014 6:40 AM, Thomas Gleixner wrote:
> >>
> >> There is no reason to care about irq_desc in that context, escpecially
> >> as irq_data for that interrupt is retrieved as well.
> >>
> >> Use the proper accessor for the msi descriptor
> >>
> >> Signed-off-by: Thomas Gleixner <[email protected]>
> >> Cc: Bjorn Helgaas <[email protected]>
> >> Cc: Jingoo Han <[email protected]>
> >> Cc: Mohit Kumar <[email protected]>
> >> Cc: pci <[email protected]>
> >
> > Acked-by: Jingoo Han <[email protected]>
>
> Acked-by: Bjorn Helgaas <[email protected]>
>
> Thomas, I assume you'll merge this along with the rest of your series.
> I don't have any pending changes in this area.

I can do, but it does not depend on anything else, so you can pick it
up as well. Either way is fine.

Thanks,

tglx

2014-02-24 23:03:42

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

On Mon, Feb 24, 2014 at 3:06 PM, Thomas Gleixner <[email protected]> wrote:
> On Mon, 24 Feb 2014, Bjorn Helgaas wrote:
>> On Sun, Feb 23, 2014 at 4:33 PM, Jingoo Han <[email protected]> wrote:
>> > On Monday, February 24, 2014 6:40 AM, Thomas Gleixner wrote:
>> >>
>> >> There is no reason to care about irq_desc in that context, escpecially
>> >> as irq_data for that interrupt is retrieved as well.
>> >>
>> >> Use the proper accessor for the msi descriptor
>> >>
>> >> Signed-off-by: Thomas Gleixner <[email protected]>
>> >> Cc: Bjorn Helgaas <[email protected]>
>> >> Cc: Jingoo Han <[email protected]>
>> >> Cc: Mohit Kumar <[email protected]>
>> >> Cc: pci <[email protected]>
>> >
>> > Acked-by: Jingoo Han <[email protected]>
>>
>> Acked-by: Bjorn Helgaas <[email protected]>
>>
>> Thomas, I assume you'll merge this along with the rest of your series.
>> I don't have any pending changes in this area.
>
> I can do, but it does not depend on anything else, so you can pick it
> up as well. Either way is fine.

I never know what to do with these. I suggested that you pick it up
so the whole series would be together, because I assumed it would make
more sense in the git history to have all these similar changes
grouped together. But maybe that really doesn't matter.

What's the recommended practice?

Bjorn

2014-02-24 23:15:44

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [patch 07/26] pci: pcie-designware: Remove irq_desc abuse

On Mon, 24 Feb 2014, Bjorn Helgaas wrote:

> On Mon, Feb 24, 2014 at 3:06 PM, Thomas Gleixner <[email protected]> wrote:
> > On Mon, 24 Feb 2014, Bjorn Helgaas wrote:
> >> On Sun, Feb 23, 2014 at 4:33 PM, Jingoo Han <[email protected]> wrote:
> >> > On Monday, February 24, 2014 6:40 AM, Thomas Gleixner wrote:
> >> >>
> >> >> There is no reason to care about irq_desc in that context, escpecially
> >> >> as irq_data for that interrupt is retrieved as well.
> >> >>
> >> >> Use the proper accessor for the msi descriptor
> >> >>
> >> >> Signed-off-by: Thomas Gleixner <[email protected]>
> >> >> Cc: Bjorn Helgaas <[email protected]>
> >> >> Cc: Jingoo Han <[email protected]>
> >> >> Cc: Mohit Kumar <[email protected]>
> >> >> Cc: pci <[email protected]>
> >> >
> >> > Acked-by: Jingoo Han <[email protected]>
> >>
> >> Acked-by: Bjorn Helgaas <[email protected]>
> >>
> >> Thomas, I assume you'll merge this along with the rest of your series.
> >> I don't have any pending changes in this area.
> >
> > I can do, but it does not depend on anything else, so you can pick it
> > up as well. Either way is fine.
>
> I never know what to do with these. I suggested that you pick it up
> so the whole series would be together, because I assumed it would make
> more sense in the git history to have all these similar changes
> grouped together. But maybe that really doesn't matter.
>
> What's the recommended practice?

Dunno. There is no rule. I'll merge it up with the rest of the lot.

Thanks,

tglx