From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision
Date: Fri, 10 Jan 2014 15:13:39 +0100 [thread overview]
Message-ID: <201401101513.40470.arnd@arndb.de> (raw)
In-Reply-To: <20140110102251.GH28141@lee--X1>
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().
Arnd
next prev parent reply other threads:[~2014-01-10 14:13 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 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 [this message]
2014-01-10 14:26 ` Lee Jones
2014-01-20 9:14 ` Roger Quadros
2014-01-09 12:08 ` [PATCH v5 3/9] mfd: omap-usb-host: Update DT clock binding information Roger Quadros
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
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=201401101513.40470.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).