public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Joe Perches <joe@perches.com>
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: Fri, 20 Jun 2014 07:22:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1406200722120.1990@localhost6.localdomain6> (raw)
In-Reply-To: <1403197152.9958.5.camel@joe-AO725>



On Thu, 19 Jun 2014, Joe Perches wrote:

> 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?

Yes, that is what I was thinking of.  Anyway, we can just test whether 
checkpatch --fix can d the change before proposing a semantic patch for 
it.

julia

      reply	other threads:[~2014-06-20  5:23 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
2014-06-20  5:22       ` Julia Lawall [this message]

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=alpine.DEB.2.02.1406200722120.1990@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=Gilles.Muller@lip6.fr \
    --cc=benoit.taine@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=himangi774@gmail.com \
    --cc=joe@perches.com \
    --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