linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]Remove a warning for drivers/edac/i82975x_edac.c
@ 2011-06-04  2:22 Harry Wei
  2011-06-06 20:36 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Harry Wei @ 2011-06-04  2:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: ravi, arvino55, bluesmoke-devel, greg, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1236 bytes --]

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.

[...]
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;
 	if (info->xeap & 1)
-		page |= 0x100000000ul;
+		page |= 0x100000000ull;
 	chan = page & 1;
 	page >>= 1;
 	offst = page & ((1 << PAGE_SHIFT) - 1);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]Remove a warning for drivers/edac/i82975x_edac.c
  2011-06-04  2:22 [PATCH]Remove a warning for drivers/edac/i82975x_edac.c Harry Wei
@ 2011-06-06 20:36 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2011-06-06 20:36 UTC (permalink / raw)
  To: Harry Wei; +Cc: greg, ravi, linux-kernel, akpm, bluesmoke-devel

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 ***

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
bluesmoke-devel mailing list
bluesmoke-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluesmoke-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-06 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).