[OPW,kernel] staging:speakup/serialio:fixes for checkpatch.pl warnings
diff mbox

Message ID 1394606838-12373-1-git-send-email-swetha.kanagala@gmail.com
State New, archived
Headers show

Commit Message

swetha.kanagala@gmail.com March 12, 2014, 6:47 a.m. UTC
From: swetha kanagala <swetha.kanagala@gmail.com>

replaced printk with pr_info and pr_err.

Signed-off-by: swetha kanagala <swetha.kanagala@gmail.com>
---
 drivers/staging/speakup/serialio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bob Copeland March 12, 2014, 3 p.m. UTC | #1
On Wed, Mar 12, 2014 at 12:17:18PM +0530, swetha.kanagala@gmail.com wrote:
> From: swetha kanagala <swetha.kanagala@gmail.com>
> 
> replaced printk with pr_info and pr_err.
> 
> Signed-off-by: swetha kanagala <swetha.kanagala@gmail.com>

Some nits on the commit log:

In the subject, you don't need to specify the full path.

    staging: speakup: XXX

would be fine.

Prefer present tense action verbs for the summary:

    staging: speakup: fix checkpatch warnings

instead of "fixes", or better yet:

    staging: speakup: use pr_err/warn macros instead of printk

Likewise:

    Replace printk with pr_info and pr_err.

instead of "replaced," and also capitalize it.

Please capitalize your name in the From/Signed-off-by lines if that
is normally how it would appear in print.  You don't need the From
line if sending from that address.

Otherwise, patch itself looks ok (although you may wish to use dev_err
or something if a device is handy).

Patch
diff mbox

diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
index 4e18fb4..c62d74c 100644
--- a/drivers/staging/speakup/serialio.c
+++ b/drivers/staging/speakup/serialio.c
@@ -40,7 +40,7 @@  const struct old_serial_port *spk_serial_init(int index)
 		cval |= UART_LCR_EPAR;
 	if (synth_request_region(ser->port, 8)) {
 		/* try to take it back. */
-		printk(KERN_INFO "Ports not available, trying to steal them\n");
+		pr_info("Ports not available, trying to steal them\n");
 		__release_region(&ioport_resource, ser->port, 8);
 		err = synth_request_region(ser->port, 8);
 		if (err) {
@@ -106,7 +106,7 @@  static void start_serial_interrupt(int irq)
 			 "serial", (void *) synth_readbuf_handler);
 
 	if (rv)
-		printk(KERN_ERR "Unable to request Speakup serial I R Q\n");
+		pr_err("Unable to request Speakup serial I R Q\n");
 	/* Set MCR */
 	outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2,
 			speakup_info.port_tts + UART_MCR);