* Re: [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c
[not found] ` <20110610052047.GB3643@gmail.com>
@ 2011-06-10 6:42 ` Connor Hansen
2011-06-12 15:50 ` Arvind R
0 siblings, 1 reply; 2+ messages in thread
From: Connor Hansen @ 2011-06-10 6:42 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel, arvino55; +Cc: ravi, bluesmoke-devel
My system is 64bit, thus not showing a warning
adding cc to maintainer, and dev list
2011/6/9 Harry Wei <jiaweiwei.xiyou@gmail.com>:
> On Thu, Jun 09, 2011 at 10:37:47AM -0700, Randy Dunlap wrote:
>> On Thu, 9 Jun 2011 11:04:13 +0800 Harry Wei wrote:
>>
>> > - page = (unsigned long) info->eap;
>> > + page = (unsigned long long) info->eap;
>>
>> But page is still unsigned long, not unsigned long long...
> Yup, but if we can define a 'unsigned long long' type?
>>
>> > if (info->xeap & 1)
>> > - page |= 0x100000000ul;
>> > + page |= 0x100000000ull;
>>
>> and just making this second change fixes the warning.
> I will try my best. Can anyone give some other comments?
>>
>> I don't know what the right answer is, but this patch does not look
>> complete to me.
> I will try to give a v2.
>>
>> 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).
> You have not got a exact conclusion about this warning.
> Maybe Arvind knows more about this warning.(cc'ed)
>
>
> Thanks
> Harry Wei
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
older convo for new cc's
On Thu, 9 Jun 2011 11:04:13 +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.
>
> [...]
> 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 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 ***
- Show quoted text -
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c
2011-06-10 6:42 ` [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c Connor Hansen
@ 2011-06-12 15:50 ` Arvind R
0 siblings, 0 replies; 2+ messages in thread
From: Arvind R @ 2011-06-12 15:50 UTC (permalink / raw)
To: Connor Hansen; +Cc: Randy Dunlap, linux-kernel, ravi, bluesmoke-devel
Hi,
My system is broken currently, so I'm unable to check:(
But the foll. patch should fix the problem for 64 and 32 bits AND work
correct wrt.
to error-info. Would be glad if can check, please.
--- linux-2.6.39.1.orig/drivers/edac/i82975x_edac.c 2011-05-19 09:36:34 +0530
+++ linux-2.6.39.1/drivers/edac/i82975x_edac.c 2011-06-12 21:03:37 +0530
@@ -294,12 +294,12 @@
}
page = (unsigned long) info->eap;
- if (info->xeap & 1)
- page |= 0x100000000ul;
chan = page & 1;
- page >>= 1;
offst = page & ((1 << PAGE_SHIFT) - 1);
- page >>= PAGE_SHIFT;
+ page >>= 1;
+ if (info->xeap & 1)
+ page |= 0x80000000;
+ page >>= (PAGE_SHIFT - 1);
row = edac_mc_find_csrow_by_page(mci, page);
if (info->errsts & 0x0002)
- arvind
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-12 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110609030401.GA2615@gmail.com>
[not found] ` <20110609103747.59805668.randy.dunlap@oracle.com>
[not found] ` <20110610052047.GB3643@gmail.com>
2011-06-10 6:42 ` [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c Connor Hansen
2011-06-12 15:50 ` Arvind R
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).