summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-22 12:46:46 +0900
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-09-22 09:04:34 +0200
commit5f2baae00542b2203e6d0fa77890f64ff741aaf3 (patch)
tree6649b4f299ca0736a727614df79a81546453dd67 /drivers/mtd/nand
parent8582a03e028f666d15acc651e0491c02941d13e7 (diff)
mtd: nand: denali: use upper/lower_32_bits() macro for clean-up
I used (uint64_t) cast to avoid "right shift count >= width of type" warning. <linux/kernel.h> provides nice helpers to cater to it. The code will be cleaner, and easier to understand. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/denali.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 02ce310f44e4..e567ad9a4ef3 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -469,10 +469,10 @@ static void denali_setup_dma64(struct denali_nand_info *denali,
0x01002000 | (64 << 16) | (write << 8) | page_count);
/* 2. set memory low address */
- denali_host_write(denali, mode, dma_addr);
+ denali_host_write(denali, mode, lower_32_bits(dma_addr));
/* 3. set memory high address */
- denali_host_write(denali, mode, (uint64_t)dma_addr >> 32);
+ denali_host_write(denali, mode, upper_32_bits(dma_addr));
}
static void denali_setup_dma32(struct denali_nand_info *denali,