All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wei <jiaweiwei.xiyou@gmail.com>
To: Connor Hansen <cmdkhh@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c
Date: Fri, 10 Jun 2011 13:07:50 +0800	[thread overview]
Message-ID: <20110610050747.GA3643@gmail.com> (raw)
In-Reply-To: <BANLkTin-iC8HFm2dmCmRTfYcBDDRbjZnFw@mail.gmail.com>

On Wed, Jun 08, 2011 at 11:17:21PM -0700, Connor Hansen wrote:
> 
> this is not what the code you are changing does.
> 
> the code is not assigned that value, its or'd with it.
> 
> a test would be more like.
> 
> #include <stdio.h>
> int main()
> {
>         unsigned long page;  //page
>         unsigned int b = 5;  //info->eap is u32 = unsigned int
>                                        // typedef unsigned int __u32;
>         page = (unsigned long) b;
>         page |= 0x10000000ul;
> 
>         printf("%lu\n",page);
> 
>         return 0;
> }
> 
> This produces no warning.
> $ gcc -g test.c && ./a.out
> 268435461
> $
> 
> 0x10000000
> 10000000000000000000000000000
> 5
> 00000000000000000000000000101
> 0x10000000 | 5 =
> 10000000000000000000000000101
> 268435461
> 
> I am green to kernel development so I will wait for someone with a bit
> more knowledge to
> chime in, or verify this warning.
> Connor

You are right, but it really has warnings yet.
My PC is also 32-bits.

Thanks
Harry Wei

  reply	other threads:[~2011-06-10  5:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  3:04 [PATCH RESEND]Remove a warning for drivers/edac/i82975x_edac.c Harry Wei
2011-06-09  4:26 ` Connor Hansen
2011-06-09  5:25   ` Harry Wei
2011-06-09  6:17     ` Connor Hansen
2011-06-10  5:07       ` Harry Wei [this message]
2011-06-09 16:35   ` Randy Dunlap
2011-06-09 17:37 ` Randy Dunlap
2011-06-10  5:20   ` Harry Wei
2011-06-10  6:42     ` Connor Hansen
2011-06-12 15:50       ` Arvind R

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=20110610050747.GA3643@gmail.com \
    --to=jiaweiwei.xiyou@gmail.com \
    --cc=cmdkhh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.