[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1402142942-27459-1-git-send-email-fabf@skynet.be>
Date: Sat, 7 Jun 2014 14:09:02 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel@...r.kernel.org
Cc: Fabian Frederick <fabf@...net.be>,
Seungwon Jeon <tgih.jun@...sung.com>,
Jaehoon Chung <jh80.chung@...sung.com>,
linux-mmc@...r.kernel.org
Subject: [PATCH 1/1] drivers/mmc/host/dw_mmc.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
Use kernel.h definition.
Cc: Seungwon Jeon <tgih.jun@...sung.com>
Cc: Jaehoon Chung <jh80.chung@...sung.com>
Cc: linux-mmc@...r.kernel.org
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
This is untested.
drivers/mmc/host/dw_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ac227c..e725b47 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -584,7 +584,7 @@ static void dw_mci_adjust_fifoth(struct dw_mci *host, struct mmc_data *data)
u32 fifo_width = 1 << host->data_shift;
u32 blksz_depth = blksz / fifo_width, fifoth_val;
u32 msize = 0, rx_wmark = 1, tx_wmark, tx_wmark_invers;
- int idx = (sizeof(mszs) / sizeof(mszs[0])) - 1;
+ int idx = ARRAY_SIZE(mszs) - 1;
tx_wmark = (host->fifo_depth) / 2;
tx_wmark_invers = host->fifo_depth - tx_wmark;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists