Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2085615imm; Thu, 11 Oct 2018 05:02:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV61scKcJoedOpBQ47K3JSOt6RAYALkugjKaN0aTPvxH6R3/w6/wxQGOv4WfUbXfJImO3YhAn X-Received: by 2002:a17:902:209:: with SMTP id 9-v6mr1320427plc.270.1539259353155; Thu, 11 Oct 2018 05:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539259353; cv=none; d=google.com; s=arc-20160816; b=XwfJhAIOKZOB6/k98wwJdHiNtVJE1doETjBICSW+4jh3i7wIhTdCx3rKs15B4aXpwX JVRO0FYmlAhuc2FY/eZDaWdFXEb0I01iAwFEocxdwLDCdSL1Pc8ysGPVeK7ZsKTSV+17 rFGRrDjjQPtpEbFK0WVGuCfFw4g6s9O9B8OV39IgPVN+MZkSY7KEyO2DXoJ/8GVpMDM/ wVaJazWi74APMNopmL/OdXDzsulvRzdl9NAC2wIMEWKYg/5oCTXHQibJhbnvE4Vi/hdO SU952XgyLrqZT35y9N7jtfuPG+qj4AIXg6GYy4450KojUzvS3GQ1fLW4zqeTa9KQHF6r Jb/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=F40zlg774j64rQ4jI5bB+9beXeXkM//eqrgPlpSqmcc=; b=iKClPrvu3BOf2tQ9xq3aos28Ck7Ze2z4Mgs0Ij6PuVTxD8SHZdf5/8L1Yi3/pNT1SC uqPkYmViM1Yra31uP4POYNSnZyUM8tD3ZFHGkUb2/QyWt1kWpIhSP88t8fV0KaFyz/KJ oB10adgV+spIf5PwyVpjZ698+2y78b0Q30GvYhYc/6WyX7LlwtQX0m0sc0qSO/aOzqY1 1pw2G66DyitldytTyvSh78bMKMNj38TMdUB2l+9uhi/lUdWzDtSDEoTiyTXIphaQyBBx w+A2ZL21s1bGfBFGfMLMedLbVzjMHZ33NjnNYc2qG0byUcFoZExM2IJEeqQXhdYudc3z p7aQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23-v6si1703508plp.371.2018.10.11.05.02.00; Thu, 11 Oct 2018 05:02:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727547AbeJKSe1 (ORCPT + 99 others); Thu, 11 Oct 2018 14:34:27 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:49351 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbeJKSe1 (ORCPT ); Thu, 11 Oct 2018 14:34:27 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N5mWp-1fcus62Hut-017HlG; Thu, 11 Oct 2018 13:06:41 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N5mWp-1fcus62Hut-017HlG; Thu, 11 Oct 2018 13:06:41 +0200 From: Arnd Bergmann To: Boris Brezillon Cc: Arnd Bergmann , stable@vger.kernel.org, Robert Jarzmik , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mtd: docg3: don't set conflicting BCH_CONST_PARAMS option Date: Thu, 11 Oct 2018 13:06:16 +0200 Message-Id: <20181011110639.2649053-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:2mIYcrEHCmuG7RUYybIDVljsxrxThacEvRjGsy7C+iWmgYoDRN4 Fc4JO24me2dWv7uoQV36UloA1IEbTFkC9ECIkizJwsrlM+77GBxLyN3vwgsbnbohoXnrL7I goFriQ+tVm/2GnPy0oUyJqz9mfbwTNsgfzbJjD3/dD/+p2DgBuoltBBG0IAMjHUdyBHbFSU RlCk5e6M56SragKm5LZjg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:PK0Z4HPl4ms=:owGKW24RaCPoD8cNnxpm9N czitPy4aSY4by8sOQMMThVVpHT6MaBJefjnFHDaV6IeTAyvb6XWLL+rerGokrJNAx6wRNlg8A DxH626uMHGsP1Ide88061WPOdTq2hf3R80OQkq7+U1z+mRh2llUWsxUX6Avd7/6G2KWZiW5UU y64nt9jUwplrn7DXL1z7Q1KN0ZGSAjg0v+y5bgOXNSCKy92VUEUca0ULMMMneVPnLmA0NP3D6 S+/rYo4NZ8+XsGtzroVSs/5LSUKqhkBz6893c8TBDs/nV6yn9OiMZ4CnKJW3sz1ii4j5MoFFu vfjOaM4iFPTZvIi2E8jIakneiLbU4e4HKB+2aPD8vwRr0el2ytB9dknZS6x9pwqtWrs4mBOcN mw922oDf0MaHbixDG1i5tKnuXyVNo/4l+fXwT7m4v+/O1xIBfH0R1494l7dyTFdOEdJtofNiC z3j7ofNqxLBxnRE3kafN3QnM/ocIXwhNNsCAreXV4SgZSRnfwR6cXdj9L/0U+my9b12YcVcOq ss3W9pNO+byZpNqVtxJwp+eh5D33oPnLtFWIaO0MOkQPvgnbhVNO4QsVoDgpxADgBVp77XNC1 4IHbwrSgkz7r1ph4VJcDLjjxLNpT+VRRg6McjJOIL4LowO7Q41o+JrOFtWZHoZ77OD95LdunN JKQIkqf9qojSmTF0q7lrUhr5fw3IMhNmDGbo0SVgySgwmlF4Y0evGnFqYHHU+S4u834A= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I noticed during the creation of another bugfix that the BCH_CONST_PARAMS option that is set by DOCG3 breaks setting variable parameters for any other users of the BCH library code. The only other user we have today is the MTD_NAND software BCH implementation (most flash controllers use hardware BCH these days and are not affected). I considered removing BCH_CONST_PARAMS entirely because of the inherent conflict, but according to the description in lib/bch.c there is a significant performance benefit in keeping it. To avoid the immediate problem of the conflict between MTD_NAND_BCH and DOCG3, this only sets the constant parameters if MTD_NAND_BCH is disabled, which should fix the problem for all cases that are affected. This should also work for all stable kernels. Note that there is only one machine that actually seems to use the DOCG3 driver (arch/arm/mach-pxa/mioa701.c), so most users should have the driver disabled, but it almost certainly shows up if we wanted to test random kernels on machines that use software BCH in MTD. Fixes: d13d19ece39f ("mtd: docg3: add ECC correction code") Cc: stable@vger.kernel.org Cc: Robert Jarzmik Signed-off-by: Arnd Bergmann --- drivers/mtd/devices/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index e514d57a0419..aa983422aa97 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 + select BCH_CONST_PARAMS if !MTD_NAND_BCH select BITREVERSE help This provides an MTD device driver for the M-Systems DiskOnChip -- 2.18.0