[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423178242-16079-1-git-send-email-linux@rasmusvillemoes.dk>
Date: Fri, 6 Feb 2015 00:17:21 +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 1/2] pcmcia: cm4000_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.
Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
drivers/char/pcmcia/cm4000_cs.c | 52 ++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index c115217c79ae..5630bf501c85 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -322,10 +322,10 @@ static int parse_atr(struct cm4000_dev *dev)
unsigned char ch, ifno;
int ix, done;
- DEBUGP(3, dev, "-> parse_atr: dev->atr_len = %i\n", dev->atr_len);
+ DEBUGP(3, dev, "dev->atr_len = %i\n", dev->atr_len);
if (dev->atr_len < 3) {
- DEBUGP(5, dev, "parse_atr: atr_len < 3\n");
+ DEBUGP(5, dev, "atr_len < 3\n");
return 0;
}
@@ -423,7 +423,7 @@ static void set_cardparameter(struct cm4000_dev *dev)
unsigned int iobase = dev->p_dev->resource[0]->start;
u_int8_t stopbits = 0x02; /* ISO default */
- DEBUGP(3, dev, "-> set_cardparameter\n");
+ DEBUGP(3, dev, "->\n");
dev->flags1 = dev->flags1 | (((dev->baudv - 1) & 0x0100) >> 8);
xoutb(dev->flags1, REG_FLAGS1(iobase));
@@ -443,7 +443,7 @@ static void set_cardparameter(struct cm4000_dev *dev)
}
xoutb(stopbits, REG_STOPBITS(iobase));
- DEBUGP(3, dev, "<- set_cardparameter\n");
+ DEBUGP(3, dev, "<-\n");
}
static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
@@ -457,7 +457,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
rc = 0;
- DEBUGP(3, dev, "-> set_protocol\n");
+ DEBUGP(3, dev, "->\n");
DEBUGP(5, dev, "ptsreq->Protocol = 0x%.8x, ptsreq->Flags=0x%.8x, "
"ptsreq->pts1=0x%.2x, ptsreq->pts2=0x%.2x, "
"ptsreq->pts3=0x%.2x\n", (unsigned int)ptsreq->protocol,
@@ -597,7 +597,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
rc = -EIO;
exit_setprotocol:
- DEBUGP(3, dev, "<- set_protocol\n");
+ DEBUGP(3, dev, "<-\n");
return rc;
}
@@ -628,7 +628,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
/* tell the monitor to stop and wait until
* it terminates.
*/
- DEBUGP(3, dev, "-> terminate_monitor\n");
+ DEBUGP(3, dev, "->\n");
wait_event_interruptible(dev->devq,
test_and_set_bit(LOCK_MONITOR,
(void *)&dev->flags));
@@ -648,7 +648,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
dev->monitor_running = 0;
#endif
- DEBUGP(3, dev, "<- terminate_monitor\n");
+ DEBUGP(3, dev, "<-\n");
}
/*
@@ -667,7 +667,7 @@ static void monitor_card(unsigned long p)
struct ptsreq ptsreq;
int i, atrc;
- DEBUGP(7, dev, "-> monitor_card\n");
+ DEBUGP(7, dev, "->\n");
/* if someone has set the lock for us: we're done! */
if (test_and_set_bit(LOCK_MONITOR, &dev->flags)) {
@@ -680,7 +680,7 @@ static void monitor_card(unsigned long p)
clear_bit(LOCK_MONITOR, &dev->flags);
/* close et al. are sleeping on devq, so wake it */
wake_up_interruptible(&dev->devq);
- DEBUGP(2, dev, "<- monitor_card (we are done now)\n");
+ DEBUGP(2, dev, "<- (we are done now)\n");
return;
}
@@ -821,7 +821,7 @@ static void monitor_card(unsigned long p)
}
if (test_bit(IS_ATR_VALID, &dev->flags) == 1) {
- DEBUGP(4, dev, "monitor_card: ATR valid\n");
+ DEBUGP(4, dev, "ATR valid\n");
/* if ta1 == 0x11, no PPS necessary (default values) */
/* do not do PPS with multi protocol cards */
if ((test_bit(IS_AUTOPPS_ACT, &dev->flags) == 0) &&
@@ -911,7 +911,7 @@ release_io:
wake_up_interruptible(&dev->ioq); /* whoever needs IO */
return_with_timer:
- DEBUGP(7, dev, "<- monitor_card (returns with timer)\n");
+ DEBUGP(7, dev, "<- (returns with timer)\n");
mod_timer(&dev->timer, jiffies + dev->mdelay);
clear_bit(LOCK_MONITOR, &dev->flags);
}
@@ -926,7 +926,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
ssize_t rc;
int i, j, k;
- DEBUGP(2, dev, "-> cmm_read(%s,%d)\n", current->comm, current->pid);
+ DEBUGP(2, dev, "-> (%s,%d)\n", current->comm, current->pid);
if (count == 0) /* according to manpage */
return 0;
@@ -1037,7 +1037,7 @@ release_io:
clear_bit(LOCK_IO, &dev->flags);
wake_up_interruptible(&dev->ioq);
- DEBUGP(2, dev, "<- cmm_read returns: rc = %Zi\n",
+ DEBUGP(2, dev, "<- returns: rc = %Zi\n",
(rc < 0 ? rc : count));
return rc < 0 ? rc : count;
}
@@ -1056,7 +1056,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
ssize_t rc;
int i;
- DEBUGP(2, dev, "-> cmm_write(%s,%d)\n", current->comm, current->pid);
+ DEBUGP(2, dev, "-> (%s,%d)\n", current->comm, current->pid);
if (count == 0) /* according to manpage */
return 0;
@@ -1365,13 +1365,13 @@ release_io:
memset((char *)dev->sbuf, 0, 512);
/* return error or actually written bytes */
- DEBUGP(2, dev, "<- cmm_write\n");
+ DEBUGP(2, dev, "<-\n");
return rc < 0 ? rc : nr;
}
static void start_monitor(struct cm4000_dev *dev)
{
- DEBUGP(3, dev, "-> start_monitor\n");
+ DEBUGP(3, dev, "->\n");
if (!dev->monitor_running) {
DEBUGP(5, dev, "create, init and add timer\n");
setup_timer(&dev->timer, monitor_card, (unsigned long)dev);
@@ -1379,12 +1379,12 @@ static void start_monitor(struct cm4000_dev *dev)
mod_timer(&dev->timer, jiffies);
} else
DEBUGP(5, dev, "monitor already running\n");
- DEBUGP(3, dev, "<- start_monitor\n");
+ DEBUGP(3, dev, "<-\n");
}
static void stop_monitor(struct cm4000_dev *dev)
{
- DEBUGP(3, dev, "-> stop_monitor\n");
+ DEBUGP(3, dev, "->\n");
if (dev->monitor_running) {
DEBUGP(5, dev, "stopping monitor\n");
terminate_monitor(dev);
@@ -1393,7 +1393,7 @@ static void stop_monitor(struct cm4000_dev *dev)
clear_bit(IS_ATR_PRESENT, &dev->flags);
} else
DEBUGP(5, dev, "monitor already stopped\n");
- DEBUGP(3, dev, "<- stop_monitor\n");
+ DEBUGP(3, dev, "<-\n");
}
static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
@@ -1654,7 +1654,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
dev = link->priv;
filp->private_data = dev;
- DEBUGP(2, dev, "-> cmm_open(device=%d.%d process=%s,%d)\n",
+ DEBUGP(2, dev, "-> (device=%d.%d process=%s,%d)\n",
imajor(inode), minor, current->comm, current->pid);
/* init device variables, they may be "polluted" after close
@@ -1681,7 +1681,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
link->open = 1; /* only one open per device */
- DEBUGP(2, dev, "<- cmm_open\n");
+ DEBUGP(2, dev, "<-\n");
ret = nonseekable_open(inode, filp);
out:
mutex_unlock(&cmm_mutex);
@@ -1703,7 +1703,7 @@ static int cmm_close(struct inode *inode, struct file *filp)
dev = link->priv;
- DEBUGP(2, dev, "-> cmm_close(maj/min=%d.%d)\n",
+ DEBUGP(2, dev, "-> (maj/min=%d.%d)\n",
imajor(inode), minor);
stop_monitor(dev);
@@ -1713,7 +1713,7 @@ static int cmm_close(struct inode *inode, struct file *filp)
link->open = 0; /* only one open per device */
wake_up(&dev->devq); /* socket removed? */
- DEBUGP(2, dev, "cmm_close\n");
+ DEBUGP(2, dev, "<-\n");
return 0;
}
@@ -1724,7 +1724,7 @@ static void cmm_cm4000_release(struct pcmcia_device * link)
/* dont terminate the monitor, rather rely on
* close doing that for us.
*/
- DEBUGP(3, dev, "-> cmm_cm4000_release\n");
+ DEBUGP(3, dev, "->\n");
while (link->open) {
printk(KERN_INFO MODULE_NAME ": delaying release until "
"process has terminated\n");
@@ -1735,7 +1735,7 @@ static void cmm_cm4000_release(struct pcmcia_device * link)
wait_event(dev->devq, (link->open == 0));
}
/* dev->devq=NULL; this cannot be zeroed earlier */
- DEBUGP(3, dev, "<- cmm_cm4000_release\n");
+ DEBUGP(3, dev, "<-\n");
return;
}
--
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