public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
	david.altobelli@hp.com, "Camuso, Tony" <Tony.Camuso@hp.com>
Subject: Re: [PATCH]: hpilo: fix pointer warning in ilo_ccb_setup
Date: Tue, 25 May 2010 18:10:04 -0400	[thread overview]
Message-ID: <4BFC4ABC.9010209@redhat.com> (raw)
In-Reply-To: <20100525144937.e0726ec2.akpm@linux-foundation.org>



On 05/25/2010 05:49 PM, Andrew Morton wrote:
> On Fri, 21 May 2010 20:50:41 -0400
> Prarit Bhargava<prarit@redhat.com>  wrote:
>
>    
>> Fixes warning:
>>
>> drivers/misc/hpilo.c: In function ___ilo_ccb_setup___:
>> drivers/misc/hpilo.c:274: warning: cast to pointer from integer of different size
>>
>> Signed-off-by: Prarit Bhargava<prarit@redhat.com>
>>
>> diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
>> index 98ad012..b07a541 100644
>> --- a/drivers/misc/hpilo.c
>> +++ b/drivers/misc/hpilo.c
>> @@ -272,7 +272,7 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
>>   		return -ENOMEM;
>>
>>   	dma_va = (char *)data->dma_va;
>> -	dma_pa = (char *)data->dma_pa;
>> +	dma_pa = (char *)(&data->dma_pa);
>>
>>   	memset(dma_va, 0, data->dma_size);
>>      
> Seems very wrong - writes to *dmp_pa will now scribble over the `struct
> ccb_data'.
>
> Probably local variable dma_pa should have type dma_addr_t.
>    

Ugh ... I even passed this by a colleague at HP :/.  I'll fix it up and 
repost.

P.


  reply	other threads:[~2010-05-25 22:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22  0:50 [PATCH]: hpilo: fix pointer warning in ilo_ccb_setup Prarit Bhargava
2010-05-25 21:49 ` Andrew Morton
2010-05-25 22:10   ` Prarit Bhargava [this message]
2010-05-25 22:35     ` Camuso, Tony
2010-05-25 22:16   ` Altobelli, David

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=4BFC4ABC.9010209@redhat.com \
    --to=prarit@redhat.com \
    --cc=Tony.Camuso@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=david.altobelli@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox