lkml.org 
[lkml]   [2014]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: tulip: delete useless tests on netdev_priv
From
From: Grant Grundler <grantgrundler@gmail.com>
Date: Thu, 2 Jan 2014 07:57:26 -0800

> On Thu, Jan 2, 2014 at 8:28 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>> From: Julia Lawall <Julia.Lawall@lip6.fr>
>>
>> Netdev_priv performs an addition, not a pointer dereference, so it seems
>> quit unlikely that its result would ever be NULL.
>
> LGTM.
>
> >
>> A semantic patch that makes this change is as follows:
>> (http://coccinelle.lip6.fr/)
>>
>> // <smpl>
>> @@
>> statement S;
>> @@
>>
>> - if (!netdev_priv(...)) S
>> // </smpl>
>>
>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Acked-by: Grant Grundler <grundler@parisc-linux.org>

Applied, thanks everyone.


\
 
 \ /
  Last update: 2014-01-04 02:21    [W:0.042 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site