From patchwork Thu Feb 21 12:57:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10824063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D83006C2 for ; Thu, 21 Feb 2019 12:58:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C45803089D for ; Thu, 21 Feb 2019 12:58:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7D5F30914; Thu, 21 Feb 2019 12:58:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3EED73089D for ; Thu, 21 Feb 2019 12:58:34 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=NHEhce3r4+sXveLoqt2z88PKp0uvE/k6HIugOduds14=; b=ukt9fakqIcreU7 CBNuBhY2jsOTRaCAxzP7u+g7AFTCxKXFkUjyy5hI14/oTPYywjP5vgf7g+BJr/iKkp5pMu5uQU+Tu qhr9TroNPigfnuxx1Ykb49yYbEx0RdEYSndEs1NEN+mGwEI5UJYBaup+uYVxxFY1LpfoG5yn8rKSK CjQUSAsjTtAUi1Sd0expw7e8RvlwcIng3ZfLwVPfxWBkitpKGJ8nQe46yBusWx9BBVFxb3KEczCT5 O8XhalL25p9jws0Z95XuMvZWTGxl2ETcWBE6Hv4QsGXJYTIu2TPAsRSkeruAftpQ8oTvQTmNYW2w5 MN4mLmjv7DDlyv7LSabA==; 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 1gwnvr-0002sl-IR; Thu, 21 Feb 2019 12:58:31 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwnvo-0002ry-BD; Thu, 21 Feb 2019 12:58:29 +0000 X-Originating-IP: 90.88.23.190 Received: from localhost.localdomain (aaubervilliers-681-1-81-190.w90-88.abo.wanadoo.fr [90.88.23.190]) (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 48D63C000C; Thu, 21 Feb 2019 12:58:24 +0000 (UTC) From: Miquel Raynal To: Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Tudor Ambarus Subject: [RFC PATCH 16/27] mtd: nand: ecc: Let the software BCH ECC engine be a module Date: Thu, 21 Feb 2019 13:57:55 +0100 Message-Id: <20190221125806.28875-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221125806.28875-1-miquel.raynal@bootlin.com> References: <20190221125806.28875-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190221_045828_533509_A5120F0C X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh R , Tudor Ambarus , Julien Su , Schrempf Frieder , linux-mtd@lists.infradead.org, Thomas Petazzoni , Miquel Raynal , Mason Yang , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There is no reason to prevent the software BCH ECC engine implementation to be compiled as a module, so change the 'bool' into a 'tristate'. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/ecc/Kconfig | 2 +- include/linux/mtd/nand-sw-bch-engine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/ecc/Kconfig b/drivers/mtd/nand/ecc/Kconfig index 6ce9007e1d9b..e0106b3a7ec1 100644 --- a/drivers/mtd/nand/ecc/Kconfig +++ b/drivers/mtd/nand/ecc/Kconfig @@ -12,7 +12,7 @@ config MTD_NAND_ECC_SW_HAMMING_SMC The original Linux implementation had byte 0 and 1 swapped. config MTD_NAND_ECC_SW_BCH - bool "Software BCH ECC engine" + tristate "Software BCH ECC engine" select BCH default n help diff --git a/include/linux/mtd/nand-sw-bch-engine.h b/include/linux/mtd/nand-sw-bch-engine.h index d8abfc9fc288..5d0b98e34a3a 100644 --- a/include/linux/mtd/nand-sw-bch-engine.h +++ b/include/linux/mtd/nand-sw-bch-engine.h @@ -33,7 +33,7 @@ struct ecc_sw_bch_conf { unsigned char *eccmask; }; -#if defined(CONFIG_MTD_NAND_ECC_SW_BCH) +#if IS_ENABLED(CONFIG_MTD_NAND_ECC_SW_BCH) int ecc_sw_bch_calculate(struct nand_device *nand, const unsigned char *buf, unsigned char *code);