Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1251136ybp; Fri, 4 Oct 2019 11:42:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjFJsEc+Uqk5eYZ0k1RFbHgq+N2NSnpTyczjLdcINJWz+4/JeywdF9s4ASJrYyn2YgV0/b X-Received: by 2002:a17:907:214e:: with SMTP id rk14mr13887828ejb.60.1570214578746; Fri, 04 Oct 2019 11:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570214578; cv=none; d=google.com; s=arc-20160816; b=K1Rn9LQev1VHXjxiRMxzXp/0suPnRn59GPua888fEVYTmprQ9K6KozA/F+QMHZKtg5 5y5RooVxCeDp9u3oKyMP/lvg6o+J5GcTs4mnkpcr8WIELSpXOABo1lOKGAsLN/PFBzqF B2+hRi/HWtCWpM4AEn5imrfmePEeEKurnFoYB3pTYljT96fqIh1vCYIqrd9Jr0nGMzBd 9Ooc1snrCfR3sF9Ld4D4pzsP6mgkrb//8YTbUVQicD0LpUfoxVHz08A95/Rt2+fzPDnn FX7zsWvlZEEA3BtAfv4jfDHuTRYpC1ADCorgUYrvE7VT8OcNg4U6TiSpjDi7WsHPONpu x0Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ZBaw56qG1xELEv2tmX43P7lqPLztlv27Ny0u0MKHzyQ=; b=l0njeQIkTkt4StYDuUxekk/61fSC51cjknZGDD643qQjQvH37lxIBZvE1ITXJjEAI3 emF3M8Flp0vr6BPT7KvmFq8+W4GivvZ/TAsZpCJq1WLsi52yrTzJq2lShAOqrAEXyXPY tWxUxivceB+qlDXq/I8htZKyHcv2TPil4XJjJ+YIEVI3h0iKCl8cEGWXurUe2krxjfyt 0uOjZMor1t0qnLNADu7Vcqkj4FaptzouqMy5DwRgkulG7vjVO4jO7tAX0apNvl1lk1P9 inVm8GPiabQQ7zyY2tmX7/vff9qiDUyCqYl8Sr9nUWRlrnAsZnrYaf37LO9xnK/bY2pS j0Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ox13si3422941ejb.0.2019.10.04.11.42.34; Fri, 04 Oct 2019 11:42:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730175AbfJDSmN (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; >