Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737170
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 09/12] mtd: nand: denali: use upper/lower_32_bits() macro for clean-up |
| Date | 2017-09-22 06:00 +0200 |
| Message-ID | <usni9-1cy-7@gated-at.bofh.it> (permalink) |
| References | <usn8t-19x-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- Changes in v2: - Newly added drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 02ce310..e567ad9 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, -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/12] mtd: nand: denali: more clean-ups Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 05:50 +0200 [PATCH v2 11/12] mtd: nand: denali: support direct addressing mode Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 05:50 +0200 [PATCH v2 05/12] mtd: nand: denali: slight clean up of denali_wait_for_irq() Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 05:50 +0200 [PATCH v2 10/12] mtd: nand: denali: remove unneeded init of ECC_ENABLE register Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 05:50 +0200 [PATCH v2 07/12] mtd: nand: denali: use more FIELD_PREP / FIELD_GET where appropriate Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:00 +0200 [PATCH v2 02/12] mtd: nand: denali: prefix detect_max_banks() with denali_ Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:00 +0200 [PATCH v2 06/12] mtd: nand: denali: clean up macros with <linux/bitfield.h> Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:00 +0200 [PATCH v2 09/12] mtd: nand: denali: use upper/lower_32_bits() macro for clean-up Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:00 +0200 [PATCH v2 08/12] mtd: nand: denali: clean up comments Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:00 +0200 Re: [PATCH v2 00/12] mtd: nand: denali: more clean-ups Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-09-22 12:10 +0200
csiph-web