From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Date: Thu, 18 Feb 2016 06:34:28 +0000 Subject: Re: [kvm-unit-tests PATCH v5 06/18] lib: add vprintf Message-Id: <56C565F4.7020201@redhat.com> List-Id: References: <1455734459-31902-1-git-send-email-drjones@redhat.com> <1455734459-31902-7-git-send-email-drjones@redhat.com> In-Reply-To: <1455734459-31902-7-git-send-email-drjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Jones , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: dgibson@redhat.com, david@gibson.dropbear.id.au, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com, rkrcmar@redhat.com On 17.02.2016 19:40, Andrew Jones wrote: > va_report_xfail has the pattern > > char buf[] > vsnprintf(buf, ...) > puts(buf) > > Before adding another one, replace it with vprintf. > > Suggested-by: David Gibson > Signed-off-by: Andrew Jones > --- > lib/libcflat.h | 1 + > lib/printf.c | 14 +++++++++++++- > lib/report.c | 4 +--- > 3 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/lib/libcflat.h b/lib/libcflat.h > index 9747ccdbc9f1d..f7a5728c6759a 100644 > --- a/lib/libcflat.h > +++ b/lib/libcflat.h > @@ -55,6 +55,7 @@ extern void abort(void); > extern int printf(const char *fmt, ...); > extern int snprintf(char *buf, int size, const char *fmt, ...); Completely off-topic to your patch, but these declarations above could maybe be improved with __attribute__((format (printf, x, y))) to get some nice format string checks from the compiler. > extern int vsnprintf(char *buf, int size, const char *fmt, va_list va); > +extern int vprintf(const char *fmt, va_list va); > extern long atol(const char *ptr); Back to the topic: Your patch looks fine to me, so: Reviewed-by: Thomas Huth