Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1430074

Re: [PATCH] Coccinelle: Add misc/boolconv.cocci

From "Andrew F. Davis" <afd@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Coccinelle: Add misc/boolconv.cocci
Date 2016-06-23 21:30 +0200
Message-ID <rNiu5-68M-3@gated-at.bofh.it> (permalink)
References <rNi13-5I7-7@gated-at.bofh.it> <rNikp-64A-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/23/2016 02:12 PM, Joe Perches wrote:
> On Thu, 2016-06-23 at 13:53 -0500, Andrew F. Davis wrote:
>> Add a script to check for unneeded conversions to bool.
> 
> this could also be extended for bool functions that:
> 
> 	return !!expression;
> and
> 	return expression != 0;
> 

Agreed, it's in the works, I was going to post this current set with
some patches to the kernel that is detects, then add additional checks
and their kernel fixes incrementally.

For the second suggestion I think we could have additions to
boolinit.cocci that include the results of comparison/logical operations.

Thanks,
Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Coccinelle: Add misc/boolconv.cocci "Andrew F. Davis" <afd@ti.com> - 2016-06-23 21:00 +0200
  Re: [PATCH] Coccinelle: Add misc/boolconv.cocci Joe Perches <joe@perches.com> - 2016-06-23 21:20 +0200
    Re: [PATCH] Coccinelle: Add misc/boolconv.cocci "Andrew F. Davis" <afd@ti.com> - 2016-06-23 21:30 +0200
  Re: [PATCH] Coccinelle: Add misc/boolconv.cocci Julia Lawall <julia.lawall@lip6.fr> - 2016-06-27 00:10 +0200

csiph-web