qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/9] pci: use uint64_t for bar addr and size ins


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 4/9] pci: use uint64_t for bar addr and size instead of uint32_t.
Date: Thu, 1 Oct 2009 07:33:02 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

On Wed, Sep 30, 2009 at 09:59:11PM +0400, malc wrote:
> On Wed, 30 Sep 2009, Michael S. Tsirkin wrote:
> 
> > On Wed, Sep 30, 2009 at 08:51:02PM +0400, malc wrote:
> > > On Wed, 30 Sep 2009, Michael S. Tsirkin wrote:
> > > 
> > > > On Wed, Sep 30, 2009 at 07:25:45PM +0400, malc wrote:
> > > > > On Wed, 30 Sep 2009, Michael S. Tsirkin wrote:
> > > > > 
> > > > > > On Wed, Jul 15, 2009 at 08:15:04PM +0900, Isaku Yamahata wrote:
> > > > > > > This patch is preliminary for 64bit bar.
> > > > > > > For 64bit bar support, replace uint32_t with uint64_t for 
> > > > > > > addr/size
> > > > > > > to be able to represent 64bit width.
> > > > > > > 
> > > > > > > Signed-off-by: Isaku Yamahata <address@hidden>
> > > > > > 
> > > > > > As long as we are touching all code: what do you think about
> > > > > > typedef uint64_t pcibus_t;
> > > > > > so that will be easier to find later?
> > > > > 
> > > > > Please read the CODING_STYLE on the subject of _t suffix.
> > > > > 
> > > > > [..snip..]
> > > > 
> > > > What do you refer to?
> > > > 
> > > 
> > > _t suffix is reserved by POSIX.
> > 
> > There's still no better naming for scalars.  Worst case some platform
> > will fail to compile, and we'll rename.
> > 
> 
> Not good enough, if you are using something you have to abide the
> constraints.

So, posix does not reserve all of *_t namespace, it would negate years
of C code. It simply says posix implementations can add only symbols
ending with _t in the headers: this is a constraint on posix headers,
not on applications that use them.  Thus you have to find some other
means to avoid conflict if you have symbols ending with _t. Using your
module name as a prefix is a classical way to do this, for pci prefixing
type name with pci_ should be enough to prevent any issues.


> -- 
> mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]