From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Cameron, Steve" <Steve.Cameron@hp.com>
Cc: "Roland Dreier" <rdreier@cisco.com>,
"Andrew Morton" <akpm@osdl.org>,
"ISS StorageDev" <iss_storagedev@hp.com>,
"lkml" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH cciss: fix printk format warning
Date: Fri, 27 Oct 2006 08:07:18 -0700 [thread overview]
Message-ID: <20061027080718.42674b06.randy.dunlap@oracle.com> (raw)
In-Reply-To: <5CCF5F0F2514664CBE20FD24BCE17614A6A76E@cceexc17.americas.cpqcorp.net>
On Fri, 27 Oct 2006 08:11:46 -0500 Cameron, Steve wrote:
> > Roland Dreier wrote:
> > > > > if (*total_size != (__u32) 0)
> > > >
> > > > Why is cciss_read_capacity casting *total_size to u32?
> > >
> > > It's not -- it's actually casting 0 to __32 -- there's no cast on the
> > > *total_size side of the comparison. However that just makes the cast
> > > look even fishier.
> > >
> > > - R.
> >
> > OK, how about this one then?
> >
> >
> > c->busaddr = (__u32) cmd_dma_handle;
> >
> > where cmd_dma_handle is a dma_addr_t (u32 or u64)
>
> The command register to which that value is written
> is a 32 bit register. Cast it or not, only 32 bits
> will be used. The DMA mask used to get that memory
> should ensure it's 32 bit addressable.
Got it. Thanks for replying.
> > and then later:
> >
> > pci_free_consistent(h->pdev, sizeof(CommandList_struct),
> > c, (dma_addr_t) c->busaddr);
---
~Randy
next prev parent reply other threads:[~2006-10-27 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 4:46 Randy Dunlap
2006-10-24 13:25 ` Miller, Mike (OS Dev)
2006-10-26 23:02 ` Andrew Morton
2006-10-26 23:19 ` Roland Dreier
2006-10-26 23:29 ` Randy Dunlap
2006-10-26 23:35 ` Randy Dunlap
2006-10-26 23:49 ` Roland Dreier
2006-10-26 23:53 ` Randy Dunlap
2006-10-27 13:11 ` Cameron, Steve
2006-10-27 15:07 ` Randy Dunlap [this message]
2006-10-27 15:15 ` Miller, Mike (OS Dev)
2006-10-26 23:31 ` Andrew Morton
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=20061027080718.42674b06.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=Steve.Cameron@hp.com \
--cc=akpm@osdl.org \
--cc=iss_storagedev@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.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
Powered by JetHome