public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Philip Rakity <prakity@marvell.com>
Cc: Zhangfei Gao <zgao6@marvell.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	Wolfram Sang <w.sang@pengutronix.de>, Chris Ball <cjb@laptop.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Jun Nie <njun@marvell.com>, Raymond Wu <xywu@marvell.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Mark Brown <mark.brown314@gmail.com>,
	Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [PATCH] mmc: support sdhci-mmp2
Date: Sat, 28 May 2011 10:52:39 +0200	[thread overview]
Message-ID: <201105281052.39803.arnd@arndb.de> (raw)
In-Reply-To: <F4CA7B04-7898-4C6A-814E-DE84588E3C94@marvell.com>

On Saturday 28 May 2011 07:00:38 Philip Rakity wrote:
> In some sense all of this is backwards.  Once the SoC is known (pxa910 or mmp2),
> it knows that SDHCI controller it supports.  It should set a config option
> like USES_MRVL_V3_SD_CONTROLLER.  The Kconfig entry in mmc/host should
> depend on THAT selection to allow the user to enable the SD option.
 
I would actually prefer in general if the Kconfig file listed only
the strictly necessary dependencies for building the driver.
If this driver can be built anywhere, I would list no dependency at
all. If it depends on something ARM specific, I'd make it depend
on CONFIG_ARM.

Then change the defconfig for the particular board to enable the
driver.

The main advantage of this is to increase build coverage on test
building machines doing an allyesconfig and randconfig once we
get there (right now, these have too many build errors, but we
have plans to work on that). 
 
> > --- /dev/null
> > +++ b/drivers/mmc/host/sdhci-mmp2.c
> 
> It is probably better to NOT name the file sdhci-mmp2.c but
> something like sdchi-pxaV3.c since other SoC's may use this controller.

Good point.

> > +       pxa = kzalloc(sizeof(struct sdhci_pxa), GFP_KERNEL);
> > +       if (!pxa) {
> > +               ret = -ENOMEM;
> > +               goto out;
> > +       }
> > +       pxa->ops = kzalloc(sizeof(struct sdhci_ops), GFP_KERNEL);
> why is  pxa->ops needed ?

I guess the idea was to be able to free the structure later. I already
commented that it should be statically allocation instead of kzalloc,
so that would make the pointer unnecessary.

	Arnd

  reply	other threads:[~2011-05-28  8:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 13:21 [PATCH] mmc: support sdhci-mmp2 Zhangfei Gao
2011-05-23 15:01 ` Arnd Bergmann
2011-05-25  8:41   ` zhangfei gao
2011-05-24  6:10 ` Philip Rakity
2011-05-25  8:50   ` zhangfei gao
2011-05-28  5:00 ` Philip Rakity
2011-05-28  8:52   ` Arnd Bergmann [this message]
2011-05-28 16:25     ` Philip Rakity
2011-05-28 19:04       ` Arnd Bergmann
2011-05-30 13:15   ` zhangfei gao
2011-05-30 20:47     ` Philip Rakity
2011-05-31 12:07       ` zhangfei gao
2011-05-31 15:57         ` Philip Rakity

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=201105281052.39803.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.brown314@gmail.com \
    --cc=nico@fluxnic.net \
    --cc=njun@marvell.com \
    --cc=prakity@marvell.com \
    --cc=shawn.guo@linaro.org \
    --cc=w.sang@pengutronix.de \
    --cc=xywu@marvell.com \
    --cc=zgao6@marvell.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