All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: "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>,
	Marek Vasut <marek.vasut@gmail.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: Wed, 8 Feb 2017 15:37:28 -0800	[thread overview]
Message-ID: <20170208233728.GN94627@google.com> (raw)
In-Reply-To: <1484817198-22477-1-git-send-email-clg@kaod.org>

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()).

Brian

  parent reply	other threads:[~2017-02-08 23:38 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 [this message]
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=20170208233728.GN94627@google.com \
    --to=computersforpeace@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=clg@kaod.org \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.