From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard
Date: Mon, 14 Jan 2013 16:55:51 +0000 [thread overview]
Message-ID: <20130114165551.GJ23505@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <50F43640.7060308@wwwdotorg.org>
On Mon, Jan 14, 2013 at 09:45:52AM -0700, Stephen Warren wrote:
> On 01/12/2013 03:34 AM, Laxman Dewangan wrote:
> ...
> > Which is the tree on which Prashant changes are applied. I can debug
> > from that tree.
>
> git://nv-tegra.nvidia.com/user/swarren/linux-2.6 test-ccf-rework-v4
>
> But as I said in some other email in response to Prashant, I'll go and
> find out why the clk driver is returning NULL.
Exactly - the rule is, the rest of the clk API should accept as valid
anything which clk_get() produces _for that implementation_ which
IS_ERR() is not equal to 1.
What that means is:
- if a platform's clk_get() never returns NULL, then the rest of the clk
API need not test for that value.
(If a NULL pointer is passed to one of the clk API functions, crashing
_is_ _okay_. Consider what memset(NULL, 0, 4096) would do from the
kernel - it doesn't test for a NULL pointer just because it can - it
crashes so you can debug why it was passed a NULL pointer.)
- if a platform's clk_get() does return NULL, then the rest of the clk
API is expected to deal with a NULL pointer in a way that does _not_
result in the system crashing.
Or, to put it another way:
clk = clk_get(...);
if (IS_ERR(clk))
return PTR_ERR(clk);
clk_foo(clk);
for all possible return values of clk_get() that an implementation
_actually_ _intentionally_ returns[*] should never cause an oops.
[*] - bugs excluded. No bugs were squashed in the creation of this email.
next prev parent reply other threads:[~2013-01-14 16:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 13:33 [PATCH 1/3] ARM: DT: tegra: add DT entry for KBC controller Laxman Dewangan
2013-01-11 13:33 ` [PATCH 2/3] ARM: tegra: config: enable KEYBOARD_TEGRA Laxman Dewangan
2013-01-15 18:59 ` Stephen Warren
2013-01-11 13:33 ` [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard Laxman Dewangan
2013-01-11 23:09 ` Stephen Warren
2013-01-11 23:24 ` Russell King - ARM Linux
2013-01-11 23:27 ` Stephen Warren
2013-01-11 23:36 ` Russell King - ARM Linux
2013-01-11 23:39 ` Stephen Warren
2013-01-12 10:34 ` Laxman Dewangan
2013-01-12 10:47 ` Russell King - ARM Linux
2013-01-12 11:06 ` Laxman Dewangan
2013-01-14 16:45 ` Stephen Warren
2013-01-14 16:55 ` Russell King - ARM Linux [this message]
2013-01-12 10:02 ` Laxman Dewangan
2013-01-14 22:09 ` Stephen Warren
2013-01-14 22:32 ` Stephen Warren
2013-01-15 18:59 ` [PATCH 1/3] ARM: DT: tegra: add DT entry for KBC controller Stephen Warren
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=20130114165551.GJ23505@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.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
all inboxes | Powered by JetHome®