Re: [PATCH 1/4] arm: msm: gpio support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > >> >> +     spin_lock_irqsave(&msm_chip->lock, irq_flags);
> > >> >> +
> > >> >> +     b = 1U << (irq - FIRST_GPIO_IRQ - msm_chip->chip.base);
> > >> >
> > >> > Urk... That's a bit confusing...
> > >> >
> > >> > You might want to make this a macro or an inline function with some kind
> > >> > of comment.
> > >> >
> > >>
> > >> On a related note, why did you inline msm_gpio_clear_detect_status? It
> > >> is used from two other functions.
> > >>
> > >
> > > You mean other places in the Android tree?
> > 
> > No, you copied it three times in this file.
> 
> Oh, well it was part of the API elimination , but it's helpful when
> doing clean up to have stuff all unrolled so optimization possibilities
> present themselves more easily .. You think I should convert it into an
> inline?

I guess so. Premature optimalization is sqrt(all evil).

Really, leave that to compiler.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux