linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions
@ 2012-09-05  5:00 Sachin Kamat
  2012-09-05  5:00 ` [PATCH 2/2] serial: Samsung: Silence some checkpatch errors and warnings Sachin Kamat
  2012-09-05 12:37 ` [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Alan Cox
  0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2012-09-05  5:00 UTC (permalink / raw)
  To: linux-serial; +Cc: alan, gregkh, sachin.kamat, patches

Silences checkpatch warnings regarding use of printks.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/tty/serial/samsung.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 5c5e7e0..8749a07 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -459,7 +459,7 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 			  s3c24xx_serial_portname(port), ourport);
 
 	if (ret != 0) {
-		printk(KERN_ERR "cannot get irq %d\n", ourport->rx_irq);
+		dev_err(port->dev, "cannot get irq %d\n", ourport->rx_irq);
 		return ret;
 	}
 
@@ -473,7 +473,7 @@ static int s3c24xx_serial_startup(struct uart_port *port)
 			  s3c24xx_serial_portname(port), ourport);
 
 	if (ret) {
-		printk(KERN_ERR "cannot get irq %d\n", ourport->tx_irq);
+		dev_err(port->dev, "cannot get irq %d\n", ourport->tx_irq);
 		goto err;
 	}
 
@@ -502,7 +502,7 @@ static int s3c64xx_serial_startup(struct uart_port *port)
 	ret = request_irq(port->irq, s3c64xx_serial_handle_irq, IRQF_SHARED,
 			  s3c24xx_serial_portname(port), ourport);
 	if (ret) {
-		printk(KERN_ERR "cannot get irq %d\n", port->irq);
+		dev_err(port->dev, "cannot get irq %d\n", port->irq);
 		return ret;
 	}
 
@@ -543,7 +543,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level,
 
 		break;
 	default:
-		printk(KERN_ERR "s3c24xx_serial: unknown pm %d\n", level);
+		dev_err(port->dev, "s3c24xx_serial: unknown pm %d\n", level);
 	}
 }
 
@@ -1038,7 +1038,7 @@ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb,
 		termios = &tty->termios;
 
 		if (termios == NULL) {
-			printk(KERN_WARNING "%s: no termios?\n", __func__);
+			dev_warn(uport->dev, "%s: no termios?\n", __func__);
 			goto exit;
 		}
 
@@ -1113,7 +1113,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 
 	res = platform_get_resource(platdev, IORESOURCE_MEM, 0);
 	if (res == NULL) {
-		printk(KERN_ERR "failed to find memory resource for uart\n");
+		dev_err(port->dev, "failed to find memory resource for uart\n");
 		return -EINVAL;
 	}
 
@@ -1683,7 +1683,7 @@ static int __init s3c24xx_serial_modinit(void)
 
 	ret = uart_register_driver(&s3c24xx_uart_drv);
 	if (ret < 0) {
-		printk(KERN_ERR "failed to register UART driver\n");
+		pr_err("Failed to register Samsung UART driver\n");
 		return -1;
 	}
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] serial: Samsung: Silence some checkpatch errors and warnings
  2012-09-05  5:00 [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Sachin Kamat
@ 2012-09-05  5:00 ` Sachin Kamat
  2012-09-05 12:37 ` [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Alan Cox
  1 sibling, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2012-09-05  5:00 UTC (permalink / raw)
  To: linux-serial; +Cc: alan, gregkh, sachin.kamat, patches

Fixes the following errors and warnings:
ERROR: trailing whitespace
ERROR: return is not a function, parentheses are not required
WARNING: suspect code indent for conditional statements (32, 36)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/tty/serial/samsung.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 8749a07..bdaa06f 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -82,7 +82,7 @@ static inline const char *s3c24xx_serial_portname(struct uart_port *port)
 
 static int s3c24xx_serial_txempty_nofifo(struct uart_port *port)
 {
-	return (rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE);
+	return rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE;
 }
 
 /*
@@ -268,7 +268,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
 				dbg("break!\n");
 				port->icount.brk++;
 				if (uart_handle_break(port))
-				    goto ignore_char;
+					goto ignore_char;
 			}
 
 			if (uerstat & S3C2410_UERSTAT_FRAME)
@@ -1129,7 +1129,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 		ourport->rx_irq = ret;
 		ourport->tx_irq = ret + 1;
 	}
-	
+
 	ret = platform_get_irq(platdev, 1);
 	if (ret > 0)
 		ourport->tx_irq = ret;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions
  2012-09-05  5:00 [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Sachin Kamat
  2012-09-05  5:00 ` [PATCH 2/2] serial: Samsung: Silence some checkpatch errors and warnings Sachin Kamat
@ 2012-09-05 12:37 ` Alan Cox
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2012-09-05 12:37 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-serial, alan, gregkh, patches

On Wed,  5 Sep 2012 10:30:10 +0530
Sachin Kamat <sachin.kamat@linaro.org> wrote:

> Silences checkpatch warnings regarding use of printks.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Series Acked-by: Alan Cox <alan@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-05 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05  5:00 [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Sachin Kamat
2012-09-05  5:00 ` [PATCH 2/2] serial: Samsung: Silence some checkpatch errors and warnings Sachin Kamat
2012-09-05 12:37 ` [PATCH 1/2] serial: Samsung: Replace printk with dev_* functions Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).