From: Alexey Brodkin Date: Tue, 26 Aug 2014 13:52:04 +0000 Subject: [U-Boot] [PATCH] axs101: Fix type mismatch warning In-Reply-To: <1409049961-6220-1-git-send-email-vvv444@gmail.com> References: <1409049961-6220-1-git-send-email-vvv444@gmail.com> Message-ID: <1409061124.6466.4.camel@abrodkin-8560l.internal.synopsys.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Vasili, On Tue, 2014-08-26 at 13:46 +0300, Vasili Galka wrote: > Initialization of pointer from integer shall be designated by explicit > type cast. > > Signed-off-by: Vasili Galka > Cc: Alexey Brodkin > --- > board/synopsys/axs101/nand.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c > index c7f90c4..ed2bb6d 100644 > --- a/board/synopsys/axs101/nand.c > +++ b/board/synopsys/axs101/nand.c > @@ -62,8 +62,8 @@ 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 */ > Thanks a lot for your patch. It does fix warnings in "board/synopsys/axs101/nand.c" But could you please make sure lines are properly wrapped? This is what checkpatch.pl reports: --->--- $ scripts/checkpatch.pl \[PATCH\]_axs101 \:_Fix_type_mismatch_warning.mbox WARNING: line over 80 characters #83: FILE: board/synopsys/axs101/nand.c:65: +#define NAND_REG_WRITE(r, v) writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #83: FILE: board/synopsys/axs101/nand.c:65: +#define NAND_REG_WRITE(r, v) writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) WARNING: line over 80 characters #84: FILE: board/synopsys/axs101/nand.c:66: +#define NAND_REG_READ(r) readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #84: FILE: board/synopsys/axs101/nand.c:66: +#define NAND_REG_READ(r) readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) total: 0 errors, 4 warnings, 0 checks, 10 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE USLEEP_RANGE [PATCH]_axs101:_Fix_type_mismatch_warning.mbox has style problems, please review. --->--- I mean messages saying "WARNING: line over 80 characters". Regards, Alexey