mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb()
authorCédric Le Goater <clg@kaod.org>
Thu, 19 Jan 2017 09:13:18 +0000 (10:13 +0100)
committerCyrille Pitchen <cyrille.pitchen@atmel.com>
Fri, 10 Feb 2017 13:21:59 +0000 (14:21 +0100)
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@kaod.org>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
drivers/mtd/spi-nor/aspeed-smc.c

index 6bb4c7d1788ce14c160ce7421f555c11bc327c5e..7c86099450bedb65412702efef07abb28c05cda0 100644 (file)
@@ -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;