From: Marek Vasut <marek.vasut@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>, linux-mtd@lists.infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>
Subject: Re: [PATCH] mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb()
Date: Thu, 19 Jan 2017 18:21:54 +0100 [thread overview]
Message-ID: <a5b9d933-95db-2cb6-fb70-40bc21dd7298@gmail.com> (raw)
In-Reply-To: <1484817198-22477-1-git-send-email-clg@kaod.org>
On 01/19/2017 10:13 AM, Cédric Le Goater wrote:
> 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>
In this case it's IMO OK:
Reviewed-by: Marek Vasut <marek.vasut@gmail.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 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;
>
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2017-01-19 17:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 9:13 [PATCH] mtd: aspeed: fix compile warning in aspeed_smc_read_from_ahb() Cédric Le Goater
2017-01-19 17:21 ` Marek Vasut [this message]
2017-01-20 13:11 ` Cyrille Pitchen
2017-02-08 23:37 ` Brian Norris
2017-02-09 9:05 ` Marek Vasut
2017-02-09 9:59 ` Cédric Le Goater
2017-02-09 15:04 ` Marek Vasut
2017-02-10 5:50 ` Cédric Le Goater
2017-02-10 15:09 ` Marek Vasut
2017-02-10 18:11 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5b9d933-95db-2cb6-fb70-40bc21dd7298@gmail.com \
--to=marek.vasut@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=clg@kaod.org \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox