From: Pavel Machek <pavel@ucw.cz>
To: Daniel Walker <dwalker@codeaurora.org>
Cc: Arve Hj?nnev?g <arve@android.com>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
H Hartley Sweeten <hartleys@visionengravers.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] arm: msm: gpio support
Date: Tue, 6 Apr 2010 15:32:16 +0200 [thread overview]
Message-ID: <20100406133216.GE1424@ucw.cz> (raw)
In-Reply-To: <1270075991.2488.9.camel@m0nster>
> > >> >> + 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
WARNING: multiple messages have this Message-ID (diff)
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm: msm: gpio support
Date: Tue, 6 Apr 2010 15:32:16 +0200 [thread overview]
Message-ID: <20100406133216.GE1424@ucw.cz> (raw)
In-Reply-To: <1270075991.2488.9.camel@m0nster>
> > >> >> + 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
next prev parent reply other threads:[~2010-04-06 13:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 23:11 [PATCH 1/4] arm: msm: gpio support Daniel Walker
2010-03-30 23:11 ` Daniel Walker
2010-03-30 23:11 ` [PATCH 2/4] arm: msm: GPIO support for HTC Dream Daniel Walker
2010-03-30 23:11 ` Daniel Walker
2010-03-30 23:11 ` [PATCH 3/4] arm: msm: trout: add trout specific gpio interrupts Daniel Walker
2010-03-30 23:11 ` Daniel Walker
2010-03-30 23:11 ` [PATCH 4/4] arm: msm: trout add mmc support Daniel Walker
2010-03-30 23:11 ` Daniel Walker
2010-03-30 23:58 ` [PATCH 1/4] arm: msm: gpio support H Hartley Sweeten
2010-03-30 23:58 ` H Hartley Sweeten
2010-03-31 1:14 ` Arve Hjønnevåg
2010-03-31 1:14 ` Arve Hjønnevåg
2010-03-31 14:03 ` Daniel Walker
2010-03-31 14:03 ` Daniel Walker
2010-03-31 21:21 ` Arve Hjønnevåg
2010-03-31 21:21 ` Arve Hjønnevåg
2010-03-31 22:53 ` Daniel Walker
2010-03-31 22:53 ` Daniel Walker
2010-04-06 13:32 ` Pavel Machek [this message]
2010-04-06 13:32 ` Pavel Machek
2010-03-31 14:12 ` Daniel Walker
2010-03-31 14:12 ` Daniel Walker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100406133216.GE1424@ucw.cz \
--to=pavel@ucw.cz \
--cc=arve@android.com \
--cc=dwalker@codeaurora.org \
--cc=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.