public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Nizette <bn@niasdigital.com>
To: Andrew Victor <avictor.za@gmail.com>
Cc: "Thiago A. Corrêa" <thiago.correa@gmail.com>,
	kernel@avr32linux.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Nicolas Ferre" <nicolas.ferre@atmel.com>,
	akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board
Date: Thu, 29 Oct 2009 07:50:57 +1100	[thread overview]
Message-ID: <1256763057.4362.36.camel@ben-desktop> (raw)
In-Reply-To: <cd73a99e0910281253x1bb72b74p47cb5110efb0871f@mail.gmail.com>

On Wed, 2009-10-28 at 21:53 +0200, Andrew Victor wrote:
> hi,
> 
> > Then I think it would be best to use GPIO_PIN_NONE. Makes it clear
> > what is expected and avoids confusion on what should be the proper
> > value.
> > I hope I'm not saying non-sense, but even if I am, I guess you can see
> > that I'm advocating against the magic numbers :)
> 
> What magic numbers ?

I think Thiago was referring to the "-1" in the original patch as the
magic number.

Leaving the field blank to be initialised to 0 is certainly the
cleanest, I agree, but it doesn't actually /work/.  On many archs 0 is a
valid gpio number; the gpio_is_valid check used throughout the kernel
(including atmel-mci.c) looks like

static inline int gpio_is_valid(int number)
{
	/* only some non-negative numbers are valid */
	return ((unsigned)number) < ARCH_NR_GPIOS;
}

	--Ben.

  reply	other threads:[~2009-10-28 20:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 16:29 [PATCH 0/2] mmc: atmel-mci: introduce MCI2 support on at91 Nicolas Ferre
2009-09-17 16:29 ` [PATCH 1/2] atmel-mci: change use of dma slave interface Nicolas Ferre
2009-09-29 19:29   ` Andrew Morton
2009-09-30 13:33     ` Nicolas Ferre
2009-09-30 13:55       ` Haavard Skinnemoen
2009-10-23 16:34         ` [PATCH 0/2 v2]mmc: atmel-mci: introduce MCI2 support on at91 Nicolas Ferre
2009-10-23 16:34         ` [PATCH 1/3 v2] atmel-mci: change use of dma slave interface Nicolas Ferre
2009-10-23 16:34           ` [PATCH 2/3 v2] mmc: atmel-mci: New MCI2 module support in atmel-mci driver Nicolas Ferre
2009-11-02 17:18             ` Nicolas Ferre
2009-11-18 13:33               ` Nicolas Ferre
2009-10-23 16:34           ` [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board Nicolas Ferre
2009-10-26  8:15             ` Yegor Yefremov
2009-11-02 17:14               ` Nicolas Ferre
2009-10-27 19:43             ` Andrew Victor
2009-10-28  0:35               ` Haavard Skinnemoen
2009-10-28  0:53                 ` Thiago A. Corrêa
2009-10-28  1:31                   ` Haavard Skinnemoen
2009-10-28 19:53                   ` Andrew Victor
2009-10-28 20:50                     ` Ben Nizette [this message]
2009-11-02 17:11                       ` Nicolas Ferre
2009-11-02 22:10                         ` Ben Nizette
2009-11-02 22:14                         ` Ben Nizette
2009-11-03  2:30                         ` Ryan Mallon
2009-11-03  2:55                           ` Ben Nizette
2009-11-07 11:20                             ` Haavard Skinnemoen
2009-09-17 16:29 ` [PATCH 2/2] mmc: atmel-mci: New MCI2 module support in atmel-mci driver Nicolas Ferre

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=1256763057.4362.36.camel@ben-desktop \
    --to=bn@niasdigital.com \
    --cc=akpm@linux-foundation.org \
    --cc=avictor.za@gmail.com \
    --cc=kernel@avr32linux.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=thiago.correa@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox