All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 1/3] x86/nmi: Corrections and improvements to do_nmi_stats()
Date: Tue, 18 Feb 2020 17:07:25 +0100	[thread overview]
Message-ID: <16314a6e-b005-03bf-cffa-432d91701204@suse.com> (raw)
In-Reply-To: <20200217111740.7298-2-andrew.cooper3@citrix.com>

On 17.02.2020 12:17, Andrew Cooper wrote:
> --- a/xen/arch/x86/nmi.c
> +++ b/xen/arch/x86/nmi.c
> @@ -587,25 +587,25 @@ static void do_nmi_trigger(unsigned char key)
>  
>  static void do_nmi_stats(unsigned char key)
>  {
> -    int i;
> -    struct domain *d;
> -    struct vcpu *v;
> +    const struct vcpu *v;
> +    unsigned int cpu;
> +    bool pend, mask;
>  
>      printk("CPU\tNMI\n");
> -    for_each_online_cpu ( i )
> -        printk("%3d\t%3d\n", i, nmi_count(i));
> +    for_each_online_cpu ( cpu )
> +        printk("%3d\t%3d\n", cpu, nmi_count(cpu));

%3u twice then please. With this
Reviewed-by: Jan Beulich <jbeulich@suse.com>
but I have one more remark:

> -    if ( ((d = hardware_domain) == NULL) || (d->vcpu == NULL) ||
> -         ((v = d->vcpu[0]) == NULL) )
> +    if ( !hardware_domain || !hardware_domain->vcpu ||
> +         !(v = hardware_domain->vcpu[0]) )

Perhaps, just for readability and consistency, use domain_vcpu()
here?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-02-18 16:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 11:17 [Xen-devel] [PATCH 0/3] xen: async_exception_* cleanup Andrew Cooper
2020-02-17 11:17 ` [Xen-devel] [PATCH 1/3] x86/nmi: Corrections and improvements to do_nmi_stats() Andrew Cooper
2020-02-18 16:07   ` Jan Beulich [this message]
2020-02-17 11:17 ` [Xen-devel] [PATCH 2/3] xen: Move async_exception_* infrastructure into x86 Andrew Cooper
2020-02-18 16:11   ` Jan Beulich
2020-02-18 16:23     ` Andrew Cooper
2020-02-17 11:17 ` [Xen-devel] [PATCH 3/3] xen/x86: Rename and simplify async_event_* infrastructure Andrew Cooper
2020-02-18 16:31   ` Jan Beulich
2020-02-20 18:24     ` Andrew Cooper

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=16314a6e-b005-03bf-cffa-432d91701204@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.