From patchwork Wed Apr 10 19:58:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 162039 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp6605491jan; Wed, 10 Apr 2019 12:59:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqJCTsdDSKmzP/sD6Lr+mh3I7eCb1yArUJMuQ456TQre1T/pel6UcZBlQ5hzJVeqiEQyPU X-Received: by 2002:a17:902:e20e:: with SMTP id ce14mr46369807plb.193.1554926346944; Wed, 10 Apr 2019 12:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554926346; cv=none; d=google.com; s=arc-20160816; b=Q4duskZ1l1eSp9+5lh+Vh9H12U8P0EPMsrWCBcUeu2Zk1rjHsu4vJ+cbTXhTZYhmAP MbpDLE1B5Qwb8nn8L3tzix/U59+IbKBesjKCaW7JKpX/S3464Mt4S5ErDiuTu+2ASHs1 tHArhSGa7T45yeUGFsXAIcOQyf37AyayzY64ZX7Mu4Bgj6gusdLUHcuDQtRpIZM8cvCr sT3C/yMcloFuYhVmF433GE4QUQU4Dj1JcX4pRRJw/dtQz2RduEBDR7/KXSmE7cmlSKmd Fl+6CdYVLW8cEEdYpG/XUC29knYf/rph6YcpGsJacziIpot2RhsI4zt1/b0fFYxzcRtc CVqQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wcVt5VTKGlyZxp0vS8+Fu1r59HHgCfHanefStNqWyW4=; b=eEDv7k0DtUL8gFsLcyE4gr2PpfJd/TBGk8+EOp6Iu22wwE8BBJWU72ORYwa9Ad6dnZ zcL/13y+yIvrwrxdwEuKFJJj5NWKP9nIl9VBmrbMQcfBKLUAsNyjYz0+rsZc5m1pmcdc UpgkkQPkOjaqT1z97YEqzEtBMSmuVOlfNAnE4xb+9Pu5rT3a3LTVikKlimNrUNdGIWuO TZZQipjTGD/MVLbZfi5vRxdvbPcq+M4poetra5w0Vj+atO5e+aSTkPQsAGrvgpw0DWjl 7pXaYjCOj6Yt3AREtqlddMc4rzr9jMvIoML1VKoXFrFD8AcgnHwQdnnsNodhxwzktExY b6hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qNNRePeJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si560749pgw.359.2019.04.10.12.59.06; Wed, 10 Apr 2019 12:59:06 -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; dkim=pass header.i=@linaro.org header.s=google header.b=qNNRePeJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbfDJT7F (ORCPT + 31 others); Wed, 10 Apr 2019 15:59:05 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46227 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbfDJT7E (ORCPT ); Wed, 10 Apr 2019 15:59:04 -0400 Received: by mail-lj1-f194.google.com with SMTP id h21so3248526ljk.13 for ; Wed, 10 Apr 2019 12:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wcVt5VTKGlyZxp0vS8+Fu1r59HHgCfHanefStNqWyW4=; b=qNNRePeJKdY7jFnfDSk9PmpyTxY6zSzPSAtVRIWK+uHxJMacppvEn/3kXlOkTwFnk1 uz5S+S6k/szSe3cRBRXt7t8V+Jl9+asGbYFbEE2UxvSsy2DAtX8ivFvuT+BfK7OydkmQ BprZTTXTXlQLr3aIH9y11wPdFzohP2cKdOqdWWNLaYOOj/Voob1MY0TFa9bX3nPi8WPm 5ZfZGAMDo0rVka+2OC4SmA6bIzpRpR4LL9WKgiGhfxWkkrtRhMq2lg7DzmbvV73VK0is usC5IT+TGuKBi+D1/bvXF/whPmT2wDCf9DUMxxjSwXnrqVV7oEtpHwvtlKbH8HhvXgW9 3paQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wcVt5VTKGlyZxp0vS8+Fu1r59HHgCfHanefStNqWyW4=; b=V7aqyuAHSc5u3Uk27gWxy2qo5U2PORDhymwXMTXIKAfbey4BHXYlh74LstbbJqXDUI yaGwnMLzIEJgfLbhphPTVZ/OWQXMK0elykBrUqiPir4+GFsz6VxznnxdJB8NEv64Xq8p 6D9oJgTUQx4IEPqRiAiEBLFP+TNRFiWBHXtUsexy28gm2l9Fxoh35BFfuJ16b016kVWS ikUn7CihF+sEO3KLDjGVyj09djnztcmqDjtPG+Lx5j74HCyRhOcbaj3gXJSLFmRlQ3kC wqTfgcEk2k85OF5EsATxt/2g5ak+aE0W2ojj0kDzaBz5zDw+J3dy4MeGOhoS3Fib2w9n 2Kbw== X-Gm-Message-State: APjAAAUCnOiLcsmr3tDS/1pg+3YSo9O+yqxo5Cy8l8LXhTE1wKnZy1lX qrT/ka0HUWBKP92ryJYbG9rpDA== X-Received: by 2002:a2e:6c0f:: with SMTP id h15mr23337379ljc.155.1554926342648; Wed, 10 Apr 2019 12:59:02 -0700 (PDT) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id w3sm7398594lji.59.2019.04.10.12.59.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 12:59:01 -0700 (PDT) From: Anders Roxell To: dwmw2@infradead.org, computersforpeace@gmail.com, bbrezillon@kernel.org, marek.vasut@gmail.com, richard@nod.at Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Date: Wed, 10 Apr 2019 21:58:51 +0200 Message-Id: <20190410195852.4066-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Config fragments should not have the prefix 'CONFIG_'. Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'. Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm") Signed-off-by: Anders Roxell --- drivers/mtd/devices/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index 7fcdaf6c279d..f9258d666846 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -207,7 +207,7 @@ comment "Disk-On-Chip Device Drivers" config MTD_DOCG3 tristate "M-Systems Disk-On-Chip G3" select BCH - select BCH_CONST_PARAMS if !CONFIG_MTD_NAND_ECC_SW_BCH + select BCH_CONST_PARAMS if !MTD_NAND_ECC_SW_BCH select BITREVERSE help This provides an MTD device driver for the M-Systems DiskOnChip From patchwork Wed Apr 10 19:58:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 162040 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp6605576jan; Wed, 10 Apr 2019 12:59:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlXYavsXMEJfZgaZ+cOV+VoQ6DOMmCE6wywxk9RNsfQCo2WZXdRwAjM51RLXTIVJOznObB X-Received: by 2002:a17:902:a01:: with SMTP id 1mr17282985plo.36.1554926351784; Wed, 10 Apr 2019 12:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554926351; cv=none; d=google.com; s=arc-20160816; b=HgDt6sdlWNUnsg31Wq5G82TVzSCKH+GBkf1hydg3SZom/T3yp42suQ7qUhsutMytov rvXSDgff+dXGcMCfH2HIvpIL9Q+sllAH+vP2Ln3QrdUM55wBLSQQ2iO6MHyr4eRIkiG5 v119fs2T9r/O5sQWOSfzdqeg/gpF74Nvqqaa8neBpRpxuATNtqYSLFM+WjythXbjmIqV G30wuRsyCa8TfzHvdxv4KIrWWv6mn5PogoYubOLDIWnz7cja/pDd6LOM2cPkENR+Qseh O5tKwpklyrQQv86M7Z+VZVDKX/WDAby0nrbxd/wBnO98F/OAdwYhUBQl/IjAtvKDvd7B +v1Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xF0+W7srIQfbgQ7tlGxBCjWOJ+vLDr6qxPO28weJN5Y=; b=Yq3gdGhyqOspUHhFIylTdZgBge5z53EkKpLiT2q5s9JZiJiwc1dNXjfcaXN6DoI/zc IXycDhdcAqnWaLNKaQu/zJJSqUT/AwlIZJnpWH+kvXz35oK7Df9v+2LEq4jjSySBY6ak M1WFC2EzgSHlsnbZsOCeTwEEso/ZVEpqs59ZBhkxYFvO2IV3UPCb8EyOz503gKs0X8sh 3oeYaaN7HRHta+6/G4xjoDtuu29w/PiQJqPRblfONwUsdkAmClBrKD1tIvc4SExvgAhY 9L9CTC4HoBLTKUSdZsVrcw3FiSE7zc0DQnLfEk5bFUDxO5hc1MTSGeV6YezHwW2pj+rv Wsow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QP1vEQtQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si560749pgw.359.2019.04.10.12.59.11; Wed, 10 Apr 2019 12:59:11 -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; dkim=pass header.i=@linaro.org header.s=google header.b=QP1vEQtQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726814AbfDJT7K (ORCPT + 31 others); Wed, 10 Apr 2019 15:59:10 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37172 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbfDJT7J (ORCPT ); Wed, 10 Apr 2019 15:59:09 -0400 Received: by mail-lj1-f194.google.com with SMTP id v13so3297697ljk.4 for ; Wed, 10 Apr 2019 12:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xF0+W7srIQfbgQ7tlGxBCjWOJ+vLDr6qxPO28weJN5Y=; b=QP1vEQtQhoJSrpZ76JBL1JAYV+zoZbWvYwB5G5p18VhhzHZBR2lMnGBoqbyRvNr0pq 4OoUGdDwPBl3J8a4UO97fGmytDlID6KzSlRdoVCzR3SNnR+r4tTM1lV6ujfQlIlVagXK uO0tXtmSG5ptGpp7laRSeweAc9bxB01JqHArPISzXsGzTE4q+K5w/eqPKfGwWb69zOaX gDiMvuM1FKmmxSFyuvDUJ47R9sz05HNBltF4LNg8ZXPHCwcPF901ylscKJ4LzBbV2AAe q8vM9cBtGjbBPp/OCI9smkda/UjqT+FOWvKWjwnr2WlqKbtk9PLFzuACWKnaqjXY94Kz wKww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xF0+W7srIQfbgQ7tlGxBCjWOJ+vLDr6qxPO28weJN5Y=; b=pnTyfmjW+MfW0YuADltG5D99usrXUe36hz2FrD8qUzTTQ3v5Go6C3FCKcqlRcfu3rs /w7IUq58M4WVYe/t49DAnUxSvhjEdSA7xXS/8mhTePrdaTuT6xZsDzqi7Z4S1/L3wmt3 yFrG8hFDbKyAzaQmqzqofzb4KImqJvydURcs7c7IdnTzWJDdi3hkGorPv0Nuk+J6GSHR uYEvR39/Xcih9ot4eMuZhP4/N8aThcEQHvhpAZuKRC+NBwkDIwu0l53FDYjlFN00qYZy Nh7PZtgx7MdrvSom9iTwWlYk2ySe7JO9xlH/1ZETqtteUvoHP9HGcMyC+QgOm4/zdVWp q5dg== X-Gm-Message-State: APjAAAVkj87ssKV4xMyD74k+x2zCG3ATrbKJMfFsVJJwGi9CTPTXlpX4 fx4iKxORd1eAlUcHXC022gppyQ== X-Received: by 2002:a2e:968c:: with SMTP id q12mr23873796lji.36.1554926346965; Wed, 10 Apr 2019 12:59:06 -0700 (PDT) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id q5sm7150752lfm.16.2019.04.10.12.59.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 12:59:06 -0700 (PDT) From: Anders Roxell To: dwmw2@infradead.org, computersforpeace@gmail.com, bbrezillon@kernel.org, marek.vasut@gmail.com, richard@nod.at Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH 2/2] mtd: nand: raw: fix build dependency Date: Wed, 10 Apr 2019 21:58:52 +0200 Message-Id: <20190410195852.4066-2-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190410195852.4066-1-anders.roxell@linaro.org> References: <20190410195852.4066-1-anders.roxell@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When enable CONFIG_MTD_NAND_ECC_SW_BCH as a module, the MTD_NAND_ECC_SW_BCH depends on MTD_NAND, but the module controlled by MTD_NAND links against the module controlled by MTD_NAND_ECC_SW_BCH. This leads to the following link failure. aarch64-linux-gnu-ld: drivers/mtd/nand/raw/nand_base.o: in function `nand_cleanup': ../drivers/mtd/nand/raw/nand_base.c:5886: undefined reference to `nand_bch_free' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5886:(.text+0x9928): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nand_bch_free' aarch64-linux-gnu-ld: drivers/mtd/nand/raw/nand_base.o: in function `nand_set_ecc_soft_ops': ../drivers/mtd/nand/raw/nand_base.c:5093: undefined reference to `nand_bch_calculate_ecc' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5093:(.text+0xe914): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `nand_bch_calculate_ecc' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5093: undefined reference to `nand_bch_calculate_ecc' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094: undefined reference to `nand_bch_correct_data' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094:(.text+0xe934): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `nand_bch_correct_data' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094: undefined reference to `nand_bch_correct_data' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5148: undefined reference to `nand_bch_init' aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5148:(.text+0xebbc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nand_bch_init' Rework CONFIG_MTD_NAND_ECC_SW_BCH from tristate to bool, and then link the nand_bch.o file into nand.ko if its enabled. Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm") Signed-off-by: Anders Roxell --- drivers/mtd/nand/raw/Kconfig | 2 +- drivers/mtd/nand/raw/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 615d738be411..0500c42f31cb 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -22,7 +22,7 @@ menuconfig MTD_RAW_NAND if MTD_RAW_NAND config MTD_NAND_ECC_SW_BCH - tristate "Support software BCH ECC" + bool "Support software BCH ECC" select BCH default n help diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index 8bc6faaa3bc7..efaf5cd25edc 100644 --- a/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_MTD_RAW_NAND) += nand.o obj-$(CONFIG_MTD_NAND_ECC_SW_HAMMING) += nand_ecc.o -obj-$(CONFIG_MTD_NAND_ECC_SW_BCH) += nand_bch.o +nand-$(CONFIG_MTD_NAND_ECC_SW_BCH) += nand_bch.o obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o