linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Dan Carpenter <error27@gmail.com>, Tony Prisk <linux@prisktech.co.nz>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>,
	kernel-janitors@vger.kernel.org,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	linux-kernel@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL
Date: Thu, 03 Jan 2013 00:14:38 +0100	[thread overview]
Message-ID: <50E4BF5E.9060108@gmail.com> (raw)
In-Reply-To: <CA+_b7DK2zbBzbCh15ikEAeGP5h-V9gQ_YcX15O-RNvWxCk8Zfg@mail.gmail.com>

On 01/02/2013 06:10 AM, Dan Carpenter wrote:
> clk_get() returns NULL if CONFIG_HAVE_CLK is disabled.

It's not a problem for this driver, as it never dereferences what's
returned from clk_get(). It would have to include <plat/clock.h>, which
it doesn't and which would have clearly indicated abuse of the clock API.

Moreover, this driver now depends on architectures that select HAVE_CLK,
so it couldn't be build when CONFIG_HAVE_CLK is disabled.

> I told Tony about this but everyone has been gone with end of year
> holidays so it hasn't been addressed.
>
> Tony, please fix it so people don't apply these patches until
> clk_get() is updated to not return NULL.  It sucks to have to revert
> patches.

As explained by Russell many times, the clock API users should not care
whether the value returned from clk_get() is NULL or not. It should only
be tested with IS_ERR(). The patches look fine to me, no need to do
anything.

---

Regards,
Sylwester

      parent reply	other threads:[~2013-01-02 23:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1355852048-23188-1-git-send-email-linux@prisktech.co.nz>
2012-12-18 17:34 ` [PATCH RESEND 4/6] clk: s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL Tony Prisk
2013-01-01 19:41   ` Sylwester Nawrocki
2012-12-18 17:34 ` [PATCH RESEND 5/6] clk: s5p-fimc: " Tony Prisk
2012-12-18 17:34 ` [PATCH RESEND 6/6] clk: s5p-g2d: " Tony Prisk
2012-12-22 21:53   ` Sergei Shtylyov
2013-01-01 18:33     ` Sylwester Nawrocki
2013-01-02  5:10       ` Dan Carpenter
2013-01-02  5:31         ` Tony Prisk
2013-01-02  7:29           ` Julia Lawall
2013-01-02  9:28             ` Russell King - ARM Linux
2013-01-03  9:05           ` Dan Carpenter
2013-01-03  9:14             ` Julia Lawall
2013-01-03 10:00               ` Russell King - ARM Linux
2013-01-03 10:00             ` Russell King - ARM Linux
2013-01-03 11:10               ` Dan Carpenter
2013-01-03 11:21                 ` Russell King - ARM Linux
2013-01-03 13:45                   ` Dan Carpenter
2013-01-03 13:52                     ` Russell King - ARM Linux
2013-01-02  9:26         ` Russell King - ARM Linux
2013-01-02  9:44           ` Julia Lawall
2013-01-02 10:15             ` Russell King - ARM Linux
2013-01-02 23:14         ` Sylwester Nawrocki [this message]

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=50E4BF5E.9060108@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=sshtylyov@mvista.com \
    --cc=t.stanislaws@samsung.com \
    /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).