linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: Inconsistency in clk framework
Date: Thu, 20 Dec 2012 08:00:49 +1300	[thread overview]
Message-ID: <1355943649.2451.1.camel@gitbox> (raw)
In-Reply-To: <1355938492.27893.8.camel@gitbox>

On Thu, 2012-12-20 at 06:34 +1300, Tony Prisk wrote:
> On Wed, 2012-12-19 at 09:26 +0000, Russell King - ARM Linux wrote:
> > On Wed, Dec 19, 2012 at 05:10:33PM +1300, Tony Prisk wrote:
> > > Hi Mike,
> > > 
> > > In attempting to remove some IS_ERR_OR_NULL references, it was pointed
> > > out that clk_get() can return NULL if CONFIG_HAVE_CLK is not defined.
> > 
> > That is correct - but why is that a problem?  As far as users are
> > concerned, NULL is a valid clock.  If HAVE_CLK is undefined, do you
> > want all your drivers to suddenly stop working?
> 
> That will be where the misunderstanding has occurred - I didn't consider
> NULL to be a valid clock.
> 
> Given that NULL is a valid clock, I guess all tests against get_clk and
> of_get_clk results should be IS_ERR_OR_NULL. Correct?
> 
For the sake of clarity, I should rephrase:

If the driver can't operate with a NULL clk, it should use a
IS_ERR_OR_NULL test to test for failure, rather than IS_ERR.

Regards
Tony P

  reply	other threads:[~2012-12-19 19:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19  4:10 Inconsistency in clk framework Tony Prisk
2012-12-19  9:26 ` Russell King - ARM Linux
2012-12-19 17:34   ` Tony Prisk
2012-12-19 19:00     ` Tony Prisk [this message]
2012-12-19 19:08       ` Russell King - ARM Linux
2012-12-20  4:13         ` Tony Prisk
2012-12-20  9:40           ` Russell King - ARM Linux

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=1355943649.2451.1.camel@gitbox \
    --to=linux@prisktech.co.nz \
    --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).