All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Mark Brown <broonie@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] tools/nolibc/stdio: Implement vprintf()
Date: Thu, 6 Apr 2023 20:26:09 +0200	[thread overview]
Message-ID: <ZC8OwUPAC4s413jP@1wt.eu> (raw)
In-Reply-To: <20230405-kselftest-nolibc-v2-1-2ac2495814b5@kernel.org>

On Thu, Apr 06, 2023 at 05:19:10PM +0100, Mark Brown wrote:
> vprintf() is equivalent to vfprintf() to stdout so implement it as a simple
> wrapper for the existing vfprintf(), allowing us to build kselftest.h.
> 
> Suggested-by: Willy Tarreau <w@1wt.eu>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/include/nolibc/stdio.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
> index 96ac8afc5aee..6cbbb52836a0 100644
> --- a/tools/include/nolibc/stdio.h
> +++ b/tools/include/nolibc/stdio.h
> @@ -273,6 +273,12 @@ int vfprintf(FILE *stream, const char *fmt, va_list args)
>  	return written;
>  }
>  
> +static __attribute__((unused))
> +int vprintf(const char *fmt, va_list args)
> +{
> +	return vfprintf(stdout, fmt, args);
> +}
> +
>  static __attribute__((unused, format(printf, 2, 3)))
>  int fprintf(FILE *stream, const char *fmt, ...)
>  {

Perfect, thank you Mark, I'm glad that it simplified the rest of
your series.

Acked-by: Willy Tarreau <w@1wt.eu>

Paul, feel free to directly queue this one for 6.5. If you prefer I
can as well queue it on my side and send it later, it's just that I
have exactly zero extra value on top of this one ;-)

Thanks,
Willy

WARNING: multiple messages have this Message-ID (diff)
From: Willy Tarreau <w@1wt.eu>
To: Mark Brown <broonie@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] tools/nolibc/stdio: Implement vprintf()
Date: Thu, 6 Apr 2023 20:26:09 +0200	[thread overview]
Message-ID: <ZC8OwUPAC4s413jP@1wt.eu> (raw)
In-Reply-To: <20230405-kselftest-nolibc-v2-1-2ac2495814b5@kernel.org>

On Thu, Apr 06, 2023 at 05:19:10PM +0100, Mark Brown wrote:
> vprintf() is equivalent to vfprintf() to stdout so implement it as a simple
> wrapper for the existing vfprintf(), allowing us to build kselftest.h.
> 
> Suggested-by: Willy Tarreau <w@1wt.eu>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/include/nolibc/stdio.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
> index 96ac8afc5aee..6cbbb52836a0 100644
> --- a/tools/include/nolibc/stdio.h
> +++ b/tools/include/nolibc/stdio.h
> @@ -273,6 +273,12 @@ int vfprintf(FILE *stream, const char *fmt, va_list args)
>  	return written;
>  }
>  
> +static __attribute__((unused))
> +int vprintf(const char *fmt, va_list args)
> +{
> +	return vfprintf(stdout, fmt, args);
> +}
> +
>  static __attribute__((unused, format(printf, 2, 3)))
>  int fprintf(FILE *stream, const char *fmt, ...)
>  {

Perfect, thank you Mark, I'm glad that it simplified the rest of
your series.

Acked-by: Willy Tarreau <w@1wt.eu>

Paul, feel free to directly queue this one for 6.5. If you prefer I
can as well queue it on my side and send it later, it's just that I
have exactly zero extra value on top of this one ;-)

Thanks,
Willy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-04-06 18:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 16:19 [PATCH v2 0/3] tools/nolibc: Support vprintf() so we can use kselftest.h with nolibc Mark Brown
2023-04-06 16:19 ` Mark Brown
2023-04-06 16:19 ` [PATCH v2 1/3] tools/nolibc/stdio: Implement vprintf() Mark Brown
2023-04-06 16:19   ` Mark Brown
2023-04-06 18:26   ` Willy Tarreau [this message]
2023-04-06 18:26     ` Willy Tarreau
2023-04-06 18:43     ` Paul E. McKenney
2023-04-06 18:43       ` Paul E. McKenney
2023-04-10 18:30       ` Shuah Khan
2023-04-10 18:30         ` Shuah Khan
2023-04-11 14:31         ` Mark Brown
2023-04-11 14:31           ` Mark Brown
2023-04-11 15:03           ` Will Deacon
2023-04-11 15:03             ` Will Deacon
2023-04-11 15:13             ` Mark Brown
2023-04-11 15:13               ` Mark Brown
2023-04-11 16:44               ` Paul E. McKenney
2023-04-11 16:44                 ` Paul E. McKenney
2023-04-11 18:54                 ` Shuah Khan
2023-04-11 18:54                   ` Shuah Khan
2023-04-11 21:06                   ` Will Deacon
2023-04-11 21:06                     ` Will Deacon
2023-04-06 16:19 ` [PATCH v2 2/3] kselftest: Support nolibc Mark Brown
2023-04-06 16:19   ` Mark Brown
2023-04-06 16:19 ` [PATCH v2 3/3] kselftest/arm64: Convert za-fork to use kselftest.h Mark Brown
2023-04-06 16:19   ` Mark Brown

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=ZC8OwUPAC4s413jP@1wt.eu \
    --to=w@1wt.eu \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.