From: Cédric Le Goater Date: Thu, 19 Jan 2017 09:13:18 +0000 (+0100) Subject: mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f40a2725ea720a6270d3970cf11472da66924624;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen --- diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c index 6bb4c7d1788c..7c86099450be 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;