linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Ohad Ben-Cohen <ohad@wizery.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Chikkature Rajashekar Madhusudhan <madhu.cr@ti.com>,
	San Mehat <san@google.com>,
	"Quadros Roger (Nokia-MS/Helsinki)" <roger.quadros@nokia.com>,
	Tony Lindgren <tony@atomide.com>,
	Nicolas Pitre <nico@fluxnic.net>, Ido Yariv <ido@wizery.com>,
	Kalle Valo <kalle.valo@iki.fi>,
	Russell King <linux@arm.linux.org.uk>,
	Vitaly Wool <vitalywool@gmail.com>
Subject: Re: [PATCH v6 2/7] wl1271: propagate set_power's return value
Date: Thu, 16 Sep 2010 22:56:51 +0300	[thread overview]
Message-ID: <1284667011.8951.73.camel@powerslave> (raw)
In-Reply-To: <AANLkTimp2JT4XT5EHwKwmMQ+5KYgHTOzpqDwF3UjGDBh@mail.gmail.com>

On Thu, 2010-09-16 at 21:53 +0200, ext Ohad Ben-Cohen wrote:
> On Thu, Sep 16, 2010 at 9:40 PM, Luciano Coelho
> <luciano.coelho@nokia.com> wrote:
> >> +     int ret = wl->if_ops->power(wl, true);
> >
> > I think it look nicer if you keep the "int ret" in one line by itself
> > and then do a ret = wl->if_ops... on another one.
> 
> Fixed.
> 
> >> +static int wl1271_sdio_power_on(struct wl1271 *wl)
> >>  {
> >>       struct sdio_func *func = wl_to_func(wl);
> >>
> >>       sdio_claim_host(func);
> >>       sdio_enable_func(func);
> >>       sdio_release_host(func);
> >> +
> >> +     return 0;
> >>  }
> >
> > You seem to always return 0, so the whole chain to pass the value up
> > seems unnecessary.  Is this just a preparation for a future patch?
> 
> Yes, it's soon going to be:
> 
> static int wl1271_sdio_power_on(struct wl1271 *wl)
> {
>        struct sdio_func *func = wl_to_func(wl);
>        int ret;
> 
>        ret = pm_runtime_get_sync(&func->dev);
>        if (ret)
>                  goto out;
> 
>        sdio_claim_host(func);
>        sdio_enable_func(func);
>        sdio_release_host(func);
> 
> out:
>        return ret;
> }
> 

Ok, that was the only explanation I could think of ;)

Acked-by: Luciano Coelho <luciano.coelho@nokia.com>

-- 
Cheers,
Luca.


      reply	other threads:[~2010-09-16 19:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 23:22 [PATCH v6 0/7] native wl1271 support on ZOOM Ohad Ben-Cohen
2010-09-15 23:22 ` [PATCH v6 1/7] wl12xx: make wl12xx.h common to both spi and sdio Ohad Ben-Cohen
2010-09-16 10:17   ` Teemu Paasikivi
2010-09-16 10:45     ` Ohad Ben-Cohen
     [not found]       ` <AANLkTikYd+TojQC-R+Vrdou6KSRwFNczBeTnsX7eTDn4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-16 11:16         ` [PATCH v6 01/17] " Ohad Ben-Cohen
2010-09-16 11:50           ` [PATCH v6 1/7] " Ohad Ben-Cohen
     [not found]           ` <1284635762-12335-1-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2010-09-16 18:35             ` [PATCH v6 01/17] " Luciano Coelho
2010-09-16 19:56               ` Ohad Ben-Cohen
2010-09-16 20:00                 ` Luciano Coelho
2010-09-16 20:46               ` Tony Lindgren
     [not found] ` <1284592929-29616-1-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2010-09-15 23:22   ` [PATCH v6 2/7] wl1271: propagate set_power's return value Ohad Ben-Cohen
     [not found]     ` <1284592929-29616-3-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2010-09-16 19:40       ` Luciano Coelho
2010-09-16 19:53         ` Ohad Ben-Cohen
2010-09-16 19:56           ` Luciano Coelho [this message]

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=1284667011.8951.73.camel@powerslave \
    --to=luciano.coelho@nokia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=ido@wizery.com \
    --cc=kalle.valo@iki.fi \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linville@tuxdriver.com \
    --cc=madhu.cr@ti.com \
    --cc=nico@fluxnic.net \
    --cc=ohad@wizery.com \
    --cc=roger.quadros@nokia.com \
    --cc=san@google.com \
    --cc=tony@atomide.com \
    --cc=vitalywool@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;
as well as URLs for NNTP newsgroup(s).