From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 175C3C4360C for ; Fri, 4 Oct 2019 18:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBEA42077B for ; Fri, 4 Oct 2019 18:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728663AbfJDSmN (ORCPT ); Fri, 4 Oct 2019 14:42:13 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59774 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbfJDSmN (ORCPT ); Fri, 4 Oct 2019 14:42:13 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: bbrezillon) with ESMTPSA id 36FCA28A473 Date: Fri, 4 Oct 2019 14:42:05 -0400 From: Boris Brezillon To: Paul Burton Cc: "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Paul Burton , Boris Brezillon , Miquel Raynal , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra , "linux-mips@vger.kernel.org" , "stable@vger.kernel.org" Subject: Re: [PATCH] mtd: rawnand: au1550nd: Fix au_read_buf16() prototype Message-ID: <20191004144205.24d38ab3@dhcp-172-31-174-146.wireless.concordia.ca> In-Reply-To: <20191004183706.850363-1-paul.burton@mips.com> References: <20191004183706.850363-1-paul.burton@mips.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Fri, 4 Oct 2019 18:38:33 +0000 Paul Burton 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 > Fixes: 7e534323c416 ("mtd: rawnand: Pass a nand_chip object to chip->read_xxx() hooks") > Cc: Boris Brezillon Reviewed-by: Boris Brezillon > Cc: Miquel Raynal > Cc: David Woodhouse > Cc: Brian Norris > Cc: Marek Vasut > Cc: Vignesh Raghavendra > 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; >