Message ID | 1409064629-7128-1-git-send-email-vvv444@gmail.com |
---|---|
State | Accepted, archived |
Headers | show |
Hi Vasili, On Tue, 2014-08-26 at 17:50 +0300, Vasili Galka wrote: > Initialization of pointer from integer shall be designated by explicit > type cast. > > Signed-off-by: Vasili Galka <vvv444@gmail.com> > Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> > --- > Changes for v2: > - Verified complience with checkpatch.pl (wrapped long lines) > > board/synopsys/axs101/nand.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c > index c7f90c4..ff35286 100644 > --- a/board/synopsys/axs101/nand.c > +++ b/board/synopsys/axs101/nand.c > @@ -62,8 +62,10 @@ struct nand_bd { > uint32_t buffer_ptr1; /* DES3 */ > }; > > -#define NAND_REG_WRITE(r, v) writel(v, CONFIG_SYS_NAND_BASE + r) > -#define NAND_REG_READ(r) readl(CONFIG_SYS_NAND_BASE + r) > +#define NAND_REG_WRITE(r, v) \ > + writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) > +#define NAND_REG_READ(r) \ > + readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) > > static struct nand_bd *bd; /* DMA buffer descriptors */ > Applied, Thanks!
diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c index c7f90c4..ff35286 100644 --- a/board/synopsys/axs101/nand.c +++ b/board/synopsys/axs101/nand.c @@ -62,8 +62,10 @@ struct nand_bd { uint32_t buffer_ptr1; /* DES3 */ }; -#define NAND_REG_WRITE(r, v) writel(v, CONFIG_SYS_NAND_BASE + r) -#define NAND_REG_READ(r) readl(CONFIG_SYS_NAND_BASE + r) +#define NAND_REG_WRITE(r, v) \ + writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) +#define NAND_REG_READ(r) \ + readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) static struct nand_bd *bd; /* DMA buffer descriptors */
Initialization of pointer from integer shall be designated by explicit type cast. Signed-off-by: Vasili Galka <vvv444@gmail.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> --- Changes for v2: - Verified complience with checkpatch.pl (wrapped long lines) board/synopsys/axs101/nand.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)