浏览代码

mmc: tmio: make a cast explicit

Sparse complains about the implicit cast. Making it explicit is indeed
better coding style.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Wolfram Sang 9 年之前
父节点
当前提交
7c42dbf335
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/mmc/host/tmio_mmc.h

+ 1 - 1
drivers/mmc/host/tmio_mmc.h

@@ -259,7 +259,7 @@ static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr,
 
 
 static inline void sd_ctrl_write32_as_16_and_16(struct tmio_mmc_host *host, int addr, u32 val)
 static inline void sd_ctrl_write32_as_16_and_16(struct tmio_mmc_host *host, int addr, u32 val)
 {
 {
-	writew(val, host->ctl + (addr << host->bus_shift));
+	writew(val & 0xffff, host->ctl + (addr << host->bus_shift));
 	writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift));
 	writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift));
 }
 }