diff mbox series

[014/171] lib: Add a Kconfig for SPL_ERRNO_STR

Message ID 20230130144324.206208-15-sjg@chromium.org
State Changes Requested
Headers show
Series Kconfig: More cleanup of CONFIG options | expand

Commit Message

Simon Glass Jan. 30, 2023, 2:40 p.m. UTC
This is implicitly used in the source and seems useful, so add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Heinrich Schuchardt Jan. 30, 2023, 2:51 p.m. UTC | #1
On 1/30/23 15:40, Simon Glass wrote:
> This is implicitly used in the source and seems useful, so add it.

Do not use the same commit message for all patches.

Clearly describe how you plan to use this and put this patch in a series
where you actually use the new CONFIG option

>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>   lib/Kconfig | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 549bd357785..999ae99bf68 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -782,6 +782,10 @@ config ERRNO_STR
>   	  - if errno is null or positive number - a pointer to "Success" message
>   	  - if errno is negative - a pointer to errno related message
>
> +config SPL_ERRNO_STR
> +	def_bool n  # Enable function for getting errno-related string message (SPL)
> +	depends on SPL
> +
>   config HEXDUMP
>   	bool "Enable hexdump"
>   	help
Tom Rini Jan. 30, 2023, 2:53 p.m. UTC | #2
On Mon, Jan 30, 2023 at 03:51:56PM +0100, Heinrich Schuchardt wrote:
> On 1/30/23 15:40, Simon Glass wrote:
> > This is implicitly used in the source and seems useful, so add it.
> 
> Do not use the same commit message for all patches.

The same commit message is fine, when scripting a bulk fix such as this.
Simon Glass Jan. 31, 2023, 2:16 p.m. UTC | #3
Hi Heinrich,

On Mon, 30 Jan 2023 at 07:57, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 1/30/23 15:40, Simon Glass wrote:
> > This is implicitly used in the source and seems useful, so add it.
>
> Do not use the same commit message for all patches.
>
> Clearly describe how you plan to use this and put this patch in a series
> where you actually use the new CONFIG option

It is actually used today. To see that, you only need to grep for use
this with CONFIG_IS_ENABLDE().

Of course it is never actually enabled, but that doesn't mean we can drop it.

The reason this works today is that CONFIG_IS_ENABLED() looks for
Kconfig options which are not actually in Kconfig. That is what I am
trying to change, since it is incompatible with separating out the
builds.



>
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >   lib/Kconfig | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 549bd357785..999ae99bf68 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -782,6 +782,10 @@ config ERRNO_STR
> >         - if errno is null or positive number - a pointer to "Success" message
> >         - if errno is negative - a pointer to errno related message
> >
> > +config SPL_ERRNO_STR
> > +     def_bool n  # Enable function for getting errno-related string message (SPL)
> > +     depends on SPL
> > +
> >   config HEXDUMP
> >       bool "Enable hexdump"
> >       help
>
diff mbox series

Patch

diff --git a/lib/Kconfig b/lib/Kconfig
index 549bd357785..999ae99bf68 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -782,6 +782,10 @@  config ERRNO_STR
 	  - if errno is null or positive number - a pointer to "Success" message
 	  - if errno is negative - a pointer to errno related message
 
+config SPL_ERRNO_STR
+	def_bool n  # Enable function for getting errno-related string message (SPL)
+	depends on SPL
+
 config HEXDUMP
 	bool "Enable hexdump"
 	help