]> git.karo-electronics.de Git - linux-beck.git/commit
Staging: comedi: clean dev_err logging
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Fri, 6 Mar 2015 19:01:38 +0000 (22:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 23:55:36 +0000 (15:55 -0800)
commitce82410c76374be44a4dbd60b906e896a5e20687
tree09f23c62222e7ba3d84278b4affa826e5c6b7415
parent99beca13675c842b83d83e5d5b24d3a80dde1f58
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.
This was done using Coccinelle, with the following semantic patch:

@a@
expression E, R;
expression  msg;
@@

dev_err(E, msg, __func__, R);

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

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

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

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

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