Test for NULL as !x where functions that return NULL on failure
are used. Done using the following semantic patch by coccinelle.
@ is_null @
expression E;
statement S;
@@
E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
(
if(!E)
S
The vma argument in update_page_range is no longer
used after 74310e06 ("android: binder: Move buffer
out of area shared with user space"), since mmap_handler
no longer calls update_page_range with a vma.
Acked-by: Arve Hjønnevåg
Signed-off-by: Sherry Yang
---
drivers/android/binder_alloc.c | 1
Use binder_alloc struct's mm_struct rather than getting
a reference to the mm struct through get_task_mm to
avoid a potential deadlock between lru lock, task lock and
dentry lock, since a thread can be holding the task lock
and the dentry lock while trying to acquire the lru lock.
Acked-by: Arve H
Replace use of the combination of list_for_each and list_entry
with list_for_each_entry to simplify the code and remove variables
that are used only in list_for_each.
Issue found and corrected using Coccinelle script:
@r@
expression head, member, e;
type T1, T2, T3;
iterator name list_for_each, li
On Fri, Sep 08, 2017 at 01:53:43PM +0300, Dan Carpenter wrote:
> The background of this code is that we can either use the default
> tables or load our own table with sysfs. The default tables are three
> element arrays of struct tsl2x7x_lux. If we load the table with sysfs
> then we can have as
On Sat, 2017-09-16 at 02:36 +0530, Srishti Sharma wrote:
> Parentheses are not needed on the right hand side of assignment
> statement in most cases. Done using the following semantic
> patch by coccinelle.
[]
> @@
> identifier E,F,G,f;
> expression e,r;
> @@
>
> (
> E = (G == F);
> >
>
> E = (e
On Fri, 15 Sep 2017, Joe Perches wrote:
> On Sat, 2017-09-16 at 02:36 +0530, Srishti Sharma wrote:
> > Parentheses are not needed on the right hand side of assignment
> > statement in most cases. Done using the following semantic
> > patch by coccinelle.
> []
> > @@
> > identifier E,F,G,f;
> > e
From: Stephen Hemminger
Date: Thu, 14 Sep 2017 09:31:07 -0700
> The default receive buffer size was reduced by recent change
> to a value which was appropriate for 10G and Windows Server 2016.
> But the value is too small for full performance with 40G on Azure.
> Increase the default back to maxi
On Sat, Sep 16, 2017 at 2:39 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote:
>> >
>> >
>> > On Sat, 16 Sep 2017, Srishti Sharma wrote:
>> >
>> >> Write assignment statement outside the if statement. Done using
>> >
On Sat, 16 Sep 2017, Srishti Sharma wrote:
> On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote:
> >
> >
> > On Sat, 16 Sep 2017, Srishti Sharma wrote:
> >
> >> Write assignment statement outside the if statement. Done using
> >> the following semantic patch by coccinelle.
> >>
> >> @@
> >> id
On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> Write assignment statement outside the if statement. Done using
>> the following semantic patch by coccinelle.
>>
>> @@
>> identifier E;
>> expression F;
>> statement S;
>> @@
>>
>> -if((E =
Parentheses are not needed on the right hand side of assignment
statement in most cases. Done using the following semantic
patch by coccinelle.
@@
identifier E,F,G,f;
expression e,r;
@@
(
E = (G == F);
|
E = (e == r);
|
E =
-(
...
-)
;
)
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/d
Write assignment statement outside of the if statement. Done
using the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F;
+if(E)
S
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/drivers/irda-usb.c | 4 ++--
drivers/staging/ir
This patch series intends to remove the assignment statements
inside the if statement, and eliminates the cases of parentheses
around the right hand side of assignment generated as a result of
the same.
Srishti Sharma (2):
Staging: irda: Don't use assignment inside if statement
Staging: irda
On Sat, 16 Sep 2017, Srishti Sharma wrote:
> Write assignment statement outside the if statement. Done using
> the following semantic patch by coccinelle.
>
> @@
> identifier E;
> expression F;
> statement S;
> @@
>
> -if((E = F))
> +E = F;
> +if(E)
> S
>
> Signed-off-by: Srishti Sharma
Acke
Write assignment statement outside the if statement. Done using
the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F;
+if(E)
S
Signed-off-by: Srishti Sharma
---
Changes in v2:
-Semicolon was missing in one of the statements of the
On Sat, Sep 16, 2017 at 1:08 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> Write assignment statement outside the if statement. Done using
>> the following semantic patch by coccinelle.
>>
>> @@
>> identifier E;
>> expression F;
>> statement S;
>> @@
>>
>> -if((E =
On Sat, 16 Sep 2017, Srishti Sharma wrote:
> Write assignment statement outside the if statement. Done using
> the following semantic patch by coccinelle.
>
> @@
> identifier E;
> expression F;
> statement S;
> @@
>
> -if((E = F))
> +E = F
The line above would need to end in a ;
This ends up w
On Sat, Sep 16, 2017 at 1:03 AM, Srishti Sharma wrote:
> Write assignment statement outside the if statement. Done using
> the following semantic patch by coccinelle.
>
> @@
> identifier E;
> expression F;
> statement S;
> @@
>
> -if((E = F))
> +E = F
> +if(E)
> S
>
> Signed-off-by: Srishti Shar
Write assignment statement outside the if statement. Done using
the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F
+if(E)
S
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/drivers/irda-usb.c | 4 ++--
drivers/staging/irda/dri
gcc-4.6 causes a harmless warning about the init function:
WARNING: vmlinux.o(.text+0xed62c2): Section mismatch in reference from the
function init_unisys() to the function .init.text:visorutil_spar_detect()
The function init_unisys() references
the function __init visorutil_spar_detect().
This i
> -Original Message-
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
> Sent: Friday, September 15, 2017 6:49 AM
> To: KY Srinivasan
> Cc: Stephen Hemminger ; o...@aepfle.de;
> Stephen Hemminger ;
> gre...@linuxfoundation.org; jasow...@redhat.com; linux-
> ker...@vger.kernel.org; a.
Vitaly Kuznetsov writes:
> Stephen Hemminger writes:
>
>> On Fri, 11 Aug 2017 10:03:59 -0700
>> k...@exchange.microsoft.com wrote:
>>
>>> From: K. Y. Srinivasan
>>>
>>> This patch handles the following issues that were observed when we are
>>> handling racing channel offer message and rescind
On Fri, 15 Sep 2017, Harsha Sharma wrote:
> Remove two adjacent assignments to the same location.
> In practice, many such occurences are intentional but
> this case don't seem to fall into that category.
> Done using following coccinelle semantic patch
>
> @@
> expression e1,e2,e3;
> @@
>
> (
>
Stephen Hemminger writes:
> On Fri, 11 Aug 2017 10:03:59 -0700
> k...@exchange.microsoft.com wrote:
>
>> From: K. Y. Srinivasan
>>
>> This patch handles the following issues that were observed when we are
>> handling racing channel offer message and rescind message for the same
>> offer:
>>
>>
Parenthesis are not needed around the right hand side of an assignment.
This patch was made on the core files of rtl8188eu using the following
coccinelle script.
@@
binary operator op = {==,!=,&&,||,>=,<=,&,|};
expression l, r, t;
@@
(
l = (r op t)
|
l =
-(
r
-)
)
Signed-off-by: Aishwarya Pant
Remove two adjacent assignments to the same location.
In practice, many such occurences are intentional but
this case don't seem to fall into that category.
Done using following coccinelle semantic patch
@@
expression e1,e2,e3;
@@
(
(<+...e1++...+>)=e2;
|
(<+...e1--...+>)=e2;
|
(<+...++e1...+>
27 matches
Mail list logo