* [PATCH v2] irqdomain: protect macro variable in domain iterators [not found] <1322833997-32083-1-git-send-email-nicolas.ferre@atmel.com> @ 2011-12-02 13:30 ` Nicolas Ferre 2011-12-02 13:44 ` Dave Martin 0 siblings, 1 reply; 4+ messages in thread From: Nicolas Ferre @ 2011-12-02 13:30 UTC (permalink / raw) To: robherring2, devicetree-discuss Cc: linux-arm-kernel, grant.likely, linux-kernel, dave.martin, Nicolas Ferre Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> --- v2: add brackets to each macro variable. include/linux/irqdomain.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index bd4272b..e535063 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -82,12 +82,14 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d, } #define irq_domain_for_each_hwirq(d, hw) \ - for (hw = d->hwirq_base; hw < d->hwirq_base + d->nr_irq; hw++) + for ((hw) = (d)->hwirq_base; \ + (hw) < (d)->hwirq_base + (d)->nr_irq; \ + (hw)++) #define irq_domain_for_each_irq(d, hw, irq) \ - for (hw = d->hwirq_base, irq = irq_domain_to_irq(d, hw); \ - hw < d->hwirq_base + d->nr_irq; \ - hw++, irq = irq_domain_to_irq(d, hw)) + for ((hw) = (d)->hwirq_base, (irq) = irq_domain_to_irq((d), (hw)); \ + (hw) < (d)->hwirq_base + (d)->nr_irq; \ + (hw)++, (irq) = irq_domain_to_irq((d), (hw))) extern void irq_domain_add(struct irq_domain *domain); extern void irq_domain_del(struct irq_domain *domain); -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] irqdomain: protect macro variable in domain iterators 2011-12-02 13:30 ` [PATCH v2] irqdomain: protect macro variable in domain iterators Nicolas Ferre @ 2011-12-02 13:44 ` Dave Martin 2011-12-08 9:37 ` Nicolas Ferre 0 siblings, 1 reply; 4+ messages in thread From: Dave Martin @ 2011-12-02 13:44 UTC (permalink / raw) To: Nicolas Ferre Cc: robherring2, devicetree-discuss, linux-arm-kernel, grant.likely, linux-kernel On Fri, Dec 02, 2011 at 02:30:09PM +0100, Nicolas Ferre wrote: > Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Looks OK to me: Acked-by: Dave Martin <dave.martin@linaro.org> > --- > v2: add brackets to each macro variable. > > include/linux/irqdomain.h | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h > index bd4272b..e535063 100644 > --- a/include/linux/irqdomain.h > +++ b/include/linux/irqdomain.h > @@ -82,12 +82,14 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d, > } > > #define irq_domain_for_each_hwirq(d, hw) \ > - for (hw = d->hwirq_base; hw < d->hwirq_base + d->nr_irq; hw++) > + for ((hw) = (d)->hwirq_base; \ > + (hw) < (d)->hwirq_base + (d)->nr_irq; \ > + (hw)++) > > #define irq_domain_for_each_irq(d, hw, irq) \ > - for (hw = d->hwirq_base, irq = irq_domain_to_irq(d, hw); \ > - hw < d->hwirq_base + d->nr_irq; \ > - hw++, irq = irq_domain_to_irq(d, hw)) > + for ((hw) = (d)->hwirq_base, (irq) = irq_domain_to_irq((d), (hw)); \ > + (hw) < (d)->hwirq_base + (d)->nr_irq; \ > + (hw)++, (irq) = irq_domain_to_irq((d), (hw))) > > extern void irq_domain_add(struct irq_domain *domain); > extern void irq_domain_del(struct irq_domain *domain); > -- > 1.7.5.4 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] irqdomain: protect macro variable in domain iterators 2011-12-02 13:44 ` Dave Martin @ 2011-12-08 9:37 ` Nicolas Ferre 2011-12-08 13:30 ` Rob Herring 0 siblings, 1 reply; 4+ messages in thread From: Nicolas Ferre @ 2011-12-08 9:37 UTC (permalink / raw) To: robherring2, devicetree-discuss, grant.likely Cc: Dave Martin, linux-arm-kernel, linux-kernel On 12/02/2011 02:44 PM, Dave Martin : > On Fri, Dec 02, 2011 at 02:30:09PM +0100, Nicolas Ferre wrote: >> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com> > > Looks OK to me: > > Acked-by: Dave Martin<dave.martin@linaro.org> Rob, Do you want a different implementation for this. I think it is the simplest way to write this macro... If it is ok for you, it will be interesting to include this patch quickly so that I will be able to queue my own patches on top of it. (Cc: stable can be a good idea also). Best regards, >> --- >> v2: add brackets to each macro variable. >> >> include/linux/irqdomain.h | 10 ++++++---- >> 1 files changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h >> index bd4272b..e535063 100644 >> --- a/include/linux/irqdomain.h >> +++ b/include/linux/irqdomain.h >> @@ -82,12 +82,14 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d, >> } >> >> #define irq_domain_for_each_hwirq(d, hw) \ >> - for (hw = d->hwirq_base; hw< d->hwirq_base + d->nr_irq; hw++) >> + for ((hw) = (d)->hwirq_base; \ >> + (hw)< (d)->hwirq_base + (d)->nr_irq; \ >> + (hw)++) >> >> #define irq_domain_for_each_irq(d, hw, irq) \ >> - for (hw = d->hwirq_base, irq = irq_domain_to_irq(d, hw); \ >> - hw< d->hwirq_base + d->nr_irq; \ >> - hw++, irq = irq_domain_to_irq(d, hw)) >> + for ((hw) = (d)->hwirq_base, (irq) = irq_domain_to_irq((d), (hw)); \ >> + (hw)< (d)->hwirq_base + (d)->nr_irq; \ >> + (hw)++, (irq) = irq_domain_to_irq((d), (hw))) >> >> extern void irq_domain_add(struct irq_domain *domain); >> extern void irq_domain_del(struct irq_domain *domain); >> -- >> 1.7.5.4 >> > -- Nicolas Ferre ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] irqdomain: protect macro variable in domain iterators 2011-12-08 9:37 ` Nicolas Ferre @ 2011-12-08 13:30 ` Rob Herring 0 siblings, 0 replies; 4+ messages in thread From: Rob Herring @ 2011-12-08 13:30 UTC (permalink / raw) To: Nicolas Ferre Cc: devicetree-discuss, grant.likely, Dave Martin, linux-arm-kernel, linux-kernel, Thomas Gleixner On 12/08/2011 03:37 AM, Nicolas Ferre wrote: > On 12/02/2011 02:44 PM, Dave Martin : >> On Fri, Dec 02, 2011 at 02:30:09PM +0100, Nicolas Ferre wrote: >>> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com> >> >> Looks OK to me: >> >> Acked-by: Dave Martin<dave.martin@linaro.org> > > Rob, > > Do you want a different implementation for this. I think it is the > simplest way to write this macro... > > If it is ok for you, it will be interesting to include this patch > quickly so that I will be able to queue my own patches on top of it. > (Cc: stable can be a good idea also). > Yes, it's fine. The irqdomain patches need to be taken by tglx or acked by him. I don't think this is needed for stable. The existing users are fine and new ones aren't going to be added to stable kernels. Rob ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-08 13:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1322833997-32083-1-git-send-email-nicolas.ferre@atmel.com>
2011-12-02 13:30 ` [PATCH v2] irqdomain: protect macro variable in domain iterators Nicolas Ferre
2011-12-02 13:44 ` Dave Martin
2011-12-08 9:37 ` Nicolas Ferre
2011-12-08 13:30 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox