linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 14/15] watchdog/mpcore_wdt: Add clock framework support
Date: Wed, 7 Mar 2012 12:47:51 +0000	[thread overview]
Message-ID: <20120307124751.GU17370@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAOh2x=mCMdSVAGXtEg3=P8aJxc5kmk-UqDYeKLGnQZpUYu0DrA@mail.gmail.com>

On Wed, Mar 07, 2012 at 04:37:12AM -0800, viresh kumar wrote:
> On 3/7/12, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > Drivers have no business interpreting anything but an IS_ERR() return from
> > clk_get() as invalid.  Everything else is the CLK APIs business, not the
> > driver's business.  So, to start using NULL as a special case is wrong.
> 
> But driver isn't comparing return value of clk_get with NULL (that would have
> been wrong) or interpreting its return value in a wrong way.

What if clk_get() returned NULL?

Hint: as far as _you_ are concerned as a driver writer, a struct clk is
an opaque cookie.  IS_ERR(clk) means the cookie is invalid.  Everything
else is potentially valid.  You must not interpret anything which is
potentially valid as some kind of special case.

> Instead it is using the same pointer/variable to check if clk_* APIs are
> supported or not by making it NULL. And that's a driver convention.

Bollocks it is.

Plain and simple NAK to this patch until clue is forthcoming.

  reply	other threads:[~2012-03-07 12:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 10:27 [PATCH 00/15] watchdog/mpcore: updates & fixes Viresh Kumar
2012-03-07 10:27 ` [PATCH 01/15] watchdog/mpcore_wdt: Fix multiline comments Viresh Kumar
2012-03-07 10:27 ` [PATCH 02/15] watchdog/mpcore_wdt: Add blank line after variable definitions in routines Viresh Kumar
2012-03-07 10:27 ` [PATCH 03/15] watchdog/mpcore_wdt: Arrange #includes in alphabetical order Viresh Kumar
2012-03-07 10:27 ` [PATCH 04/15] watchdog/mpcore_wdt: remove multiple 'ret = 0' statements from ioctl ops Viresh Kumar
2012-03-07 10:27 ` [PATCH 05/15] watchdog/mpcore_wdt: Rename dev to pdev for pointing to struct platform_device Viresh Kumar
2012-03-07 10:27 ` [PATCH 06/15] watchdog/mpcore_wdt: do request_irq before registering misc device Viresh Kumar
2012-03-07 10:27 ` [PATCH 07/15] watchdog/mpcore_wdt: Use devm routines Viresh Kumar
2012-03-07 10:27 ` [PATCH 08/15] watchdog/mpcore_wdt: handle module param mpcore_margin in probe Viresh Kumar
2012-03-07 10:27 ` [PATCH 09/15] watchdog/mpcore_wdt: convert to use module_platform_driver() Viresh Kumar
2012-03-07 10:27 ` [PATCH 10/15] watchdog/mpcore_wdt: Add support for dev_pm_ops interface Viresh Kumar
2012-03-07 11:38   ` Sergei Shtylyov
2012-03-07 12:11     ` viresh kumar
2012-03-07 10:27 ` [PATCH 11/15] watchdog/mpcore_wdt: disable wdt in suspend only if it is busy Viresh Kumar
2012-03-07 10:27 ` [PATCH 12/15] watchdog/mpcore_wdt: Add support for WDIOF_CARDRESET Viresh Kumar
2012-03-07 11:40   ` Sergei Shtylyov
2012-03-07 12:10     ` viresh kumar
2012-03-07 10:27 ` [PATCH 13/15] watchdog/mpcore_wdt: Allow platform_get_irq() to fail Viresh Kumar
2012-03-07 10:27 ` [PATCH 14/15] watchdog/mpcore_wdt: Add clock framework support Viresh Kumar
2012-03-07 11:17   ` Srinidhi Kasagar
2012-03-07 12:13     ` viresh kumar
2012-03-07 11:18   ` Russell King - ARM Linux
2012-03-07 12:20     ` viresh kumar
2012-03-07 12:27       ` Russell King - ARM Linux
2012-03-07 12:37         ` viresh kumar
2012-03-07 12:47           ` Russell King - ARM Linux [this message]
2012-03-07 10:27 ` [PATCH 15/15] watchdog/mpcore_wdt: use correct clk_rate to program timeout Viresh Kumar
2012-03-07 10:34 ` [PATCH 00/15] watchdog/mpcore: updates & fixes Wolfram Sang
2012-03-07 12:26   ` viresh kumar
2012-03-07 12:48     ` Wolfram Sang

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=20120307124751.GU17370@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).