mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Zachary Amsden" <zach@vmware.com>
Cc: "Andrew Morton" <akpm@osdl.org>, "Andi Kleen" <ak@muc.de>,
	"Jeremy Fitzhardinge" <jeremy@goop.org>,
	"Rusty Russell" <rusty@rustcorp.com.au>,
	"Chris Wright" <chrisw@sous-sol.org>,
	"Virtualization Mailing List" <virtualization@lists.osdl.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/10] I386 mcheck p4 grotesque and needless warning fix.patch
Date: Tue, 10 Apr 2007 16:36:36 +0200	[thread overview]
Message-ID: <9a8748490704100736l49b0a7c6t49d21900f4f23e33@mail.gmail.com> (raw)
In-Reply-To: <200704100006.l3A068Xk020608@zach-dev.vmware.com>

On 10/04/07, Zachary Amsden <zach@vmware.com> wrote:
> No, just no.  You do not use goto to skip a code block.  You do not
> return an obvious variable from a singly-inlined function and give
> the function a return value.  You don't put unexplained comments
> about kmalloc in code which doesn't do dynamic allocation.  And
> you don't leave stray warnings around for no good reason.
>
> Also, when possible, it is better to use block scoped variables
> because gcc can sometime generate better code.
>
> Signed-off-by: Zachary Amsden <zach@vmware.com>
>
> diff -r ed741f57dae8 arch/i386/kernel/cpu/mcheck/p4.c
> --- a/arch/i386/kernel/cpu/mcheck/p4.c  Fri Apr 06 14:29:52 2007 -0700
> +++ b/arch/i386/kernel/cpu/mcheck/p4.c  Fri Apr 06 14:43:24 2007 -0700
[...]
>  static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
> @@ -155,7 +146,6 @@ static fastcall void intel_machine_check
>         u32 alow, ahigh, high, low;
>         u32 mcgstl, mcgsth;
>         int i;
> -       struct intel_mce_extended_msrs dbg;
>
>         rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
>         if (mcgstl & (1<<0))    /* Recoverable ? */
> @@ -164,7 +154,9 @@ static fastcall void intel_machine_check
>         printk (KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
>                 smp_processor_id(), mcgsth, mcgstl);
>
> -       if (intel_get_extended_msrs(&dbg)) {
> +       if (mce_num_extended_msrs > 0) {
> +               struct intel_mce_extended_msrs dbg;

shouldn't there be a blank line here?

> +               intel_get_extended_msrs(&dbg);
>                 printk (KERN_DEBUG "CPU %d: EIP: %08x EFLAGS: %08x\n",
>                         smp_processor_id(), dbg.eip, dbg.eflags);
>                 printk (KERN_DEBUG "\teax: %08x ebx: %08x ecx: %08x edx: %08x\n",


-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

      parent reply	other threads:[~2007-04-10 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10  0:06 Zachary Amsden
2007-04-10 14:06 ` Chuck Ebbert
2007-04-10 14:36 ` Jesper Juhl [this message]

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=9a8748490704100736l49b0a7c6t49d21900f4f23e33@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=chrisw@sous-sol.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.org \
    --cc=zach@vmware.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

all inboxes | Powered by JetHome®