From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D279F3537FE for ; Wed, 22 Jul 2026 13:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784727839; cv=none; b=qFK//7KClxPNQgtz5qeBfPZaGuZapUz77liNgHYY09V0Wb8K87wH69I0mJyHWaS6+9WtrlcnijsnM4h5KA997MXOLKp72a/+XJvqmd+Yth33ubbhAZY//dmJG/DmG8UKQ+Ukh/H2y9rHvOHTQRSdLExEm/TZe9Ykjiryyn8Wei8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784727839; c=relaxed/simple; bh=Fp3FOmw81zL7uFPXE2Ykv3YQS8B/eTLaWYeLYA74fYs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Kmc5J+wfq/+5ulytZTbk8IHfdxrqcjcdLEXQ+pk7fmk7b5xSbTveBrKeQa6q883gtshkGZwynsRuRMLFUR92Uo6yaacxlIe9V0bHLdW8p1e2BxeujTzp1IlKzEUeIgDT6V280baowT5pSoklIQ3saGi2jOXhLYI6tk++jAyx7UY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Gq5SduSq; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gq5SduSq" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-698acd36d67so23048403a12.0 for ; Wed, 22 Jul 2026 06:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784727836; x=1785332636; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0IWahDCuW6qxjFQuKiHGFEmpuSZgf5V3GqP3/t/rnZY=; b=Gq5SduSqP78gKE6uUg+UiaOGgi5kYbsLDN6lojpF4xaYqQTj8Ya7TwZ6PUpDmjnIs7 FdYtkxuBLWF5CQEFnnNvZrWz+5A6CYdiLCQRpb/TRDR1/GE09RIS0SL+vNfikxy9wbVR UFZvw+qhf17KmMFIRCBW5H3z+7QIEWgaUgjsha42uiQm9d0h9mAe96uhEbIo3ARHe/2A wq7nCQ8ktdYUSvq6NQztWamhQiVJcx3uuZuJHDSf03TjEcvJLslc+Phi4Au3bP5wztA6 YMqubcWK3ZIsw3SRAKlBg5qSNI/Ae2oYPbpMUNcAth+O65PNnun9emPYn/tzj9PqqhV0 FAhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784727836; x=1785332636; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=0IWahDCuW6qxjFQuKiHGFEmpuSZgf5V3GqP3/t/rnZY=; b=Y0uKgGEDEL/stZ5FGlcHAxfxKhZpCpYZqqx5fDPo6jp2FPFYK4VMKnZ2pzDdjF1F/X boDZjd5joIhhEOsRBFNY08A1C4kPM4DilmGEB17WWNCfyGAPyjNLfmXaQvMVEcNhJW3D emgd63MbPTGFU3GGk37LMfDP0Tmb7McJ8JOMb2qAuR9PddwYryiVOBsYTjRoTH+33Pjj 8vi+RqcUmAJZYeRu3srnPjLofSwlVLkk/5qWS4t77H0xj7wVb+5Kwse19rMqMA2htIet 30ThTJDB5LgbeMnee3a3w7LC6OY5IFTNXakT9agm0ez/RokL1bOON3jQqKmKpENyr+Fq cxBA== X-Forwarded-Encrypted: i=1; AHgh+Rr4+EBK148GQLgVk3VtOk9+qzj4m1gwWq1JbdMSIo3miIsJCK1d45AfG1JWFaHrCAgqkzv89SQby0rbE6A=@vger.kernel.org X-Gm-Message-State: AOJu0Yyuc51WCeHgyMg7NbPjAkOQMG79rb6Wd7THyJoyP3nnjZ003E+E YR3uGp2xjljJTTDbS9ky6q4QvcjW3IgtkMDqGOioxjB4uRWpdUHrsJx+ X-Gm-Gg: AR+sD12mU8DLIlRMuDmaMHjCp9+IX1MWOkw683Kni2EwXZFkwB23W6dHxbHkyF2Sbdj 7mOA691MtG7D+EcXRYRTXlt9g2lXFPtss5g83tpQQxdujHPJNoRLBoc4M1SAtz80CO1Ajqp4EZP 9d+85in+2ZCScrEVNpW73oTHoBjurscg8oEi8S0YXQC8HmFNALFHP5WEOsIyriHXbsHM5GmAECW rthruzWOHwO8F2fg+9MLAMaKljioP09z0nf7GC3LoCYNtUoJmoBQ21naLZDKY4hwsw8mejivoMV SI5eao3QKNPi/578sNtxuZjhB/bcuPcD/YoR0XmkCIvKf/x1RhTBDPVPL8VW/yJycM7cwOda2lM u9SR7OaYQgln1d9pThUyryNlE0IjW0UpigJ7QPlZCrOrjUoQvLBSHpKUESJhupQsfPwZn74lfBQ XPGY2VrMfbyJUrjnuBZdCwqdEanxlGzKDItcXqp+ky X-Received: by 2002:a05:6402:234f:b0:69e:38f0:62c9 with SMTP id 4fb4d7f45d1cf-69e652e0a22mr8681778a12.39.1784727835818; Wed, 22 Jul 2026 06:43:55 -0700 (PDT) Received: from [10.186.94.117] ([92.250.103.74]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69f35024922sm997937a12.22.2026.07.22.06.43.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2026 06:43:55 -0700 (PDT) Sender: Julian Braha Message-ID: <64f0f609-9b24-4830-b0c6-c7ec0a01028a@gmail.com> Date: Wed, 22 Jul 2026 14:43:52 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mtd: maps: fix dead select of MTD_CFI_BE_BYTE_SWAP To: Arnd Bergmann , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Sean Young , Andy Shevchenko , Randy Dunlap , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij References: <20260722001003.36598-1-julianbraha@gmail.com> <73b310a6-e97c-4bcc-ba82-9ed781f4bba6@app.fastmail.com> Content-Language: en-US From: Julian Braha In-Reply-To: <73b310a6-e97c-4bcc-ba82-9ed781f4bba6@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Arnd, On 7/22/26 08:42, Arnd Bergmann wrote: >> 'select' does not work on config options in a 'choice', so currently it is >> possible to enable MTD_PHYSMAP_IXP4XX without MTD_CFI_BE_BYTE_SWAP. >> >> Let's replace the select with 'depends on'. >> >> Note that, if we remove the select / dependency, the kernel will compile >> with MTD_PHYSMAP_IXP4XX=y and MTD_CFI_BE_BYTE_SWAP=n so if it would be >> better to remove the select, please advise as I do not have the hardware >> to runtime test this. >> >> This dead select was found by kconfirm, a static analysis tool for Kconfig. > The choice is forced to be MTD_CFI_BE_BYTE_SWAP when building for > big-endian IXP4XX, which I think means this will currently always > work correctly: > > config MTD_CFI_NOSWAP > depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN > bool "NO" > > config MTD_CFI_BE_BYTE_SWAP > bool "BIG_ENDIAN_BYTE" > > config MTD_CFI_LE_BYTE_SWAP > depends on !ARCH_IXP4XX > bool "LITTLE_ENDIAN_BYTE" > > endchoice Actually it is currently possible to have: MTD_PHYSMAP_IXP4XX=y MTD_CFI_BE_BYTE_SWAP=n CPU_BIG_ENDIAN=y by not satisfying the dependencies of the choice that MTD_CFI_BE_BYTE_SWAP is part of, for example, set: MTD_CFI_ADV_OPTIONS=n then, none of the choice options are enabled. This is the configuration that I had compile-tested (but cannot runtime test). In any case, should I send a v2 removing the select, and leave the rest of the little-endian ARCH_IXP4XX changes to you? - Julian Braha