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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 9E3B2FA3728 for ; Wed, 16 Oct 2019 22:00:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7667820872 for ; Wed, 16 Oct 2019 22:00:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263256; bh=3lrQe4z5hzvnlvvJeQs1bswWpYlhTIQI5HZNYEmx3bA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uo1nHFGWZzfL6DMfw+pKf1STiCoAItzCAEBLRRST1yQ3eBbrfWhqfPXH0X56OtHTO NCeGsM3mw/PpHb9PsdSBSdp2VWwbnbmnX24csuZJglkVTQaNGDFCLxVjebu09UJ0Xl RtnO6K72+9L2Q2OdEYwASo4/xPwU8DB7KgIo+fuc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392034AbfJPWAz (ORCPT ); Wed, 16 Oct 2019 18:00:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:54776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732431AbfJPV7m (ORCPT ); Wed, 16 Oct 2019 17:59:42 -0400 Received: from localhost (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62B0C21D7A; Wed, 16 Oct 2019 21:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263181; bh=3lrQe4z5hzvnlvvJeQs1bswWpYlhTIQI5HZNYEmx3bA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=znxnjtxnMqV5Gh1Yjy82JeOqEG7hrUU4fwQqWv9KNltQh259TIY1d+MjvHzLowmLL uMBcfb/mgano8YFHVaUqy6Py/PGT34MP5PtN6FIZv7/rKA5JCGnb0QhkmbgbKl17GO MJnbGGkY4LGhJk4+fpeLAhbpDjISh854PeOgp7Vg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Burton , Boris Brezillon , Miquel Raynal Subject: [PATCH 5.3 108/112] mtd: rawnand: au1550nd: Fix au_read_buf16() prototype Date: Wed, 16 Oct 2019 14:51:40 -0700 Message-Id: <20191016214907.273789010@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Burton commit df8fed831cbcdce7b283b2d9c1aadadcf8940d05 upstream. 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: stable@vger.kernel.org # v4.20+ Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/au1550nd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/mtd/nand/raw/au1550nd.c +++ b/drivers/mtd/nand/raw/au1550nd.c @@ -134,16 +134,15 @@ static void au_write_buf16(struct nand_c /** * au_read_buf16 - read chip data into buffer - * @mtd: MTD device structure + * @this: NAND chip object * @buf: buffer to store date * @len: number of bytes to read * * 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;