From: Andrew Morton <akpm@linux-foundation.org>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
david.altobelli@hp.com, tony.camuso@redhat.com
Subject: Re: [PATCH]: hpilo: fix pointer warning in ilo_ccb_setup
Date: Tue, 25 May 2010 14:49:37 -0700 [thread overview]
Message-ID: <20100525144937.e0726ec2.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100522004615.25451.83108.sendpatchset@prarit.bos.redhat.com>
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.
next prev parent reply other threads:[~2010-05-25 21:49 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 [this message]
2010-05-25 22:10 ` Prarit Bhargava
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=20100525144937.e0726ec2.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david.altobelli@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
--cc=stable@kernel.org \
--cc=tony.camuso@redhat.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