Hi, Sorry, looks like something went wrong with the reply-to. It belongs to this issue: https://xenomai.org/pipermail/xenomai/2022-April/047624.html
Thanks, Gunter > -----Original Message----- > From: Xenomai <[email protected]> On Behalf Of Gunter > Grau via Xenomai > Sent: Freitag, 20. Mai 2022 16:29 > To: [email protected] > Cc: Gunter Grau <[email protected]> > Subject: [PATCH] cobalt: ipipe: intr: Fix return value check of > ipipe_set_irq_affinity > > Caution: This e-mail originated from outside of Philips, be careful for > phishing. > > > From: Julian Haller <[email protected]> > > ipipe_set_irq_affinity directly returns the value of the regular > irq_set_affinity method. As described in irq.h in the linux kernel, the > following return values indicate a success: > > /* > * Return value for chip->irq_set_affinity() > * > * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity > * IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity > * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special > code to > * support stacked irqchips, which indicates skipping > * all descendent irqchips. > */ > enum { > IRQ_SET_MASK_OK = 0, > IRQ_SET_MASK_OK_NOCOPY, > IRQ_SET_MASK_OK_DONE, > }; > > As one example, the GIC in i.MX6 devices returns IRQ_SET_MASK_OK_DONE > on success. Fix the xintr_attach function by treating all positive return > values > as success. > > Signed-off-by: Gunter Grau <[email protected]> > --- > kernel/cobalt/ipipe/intr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/cobalt/ipipe/intr.c b/kernel/cobalt/ipipe/intr.c index > 378c7f07d..cb15597f7 100644 > --- a/kernel/cobalt/ipipe/intr.c > +++ b/kernel/cobalt/ipipe/intr.c > @@ -869,7 +869,7 @@ int xnintr_attach(struct xnintr *intr, void *cookie, > const cpumask_t *cpumask) > return -EINVAL; > } > ret = ipipe_set_irq_affinity(intr->irq, *effective_mask); > - if (ret) > + if (ret < 0) > return ret; > #endif /* CONFIG_SMP */ > > -- > 2.25.1 > ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
