Re: [PATCH 10/15] irqchip/gic: Remove static irq_chip definition for eoimode1

From: Linus Walleij
Date: Tue Mar 22 2016 - 07:49:29 EST


On Thu, Mar 17, 2016 at 3:19 PM, Jon Hunter <jonathanh@xxxxxxxxxx> wrote:

> There are only 3 differences (not including the name) in the definitions
> of the gic_chip and gic_eoimode1_chip structures. Instead of statically
> defining the gic_eoimode1_chip structure, remove it and populate the
> eoimode1 functions dynamically for the appropriate GIC irqchips.
>
> Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>

> if (static_key_true(&supports_deactivate) && gic_nr == 0) {
> - gic->chip = gic_eoimode1_chip;
> + gic->chip.irq_mask = gic_eoimode1_mask_irq;
> + gic->chip.irq_eoi = gic_eoimode1_eoi_irq;
> + gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity;
> + gic->chip.name = kasprintf(GFP_KERNEL, "GICv2");

I think you can just = "GICv2" there. No need to kasprintf()

Yours,
Linus Walleij