Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1010782ybh; Tue, 10 Mar 2020 12:42:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtzysD20HPEOrTR74lIgG1GV0MZIFsugeqHljxhV4DURRQs5pUsBnV24LF2Ze2tXW+5PaEO X-Received: by 2002:a9d:6e90:: with SMTP id a16mr6056244otr.72.1583869350859; Tue, 10 Mar 2020 12:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583869350; cv=none; d=google.com; s=arc-20160816; b=iNlcOPOlQeaCrVUWsEL50jyFAPlfrWHRp4DMxFWxqFPp9iecyC9+khldSzitG6SePZ +UBC1kPE9pmgtYyybg05M7b5YM3SRbYJQM6bZG3kzaCxkITnsxnkkM6xUE6pq8lGrP9n m3xcrifGrMpYdtYv3dkQKZ1oRCVOaQVycwivNKS+NdlEIL8xBOXRoEhuq3TS29xZYVuQ 4FSIlL3+HBrO/OAUnrJFDe8HiFJLSHglnHFTbOifp/LIyuBDuGsDvKV5ecIDYlvHMhNy Q9JBQWjJ9L3/jIiHswAEWw2fXGro/j/7Ok407qNggQ0ZIUmGsDVP/aT0k9zAoFytOevB cTkw== 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=XtFYfwhb0JGA61XEC7XZz6hcGlJ5SYy8DdLcvKRdO+E=; b=E7OgjfLVisNo4PHnFU4k22XTJNpnj+TzLl/WVHfvAqiwiLatl1Fwz+8pbV/Jky79l2 8TIMhOvPQVOZQcGCBbjze7/pcmyjmp9jiTW1gLFZ3JpwKbMNoVYtA9L3gQJnwTVfK10m zX9gqEM+UP5bV2LLy+I7wSFQ5nk5LHn5wHFVlWt+SXqJr6+bVTSq1R3NmnYJA/EiDSic T2SAVhU9VVclvDpNqil/caUySRrZB+g3TZl+CSp2yvOt02ZZ8NtlDwv8PQVz+X4ongdM ncQTp3d0EbdtmSS30KxNKdn6sLn/By0e+/5DFqesdv1zC27XaiiOFFQEKuDtFTeVh88D Dn4Q== 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 q206si1306174oic.5.2020.03.10.12.42.17; Tue, 10 Mar 2020 12:42:30 -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 S1726977AbgCJTlt (ORCPT + 99 others); Tue, 10 Mar 2020 15:41:49 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50040 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgCJTls (ORCPT ); Tue, 10 Mar 2020 15:41:48 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (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 686A329196A; Tue, 10 Mar 2020 19:41:46 +0000 (GMT) Date: Tue, 10 Mar 2020 20:41:42 +0100 From: Boris Brezillon To: Mason Yang Cc: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, frieder.schrempf@kontron.de, tglx@linutronix.de, stefan@agner.ch, juliensu@mxic.com.tw, allison@lohutok.net, linux-kernel@vger.kernel.org, bbrezillon@kernel.org, rfontana@redhat.com, linux-mtd@lists.infradead.org, yuehaibing@huawei.com, s.hauer@pengutronix.de Subject: Re: [PATCH v3 3/4] mtd: rawnand: Add support manufacturer specific suspend/resume operation Message-ID: <20200310204142.540fc7c4@collabora.com> In-Reply-To: <20200310203930.2b8c0cfb@collabora.com> References: <1583220084-10890-1-git-send-email-masonccyang@mxic.com.tw> <1583220084-10890-4-git-send-email-masonccyang@mxic.com.tw> <20200310203930.2b8c0cfb@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.5 (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 Tue, 10 Mar 2020 20:39:30 +0100 Boris Brezillon wrote: > On Tue, 3 Mar 2020 15:21:23 +0800 > Mason Yang wrote: > > > Patch nand_suspend() & nand_resume() for manufacturer specific > > suspend/resume operation. > > > > Signed-off-by: Mason Yang > > Reported-by: kbuild test robot > > Reviewed-by: Miquel Raynal > > --- > > drivers/mtd/nand/raw/nand_base.c | 11 ++++++++--- > > include/linux/mtd/rawnand.h | 4 ++++ > > 2 files changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c > > index 769be81..b44e460 100644 > > --- a/drivers/mtd/nand/raw/nand_base.c > > +++ b/drivers/mtd/nand/raw/nand_base.c > > @@ -4327,7 +4327,9 @@ static int nand_suspend(struct mtd_info *mtd) > > struct nand_chip *chip = mtd_to_nand(mtd); > > > > mutex_lock(&chip->lock); > > - chip->suspended = 1; > > + if (chip->_suspend) > > + if (!chip->_suspend(chip)) > > + chip->suspended = 1; Shouldn't you propagate the error to the caller if chip->_suspend() fails?