lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jun 2014 09:59:12 -0700
From:	Joe Perches <joe@...ches.com>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	Himangi Saraogi <himangi774@...il.com>,
	Gilles Muller <Gilles.Muller@...6.fr>,
	Nicolas Palix <nicolas.palix@...g.fr>,
	Michal Marek <mmarek@...e.cz>, cocci@...teme.lip6.fr,
	linux-kernel@...r.kernel.org, benoit.taine@...6.fr
Subject: Re: [PATCH] Coccinelle: Script to drop parenthesis in the return
 statements

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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