All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Rasmussen <sebras@gmail.com>
To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sebastian Rasmussen <sebras@hotmail.com>
Subject: [PATCH] mmci: Fix checkpatch warnings
Date: Sat, 18 Jun 2011 19:45:30 +0200	[thread overview]
Message-ID: <1308419130-18143-1-git-send-email-sebras@gmail.com> (raw)

From: Sebastian Rasmussen <sebras@hotmail.com>

Pretty self-descriptive.

Signed-off-by: Sebastian Rasmussen <sebras@hotmail.com>
---
 drivers/mmc/host/mmci.c |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 5da5bea..a94f965 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -29,9 +29,9 @@
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
 #include <linux/amba/mmci.h>
+#include <linux/io.h>
 
 #include <asm/div64.h>
-#include <asm/io.h>
 #include <asm/sizes.h>
 
 #include "mmci.h"
@@ -329,11 +329,10 @@ static void mmci_dma_unmap(struct mmci_host *host, struct mmc_data *data)
 			data->error = -EIO;
 	}
 
-	if (data->flags & MMC_DATA_WRITE) {
+	if (data->flags & MMC_DATA_WRITE)
 		dir = DMA_TO_DEVICE;
-	} else {
+	else
 		dir = DMA_FROM_DEVICE;
-	}
 
 	dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, dir);
 
@@ -445,7 +444,8 @@ static inline void mmci_dma_data_error(struct mmci_host *host)
 {
 }
 
-static inline int mmci_dma_start_data(struct mmci_host *host, unsigned int datactrl)
+static inline int mmci_dma_start_data(struct mmci_host *host,
+		unsigned int datactrl)
 {
 	return -ENOSYS;
 }
@@ -557,7 +557,8 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
 	      unsigned int status)
 {
 	/* First check for errors */
-	if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
+	if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|
+		      MCI_RXOVERRUN)) {
 		u32 remain, success;
 
 		/* Terminate the DMA transfer */
@@ -606,11 +607,10 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
 			/* The error clause is handled above, success! */
 			data->bytes_xfered = data->blksz * data->blocks;
 
-		if (!data->stop) {
+		if (!data->stop)
 			mmci_request_end(host, data->mrq);
-		} else {
+		else
 			mmci_start_command(host, data->stop, 0);
-		}
 	}
 }
 
@@ -642,7 +642,8 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
 	}
 }
 
-static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int remain)
+static int mmci_pio_read(struct mmci_host *host, char *buffer,
+		unsigned int remain)
 {
 	void __iomem *base = host->base;
 	char *ptr = buffer;
@@ -673,7 +674,8 @@ static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int rema
 	return ptr - buffer;
 }
 
-static int mmci_pio_write(struct mmci_host *host, char *buffer, unsigned int remain, u32 status)
+static int mmci_pio_write(struct mmci_host *host, char *buffer,
+		unsigned int remain, u32 status)
 {
 	struct variant_data *variant = host->variant;
 	void __iomem *base = host->base;
@@ -799,7 +801,8 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id)
 	 */
 	if (host->size == 0) {
 		mmci_set_mask1(host, 0);
-		writel(readl(base + MMCIMASK0) | MCI_DATAENDMASK, base + MMCIMASK0);
+		writel(readl(base + MMCIMASK0) | MCI_DATAENDMASK,
+			base + MMCIMASK0);
 	}
 
 	return IRQ_HANDLED;
@@ -836,11 +839,13 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
 
 		data = host->data;
 		if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|
-			      MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND) && data)
+			      MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND)
+			      && data)
 			mmci_data_irq(host, data, status);
 
 		cmd = host->cmd;
-		if (status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT|MCI_CMDSENT|MCI_CMDRESPEND) && cmd)
+		if (status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT|MCI_CMDSENT|
+			      MCI_CMDRESPEND) && cmd)
 			mmci_cmd_irq(host, cmd, status);
 
 		ret = 1;
@@ -907,7 +912,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		if (host->plat->vdd_handler)
 			pwr |= host->plat->vdd_handler(mmc_dev(mmc), ios->vdd,
 						       ios->power_mode);
-		/* The ST version does not have this, fall through to POWER_ON */
+		/* ST version does not have this, fall through to POWER_ON */
 		if (host->hw_designer != AMBA_VENDOR_ST) {
 			pwr |= MCI_PWR_UP;
 			break;
@@ -1164,7 +1169,8 @@ static int __devinit mmci_probe(struct amba_device *dev,
 	    && host->gpio_cd_irq < 0)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
 
-	ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
+	ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED,
+			DRIVER_NAME " (cmd)", host);
 	if (ret)
 		goto unmap;
 
-- 
1.7.5.4


