Re: [PATCH 1/2] pcmcia: cm4000_cs.c: Remove duplicated function names
Hi Rasmus, On Fri, Feb 06, 2015 at 12:17:21AM +0100, Rasmus Villemoes wrote: > 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. Acked-by: Harald Welte also for 2/2 of that patch series. Thanks! Regards, Harald -- - Harald Weltehttp://laforge.gnumonks.org/ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pcmcia: cm4000_cs.c: Remove duplicated function names
Hi Rasmus, On Fri, Feb 06, 2015 at 12:17:21AM +0100, Rasmus Villemoes wrote: 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. Acked-by: Harald Welte lafo...@gnumonks.org also for 2/2 of that patch series. Thanks! Regards, Harald -- - Harald Welte lafo...@gnumonks.org http://laforge.gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[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 --- 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 *)>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, >flags)) { @@ -680,7 +680,7 @@ static void monitor_card(unsigned long p) clear_bit(LOCK_MONITOR, >flags); /* close et al. are sleeping on devq, so wake it */ wake_up_interruptible(>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, >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, >flags) == 0) && @@ -911,7 +911,7 @@ release_io: wake_up_interruptible(>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(>timer, jiffies + dev->mdelay); clear_bit(LOCK_MONITOR, >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, >flags); wake_up_interruptible(>ioq); - DEBUGP(2, dev, "<- cmm_read returns: rc = %Zi\n", + DEBUGP(2, dev, "<-
[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 li...@rasmusvillemoes.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));