From: Boris Brezillon <boris.brezillon@collabora.com>
To: Paul Burton <paul.burton@mips.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Paul Burton <pburton@wavecomp.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: au1550nd: Fix au_read_buf16() prototype
Date: Fri, 4 Oct 2019 14:42:05 -0400 [thread overview]
Message-ID: <20191004144205.24d38ab3@dhcp-172-31-174-146.wireless.concordia.ca> (raw)
In-Reply-To: <20191004183706.850363-1-paul.burton@mips.com>
On Fri, 4 Oct 2019 18:38:33 +0000
Paul Burton <paul.burton@mips.com> wrote:
> Commit 7e534323c416 ("mtd: rawnand: Pass a nand_chip object to
> chip->read_xxx() hooks") modified the prototype of the struct nand_chip
> read_buf function pointer. In the au1550nd driver we have 2
> implementations of read_buf. The previously mentioned commit modified
> the au_read_buf() implementation to match the function pointer, but not
> au_read_buf16(). This results in a compiler warning for MIPS
> db1xxx_defconfig builds:
>
> drivers/mtd/nand/raw/au1550nd.c:443:57:
> warning: pointer type mismatch in conditional expression
>
> Fix this by updating the prototype of au_read_buf16() to take a struct
> nand_chip pointer as its first argument, as is expected after commit
> 7e534323c416 ("mtd: rawnand: Pass a nand_chip object to chip->read_xxx()
> hooks").
>
> Note that this shouldn't have caused any functional issues at runtime,
> since the offset of the struct mtd_info within struct nand_chip is 0
> making mtd_to_nand() effectively a type-cast.
>
> Signed-off-by: Paul Burton <paul.burton@mips.com>
> Fixes: 7e534323c416 ("mtd: rawnand: Pass a nand_chip object to chip->read_xxx() hooks")
> Cc: Boris Brezillon <bbrezillon@kernel.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Cc: linux-mtd@lists.infradead.org
> Cc: linux-mips@vger.kernel.org
> Cc: stable@vger.kernel.org # v4.20+
>
> ---
>
> drivers/mtd/nand/raw/au1550nd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/au1550nd.c b/drivers/mtd/nand/raw/au1550nd.c
> index 97a97a9ccc36..2bc818dea2a8 100644
> --- a/drivers/mtd/nand/raw/au1550nd.c
> +++ b/drivers/mtd/nand/raw/au1550nd.c
> @@ -140,10 +140,9 @@ static void au_write_buf16(struct nand_chip *this, const u_char *buf, int len)
> *
> * read function for 16bit buswidth
> */
> -static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len)
> +static void au_read_buf16(struct nand_chip *this, u_char *buf, int len)
> {
> int i;
> - struct nand_chip *this = mtd_to_nand(mtd);
> u16 *p = (u16 *) buf;
> len >>= 1;
>
prev parent reply other threads:[~2019-10-04 18:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 18:38 [PATCH] mtd: rawnand: au1550nd: Fix au_read_buf16() prototype Paul Burton
2019-10-04 18:41 ` [PATCH v2] " Paul Burton
2019-10-04 18:42 ` Boris Brezillon [this message]
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=20191004144205.24d38ab3@dhcp-172-31-174-146.wireless.concordia.ca \
--to=boris.brezillon@collabora.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=paul.burton@mips.com \
--cc=pburton@wavecomp.com \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).