public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Himangi Saraogi <himangi774@gmail.com>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Michal Marek <mmarek@suse.cz>,
	cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org,
	benoit.taine@lip6.fr
Subject: Re: [PATCH] Coccinelle: Script to drop parenthesis in the return statements
Date: Thu, 19 Jun 2014 09:59:12 -0700	[thread overview]
Message-ID: <1403197152.9958.5.camel@joe-AO725> (raw)
In-Reply-To: <alpine.DEB.2.10.1406191848020.2078@hadrien>

On Thu, 2014-06-19 at 18:49 +0200, Julia Lawall wrote:
> On Thu, 19 Jun 2014, Joe Perches wrote:
> > On Thu, 2014-06-19 at 21:59 +0530, Himangi Saraogi wrote:
> > > This script detects the use of a parenthesis around return value ot the
> > > return statements and removes them as they are unnecessary and against
> > > the CodingStyle. A new directory called checkpatch is added for semantic
> > > patches that just make patches for what checkpatch does. This will help
> > > developers having checkpatch problems, to run the semantic patches in this
> > > directory on their code and fix some of them automatically.
> >
> > checkpatch already has --fix and --fix-inplace options that
> > do something similar.
> 
> OK.  Then it is not worth adding coccinelle scripts for simple changes
> like this one.
> 
> I guess that some of the more complex changes, like choosing an
> appropriate error message function, checkpatch does not do?

I'm not quite sure what you're suggesting.

You mean choosing pr_err vs pr_notice or something
like finding an active struct <foo> and converting
printks to <foo>_<level>(&foo, fmt, ...)

from:
{
	struct device *dev;
	...
	printk(KERN_ERR "msg", ...)
to:
	dev_err(dev, "msg", ...)

checkpatch definitely can not do that.

Is it something else?


  reply	other threads:[~2014-06-19 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 16:29 [PATCH] Coccinelle: Script to drop parenthesis in the return statements Himangi Saraogi
2014-06-19 16:34 ` Joe Perches
2014-06-19 16:49   ` Julia Lawall
2014-06-19 16:59     ` Joe Perches [this message]
2014-06-20  5:22       ` 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=1403197152.9958.5.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=benoit.taine@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=himangi774@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --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