public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: "Brian Norris" <computersforpeace@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>
Cc: linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>,
	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, 9 Feb 2017 10:05:39 +0100	[thread overview]
Message-ID: <19aa7cbb-8691-36d3-47a3-7a1029e66ecf@gmail.com> (raw)
In-Reply-To: <20170208233728.GN94627@google.com>

On 02/09/2017 12:37 AM, Brian Norris wrote:
> On Thu, Jan 19, 2017 at 10:13:18AM +0100, 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);
> 
> But why isn't that param constant? Seems like that's a bug in the
> ioread* APIs. Some of their implementations are const, but some are not.
> 
> I see for instance that the implementation in lib/iomap.c is not const,
> where there's zero reason it shouldn't be (if we also fix, e.g., its
> mmio_insl()).

Maybe it's worth fixing the ioread*_rep then ? Then again, that seems to
be way far off the scope of this patch.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-02-09  9:21 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
2017-01-20 13:11   ` Cyrille Pitchen
2017-02-08 23:37 ` Brian Norris
2017-02-09  9:05   ` Marek Vasut [this message]
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=19aa7cbb-8691-36d3-47a3-7a1029e66ecf@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