From: Haneen Mohammed <hamohammed.sa@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Subject: [PATCH 5/7] Staging: slicoss: Clean dev_err() logging
Date: Thu, 5 Mar 2015 22:38:59 +0300 [thread overview]
Message-ID: <1425584339-28322-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/slicoss/slicoss.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 45f6a5f..2923b2c 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1529,8 +1529,8 @@ retry_rcvqfill:
skb->next = NULL;
#ifdef KLUDGE_FOR_4GB_BOUNDARY
if (paddrl == 0) {
- dev_err(dev, "%s: LOW 32bits PHYSICAL ADDRESS == 0\n",
- __func__);
+ dev_err(dev,
+ "LOW 32bits PHYSICAL ADDRESS == 0\n");
dev_err(dev, "skb[%p] PROBLEM\n", skb);
dev_err(dev, " skbdata[%p]\n",
skb->data);
@@ -1549,8 +1549,8 @@ retry_rcvqfill:
}
#else
if (paddrl == 0) {
- dev_err(dev, "%s: LOW 32bits PHYSICAL ADDRESS == 0\n",
- __func__);
+ dev_err(dev,
+ "LOW 32bits PHYSICAL ADDRESS == 0\n");
dev_err(dev, "skb[%p] PROBLEM\n", skb);
dev_err(dev, " skbdata[%p]\n",
skb->data);
@@ -1685,8 +1685,7 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb)
if (paddrl == 0) {
dev = &adapter->netdev->dev;
- dev_err(dev, "%s: LOW 32bits PHYSICAL ADDRESS == 0\n",
- __func__);
+ dev_err(dev, "LOW 32bits PHYSICAL ADDRESS == 0\n");
dev_err(dev, "skb[%p] PROBLEM\n", skb);
dev_err(dev, " skbdata[%p]\n", skb->data);
dev_err(dev, " skblen[%x]\n", skb->len);
@@ -2293,8 +2292,7 @@ static int slic_if_init(struct adapter *adapter)
/* adapter should be down at this point */
if (adapter->state != ADAPT_DOWN) {
- dev_err(&dev->dev, "%s: adapter->state != ADAPT_DOWN\n",
- __func__);
+ dev_err(&dev->dev, "adapter->state != ADAPT_DOWN\n");
rc = -EIO;
goto err;
}
--
1.9.1
next prev parent reply other threads:[~2015-03-05 19:40 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 ` Haneen Mohammed [this message]
2015-03-05 19:42 ` [PATCH 6/7] Staging: gdm72xx: " Haneen Mohammed
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=1425584339-28322-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.