Skip to content

Commit

Permalink
mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
legoater authored and Cyrille Pitchen committed Feb 10, 2017
1 parent 3a08e93 commit f40a272
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/spi-nor/aspeed-smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f40a272

Please sign in to comment.