public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory Haskins <ghaskins@novell.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [patch] Re: Zillions of warnings in -next
Date: Wed, 28 Oct 2009 09:35:56 -0400	[thread overview]
Message-ID: <4AE848BC.6020202@novell.com> (raw)
In-Reply-To: <20091027153651.6d636fe8.randy.dunlap@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

Randy Dunlap wrote:
> On Tue, 27 Oct 2009 22:21:12 +0000 Alan Cox wrote:
> 
>>> I just did a 32-bit build and indeed reproduced the warnings.  However, the warnings
>>> appear to be dubious as the code is properly (afaict) annotated with explicit casts, and
>>> I believe they are doing what I intended.
>>>
>>> Basically I have structures that are always 64 bit (so we can have a mixed-mode 32-bit
>>> guest talk to a 64-bit hypervisor, for instance).  Therefore I am casting between native
>>> and u64, but the compiler doesn't like this.  Does anyone have any suggestions on ways
>>> to fix this so the compiler is happy?
>> 	foo = (void *)(unsigned long)x
>>
>> works for the general case because Linux assumes ptr fits ulong
>>
>> Similarly in the other direction.

Thank you, Alan.  Your tip was spot on.

> 
> Yes, I already had this done for venet and pci-bridge.  Patch below.
> 
> ---
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Eliminate all cast warnings in vbus-enet.c and pci-bridge.c.
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Thank you, Randy.  Applied.

Kind Regards,
-Greg



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 267 bytes --]

      parent reply	other threads:[~2009-10-28 13:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27 15:25 Zillions of warnings in -next Alan Cox
2009-10-27 15:57 ` Gregory Haskins
2009-10-27 20:53 ` Gregory Haskins
2009-10-27 22:21   ` Alan Cox
2009-10-27 22:36     ` [patch] " Randy Dunlap
2009-10-27 23:25       ` Joe Perches
2009-10-28  0:08         ` Stefan Richter
2009-10-28 13:35       ` Gregory Haskins [this message]

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=4AE848BC.6020202@novell.com \
    --to=ghaskins@novell.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.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