devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Arend van Spriel <arend@broadcom.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Olof Johansson <olof@lixom.net>,
	Russell King <linux@arm.linux.org.uk>,
	Hans de Goede <hdegoede@redhat.com>,
	Doug Anderson <dianders@chromium.org>, NeilBrown <neilb@suse.de>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH V4 3/4] mmc: pwrseq: Initial support for the simple MMC power sequence provider
Date: Wed, 11 Feb 2015 05:28:42 +0100	[thread overview]
Message-ID: <CAPDyKFrdpknrMa62Vz4dfKaFMTdF-uXaAz3pkw_3qwNvHy49SQ@mail.gmail.com> (raw)
In-Reply-To: <CAAVeFu+ubZZGQd=zPPYm--PVCO9q-A3503Y5g50+sU4ztxU+iA@mail.gmail.com>

[...]

>> +int mmc_pwrseq_simple_alloc(struct mmc_host *host, struct device *dev)
>> +{
>> +       struct mmc_pwrseq_simple *pwrseq;
>> +
>> +       pwrseq = kzalloc(sizeof(struct mmc_pwrseq_simple), GFP_KERNEL);
>> +       if (!pwrseq)
>> +               return -ENOMEM;
>> +
>> +       pwrseq->pwrseq.ops = &mmc_pwrseq_simple_ops;
>> +       host->pwrseq = &pwrseq->pwrseq;
>
> How about making this function return a struct mmc_pwrseq * so this
> last line can be moved to mmc_pwrseq_alloc() instead of requiring all
> power sequences to do it?
>
> The same applies to
>
>     host->pwrseq = NULL;
>
> in mmc_pwrseq_simple_free(), which could be done in mmc_pwrseq_free() it seems.

Thanks for reviewing!

I like you suggestion, though $subject patch is already part of the PR for 3.20.

Feel free to send a patch, I would happily apply it.

Kind regards
Uffe

  reply	other threads:[~2015-02-11  4:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  9:13 [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson
2015-01-19  9:13 ` [PATCH V4 1/4] mmc: core: Initial " Ulf Hansson
2015-01-28 10:17   ` Javier Martinez Canillas
2015-01-28 11:36     ` Ulf Hansson
2015-01-28 12:47       ` Javier Martinez Canillas
2015-01-19  9:13 ` [PATCH V4 3/4] mmc: pwrseq: Initial support for the simple MMC power sequence provider Ulf Hansson
2015-01-28 10:19   ` Javier Martinez Canillas
2015-02-10  8:34   ` Alexandre Courbot
2015-02-11  4:28     ` Ulf Hansson [this message]
     [not found]       ` <CAPDyKFrdpknrMa62Vz4dfKaFMTdF-uXaAz3pkw_3qwNvHy49SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-11  4:34         ` Alexandre Courbot
     [not found] ` <1421658784-11980-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-19  9:13   ` [PATCH V4 2/4] mmc: pwrseq: Document DT bindings for the simple MMC power sequence Ulf Hansson
2015-01-28 10:18     ` Javier Martinez Canillas
2015-01-19  9:13   ` [PATCH V4 4/4] mmc: pwrseq_simple: Add support for a reset GPIO pin Ulf Hansson
2015-01-23 15:56     ` Javier Martinez Canillas
     [not found]       ` <CABxcv=nGWPnkNz1tXJpaTUkroucDgVYzeCrEmZvA8xfzHzROvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-23 17:01         ` Ulf Hansson
2015-01-23 17:09           ` Javier Martinez Canillas
2015-01-28 10:20     ` Javier Martinez Canillas
2015-02-10  9:12     ` Alexandre Courbot
2015-02-11  4:34       ` Ulf Hansson
2015-03-05  9:05         ` Linus Walleij
2015-01-22  9:28 ` [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson

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=CAPDyKFrdpknrMa62Vz4dfKaFMTdF-uXaAz3pkw_3qwNvHy49SQ@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gnurou@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=neilb@suse.de \
    --cc=olof@lixom.net \
    --cc=s.hauer@pengutronix.de \
    --cc=tomeu.vizoso@collabora.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;
as well as URLs for NNTP newsgroup(s).