[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110609103747.59805668.randy.dunlap@oracle.com>
Date: Thu, 9 Jun 2011 10:37:47 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Harry Wei <jiaweiwei.xiyou@...il.com>,
Doug Thompson <dougthompson@...ssion.com>
Cc: linux-kernel@...r.kernel.org, ravi@...ztechnologies.com,
arvino55@...il.com, greg@...ah.com, akpm@...ux-foundation.org,
randy.dunlap@...cle.com, joe@...ches.com
Subject: Re: [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c
On Thu, 9 Jun 2011 11:04:13 +0800 Harry Wei wrote:
> From: Harry Wei <harryxiyou@...il.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@...il.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 unsigned long, not unsigned long long...
> if (info->xeap & 1)
> - page |= 0x100000000ul;
> + page |= 0x100000000ull;
and just making this second change fixes the warning.
I don't know what the right answer is, but this patch does not look
complete to me.
Back in April there was a discussion about this warning message and the
conclusion was that this driver should be replaced. See
https://lkml.org/lkml/2011/4/21/232 and its replies.
But we seem to be having problems reaching the EDAC subsystem maintainer
(again cc-ed).
> chan = page & 1;
> page >>= 1;
> offst = page & ((1 << PAGE_SHIFT) - 1);
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists