mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Feb 12 18:59:11 PST 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f40a2725ea720a6270d3970cf11472da66924624
Commit:     f40a2725ea720a6270d3970cf11472da66924624
Parent:     3a08e933415c58689797c5bdc825e78a808fffe1
Author:     Cédric Le Goater <clg at kaod.org>
AuthorDate: Thu Jan 19 10:13:18 2017 +0100
Committer:  Cyrille Pitchen <cyrille.pitchen at atmel.com>
CommitDate: Fri Feb 10 14:21:59 2017 +0100

    mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb()
    
    The first argument of ioread32_rep() and ioread8_rep is not
    const. Change aspeed_smc_read_from_ahb() prototype to fix compile
    warning :
    
       drivers/mtd/spi-nor/aspeed-smc.c: In function 'aspeed_smc_read_from_ahb':
       drivers/mtd/spi-nor/aspeed-smc.c:212:16: warning: passing argument 1 of 'ioread32_rep' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          ioread32_rep(src, buf, len >> 2);
    
    Signed-off-by: Cédric Le Goater <clg at kaod.org>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
---
 drivers/mtd/spi-nor/aspeed-smc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index 6bb4c7d..7c86099 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -222,8 +222,7 @@ struct aspeed_smc_controller {
  * the memory buffer pointer and count via explicit code. The final updates
  * to len are optimistically suppressed.
  */
-static int aspeed_smc_read_from_ahb(void *buf, const void __iomem *src,
-				    size_t len)
+static int aspeed_smc_read_from_ahb(void *buf, void __iomem *src, size_t len)
 {
 	size_t offset = 0;
 



More information about the linux-mtd-cvs mailing list