linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien BOUIN <a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Aurelien BOUIN <a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 1/4] serial: imx: checkpatch cleanup
Date: Thu, 12 Feb 2015 13:07:25 +0100	[thread overview]
Message-ID: <1423742848-15369-1-git-send-email-a.bouin@gmail.com> (raw)

This patch solve various issue detected by checkpatch.pl

Signed-off-by: Aurelien BOUIN <a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a086eef..63eb457 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -275,9 +275,12 @@ static struct platform_device_id imx_uart_devtype[] = {
 MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static struct of_device_id imx_uart_dt_ids[] = {
-	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
-	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
-	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
+	{ .compatible = "fsl,imx6q-uart",
+			.data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx1-uart",
+			.data = &imx_uart_devdata[IMX1_UART], },
+	{ .compatible = "fsl,imx21-uart",
+			.data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, imx_uart_dt_ids);
@@ -430,6 +433,7 @@ static void imx_stop_tx(struct uart_port *port)
 	if (USE_IRDA(sport)) {
 		/* half duplex - wait for end of transmission */
 		int n = 256;
+
 		while ((--n > 0) &&
 		      !(readl(sport->port.membase + USR2) & USR2_TXDC)) {
 			udelay(5);
@@ -621,7 +625,6 @@ static void imx_dma_tx(struct imx_port *sport)
 	sport->dma_is_txing = 1;
 	dmaengine_submit(desc);
 	dma_async_issue_pending(chan);
-	return;
 }
 
 /*
@@ -870,7 +873,8 @@ static unsigned int imx_tx_empty(struct uart_port *port)
 	struct imx_port *sport = (struct imx_port *)port;
 	unsigned int ret;
 
-	ret = (readl(sport->port.membase + USR2) & USR2_TXDC) ?  TIOCSER_TEMT : 0;
+	ret = (readl(sport->port.membase + USR2) & USR2_TXDC) ?
+			TIOCSER_TEMT : 0;
 
 	/* If the TX DMA is working, return 0. */
 	if (sport->dma_is_enabled && sport->dma_is_txing)
@@ -1256,6 +1260,7 @@ static int imx_startup(struct uart_port *port)
 
 	if (USE_IRDA(sport)) {
 		struct imxuart_platform_data *pdata;
+
 		pdata = dev_get_platdata(sport->port.dev);
 		sport->irda_inv_rx = pdata->irda_inv_rx;
 		sport->irda_inv_tx = pdata->irda_inv_tx;
@@ -1299,6 +1304,7 @@ static void imx_shutdown(struct uart_port *port)
 
 	if (USE_IRDA(sport)) {
 		struct imxuart_platform_data *pdata;
+
 		pdata = dev_get_platdata(sport->port.dev);
 		if (pdata->irda_enable)
 			pdata->irda_enable(0);
@@ -1754,7 +1760,8 @@ imx_console_get_options(struct imx_port *sport, int *baud,
 		ubir = readl(sport->port.membase + UBIR) & 0xffff;
 		ubmr = readl(sport->port.membase + UBMR) & 0xffff;
 
-		ucfr_rfdiv = (readl(sport->port.membase + UFCR) & UFCR_RFDIV) >> 7;
+		ucfr_rfdiv = (readl(sport->port.membase + UFCR) & UFCR_RFDIV)
+				>> 7;
 		if (ucfr_rfdiv == 6)
 			ucfr_rfdiv = 7;
 		else
@@ -1763,12 +1770,13 @@ imx_console_get_options(struct imx_port *sport, int *baud,
 		uartclk = clk_get_rate(sport->clk_per);
 		uartclk /= ucfr_rfdiv;
 
-		{	/*
-			 * The next code provides exact computation of
-			 *   baud_raw = round(((uartclk/16) * (ubir + 1)) / (ubmr + 1))
-			 * without need of float support or long long division,
-			 * which would be required to prevent 32bit arithmetic overflow
-			 */
+		{
+		/*
+		 * The next code provides exact computation of
+		 *   baud_raw = round(((uartclk/16) * (ubir + 1)) / (ubmr + 1))
+		 * without need of float support or long long division,
+		 * which would be required to prevent 32bit arithmetic overflow
+		 */
 			unsigned int mul = ubir + 1;
 			unsigned int div = 16 * (ubmr + 1);
 			unsigned int rem = uartclk % div;
@@ -1844,7 +1852,7 @@ static struct console imx_console = {
 	.data		= &imx_reg,
 };
 
-#define IMX_CONSOLE	&imx_console
+#define IMX_CONSOLE	(&imx_console)
 #else
 #define IMX_CONSOLE	NULL
 #endif
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2015-02-12 12:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 12:07 Aurelien BOUIN [this message]
     [not found] ` <1423742848-15369-1-git-send-email-a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-12 12:07   ` [PATCH 2/4] spi: imx: checkpatch cleanup Aurelien BOUIN
     [not found]     ` <1423742848-15369-2-git-send-email-a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-12 12:42       ` Joe Perches
2015-02-12 13:03         ` aurélien bouin
     [not found]           ` <CAFeThoBqepd8WO4=zqxc2H3SQ+XgbgKATwCO=n3W3B0dpwR9Rw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-12 17:44             ` Joe Perches
2015-02-21 14:34     ` Mark Brown
     [not found]       ` <20150221143441.GT6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-23  8:45         ` aurélien bouin
     [not found]           ` <CAFeThoCCRE8wxKZdgP6eX5Dbd-ttg-x61xo+zOJ0qftL4Mjukw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-23 13:33             ` Mark Brown
2015-02-12 12:07 ` [PATCH 3/4] spi: imx: Chose DMA bits per word transfered Aurelien BOUIN
     [not found]   ` <1423742848-15369-3-git-send-email-a.bouin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-21 14:35     ` Mark Brown
     [not found]       ` <20150221143528.GU6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-23  8:44         ` aurélien bouin
     [not found]           ` <CAFeThoDBstQ_=gsi2o509qqQR6PbV4MxsNe=hEhKj4Mj162osA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-23 14:46             ` Mark Brown
2015-02-23 15:25               ` aurélien bouin
2015-02-24  1:54                 ` Mark Brown
2015-02-12 12:07 ` [PATCH 4/4] dt: fsl-imx-cspi.txt: Add fsl,spi-dma-bits-per-word Aurelien BOUIN

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=1423742848-15369-1-git-send-email-a.bouin@gmail.com \
    --to=a.bouin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).