From: Haneen Mohammed <hamohammed.sa@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Subject: [PATCH 6/7] Staging: gdm72xx: Clean dev_err() logging
Date: Thu, 5 Mar 2015 22:42:38 +0300 [thread overview]
Message-ID: <1425584558-28392-1-git-send-email-hamohammed.sa@gmail.com> (raw)
In-Reply-To: <1425583768-27996-1-git-send-email-hamohammed.sa@gmail.com>
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;
expression msg;
@@
dev_err(E, msg, __func__);
@script:python b@git rebae -i
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;
identifier b.y;
@@
- dev_err(E, msg, __func__);
+ dev_err(E, y);
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
drivers/staging/gdm72xx/gdm_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gdm72xx/gdm_usb.c b/drivers/staging/gdm72xx/gdm_usb.c
index eac2f34..5ca5f81 100644
--- a/drivers/staging/gdm72xx/gdm_usb.c
+++ b/drivers/staging/gdm72xx/gdm_usb.c
@@ -301,7 +301,7 @@ static int gdm_usb_send(void *priv_dev, void *data, int len,
#endif /* CONFIG_WIMAX_GDM72XX_K_MODE */
if (!udev->usbdev) {
- dev_err(&usbdev->dev, "%s: No such device\n", __func__);
+ dev_err(&usbdev->dev, "No such device\n");
return -ENODEV;
}
@@ -470,7 +470,7 @@ static int gdm_usb_receive(void *priv_dev,
unsigned long flags;
if (!udev->usbdev) {
- dev_err(&usbdev->dev, "%s: No such device\n", __func__);
+ dev_err(&usbdev->dev, "No such device\n");
return -ENODEV;
}
--
1.9.1
next prev parent reply other threads:[~2015-03-05 19:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 19:29 [PATCH 0/7] Staging: clean de_err() loging Haneen Mohammed
2015-03-05 19:31 ` [PATCH 1/7] Staging: media: Clean dev_err() logging Haneen Mohammed
2015-03-05 19:35 ` [PATCH 2/7] Staging: fbtft: " Haneen Mohammed
2015-03-05 19:37 ` [PATCH 3/7] Staging: iio: " Haneen Mohammed
2015-03-05 19:38 ` [PATCH 4/7] Staging: octeon-usb: " Haneen Mohammed
2015-03-05 19:38 ` [PATCH 5/7] Staging: slicoss: " Haneen Mohammed
2015-03-05 19:42 ` Haneen Mohammed [this message]
2015-03-05 19:43 ` [PATCH 7/7] Staging: ste_rmi4: " Haneen Mohammed
2015-03-05 20:40 ` [Outreachy kernel] " Julia Lawall
2015-03-05 21:02 ` Haneen Mohammed
2015-03-05 21:29 ` [PATCH v2 0/7] Staging: clean de_err() loging Haneen Mohammed
2015-03-05 21:36 ` [PATCH v3 0/7]Staging: " Haneen Mohammed
2015-03-05 21:42 ` [PATCH v3 1/7] Staging: media: Clean dev_err() logging Haneen Mohammed
2015-03-06 23:52 ` [Outreachy kernel] " Greg KH
2015-03-05 21:44 ` [PATCH v3 2/7] Staging: fbtft: " Haneen Mohammed
2015-03-05 21:46 ` [PATCH v3 3/7] Staging: iio: " Haneen Mohammed
2015-03-05 21:48 ` [PATCH v3 4/7] Staging: octeon-usb: " Haneen Mohammed
2015-03-05 21:50 ` [PATCH v3 5/7] Staging: slicoss: " Haneen Mohammed
2015-03-05 21:52 ` [PATCH v3 6/7] Staging: gdm72xx: " Haneen Mohammed
2015-03-05 21:55 ` [PATCH v3 7/7] Staging: ste_rmi4: " Haneen Mohammed
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=1425584558-28392-1-git-send-email-hamohammed.sa@gmail.com \
--to=hamohammed.sa@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.