devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Roger Quadros <rogerq@ti.com>,
	bcousson@baylibre.com, tony@atomide.com, balbi@ti.com,
	sre@debian.org, mark.rutland@arm.com,
	m.paolino@virtualopensystems.com, linux-omap@vger.kernel.org,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision
Date: Fri, 10 Jan 2014 14:26:40 +0000	[thread overview]
Message-ID: <20140110142640.GA32035@lee--X1> (raw)
In-Reply-To: <201401101513.40470.arnd@arndb.de>

On Fri, 10 Jan 2014, Arnd Bergmann wrote:

> On Friday 10 January 2014, Lee Jones wrote:
> > >  
> > > -     need_logic_fck = false;
> > > +     /* Set all clocks as invalid to begin with */
> > > +     omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-EINVAL);
> > > +     omap->utmi_p1_gfclk = omap->utmi_p2_gfclk = ERR_PTR(-EINVAL);
> > > +     omap->xclk60mhsp1_ck = omap->xclk60mhsp2_ck = ERR_PTR(-EINVAL);
> > 
> > I don't think this is the correct error code.
> > 
> > -EINVAL means 'invalid parameter'.
> > 
> > You probably want -ENODEV or -ENOSYS ('function not implemented'
> > probably isn't ideal either tbh, but you get the idea). Perhaps you
> > can set them as NULL and check for IS_ERR_OR_NULL() instead?
> 
> I think ENODEV is ok here, I'd much prefer this over IS_ERR_OR_NULL().

Sounds good to me.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-01-10 14:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 12:08 [PATCH v5 0/9] USB Host support for OMAP5 uEVM (for 3.14) Roger Quadros
2014-01-09 12:08 ` [PATCH v5 1/9] mfd: omap-usb-host: Use resource managed clk_get() Roger Quadros
2014-01-10 10:12   ` Lee Jones
2014-01-09 12:08 ` [PATCH v5 3/9] mfd: omap-usb-host: Update DT clock binding information Roger Quadros
     [not found]   ` <1389269303-30465-4-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-01-10 10:11     ` Lee Jones
2014-01-20  9:14       ` Roger Quadros
2014-01-09 12:08 ` [PATCH v5 4/9] mfd: omap-usb-tll: " Roger Quadros
     [not found] ` <1389269303-30465-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-01-09 12:08   ` [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision Roger Quadros
2014-01-10 10:22     ` Lee Jones
2014-01-10 14:13       ` Arnd Bergmann
2014-01-10 14:26         ` Lee Jones [this message]
2014-01-20  9:14           ` Roger Quadros
2014-01-09 12:08   ` [PATCH v5 5/9] ARM: dts: omap4: Update omap-usb-host node Roger Quadros
2014-01-09 12:08   ` [PATCH v5 6/9] ARM: dts: omap5: " Roger Quadros
2014-01-09 12:08   ` [PATCH v5 7/9] ARM: dts: omap4-panda: Provide USB PHY clock Roger Quadros
2014-01-09 12:08 ` [PATCH v5 8/9] ARM: dts: omap5-uevm: " Roger Quadros
2014-01-09 12:08 ` [PATCH v5 9/9] ARM: OMAP2+: Remove legacy_init_ehci_clk() Roger Quadros

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=20140110142640.GA32035@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=arnd@arndb.de \
    --cc=balbi@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.paolino@virtualopensystems.com \
    --cc=mark.rutland@arm.com \
    --cc=rogerq@ti.com \
    --cc=sameo@linux.intel.com \
    --cc=sre@debian.org \
    --cc=tony@atomide.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).