From: Jiri Slaby <jirislaby@kernel.org>
To: Yoann Congal <yoann.congal@smile.fr>,
x86@kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Luis R . Rodriguez" <mcgrof@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Matthew Wilcox" <willy@infradead.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"André Almeida" <andrealmeid@igalia.com>,
"Masahiro Yamada" <masahiroy@kernel.org>
Subject: Re: [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL
Date: Mon, 29 Jan 2024 12:28:13 +0100 [thread overview]
Message-ID: <60deb891-dab3-4440-82ff-c179486c0a79@kernel.org> (raw)
In-Reply-To: <20240127220026.1722399-1-yoann.congal@smile.fr>
On 27. 01. 24, 23:00, Yoann Congal wrote:
> CONFIG_BASE_SMALL is currently a type int but is only used as a boolean
> equivalent to !CONFIG_BASE_FULL.
>
> So, remove it entirely and move every usage to !CONFIG_BASE_FULL.
>
> In addition, recent kconfig changes (see the discussion in Closes: tag)
> revealed that using:
> config SOMETHING
> default "some value" if X
> does not work as expected if X is not of type bool.
>
> CONFIG_BASE_SMALL was used that way in init/Kconfig:
> config LOG_CPU_MAX_BUF_SHIFT
> default 12 if !BASE_SMALL
> default 0 if BASE_SMALL
>
> Note: This changes CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 to
> CONFIG_LOG_CPU_MAX_BUF_SHIFT=0 for some defconfigs, but that will not be
> a big impact due to this code in kernel/printk/printk.c:
> /* by default this will only continue through for large > 64 CPUs */
> if (cpu_extra <= __LOG_BUF_LEN / 2)
> return;
>
> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/all/CAMuHMdWm6u1wX7efZQf=2XUAHascps76YQac6rdnQGhc8nop_Q@mail.gmail.com/
> Fixes: 4e244c10eab3 ("kconfig: remove unneeded symbol_empty variable")
> ---
> v1 patch was named "treewide: Change CONFIG_BASE_SMALL to bool type"
> https://lore.kernel.org/all/20240126163032.1613731-1-yoann.congal@smile.fr/
>
> v1 -> v2: Applied Masahiro Yamada's comments (Thanks!):
> * Changed from "Change CONFIG_BASE_SMALL to type bool" to
> "Remove it and switch usage to !CONFIG_BASE_FULL"
> * Fixed "Fixes:" tag and reference to the mailing list thread.
> * Added a note about CONFIG_LOG_CPU_MAX_BUF_SHIFT changing.
...
> --- a/drivers/tty/vt/vc_screen.c
> +++ b/drivers/tty/vt/vc_screen.c
> @@ -51,7 +51,7 @@
> #include <asm/unaligned.h>
>
> #define HEADER_SIZE 4u
> -#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE)
> +#define CON_BUF_SIZE (IS_ENABLED(CONFIG_BASE_FULL) ? PAGE_SIZE : 256)
Why is the IS_ENABLED() addition needed? You don't say anything about
that in the commit log.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2024-01-29 11:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 22:00 [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL Yoann Congal
2024-01-29 11:28 ` Jiri Slaby [this message]
2024-01-29 12:56 ` Yoann Congal
2024-01-29 16:00 ` Luis Chamberlain
2024-01-31 14:34 ` Masahiro Yamada
2024-01-31 15:47 ` John Ogness
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60deb891-dab3-4440-82ff-c179486c0a79@kernel.org \
--to=jirislaby@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=willemdebruijn.kernel@gmail.com \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
--cc=yoann.congal@smile.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox