Re: [PATCH] erofs: Fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS default logic

From: Nicolas Schier

Date: Fri Aug 28 2026 - 11:47:44 EST


On Thu, Aug 20, 2026 at 12:15:33PM +0200, Geert Uytterhoeven wrote:
> CC kbuild
>
> On Thu, 20 Aug 2026 at 12:01, Geert Uytterhoeven
> <geert+renesas@xxxxxxxxx> wrote:
> > When NR_CPUS is less than 16, or when SMP is disabled, the default value
> > of 16 is invalid.
> >
> > While actual configuration picks up a sensible and valid default
> > (NR_CPUS or 1), "make savedefconfig" will still write a line like
> >
> > CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1
> >
> > to the defconfig file, even if that matches the sensible default.
>
> Is this a bug in kconfig?

I am not able to reproduce that; this is what I see with ARCH=arm64
(arm64 always has SMP=y):

.config:CONFIG_SMP=y
.config:CONFIG_NR_CPUS=3
.config:CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=3

-> defconfig:CONFIG_NR_CPUS=3

similar for ARCH=arm:

.config:CONFIG_SMP=y
.config:CONFIG_NR_CPUS=3
.config:CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=3
defconfig:CONFIG_SMP=y
defconfig:CONFIG_NR_CPUS=3

or with ARCH=arm and SMP=n:

.config:# CONFIG_SMP is not set
.config:CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1

(CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS does not appear in ./defconfig)

and with ARCH=m68k, NR_CPUS=8:

.config:CONFIG_NR_CPUS=1
.config:CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1

(CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS does not appear in ./defconfig)



Thus, to me it looks as expected. Do you still see the behaviour you
described above?

Kind regards,
Nicolas