[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423178242-16079-2-git-send-email-linux@rasmusvillemoes.dk>
Date: Fri, 6 Feb 2015 00:17:22 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Harald Welte <laforge@...monks.org>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] pcmcia: cm4040_cs.c: Remove duplicated function names
The macro DEBUGP already ensures that __func__ is included in the
output, so there's no reason to have the function name in the format
string itself.
I've also removed a useless KERN_INFO in cm4040_reader_release which
would end up in the middle of the format string.
Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
drivers/char/pcmcia/cm4040_cs.c | 46 ++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 8dd48a2be911..ab004524ba8c 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -223,7 +223,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
int rc;
unsigned char uc;
- DEBUGP(2, dev, "-> cm4040_read(%s,%d)\n", current->comm, current->pid);
+ DEBUGP(2, dev, "-> %s,%d\n", current->comm, current->pid);
if (count == 0)
return 0;
@@ -233,7 +233,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
if (filp->f_flags & O_NONBLOCK) {
DEBUGP(4, dev, "filep->f_flags O_NONBLOCK set\n");
- DEBUGP(2, dev, "<- cm4040_read (failure)\n");
+ DEBUGP(2, dev, "<- failure\n");
return -EAGAIN;
}
@@ -244,7 +244,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
rc = wait_for_bulk_in_ready(dev);
if (rc <= 0) {
DEBUGP(5, dev, "wait_for_bulk_in_ready rc=%.2x\n", rc);
- DEBUGP(2, dev, "<- cm4040_read (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
return -EIO;
@@ -271,7 +271,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
rc = wait_for_bulk_in_ready(dev);
if (rc <= 0) {
DEBUGP(5, dev, "wait_for_bulk_in_ready rc=%.2x\n", rc);
- DEBUGP(2, dev, "<- cm4040_read (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
return -EIO;
@@ -292,7 +292,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
rc = wait_for_bulk_in_ready(dev);
if (rc <= 0) {
DEBUGP(5, dev, "wait_for_bulk_in_ready rc=%.2x\n", rc);
- DEBUGP(2, dev, "<- cm4040_read (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
return -EIO;
@@ -301,7 +301,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
rc = write_sync_reg(SCR_READER_TO_HOST_DONE, dev);
if (rc <= 0) {
DEBUGP(5, dev, "write_sync_reg c=%.2x\n", rc);
- DEBUGP(2, dev, "<- cm4040_read (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
else
@@ -310,7 +310,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
uc = xinb(iobase + REG_OFFSET_BULK_IN);
- DEBUGP(2, dev, "<- cm4040_read (successfully)\n");
+ DEBUGP(2, dev, "<- successfully\n");
return min_bytes_to_read;
}
@@ -323,21 +323,21 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
int i;
unsigned int bytes_to_write;
- DEBUGP(2, dev, "-> cm4040_write(%s,%d)\n", current->comm, current->pid);
+ DEBUGP(2, dev, "-> %s,%d\n", current->comm, current->pid);
if (count == 0) {
- DEBUGP(2, dev, "<- cm4040_write empty read (successfully)\n");
+ DEBUGP(2, dev, "<- empty read (successfully)\n");
return 0;
}
if ((count < 5) || (count > READ_WRITE_BUFFER_SIZE)) {
- DEBUGP(2, dev, "<- cm4040_write buffersize=%Zd < 5\n", count);
+ DEBUGP(2, dev, "<- buffersize=%Zd < 5\n", count);
return -EIO;
}
if (filp->f_flags & O_NONBLOCK) {
DEBUGP(4, dev, "filep->f_flags O_NONBLOCK set\n");
- DEBUGP(4, dev, "<- cm4040_write (failure)\n");
+ DEBUGP(4, dev, "<- failure\n");
return -EAGAIN;
}
@@ -375,7 +375,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
rc = write_sync_reg(SCR_HOST_TO_READER_START, dev);
if (rc <= 0) {
DEBUGP(5, dev, "write_sync_reg c=%.2Zx\n", rc);
- DEBUGP(2, dev, "<- cm4040_write (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
else
@@ -389,7 +389,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
if (rc <= 0) {
DEBUGP(5, dev, "wait_for_bulk_out_ready rc=%.2Zx\n",
rc);
- DEBUGP(2, dev, "<- cm4040_write (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
else
@@ -404,14 +404,14 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
if (rc <= 0) {
DEBUGP(5, dev, "write_sync_reg c=%.2Zx\n", rc);
- DEBUGP(2, dev, "<- cm4040_write (failed)\n");
+ DEBUGP(2, dev, "<- failed\n");
if (rc == -ERESTARTSYS)
return rc;
else
return -EIO;
}
- DEBUGP(2, dev, "<- cm4040_write (successfully)\n");
+ DEBUGP(2, dev, "<- successfully\n");
return count;
}
@@ -427,7 +427,7 @@ static unsigned int cm4040_poll(struct file *filp, poll_table *wait)
if (test_and_clear_bit(BS_WRITABLE, &dev->buffer_status))
mask |= POLLOUT | POLLWRNORM;
- DEBUGP(2, dev, "<- cm4040_poll(%u)\n", mask);
+ DEBUGP(2, dev, "<- %u\n", mask);
return mask;
}
@@ -468,7 +468,7 @@ static int cm4040_open(struct inode *inode, struct file *filp)
dev->poll_timer.data = (unsigned long) dev;
mod_timer(&dev->poll_timer, jiffies + POLL_PERIOD);
- DEBUGP(2, dev, "<- cm4040_open (successfully)\n");
+ DEBUGP(2, dev, "<- successfully\n");
ret = nonseekable_open(inode, filp);
out:
mutex_unlock(&cm4040_mutex);
@@ -481,7 +481,7 @@ static int cm4040_close(struct inode *inode, struct file *filp)
struct pcmcia_device *link;
int minor = iminor(inode);
- DEBUGP(2, dev, "-> cm4040_close(maj/min=%d.%d)\n", imajor(inode),
+ DEBUGP(2, dev, "-> maj/min=%d.%d\n", imajor(inode),
iminor(inode));
if (minor >= CM_MAX_DEV)
@@ -496,7 +496,7 @@ static int cm4040_close(struct inode *inode, struct file *filp)
link->open = 0;
wake_up(&dev->devq);
- DEBUGP(2, dev, "<- cm4040_close\n");
+ DEBUGP(2, dev, "<-\n");
return 0;
}
@@ -504,13 +504,13 @@ static void cm4040_reader_release(struct pcmcia_device *link)
{
struct reader_dev *dev = link->priv;
- DEBUGP(3, dev, "-> cm4040_reader_release\n");
+ DEBUGP(3, dev, "->\n");
while (link->open) {
- DEBUGP(3, dev, KERN_INFO MODULE_NAME ": delaying release "
+ DEBUGP(3, dev, MODULE_NAME ": delaying release "
"until process has terminated\n");
wait_event(dev->devq, (link->open == 0));
}
- DEBUGP(3, dev, "<- cm4040_reader_release\n");
+ DEBUGP(3, dev, "<-\n");
return;
}
@@ -542,7 +542,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
DEBUGP(2, dev, "device " DEVICE_NAME "%d at %pR\n", devno,
link->resource[0]);
- DEBUGP(2, dev, "<- reader_config (succ)\n");
+ DEBUGP(2, dev, "<- success\n");
return 0;
--
2.1.3
--
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