Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "structirq_data *data"

From: Geert Uytterhoeven
Date: Sun Sep 11 2011 - 13:46:13 EST


On Sun, Sep 11, 2011 at 15:40, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:
>> diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
>> index ffa1b3f..3cee6d2 100644
>> --- a/arch/m68k/mac/macints.c
>> +++ b/arch/m68k/mac/macints.c
>> @@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *);
>> Âvoid mac_enable_irq(unsigned int irq);
>> Âvoid mac_disable_irq(unsigned int irq);
>>
>> +static void mac_irq_enable(struct irq_data *data)
>> +{
>> + Â Â mac_enable_irq(data->irq);
>> +}
>> +
>> +static void mac_irq_disable(struct irq_data *data)
>> +{
>> + Â Â mac_disable_irq(data->irq);
>> +}
>> +
>> Âstatic struct irq_chip mac_irq_chip = {
>>    .name      = "mac",
>> -   .irq_enable   = mac_enable_irq,
>> -   .irq_disable  Â= mac_disable_irq,
>> +   .irq_enable   = mac_irq_enable,
>> +   .irq_disable  Â= mac_irq_disable,
>> Â};
>>
>> Âvoid __init mac_init_IRQ(void)
>
>
> I wrote a patch (below) to remove these wrapper functions from the
> m68k-genirq branch. What do you think of it? (Perhaps fold it into the
> patch above?)

I didn't remove the wrappers, as they're used outside the file.

> @@ -152,7 +149,7 @@ void baboon_irq_enable(int irq)
>
> Â Â Â Âbaboon_disabled &= ~(1 << irq_idx);
> Â Â Â Âif (!baboon_disabled)
> - Â Â Â Â Â Â Â mac_enable_irq(IRQ_NUBUS_C);
> + Â Â Â Â Â Â Â mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));

irq_get_irq_data() is not available in the non-genirq case, so this cleanup
cannot be folded in patch 7, and has to wait until after patch 27.

I'll add it at the end of the series, OK?

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/