linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Harry Wei <jiaweiwei.xiyou@gmail.com>
Cc: linux-kernel@vger.kernel.org, ravi@jetztechnologies.com,
	arvino55@gmail.com, bluesmoke-devel@lists.sourceforge.net,
	greg@kroah.com, akpm@linux-foundation.org
Subject: Re: [PATCH]Remove a warning for drivers/edac/i82975x_edac.c
Date: Mon, 6 Jun 2011 13:36:52 -0700	[thread overview]
Message-ID: <20110606133652.1d146bba.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20110604022151.GA2475@gmail.com>

On Sat, 4 Jun 2011 10:22:21 +0800 Harry Wei wrote:

> From: Harry Wei <harryxiyou@gmail.com>
> 
> When i compile 2.6.39.1, a warning shows like below.
> This patch can fix the warning. And i works well with
> my PC.

Hi Harry,

Does "works well with my PC" mean that you boot-tested this patch
or just compile-tested it?

and if you boot-tested it, do you have hardware that actually
exercises this code path?

> [...]
> CC [M]  drivers/edac/e752x_edac.o
> CC [M]  drivers/edac/i82875p_edac.o
> CC [M]  drivers/edac/i82975x_edac.o
> drivers/edac/i82975x_edac.c: In function ���i82975x_process_error_info���:
> drivers/edac/i82975x_edac.c:298: warning: integer constant is too large for ���unsigned long��� type
> CC [M]  drivers/edac/i3000_edac.o
> CC [M]  drivers/edac/i3200_edac.o
> CC [M]  drivers/edac/x38_edac.o
> CC [M]  drivers/edac/i82860_edac.o
> [...]
> 
> Signed-off-by: Harry Wei <harryxiyou@gmail.com>
> 
> Index: prj/drivers/edac/i82975x_edac.c
> ===================================================================
> --- prj.orig/drivers/edac/i82975x_edac.c	2011-06-04 10:09:55.351174516 +0800
> +++ prj/drivers/edac/i82975x_edac.c	2011-06-04 10:10:30.875168437 +0800
> @@ -293,9 +293,9 @@
>  		info->errsts = info->errsts2;
>  	}
>  
> -	page = (unsigned long) info->eap;
> +	page = (unsigned long long) info->eap;

but page is still declared as unsigned long.  should it be unsigned long long?

>  	if (info->xeap & 1)
> -		page |= 0x100000000ul;
> +		page |= 0x100000000ull;
>  	chan = page & 1;
>  	page >>= 1;
>  	offst = page & ((1 << PAGE_SHIFT) - 1);


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2011-06-06 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-04  2:22 [PATCH]Remove a warning for drivers/edac/i82975x_edac.c Harry Wei
2011-06-06 20:36 ` Randy Dunlap [this message]
2011-06-07  1:12   ` Harry Wei

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=20110606133652.1d146bba.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=arvino55@gmail.com \
    --cc=bluesmoke-devel@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=jiaweiwei.xiyou@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ravi@jetztechnologies.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).