public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd@ti.com>
To: Joe Perches <joe@perches.com>,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Michal Marek <mmarek@suse.com>
Cc: <cocci@systeme.lip6.fr>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Coccinelle: Add misc/boolconv.cocci
Date: Thu, 23 Jun 2016 14:22:13 -0500	[thread overview]
Message-ID: <576C36E5.9030909@ti.com> (raw)
In-Reply-To: <1466709177.1847.19.camel@perches.com>

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

  reply	other threads:[~2016-06-23 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 18:53 [PATCH] Coccinelle: Add misc/boolconv.cocci Andrew F. Davis
2016-06-23 19:12 ` Joe Perches
2016-06-23 19:22   ` Andrew F. Davis [this message]
2016-06-26 22:01 ` Julia Lawall

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=576C36E5.9030909@ti.com \
    --to=afd@ti.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=nicolas.palix@imag.fr \
    /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