Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if 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,

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Julia Lawall
On Thu, 3 Jan 2013, Dan Carpenter wrote: On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if CONFIG_HAVE_CLK is disabled. I told Tony about this but everyone has been gone with end of year

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Russell King - ARM Linux
On Thu, Jan 03, 2013 at 12:05:20PM +0300, Dan Carpenter wrote: On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: Why should a _consumer_ of a clock care? It is _very_ important that people get this idea - to a consumer, the struct clk is just an opaque cookie. The fact that it

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Russell King - ARM Linux
On Thu, Jan 03, 2013 at 10:14:13AM +0100, Julia Lawall wrote: On Thu, 3 Jan 2013, Dan Carpenter wrote: On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if CONFIG_HAVE_CLK is disabled. I

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
Come on... Don't say we haven't read comment. Obviously, the first thing we did was read that comment. I've read it many times at this point and I still think we should add in a bit which says: NOTE: Drivers should treat the return value as an opaque cookie and not dereference it. NULL

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Russell King - ARM Linux
On Thu, Jan 03, 2013 at 02:10:40PM +0300, Dan Carpenter wrote: Come on... Don't say we haven't read comment. Obviously, the first thing we did was read that comment. I've read it many times at this point and I still think we should add in a bit which says: So where does it give you in that

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
On Thu, Jan 03, 2013 at 11:21:02AM +, Russell King - ARM Linux wrote: Maybe you don't realise, but IS_ERR(NULL) is false. Therefore, this falls into category (2). No, obviously, I know the difference between IS_ERR() and IS_ERR_OR_NULL(). That's how we started this thread. *shrug*.

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Russell King - ARM Linux
On Thu, Jan 03, 2013 at 04:45:54PM +0300, Dan Carpenter wrote: On Thu, Jan 03, 2013 at 11:21:02AM +, Russell King - ARM Linux wrote: Maybe you don't realise, but IS_ERR(NULL) is false. Therefore, this falls into category (2). No, obviously, I know the difference between IS_ERR() and

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-02 Thread Russell King - ARM Linux
On Wed, Jan 02, 2013 at 08:10:36AM +0300, Dan Carpenter wrote: clk_get() returns NULL if 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

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-02 Thread Russell King - ARM Linux
On Wed, Jan 02, 2013 at 08:29:57AM +0100, Julia Lawall wrote: There are dereferences to the result of clk_get a few times. I tried the following semantic patch: And those are buggy; struct clk is _SUPPOSED_ to be an OPAQUE COOKIE and no one other than the clk code should be dereferencing it.

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-02 Thread Julia Lawall
On Wed, 2 Jan 2013, Russell King - ARM Linux wrote: On Wed, Jan 02, 2013 at 08:10:36AM +0300, Dan Carpenter wrote: clk_get() returns NULL if 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,

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-02 Thread Russell King - ARM Linux
On Wed, Jan 02, 2013 at 10:44:32AM +0100, Julia Lawall wrote: On Wed, 2 Jan 2013, Russell King - ARM Linux wrote: On Wed, Jan 02, 2013 at 08:10:36AM +0300, Dan Carpenter wrote: clk_get() returns NULL if CONFIG_HAVE_CLK is disabled. I told Tony about this but everyone has been gone

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-02 Thread Sylwester Nawrocki
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

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Sylwester Nawrocki
On 12/22/2012 10:53 PM, Sergei Shtylyov wrote: Hello. On 18-12-2012 21:34, Tony Prisk wrote: Resend to include mailing lists. Such remarks should be placed under --- tear line, not in the changelog. Replace IS_ERR_OR_NULL with IS_ERR on clk_get results. Signed-off-by: Tony Prisk

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Dan Carpenter
clk_get() returns NULL if 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

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Tony Prisk
On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if 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()

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Julia Lawall
On Wed, 2 Jan 2013, Tony Prisk wrote: On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if 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

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2012-12-22 Thread Sergei Shtylyov
Hello. On 18-12-2012 21:34, Tony Prisk wrote: Resend to include mailing lists. Such remarks should be placed under --- tear line, not in the changelog. Replace IS_ERR_OR_NULL with IS_ERR on clk_get results. Signed-off-by: Tony Prisk li...@prisktech.co.nz CC: Kyungmin Park

[PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2012-12-18 Thread Tony Prisk
Resend to include mailing lists. Replace IS_ERR_OR_NULL with IS_ERR on clk_get results. Signed-off-by: Tony Prisk li...@prisktech.co.nz CC: Kyungmin Park kyungmin.p...@samsung.com CC: Tomasz Stanislawski t.stanisl...@samsung.com CC: linux-media@vger.kernel.org ---