From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Russell King - ARM Linux
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard
Date: Sat, 12 Jan 2013 16:04:28 +0530 [thread overview]
Message-ID: <50F13C34.3020808@nvidia.com> (raw)
In-Reply-To: <50F0A2A8.3080401-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On Saturday 12 January 2013 05:09 AM, Stephen Warren wrote:
> On 01/11/2013 04:36 PM, Russell King - ARM Linux wrote:
>> On Fri, Jan 11, 2013 at 04:27:07PM -0700, Stephen Warren wrote:
>>> On 01/11/2013 04:24 PM, Russell King - ARM Linux wrote:
>>>> On Fri, Jan 11, 2013 at 04:09:59PM -0700, Stephen Warren wrote:
>>>>> On 01/11/2013 06:33 AM, Laxman Dewangan wrote:
>>>>>> kbc->clk = clk_get(&pdev->dev, NULL);
>>>>>> if (IS_ERR(kbc->clk)) {
>>>>>> dev_err(&pdev->dev, "failed to get keyboard clock\n");
>>>>>> err = PTR_ERR(kbc->clk);
>>>>>> goto err_iounmap;
>>>>>> }
>>>>> Should that check be if (!kbc-clk) instead? Or does the common clock
>>>>> framework require if (IS_ERR_OR_NULL(kbc->clk)); hopefully not since
>>>>> IS_ERR_OR_NULL shouldn't be used any more.
>>>> /**
>>>> * clk_get - lookup and obtain a reference to a clock producer.
>>>> * @dev: device for clock "consumer"
>>>> * @id: clock consumer ID
>>>> *
>>>> * Returns a struct clk corresponding to the clock producer, or
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> * valid IS_ERR() condition containing errno. ...
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>
>>>> Or, put another way:
>>>>
>>>> If (!IS_ERR(clk))
>>>> The_Clock_Is_Valid();
>>>> Else
>>>> The_Clock_Is_Invalid();
>>>> The_Error = PTR_ERR(clk);
>>> OK, but that doesn't appear to be what happened in practice.
>> It's what I've been saying each time I see an abuse, the problem is
>> people don't care to read the documentation provided let alone
>> understand the interfaces.
>>
>> That's precisely why IS_ERR_OR_NULL() is to be removed. One less
>> thing for someone to throw a dart at as a selection method to use.
>> Or maybe roll a dice. Or whatever way they do seem to choose.
>> (Whatever that is, it's not based on any sound engineering practice
>> I can make out.)
> For the record, I did mention that IS_ERR_OR_NULL() should not be the
> solution here. And the point of my email to Laxman was that he should go
> figure out the answer to my question, which would entail reading the
> documentation/code/...
Going through clock driver, the clk_get() should return error pointer or
valid pointer, atleast not NULL.
Probably our clock driver is returning to NULL and hence issue is
becasue whole world, it check for IS_ERR or !IS_ERR() and null clk
pointer treated as !IS_ERR().
Stephen,
Which is the tree on which Prashant changes are applied. I can debug
from that tree.
next prev parent reply other threads:[~2013-01-12 10:34 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
[not found] ` <1357911185-11048-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-11 23:09 ` Stephen Warren
[not found] ` <50F09BC7.90607-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-11 23:24 ` Russell King - ARM Linux
[not found] ` <20130111232438.GN23505-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-01-11 23:27 ` Stephen Warren
[not found] ` <50F09FCB.70809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-11 23:36 ` Russell King - ARM Linux
[not found] ` <20130111233615.GO23505-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-01-11 23:39 ` Stephen Warren
[not found] ` <50F0A2A8.3080401-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-12 10:34 ` Laxman Dewangan [this message]
[not found] ` <50F13C34.3020808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-12 10:47 ` Russell King - ARM Linux
2013-01-12 11:06 ` Laxman Dewangan
2013-01-14 16:45 ` Stephen Warren
[not found] ` <50F43640.7060308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-14 16:55 ` Russell King - ARM Linux
2013-01-12 10:02 ` Laxman Dewangan
2013-01-14 22:09 ` Stephen Warren
[not found] ` <50F4820C.2050806-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
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=50F13C34.3020808@nvidia.com \
--to=ldewangan-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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).