]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Staging: comedi: Clean dev_err() logging
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Thu, 5 Mar 2015 10:01:49 +0000 (13:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 23:48:33 +0000 (15:48 -0800)
commitcd25503f5a6f0b0d6d66185461a358e8218db745
treee756c82936c4ad0ce20ac0a5f85b25e240e14b58
parent6d67b3a2f3bd82bfa75f34d9e816788d133d63b5
Staging: comedi: Clean dev_err() logging

This patch removes  __func__ from dev_err. dev_err includes information about:
 (devcice, driver, specific instance of device, etc) in the log printout, so there is no need for  __func__.
This was done using Coccinelle, with the following semantic patch:

@a@
expression E;
expression  msg;
@@

dev_err(E, msg, __func__);

@script:python b@
e << a.msg;
y;
@@

if(e.find("%s: ") == True):
m = e.replace("%s: ", "");
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "");
coccinelle.y = m;
else:
m = e.replace("%s", "");

@c@
expression a.E, a.msg;
identifier  b.y;
@@

- dev_err(E, msg, __func__);
+ dev_err(E, y);

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/ni_mio_common.c