Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp492638ybi; Tue, 16 Jul 2019 00:33:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtCza8l6jpAI5UHjS4pmjFDlVULVimpa1EcE8Id0eopXBqMg9OvTjJH8WVeJtYMydFX5e5 X-Received: by 2002:a63:f312:: with SMTP id l18mr32210018pgh.440.1563262433862; Tue, 16 Jul 2019 00:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563262433; cv=none; d=google.com; s=arc-20160816; b=gPLmF15zTAZa69Qyp1kyABwefIo7oHNmvAypyqEy1AHdOCOgxrWLHzzABttRpdDEq8 jaOMvtwFmVX2yhLAY7gKx2uuh2JsG6ANb9wN+/2blGx2TTGmiUT87f3kTtDOSN0vX7XU Xe46oMm6vbyrqLwxTuobS3nLKV/wvMOlagdjKY8i1kmzlR+JeH2h+DU2BEFAT0M2iqBN yPn6Kk7Gtys8UcHxYZUYGBk7W3PqdxMIcZIVNzNObMNA3DWMDCUNHqq4mDN4d8DNOUhh l37ofon+ZAemAzOZJ9z0Ht+vnEwl3uYwgpFMF9cbk3LVQgz1Kh5b+QMrnBN20TTR+2C/ qkMw== 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=+RLwV3Gml86y9JcqJlrMuZIS8Zn8SZW7P4R0W15+meA=; b=EPnf+n5SYh429Le4K7zzplWjb5GieCtDnFVir71kkvjqJDSXkLXKHKW9og+Ka4H+YV AE2ZTGyK2WX8vDvMPJQxmIS9t4FAqvmG4kB9E2NV4lxhrG5Ku9WHZa2+vhTqBRNehayS +s6oaL8OW45qI0zA/nZ6kfbfwyMlGlJSMo4gabPc0U6YIeENef9ifZssMjIkMrEJ+Sq1 5Es1jdRnD2YCXDeDQX/Uoiv4DvG25O+GmSQdSp5wFcTEGsqsp/LqSa9kcixBgymHbp20 ixszXW8HrzJFjtuPSkUfmbXKei32DemSmLKGwGIW3gFwJkluI5nSPx7EPVjEMdYihtve 1ANQ== 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 y134si18590667pfc.285.2019.07.16.00.33.37; Tue, 16 Jul 2019 00:33:53 -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 S1727105AbfGPHbp (ORCPT + 99 others); Tue, 16 Jul 2019 03:31:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57742 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbfGPHbp (ORCPT ); Tue, 16 Jul 2019 03:31:45 -0400 Received: from pc-375.home (2a01cb0c88d94a005820d607da339aae.ipv6.abo.wanadoo.fr [IPv6:2a01:cb0c:88d9:4a00:5820:d607:da33:9aae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 4329528B6A4; Tue, 16 Jul 2019 08:31:43 +0100 (BST) Date: Tue, 16 Jul 2019 09:31:37 +0200 From: Boris Brezillon To: Naga Sureshkumar Relli Cc: miquel.raynal@bootlin.com, bbrezillon@kernel.org, richard@nod.at, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, vigneshr@ti.com, yamada.masahiro@socionext.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, svemula@xilinx.com, nagasuresh12@gmail.com Subject: Re: [LINUX PATCH v18 1/2] mtd: rawnand: nand_micron: Do not over write driver's read_page()/write_page() Message-ID: <20190716093137.3d8e8c1f@pc-375.home> In-Reply-To: <20190716053051.11282-1-naga.sureshkumar.relli@xilinx.com> References: <20190716053051.11282-1-naga.sureshkumar.relli@xilinx.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 Mon, 15 Jul 2019 23:30:51 -0600 Naga Sureshkumar Relli wrote: > Add check before assigning chip->ecc.read_page() and chip->ecc.write_page() > > Signed-off-by: Naga Sureshkumar Relli > --- > Changes in v18 > - None > --- > drivers/mtd/nand/raw/nand_micron.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/nand_micron.c b/drivers/mtd/nand/raw/nand_micron.c > index cbd4f09ac178..565f2696c747 100644 > --- a/drivers/mtd/nand/raw/nand_micron.c > +++ b/drivers/mtd/nand/raw/nand_micron.c > @@ -500,8 +500,11 @@ static int micron_nand_init(struct nand_chip *chip) > chip->ecc.size = 512; > chip->ecc.strength = chip->base.eccreq.strength; > chip->ecc.algo = NAND_ECC_BCH; > - chip->ecc.read_page = micron_nand_read_page_on_die_ecc; > - chip->ecc.write_page = micron_nand_write_page_on_die_ecc; > + if (!chip->ecc.read_page) > + chip->ecc.read_page = micron_nand_read_page_on_die_ecc; > + > + if (!chip->ecc.write_page) > + chip->ecc.write_page = micron_nand_write_page_on_die_ecc; > Seriously?! I told you this was inappropriate and you keep sending this patch. So let's make it clear: Nacked-by: Boris Brezillon Fix your controller driver instead of adding hacks to the Micron logic! > if (ondie == MICRON_ON_DIE_MANDATORY) { > chip->ecc.read_page_raw = nand_read_page_raw_notsupp;