From: Joe Perches <joe@perches.com>
To: Randy Dunlap <rdunlap@infradead.org>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] parport_mfc3: Convert DPRINTK to pr_debug
Date: Fri, 28 Feb 2020 00:32:16 -0800 [thread overview]
Message-ID: <66cf3d4a9dbdb24bd3d299b71a2ae05e196ee207.1582878394.git.joe@perches.com> (raw)
In-Reply-To: <cover.1582878393.git.joe@perches.com>
Use a more common logging style.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/parport/parport_mfc3.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c
index 3190ef0..d6bbe8 100644
--- a/drivers/parport/parport_mfc3.c
+++ b/drivers/parport/parport_mfc3.c
@@ -70,11 +70,6 @@
#define MAX_MFC 5
#undef DEBUG
-#ifdef DEBUG
-#define DPRINTK printk
-#else
-static inline int DPRINTK(void *nothing, ...) {return 0;}
-#endif
static struct parport *this_port[MAX_MFC] = {NULL, };
static volatile int dummy; /* for trigger readds */
@@ -84,7 +79,7 @@ static struct parport_operations pp_mfc3_ops;
static void mfc3_write_data(struct parport *p, unsigned char data)
{
-DPRINTK(KERN_DEBUG "write_data %c\n",data);
+ pr_debug("write_data %c\n", data);
dummy = pia(p)->pprb; /* clears irq bit */
/* Triggers also /STROBE.*/
@@ -128,13 +123,13 @@ static unsigned char control_mfc3_to_pc(unsigned char control)
static void mfc3_write_control(struct parport *p, unsigned char control)
{
-DPRINTK(KERN_DEBUG "write_control %02x\n",control);
+ pr_debug("write_control %02x\n", control);
pia(p)->ppra = (pia(p)->ppra & 0x1f) | control_pc_to_mfc3(control);
}
static unsigned char mfc3_read_control( struct parport *p)
{
-DPRINTK(KERN_DEBUG "read_control \n");
+ pr_debug("read_control\n");
return control_mfc3_to_pc(pia(p)->ppra & 0xe0);
}
@@ -142,7 +137,7 @@ static unsigned char mfc3_frob_control( struct parport *p, unsigned char mask, u
{
unsigned char old;
-DPRINTK(KERN_DEBUG "frob_control mask %02x, value %02x\n",mask,val);
+ pr_debug("frob_control mask %02x, value %02x\n", mask, val);
old = mfc3_read_control(p);
mfc3_write_control(p, (old & ~mask) ^ val);
return old;
@@ -171,7 +166,7 @@ static unsigned char mfc3_read_status(struct parport *p)
unsigned char status;
status = status_mfc3_to_pc(pia(p)->ppra & 0x1f);
-DPRINTK(KERN_DEBUG "read_status %02x\n", status);
+ pr_debug("read_status %02x\n", status);
return status;
}
@@ -202,7 +197,7 @@ static void mfc3_disable_irq(struct parport *p)
static void mfc3_data_forward(struct parport *p)
{
- DPRINTK(KERN_DEBUG "forward\n");
+ pr_debug("forward\n");
pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */
pia(p)->pddrb = 255; /* all pins output */
pia(p)->crb |= PIA_DDR; /* make data register visible - default */
@@ -210,7 +205,7 @@ static void mfc3_data_forward(struct parport *p)
static void mfc3_data_reverse(struct parport *p)
{
- DPRINTK(KERN_DEBUG "reverse\n");
+ pr_debug("reverse\n");
pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */
pia(p)->pddrb = 0; /* all pins input */
pia(p)->crb |= PIA_DDR; /* make data register visible - default */
--
2.24.0
next prev parent reply other threads:[~2020-02-28 8:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 2:08 [PATCH] parport: fix if-statement empty body warnings Randy Dunlap
2020-02-28 2:32 ` Joe Perches
2020-02-28 2:52 ` Randy Dunlap
2020-02-28 3:19 ` Joe Perches
2020-02-28 4:19 ` Randy Dunlap
2020-02-28 8:32 ` [PATCH 0/7] parport: Use generic kernel logging styles Joe Perches
2020-02-28 8:32 ` [PATCH 1/7] parport: Convert printk(KERN_<LEVEL> to pr_<level>( Joe Perches
2020-02-28 8:32 ` [PATCH 2/7] parport: Use more comon logging styles Joe Perches
2020-03-02 19:29 ` Helge Deller
2020-03-02 19:39 ` Joe Perches
2020-03-02 20:35 ` Helge Deller
2020-02-28 8:32 ` [PATCH 3/7] parport: daisy: Convert DPRINTK to pr_debug Joe Perches
2020-02-28 8:32 ` [PATCH 4/7] parport_amiga: " Joe Perches
2020-02-28 8:32 ` Joe Perches [this message]
2020-02-28 8:32 ` [PATCH 6/7] parport_pc: " Joe Perches
2020-02-28 8:32 ` [PATCH 7/7] parport: Standardize use of printmode Joe Perches
2020-02-29 16:40 ` [PATCH 0/7] parport: Use generic kernel logging styles Randy Dunlap
2020-02-29 19:33 ` Joe Perches
2020-03-06 13:49 ` Sudip Mukherjee
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=66cf3d4a9dbdb24bd3d299b71a2ae05e196ee207.1582878394.git.joe@perches.com \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=sudipm.mukherjee@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®