Re: [PATCH] mtd: maps: fix dead select of MTD_CFI_BE_BYTE_SWAP

From: Arnd Bergmann

Date: Wed Jul 22 2026 - 10:07:04 EST


On Wed, Jul 22, 2026, at 15:43, Julian Braha wrote:
> On 7/22/26 08:42, Arnd Bergmann wrote:
>> 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).

Right. In older kernels that would have run into an #error,
and I tried to express the same with Kconfig logic but clearly
failed here.

> In any case, should I send a v2 removing the select, and leave the
> rest of the little-endian ARCH_IXP4XX changes to you?

Sound good to me, if that helps you get through your list
backlog of known issues, otherwise we can just do my version
and drop yours. Hopefully Linus Walleij can give my patch
a spin on one of his machines.

Arnd