qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 9/9] checkpatch: add virtio_error and virtque


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3 9/9] checkpatch: add virtio_error and virtqueue_error to error funcs
Date: Tue, 18 Jul 2017 18:06:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Ladi Prosek <address@hidden> writes:

> Two more error functions that should not contain newlines.
>
> Suggested-by: Greg Kurz <address@hidden>
> Signed-off-by: Ladi Prosek <address@hidden>
> ---
>  scripts/checkpatch.pl | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 4e91122..2cd2713 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2540,7 +2540,9 @@ sub process {
>                               info_vreport|
>                               error_report|
>                               warn_report|
> -                             info_report}x;
> +                             info_report|
> +                             virtio_error|
> +                             virtqueue_error}x;
>  
>       if ($rawline =~ /\b(?:$qemu_error_funcs)\s*\(.*\".*\\n/) {
>               ERROR("Error messages should not contain newlines\n" . 
> $herecurr);

What makes the two functions appropriate for this list is this pattern:

    va_start(ap, fmt);
    msg = g_strdup_vprintf(fmt, ap);
    va_end(ap);

    error_report("... %s", ..., msg);

There's a related pattern using error_vreport().

Do we have more instances of these patterns?

Regardless:
Reviewed-by: Markus Armbruster <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]