[PATCH 4/6] mmc: bcm2835: reduce variable scope within bcm2835_transfer_block_pio

Stefan Wahren stefan.wahren at i2se.com
Sat Feb 11 14:48:34 PST 2017


This reduces the scope of variables len and buf.

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

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 08d9a56..e5ccf6d 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -338,8 +338,7 @@ static void bcm2835_dma_complete(void *param)
 static void bcm2835_transfer_block_pio(struct bcm2835_host *host, bool is_read)
 {
 	unsigned long flags;
-	size_t blksize, len;
-	u32 *buf;
+	size_t blksize;
 	unsigned long wait_max;
 
 	blksize = host->data->blksz;
@@ -351,6 +350,8 @@ static void bcm2835_transfer_block_pio(struct bcm2835_host *host, bool is_read)
 	while (blksize) {
 		int copy_words;
 		u32 hsts = 0;
+		size_t len;
+		u32 *buf;
 
 		if (!sg_miter_next(&host->sg_miter)) {
 			host->data->error = -EINVAL;
-- 
1.7.9.5




More information about the linux-rpi-kernel mailing list