lkml.org 
[lkml]   [2009]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/13] sdhci: Add support for card-detection polling
On Sun, Mar 08, 2009 at 03:11:21PM +0100, Pierre Ossman wrote:
> On Wed, 4 Mar 2009 20:49:17 +0300
> Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
>
> > On Sat, Feb 21, 2009 at 04:58:21PM +0100, Pierre Ossman wrote:
> > > Just modify the if-clause and
> > > things will work.
> >
> > That would look horrid...
> >
> > if ((!(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
> > !(sdhci_readl(host, SDHCI_PRESENT_STATE) &
> > SDHCI_CARD_PRESENT)) ||
> > (host->flags & SDHCI_DEVICE_DEAD)) {
> >
>
> There are worse ones in that code, but I see your point. :)
>
> > > Might want to add a comment also to make it more obvious what the
> > > if-clause does.
> >
> > Let's try to avoid the if-clause above? How about this:
> >
>
> Looks ok.
>
> > @@ -1096,6 +1099,7 @@ out:
> > static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
> > {
> > struct sdhci_host *host;
> > + bool present;
> > unsigned long flags;
> >
> > host = mmc_priv(mmc);
>
> Can we use bool in the kernel?

Sure, it's widely used in the kernel, even in such places as
mm/ or kernel/.


Thanks for the review!

--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2


\
 
 \ /
  Last update: 2009-03-16 22:09    [W:0.066 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site