From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH v5 06/18] lib: add vprintf Date: Thu, 18 Feb 2016 07:34:28 +0100 Message-ID: <56C565F4.7020201@redhat.com> References: <1455734459-31902-1-git-send-email-drjones@redhat.com> <1455734459-31902-7-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dgibson@redhat.com, david@gibson.dropbear.id.au, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com, rkrcmar@redhat.com To: Andrew Jones , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59309 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424013AbcBRGee (ORCPT ); Thu, 18 Feb 2016 01:34:34 -0500 In-Reply-To: <1455734459-31902-7-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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