public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Thompson <norsk5@yahoo.com>
To: lkml <linux-kernel@vger.kernel.org>,
	Randy Dunlap <randy.dunlap@oracle.com>
Cc: Doug Thompson <dougthompson@xmission.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH -next] edac/mce_amd: fix shift warning
Date: Wed, 13 Oct 2010 15:39:33 -0700 (PDT)	[thread overview]
Message-ID: <243672.50367.qm@web50106.mail.re2.yahoo.com> (raw)
In-Reply-To: <20101013131057.88238be6.randy.dunlap@oracle.com>



--- On Wed, 10/13/10, Randy Dunlap <randy.dunlap@oracle.com> wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
> Subject: [PATCH -next] edac/mce_amd: fix shift warning
> To: "lkml" <linux-kernel@vger.kernel.org>
> Cc: "Doug Thompson" <dougthompson@xmission.com>, "Borislav Petkov" <borislav.petkov@amd.com>, "akpm" <akpm@linux-foundation.org>
> Date: Wednesday, October 13, 2010, 2:10 PM
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> The BIT() macro works on unsigned longs, but this warning
> happens
> on i386 (X86_32), where UL is 32 bits and this value needs
> to be
> 64 bits, so use open-coded ULL.

good find


> 
> drivers/edac/mce_amd.c:262: warning: left shift count >=
> width of type
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Signed-off-by: Doug Thompson <dougthompson@xmission.com>


> Cc: Doug Thompson <dougthompson@xmission.com>
> Cc: Borislav Petkov <borislav.petkov@amd.com>
> ---
>  drivers/edac/mce_amd.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux-next-20101012.orig/drivers/edac/mce_amd.c
> +++ linux-next-20101012/drivers/edac/mce_amd.c
> @@ -259,7 +259,8 @@ static void amd_decode_ic_mce(struct
> mce
>          pr_cont("%s TLB
> %s.\n", LL_MSG(ec),
>             
> (xec ? "multimatch" : "parity error"));
>      else if (BUS_ERROR(ec)) {
> -        bool k8 =
> (boot_cpu_data.x86 == 0xf && (m->status &
> BIT(58)));
> +        bool k8 =
> (boot_cpu_data.x86 == 0xf &&
> +           
>     (m->status & (1ULL <<
> 58)));
>  
>          pr_cont("during
> %s.\n", (k8 ? "system linefill" : "NB data read"));
>      } else if (fam_ops->ic_mce(ec))
> 

  reply	other threads:[~2010-10-13 22:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 20:10 [PATCH -next] edac/mce_amd: fix shift warning Randy Dunlap
2010-10-13 22:39 ` Doug Thompson [this message]
2010-10-14  4:24 ` Borislav Petkov
2010-10-14 10:58   ` [PATCH] bitops.h: Widen BIT macro to support 64-bit types Borislav Petkov
2010-10-14 11:12     ` Matthew Wilcox
2010-10-14 12:12       ` Borislav Petkov
2010-10-14 14:27         ` Matthew Wilcox
2010-10-14 15:03     ` Linus Torvalds
2010-10-14 15:36       ` Borislav Petkov

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=243672.50367.qm@web50106.mail.re2.yahoo.com \
    --to=norsk5@yahoo.com \
    --cc=akpm@linux-foundation.org \
    --cc=borislav.petkov@amd.com \
    --cc=dougthompson@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.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