lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v12 7/9] irqchip: Add Sunplus SP7021 interrupt controller driver
On Thu, Mar 31, 2022 at 10:29 AM Qin Jian <qinjian@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

\
 
 \ /
  Last update: 2022-03-31 14:26    [W:0.191 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site