[PATCH 10/15] mmc: bcm2835: Avoid unnecessary linebreaks

Stefan Wahren stefan.wahren at i2se.com
Tue Feb 7 12:45:49 PST 2017


Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
---
 drivers/mmc/host/bcm2835.c |   38 ++++++++++++++------------------------
 1 file changed, 14 insertions(+), 24 deletions(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index e64fcf2..21aecaf 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -200,8 +200,7 @@ struct bcm2835_host {
 	u32	pio_limit;	/* Maximum block count for PIO (0 = DMA) */
 };
 
-static void bcm2835_dumpcmd(struct bcm2835_host *host,
-			    struct mmc_command *cmd,
+static void bcm2835_dumpcmd(struct bcm2835_host *host, struct mmc_command *cmd,
 			    const char *label)
 {
 	struct device *dev = &host->pdev->dev;
@@ -384,8 +383,7 @@ static void bcm2835_dma_complete(void *param)
 	schedule_work(&host->dma_work);
 }
 
-static void bcm2835_transfer_block_pio(struct bcm2835_host *host,
-				       bool is_read)
+static void bcm2835_transfer_block_pio(struct bcm2835_host *host, bool is_read)
 {
 	unsigned long flags;
 	size_t blksize, len;
@@ -500,20 +498,18 @@ static void bcm2835_transfer_pio(struct bcm2835_host *host)
 		      SDHSTS_CRC7_ERROR |
 		      SDHSTS_FIFO_ERROR)) {
 		dev_err(dev, "%s transfer error - HSTS %x\n",
-			is_read ? "read" : "write",
-			sdhsts);
+			is_read ? "read" : "write", sdhsts);
 		host->data->error = -EILSEQ;
 	} else if ((sdhsts & (SDHSTS_CMD_TIME_OUT |
 			      SDHSTS_REW_TIME_OUT))) {
 		dev_err(dev, "%s timeout error - HSTS %x\n",
-			is_read ? "read" : "write",
-			sdhsts);
+			is_read ? "read" : "write", sdhsts);
 		host->data->error = -ETIMEDOUT;
 	}
 }
 
-static void bcm2835_prepare_dma(struct bcm2835_host *host,
-				struct mmc_data *data)
+static
+void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
 {
 	int len, dir_data, dir_slave;
 	struct dma_async_tx_descriptor *desc = NULL;
@@ -600,8 +596,8 @@ static void bcm2835_set_transfer_irqs(struct bcm2835_host *host)
 	writel(host->hcfg, host->ioaddr + SDHCFG);
 }
 
-static void bcm2835_prepare_data(struct bcm2835_host *host,
-				 struct mmc_command *cmd)
+static
+void bcm2835_prepare_data(struct bcm2835_host *host, struct mmc_command *cmd)
 {
 	struct mmc_data *data = cmd->data;
 
@@ -650,14 +646,12 @@ static u32 bcm2835_read_wait_sdcmd(struct bcm2835_host *host, u32 max_ms,
 					 (check_fail && (value & SDCMD_FAIL_FLAG)),
 					 10, max_ms * 1000);
 	if (ret == -ETIMEDOUT)
-		dev_err(dev, "%s: timeout (%d ms)\n",
-			__func__, max_ms);
+		dev_err(dev, "%s: timeout (%d ms)\n", __func__, max_ms);
 
 	return value;
 }
 
-bool bcm2835_send_command(struct bcm2835_host *host,
-			  struct mmc_command *cmd)
+bool bcm2835_send_command(struct bcm2835_host *host, struct mmc_command *cmd)
 {
 	struct device *dev = &host->pdev->dev;
 	u32 sdcmd, sdhsts;
@@ -771,8 +765,7 @@ static void bcm2835_finish_data(struct bcm2835_host *host)
 	data = host->data;
 
 	dev_dbg(dev, "finish_data(error %d, stop %d, sbc %d)\n",
-		data->error, data->stop ? 1 : 0,
-		host->mrq->sbc ? 1 : 0);
+		data->error, data->stop ? 1 : 0, host->mrq->sbc ? 1 : 0);
 
 	host->hcfg &= ~(SDHCFG_DATA_IRPT_EN | SDHCFG_BLOCK_IRPT_EN);
 	writel(host->hcfg, host->ioaddr + SDHCFG);
@@ -1159,8 +1152,7 @@ void bcm2835_set_clock(struct bcm2835_host *host, unsigned int clock)
 	writel(host->mmc->actual_clock / 2, host->ioaddr + SDTOUT);
 }
 
-static void bcm2835_request(struct mmc_host *mmc,
-			    struct mmc_request *mrq)
+static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
 	struct bcm2835_host *host = mmc_priv(mmc);
 	struct device *dev = &host->pdev->dev;
@@ -1360,8 +1352,7 @@ int bcm2835_add_host(struct bcm2835_host *host)
 				   bcm2835_threaded_irq,
 				   0, mmc_hostname(mmc), host);
 	if (ret) {
-		dev_err(dev, "failed to request IRQ %d: %d\n",
-			host->irq, ret);
+		dev_err(dev, "failed to request IRQ %d: %d\n", host->irq, ret);
 		return ret;
 	}
 
@@ -1375,8 +1366,7 @@ int bcm2835_add_host(struct bcm2835_host *host)
 	if (host->use_dma && (host->pio_limit > 0))
 		sprintf(pio_limit_string, " (>%d)", host->pio_limit);
 	dev_info(dev, "loaded - DMA %s%s\n",
-		 host->use_dma ? "enabled" : "disabled",
-		 pio_limit_string);
+		 host->use_dma ? "enabled" : "disabled", pio_limit_string);
 
 	return 0;
 }
-- 
1.7.9.5




More information about the linux-rpi-kernel mailing list