WARNING: multiple messages have this Message-ID (diff)
From: sebras@gmail.com (Sebastian Rasmussen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmci: Fix checkpatch warnings
Date: Sat, 18 Jun 2011 19:45:30 +0200	[thread overview]
Message-ID: <1308419130-18143-1-git-send-email-sebras@gmail.com> (raw)

From: Sebastian Rasmussen <sebras@hotmail.com>

Pretty self-descriptive.

Signed-off-by: Sebastian Rasmussen <sebras@hotmail.com>
---
 drivers/mmc/host/mmci.c |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 5da5bea..a94f965 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -29,9 +29,9 @@
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
 #include <linux/amba/mmci.h>
+#include <linux/io.h>
 
 #include <asm/div64.h>
-#include <asm/io.h>
 #include <asm/sizes.h>
 
 #include "mmci.h"
@@ -329,11 +329,10 @@ static void mmci_dma_unmap(struct mmci_host *host, struct mmc_data *data)
 			data->error = -EIO;
 	}
 
-	if (data->flags & MMC_DATA_WRITE) {
+	if (data->flags & MMC_DATA_WRITE)
 		dir = DMA_TO_DEVICE;
-	} else {
+	else
 		dir = DMA_FROM_DEVICE;
-	}
 
 	dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, dir);
 
@@ -445,7 +444,8 @@ static inline void mmci_dma_data_error(struct mmci_host *host)
 {
 }
 
-static inline int mmci_dma_start_data(struct mmci_host *host, unsigned int datactrl)
+static inline int mmci_dma_start_data(struct mmci_host *host,
+		unsigned int datactrl)
 {
 	return -ENOSYS;
 }
@@ -557,7 +557,8 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
 	      unsigned int status)
 {
 	/* First check for errors */
-	if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
+	if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|
+		      MCI_RXOVERRUN)) {
 		u32 remain, success;
 
 		/* Terminate the DMA transfer */
@@ -606,11 +607,10 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
 			/* The error clause is handled above, success! */
 			data->bytes_xfered = data->blksz * data->blocks;
 
-		if (!data->stop) {
+		if (!data->stop)
 			mmci_request_end(host, data->mrq);
-		} else {
+		else
 			mmci_start_command(host, data->stop, 0);
-		}
 	}
 }
 
@@ -642,7 +642,8 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
 	}
 }
 
-static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int remain)
+static int mmci_pio_read(struct mmci_host *host, char *buffer,
+		unsigned int remain)
 {
 	void __iomem *base = host->base;
 	char *ptr = buffer;
@@ -673,7 +674,8 @@ static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int rema
 	return ptr - buffer;
 }
 
-static int mmci_pio_write(struct mmci_host *host, char *buffer, unsigned int remain, u32 status)
+static int mmci_pio_write(struct mmci_host *host, char *buffer,
+		unsigned int remain, u32 status)
 {
 	struct variant_data *variant = host->variant;
 	void __iomem *base = host->base;
@@ -799,7 +801,8 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id)
 	 */
 	if (host->size == 0) {
 		mmci_set_mask1(host, 0);
-		writel(readl(base + MMCIMASK0) | MCI_DATAENDMASK, base + MMCIMASK0);
+		writel(readl(base + MMCIMASK0) | MCI_DATAENDMASK,
+			base + MMCIMASK0);
 	}
 
 	return IRQ_HANDLED;
@@ -836,11 +839,13 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
 
 		data = host->data;
 		if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|
-			      MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND) && data)
+			      MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND)
+			      && data)
 			mmci_data_irq(host, data, status);
 
 		cmd = host->cmd;
-		if (status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT|MCI_CMDSENT|MCI_CMDRESPEND) && cmd)
+		if (status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT|MCI_CMDSENT|
+			      MCI_CMDRESPEND) && cmd)
 			mmci_cmd_irq(host, cmd, status);
 
 		ret = 1;
@@ -907,7 +912,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		if (host->plat->vdd_handler)
 			pwr |= host->plat->vdd_handler(mmc_dev(mmc), ios->vdd,
 						       ios->power_mode);
-		/* The ST version does not have this, fall through to POWER_ON */
+		/* ST version does not have this, fall through to POWER_ON */
 		if (host->hw_designer != AMBA_VENDOR_ST) {
 			pwr |= MCI_PWR_UP;
 			break;
@@ -1164,7 +1169,8 @@ static int __devinit mmci_probe(struct amba_device *dev,
 	    && host->gpio_cd_irq < 0)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
 
-	ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
+	ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED,
+			DRIVER_NAME " (cmd)", host);
 	if (ret)
 		goto unmap;
 
-- 
1.7.5.4

             reply	other threads:[~2011-06-18 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18 17:45 Sebastian Rasmussen [this message]
2011-06-18 17:45 ` [PATCH] mmci: Fix checkpatch warnings Sebastian Rasmussen

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=1308419130-18143-1-git-send-email-sebras@gmail.com \
    --to=sebras@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=sebras@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.