[PATCH v12 7/9] irqchip: Add Sunplus SP7021 interrupt controller driver

Arnd Bergmann arnd at arndb.de
Thu Mar 31 02:17:04 PDT 2022


On Thu, Mar 31, 2022 at 10:29 AM Qin Jian <qinjian at cqplus1.com> wrote:

> +#ifdef CONFIG_SMP
> +static int sp_intc_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force)
> +{
> +       return -EINVAL;
> +}
> +#endif
> +
> +static struct irq_chip sp_intc_chip = {
> +       .name = "sp_intc",
> +       .irq_ack = sp_intc_ack_irq,
> +       .irq_mask = sp_intc_mask_irq,
> +       .irq_unmask = sp_intc_unmask_irq,
> +       .irq_set_type = sp_intc_set_type,
> +#ifdef CONFIG_SMP
> +       .irq_set_affinity = sp_intc_set_affinity,
> +#endif
> +};

I don't think you need to define an irq_set_affinity() callback at all if you
just return -EINVAL, all the callers should have a check already. Even
if you do need the function, I think you can remove the #ifdef, as long
as the function itself can be built that way.

      Arnd



More information about the linux-arm-kernel mailing list