kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, Bill Wendling <morbo@google.com>
Cc: "David Hildenbrand" <david@redhat.com>,
	"kvm list" <kvm@vger.kernel.org>,
	"Lukáš Doktor" <ldoktor@redhat.com>,
	"David Gibson" <dgibson@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Andrew Jones" <drjones@redhat.com>
Subject: Re: [kvm-unit-tests PATCH] lib: use an argument which doesn't require default argument promotion
Date: Mon, 14 Oct 2019 13:04:43 +0200	[thread overview]
Message-ID: <4d591c3f-82aa-dd9e-efce-8b7d73b2f64f@redhat.com> (raw)
In-Reply-To: <df9c5f5d-c9ec-1a7b-1fec-67d1e7a5bbad@redhat.com>

On 14/10/19 09:57, Thomas Huth wrote:
> -void report(const char *msg_fmt, bool pass, ...)
> +void report(bool pass, const char *msg_fmt, ...)
>  {
>         va_list va;
> -       va_start(va, pass);
> +       va_start(va, msg_fmt);
>         va_report(msg_fmt, pass, false, false, va);
>         va_end(va);
>  }
> 
> -void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...)
> +void report_xfail(bool xfail, bool pass, const char *msg_fmt, ...)
>  {
>         va_list va;
> -       va_start(va, pass);
> +       va_start(va, msg_fmt);
>         va_report(msg_fmt, pass, xfail, false, va);
>         va_end(va);
>  }
> 
> ... then we can keep the "bool" - but we have to fix all calling sites, too.
> 
> Paolo, any preferences?

Actually I had already pushed Bill's patch.  I also thought about
reordering the arguments, but it's a big change.  If someone wants to
try his hands at doing it with Coccinelle, I'm happy to apply it.

Paolo


  parent reply	other threads:[~2019-10-14 11:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 23:11 [kvm-unit-tests PATCH] lib: use an argument which doesn't require default argument promotion Bill Wendling
2019-09-10 16:43 ` Jim Mattson
2019-09-30 21:59   ` Bill Wendling
2019-10-09 10:13 ` Paolo Bonzini
2019-10-11 14:19 ` David Hildenbrand
2019-10-11 16:24   ` Thomas Huth
2019-10-11 16:36     ` Thomas Huth
2019-10-11 18:36       ` Bill Wendling
2019-10-14  7:57         ` Thomas Huth
2019-10-14  8:12           ` David Hildenbrand
2019-10-14  8:14           ` Bill Wendling
2019-10-14  9:32             ` Thomas Huth
2019-10-14 11:04           ` Paolo Bonzini [this message]
2019-10-17 12:32             ` Thomas Huth

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=4d591c3f-82aa-dd9e-efce-8b7d73b2f64f@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=david@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=ldoktor@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=morbo@google.com \
    --cc=thuth@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).