From patchwork Sun Nov 11 07:55:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 996064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aBOIAi96"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="KrQ2sRGM"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42t5mZ0LpTz9s3q for ; Sun, 11 Nov 2018 18:55:58 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=79rUnJmWSHaNKIposF+niBoloxDGJP1slzCgZcDfC54=; b=aBOIAi96hPYtkwObrJDXj4ljNh nV7Qnqt4byDAWaXEZC2zu1GqGbp1tm3QtKdd9tnOlPeYZJNF1fNiojTejczHoknM7+r6xmEnMT/nO NotBHI9Bi7fNDX8j90rI5ULnx8bt0Q3YNAUvLUKfjkJWESmlS3wwIC1j+7RmFj+09SKhcuCfsUSyo vraOapVskqaQ0HNq0VzFXGD2qCnOIUriRelfHVwmrbz2LoyV3xT4khVG8tFmkiv9Jv0fxi5F+yNmU mkNjxWDMNBLYBhKeoBD+M2G5mvivYTR0XpqJCiZo8UzuySjfYUJgUO3OrgPEDfle526aSYWF1H8g6 IY+2bOvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLkaz-0006OV-Rw; Sun, 11 Nov 2018 07:55:50 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLkar-0006HT-El for linux-mtd@bombadil.infradead.org; Sun, 11 Nov 2018 07:55:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9BZ2Q4N6wVkjg7HE0gTllTDqg663O6pSNbZsoAWBGc4=; b=KrQ2sRGM3TjFDPtg+fbKL76b3 9hhEvf8UJd6LzaMK67xHlNRH7cLLKJMumJpQEARwROu+Vv0cu7pUA0mEzuHauYRz64B/yAUV520zs ARad6XFGwmQY0hOLO3UTxSSPOz0UOnkOPwfQ0ZbrSchDpRimTIOgfa/Pel9HWph/67sbYSL9gv2s9 ka5dnAUOlr/jvV8tTeuh9P5w8d72EycWQdU2vMYZ/kec80HVNeseusWUbqnHpxgknfryTPRSRKzn1 9hF/qaVp+8Y23j5mnP+qKfu4e0TeQ+YjTK9KTS8NKDeucAAA5xuxqw9IdURIGFTSs7Tf45IrLaHjK jJBjmIsMA==; Received: from mail.bootlin.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLkan-0000OK-Tg for linux-mtd@lists.infradead.org; Sun, 11 Nov 2018 07:55:39 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 8D451224E2; Sun, 11 Nov 2018 08:55:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost.localdomain (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 1EE54207CF; Sun, 11 Nov 2018 08:55:28 +0100 (CET) From: Boris Brezillon To: Boris Brezillon , Richard Weinberger , Miquel Raynal , linux-mtd@lists.infradead.org Subject: [PATCH v3 04/22] mtd: rawnand: Move nand_exec_op() to internal.h Date: Sun, 11 Nov 2018 08:55:06 +0100 Message-Id: <20181111075524.13123-5-boris.brezillon@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181111075524.13123-1-boris.brezillon@bootlin.com> References: <20181111075524.13123-1-boris.brezillon@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_075537_994111_5D4A8944 X-CRM114-Status: GOOD ( 14.91 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Levitsky , Marek Vasut , Tudor Ambarus , Janusz Krzysztofik , Stefan Agner , Masahiro Yamada , Harvey Hunt , Marc Gonzalez , Han Xu , Xiaolei Li , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org nand_exec_op() is only used by core code (nand_xxx.c files). Let's move this inline function in drivers/mtd/nand/raw/internals.h. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik --- Changes in v3: - Add Janusz's T-b Changes in v2: - None --- drivers/mtd/nand/raw/internals.h | 9 +++++++++ include/linux/mtd/rawnand.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h index 04c2cf74eff3..6e2f61fbc5f0 100644 --- a/drivers/mtd/nand/raw/internals.h +++ b/drivers/mtd/nand/raw/internals.h @@ -95,6 +95,15 @@ void nand_decode_ext_id(struct nand_chip *chip); void panic_nand_wait(struct nand_chip *chip, unsigned long timeo); void sanitize_string(uint8_t *s, size_t len); +static inline int nand_exec_op(struct nand_chip *chip, + const struct nand_operation *op) +{ + if (!chip->exec_op) + return -ENOTSUPP; + + return chip->exec_op(chip, op, false); +} + /* BBT functions */ int nand_markbad_bbt(struct nand_chip *chip, loff_t offs); int nand_isreserved_bbt(struct nand_chip *chip, loff_t offs); diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 4e91a70ede10..85dd89abcd22 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -1098,15 +1098,6 @@ struct nand_chip { } manufacturer; }; -static inline int nand_exec_op(struct nand_chip *chip, - const struct nand_operation *op) -{ - if (!chip->exec_op) - return -ENOTSUPP; - - return chip->exec_op(chip, op, false); -} - extern const struct mtd_ooblayout_ops nand_ooblayout_sp_ops; extern const struct mtd_ooblayout_ops nand_ooblayout_lp_ops;