fs/erofs/Kconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
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.
Avoid needlessly enlarging the defconfig files, and reduce churn for
updating them, by specifying valid defaults depending on SMP and
NR_CPUS.
While at it, make the prompt depend on SMP, as there is no point in
asking the user about the maximum number of decompression streams if
there is only one valid answer.
Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
fs/erofs/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
index 2dfc313588d283a0..37495e95a78d9bf6 100644
--- a/fs/erofs/Kconfig
+++ b/fs/erofs/Kconfig
@@ -132,11 +132,13 @@ config EROFS_FS_ZIP_LZMA
Say N if you want to disable LZMA compression support.
config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
- int "EROFS LZMA default maximum decompression streams"
+ int "EROFS LZMA default maximum decompression streams" if SMP
depends on EROFS_FS_ZIP_LZMA
range 1 NR_CPUS if SMP
range 1 1 if !SMP
- default 16
+ default 16 if SMP && NR_CPUS >= 16
+ default NR_CPUS if SMP
+ default 1
help
By default EROFS allocates one LZMA decompression stream per CPU.
Each stream can hold a dictionary of up to 8 MiB taken from the
@@ -144,7 +146,7 @@ config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
of memory. This caps the default; the lzma_streams module parameter
still overrides it.
- If unsure, keep the default of 16.
+ If unsure, keep the suggested default (16 or lower).
config EROFS_FS_ZIP_DEFLATE
bool "EROFS DEFLATE compressed data support"
--
2.43.0
On 8/20/26 18:00, Geert Uytterhoeven 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.
>
> Avoid needlessly enlarging the defconfig files, and reduce churn for
> updating them, by specifying valid defaults depending on SMP and
> NR_CPUS.
>
> While at it, make the prompt depend on SMP, as there is no point in
> asking the user about the maximum number of decompression streams if
> there is only one valid answer.
>
> Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
Hi Geert,
On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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.
>
> Avoid needlessly enlarging the defconfig files, and reduce churn for
> updating them, by specifying valid defaults depending on SMP and
> NR_CPUS.
>
> While at it, make the prompt depend on SMP, as there is no point in
> asking the user about the maximum number of decompression streams if
> there is only one valid answer.
>
> Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> fs/erofs/Kconfig | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
> index 2dfc313588d283a0..37495e95a78d9bf6 100644
> --- a/fs/erofs/Kconfig
> +++ b/fs/erofs/Kconfig
> @@ -132,11 +132,13 @@ config EROFS_FS_ZIP_LZMA
> Say N if you want to disable LZMA compression support.
>
> config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> - int "EROFS LZMA default maximum decompression streams"
> + int "EROFS LZMA default maximum decompression streams" if SMP
As I said, if NR_CPUS is meaningful for both SMP or !SMP, there should
not be SMP involved in this Kconfig.
In other words, if SMP below is just a workaround since some arches
leave NR_CPUS = 0 if !SMP. If NR_CPUS is valid unconditionally, I don't
think SMP is at all useful here.
Could you just drop if SMP and leave this configuration unconditionally
shown for users? It's easy for all users to get how this Kconfig works.
Thanks,
Gao Xiang
> depends on EROFS_FS_ZIP_LZMA
> range 1 NR_CPUS if SMP
> range 1 1 if !SMP
> - default 16
> + default 16 if SMP && NR_CPUS >= 16
> + default NR_CPUS if SMP
> + default 1
> help
> By default EROFS allocates one LZMA decompression stream per CPU.
> Each stream can hold a dictionary of up to 8 MiB taken from the
> @@ -144,7 +146,7 @@ config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> of memory. This caps the default; the lzma_streams module parameter
> still overrides it.
>
> - If unsure, keep the default of 16.
> + If unsure, keep the suggested default (16 or lower).
>
> config EROFS_FS_ZIP_DEFLATE
> bool "EROFS DEFLATE compressed data support"
> --
> 2.43.0
>
>
Hi Gao,
On Thu, 20 Aug 2026 at 14:56, Gao Xiang <xiang@kernel.org> wrote:
> On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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.
> >
> > Avoid needlessly enlarging the defconfig files, and reduce churn for
> > updating them, by specifying valid defaults depending on SMP and
> > NR_CPUS.
> >
> > While at it, make the prompt depend on SMP, as there is no point in
> > asking the user about the maximum number of decompression streams if
> > there is only one valid answer.
> >
> > Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > fs/erofs/Kconfig | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
> > index 2dfc313588d283a0..37495e95a78d9bf6 100644
> > --- a/fs/erofs/Kconfig
> > +++ b/fs/erofs/Kconfig
> > @@ -132,11 +132,13 @@ config EROFS_FS_ZIP_LZMA
> > Say N if you want to disable LZMA compression support.
> >
> > config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> > - int "EROFS LZMA default maximum decompression streams"
> > + int "EROFS LZMA default maximum decompression streams" if SMP
>
> As I said, if NR_CPUS is meaningful for both SMP or !SMP, there should
> not be SMP involved in this Kconfig.
>
> In other words, if SMP below is just a workaround since some arches
> leave NR_CPUS = 0 if !SMP. If NR_CPUS is valid unconditionally, I don't
> think SMP is at all useful here.
Ideally, this should be "if NR_CPUS > 1". But we can't do that until
all (i.e. most) architectures that do not define NR_CPUS if SMP=n
are fixed.
> Could you just drop if SMP and leave this configuration unconditionally
> shown for users? It's easy for all users to get how this Kconfig works.
I cannot. There are +20000 configuration symbols. No one wants to see
questions that are irrelevant.
I can change it to "if SMP && NR_CPUS > 1", though ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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.
>
> Avoid needlessly enlarging the defconfig files, and reduce churn for
> updating them, by specifying valid defaults depending on SMP and
> NR_CPUS.
>
> While at it, make the prompt depend on SMP, as there is no point in
> asking the user about the maximum number of decompression streams if
> there is only one valid answer.
>
Absolutely agree.
> Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> fs/erofs/Kconfig | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
> index 2dfc313588d283a0..37495e95a78d9bf6 100644
> --- a/fs/erofs/Kconfig
> +++ b/fs/erofs/Kconfig
> @@ -132,11 +132,13 @@ config EROFS_FS_ZIP_LZMA
> Say N if you want to disable LZMA compression support.
>
> config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> - int "EROFS LZMA default maximum decompression streams"
> + int "EROFS LZMA default maximum decompression streams" if SMP
> depends on EROFS_FS_ZIP_LZMA
> range 1 NR_CPUS if SMP
> range 1 1 if !SMP
> - default 16
> + default 16 if SMP && NR_CPUS >= 16
> + default NR_CPUS if SMP
> + default 1
> help
> By default EROFS allocates one LZMA decompression stream per CPU.
> Each stream can hold a dictionary of up to 8 MiB taken from the
> @@ -144,7 +146,7 @@ config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> of memory. This caps the default; the lzma_streams module parameter
> still overrides it.
>
> - If unsure, keep the default of 16.
> + If unsure, keep the suggested default (16 or lower).
>
> config EROFS_FS_ZIP_DEFLATE
> bool "EROFS DEFLATE compressed data support"
> --
> 2.43.0
>
On Thu, Aug 20, 2026 at 05:51:08AM -0700, Guenter Roeck wrote: > On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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. > > > > Avoid needlessly enlarging the defconfig files, and reduce churn for > > updating them, by specifying valid defaults depending on SMP and > > NR_CPUS. > > > > While at it, make the prompt depend on SMP, as there is no point in > > asking the user about the maximum number of decompression streams if > > there is only one valid answer. > > > > Absolutely agree. As I replied to Geert, unless there is a mandatory requirement documented that "there is no point to make a Kconfig visible if there is only one valid number". I tend to avoid making EROFS Kconfig visibility depend on arbitrary architecture Kconfig options such as SMP or !SMP; SMP here is due to some arches make NR_CPUS = 0 if !SMP, but it doesn't need to bother users why a EROFS kconfig visibility has some relationship with an arch kconfig. Thanks, Gao Xiang
On Thu, Aug 20, 2026 at 09:10:25PM +0800, Gao Xiang wrote: > On Thu, Aug 20, 2026 at 05:51:08AM -0700, Guenter Roeck wrote: > > On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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. > > > > > > Avoid needlessly enlarging the defconfig files, and reduce churn for > > > updating them, by specifying valid defaults depending on SMP and > > > NR_CPUS. > > > > > > While at it, make the prompt depend on SMP, as there is no point in > > > asking the user about the maximum number of decompression streams if > > > there is only one valid answer. > > > > > > > Absolutely agree. > > As I replied to Geert, unless there is a mandatory requirement > documented that "there is no point to make a Kconfig visible if there > is only one valid number". > I would call that common sense. Guenter > I tend to avoid making EROFS Kconfig visibility depend on arbitrary > architecture Kconfig options such as SMP or !SMP; SMP here is due to > some arches make NR_CPUS = 0 if !SMP, but it doesn't need to bother > users why a EROFS kconfig visibility has some relationship with an arch > kconfig. > > Thanks, > Gao Xiang
On Thu, Aug 20, 2026 at 06:43:20AM -0700, Guenter Roeck wrote: > On Thu, Aug 20, 2026 at 09:10:25PM +0800, Gao Xiang wrote: > > On Thu, Aug 20, 2026 at 05:51:08AM -0700, Guenter Roeck wrote: > > > On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven 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. > > > > > > > > Avoid needlessly enlarging the defconfig files, and reduce churn for > > > > updating them, by specifying valid defaults depending on SMP and > > > > NR_CPUS. > > > > > > > > While at it, make the prompt depend on SMP, as there is no point in > > > > asking the user about the maximum number of decompression streams if > > > > there is only one valid answer. > > > > > > > > > > Absolutely agree. > > > > As I replied to Geert, unless there is a mandatory requirement > > documented that "there is no point to make a Kconfig visible if there > > is only one valid number". > > > I would call that common sense. Ok, I don't want to argue with that minor stuff more. Thanks for the patch, I will pick up this patch with all rvb tags later (no later than 7.3-rc2) Thanks, Gao Xiang > > Guenter > > > I tend to avoid making EROFS Kconfig visibility depend on arbitrary > > architecture Kconfig options such as SMP or !SMP; SMP here is due to > > some arches make NR_CPUS = 0 if !SMP, but it doesn't need to bother > > users why a EROFS kconfig visibility has some relationship with an arch > > kconfig. > > > > Thanks, > > Gao Xiang >
CC kbuild
On Thu, 20 Aug 2026 at 12:01, Geert Uytterhoeven
<geert+renesas@glider.be> 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?
> Avoid needlessly enlarging the defconfig files, and reduce churn for
> updating them, by specifying valid defaults depending on SMP and
> NR_CPUS.
>
> While at it, make the prompt depend on SMP, as there is no point in
> asking the user about the maximum number of decompression streams if
> there is only one valid answer.
>
> Fixes: c9b47e6b23114e93 ("erofs: cap LZMA stream pool size")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> fs/erofs/Kconfig | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
> index 2dfc313588d283a0..37495e95a78d9bf6 100644
> --- a/fs/erofs/Kconfig
> +++ b/fs/erofs/Kconfig
> @@ -132,11 +132,13 @@ config EROFS_FS_ZIP_LZMA
> Say N if you want to disable LZMA compression support.
>
> config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> - int "EROFS LZMA default maximum decompression streams"
> + int "EROFS LZMA default maximum decompression streams" if SMP
> depends on EROFS_FS_ZIP_LZMA
> range 1 NR_CPUS if SMP
> range 1 1 if !SMP
> - default 16
> + default 16 if SMP && NR_CPUS >= 16
> + default NR_CPUS if SMP
> + default 1
> help
> By default EROFS allocates one LZMA decompression stream per CPU.
> Each stream can hold a dictionary of up to 8 MiB taken from the
> @@ -144,7 +146,7 @@ config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
> of memory. This caps the default; the lzma_streams module parameter
> still overrides it.
>
> - If unsure, keep the default of 16.
> + If unsure, keep the suggested default (16 or lower).
>
> config EROFS_FS_ZIP_DEFLATE
> bool "EROFS DEFLATE compressed data support"
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
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@glider.be> 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
Hi Nicolas,
On Fri, 28 Aug 2026 at 17:47, Nicolas Schier <nsc@kernel.org> wrote:
> On Thu, Aug 20, 2026 at 12:15:33PM +0200, Geert Uytterhoeven wrote:
> > On Thu, 20 Aug 2026 at 12:01, Geert Uytterhoeven
> > <geert+renesas@glider.be> 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):
[...]
> Thus, to me it looks as expected. Do you still see the behaviour you
> described above?
Perhaps you cannot reproduce this because this fix is already
upstream as commit ab74edaeb1ae7c71 ("erofs: Fix
EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS default logic")?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Cc: Julian
On Fri, Aug 28, 2026 at 07:21:07PM +0200, Geert Uytterhoeven wrote:
> Hi Nicolas,
>
> On Fri, 28 Aug 2026 at 17:47, Nicolas Schier <nsc@kernel.org> wrote:
> > On Thu, Aug 20, 2026 at 12:15:33PM +0200, Geert Uytterhoeven wrote:
> > > On Thu, 20 Aug 2026 at 12:01, Geert Uytterhoeven
> > > <geert+renesas@glider.be> 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):
>
> [...]
>
> > Thus, to me it looks as expected. Do you still see the behaviour you
> > described above?
>
> Perhaps you cannot reproduce this because this fix is already
> upstream as commit ab74edaeb1ae7c71 ("erofs: Fix
> EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS default logic")?
>
oh sure, thanks. Yes, it really looks like a bug to me: if the range is
defined as 1 to 1, the default 16 should not cause a savedefconfig to
write the config set to 1.
--
Nicolas
On 8/28/26 20:20, Nicolas Schier wrote: > Cc: Julian Thanks for looping me in. So it's not great usage of the Kconfig language to have the 'range 1 1' and the 'default 16' here contradicting each other. But, it's currently legal. I would prefer to disallow this, but a proper check would actually require SAT solving (or similar) in the general case, so it's unlikely to become an error in the near future. Anyway, as long as we're continuing to allow it, savedefconfig should be considered bugged for not handling it accordingly. Let me see if I can send something out this weekend. - Julian Braha
Hi Julian,
On Sat, 29 Aug 2026 at 01:19, Julian Braha <julianbraha@gmail.com> wrote:
> On 8/28/26 20:20, Nicolas Schier wrote:
> > Cc: Julian
>
> Thanks for looping me in.
>
> So it's not great usage of the Kconfig language to have the 'range 1 1'
> and the 'default 16' here contradicting each other. But, it's currently
> legal.
>
> I would prefer to disallow this, but a proper check would actually
> require SAT solving (or similar) in the general case, so it's unlikely
> to become an error in the near future.
>
> Anyway, as long as we're continuing to allow it, savedefconfig should be
> considered bugged for not handling it accordingly.
>
> Let me see if I can send something out this weekend.
Thank you, my patch can be reverted again once your "PATCH] kconfig:
fix extra output from savedefconfig on out-of-range defaults"[1]
has been accepted upstream.
[1] https://lore.kernel.org/20260830221129.2668354-1-julianbraha@gmail.com
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
© 2016 - 2026 Red Hat, Inc.