[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120912122814.GB7164@endeavour.taprogge.org>
Date: Wed, 12 Sep 2012 14:28:14 +0200
From: Jens Taprogge <jens.taprogge@...rogge.org>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Samuel Iglesias Gonsálvez
<siglesias@...lia.com>
Cc: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
industrypack-devel@...ts.sourceforge.net
Subject: Re: [PATCH 03/20] Staging: ipack/bridges/tpci200: provide new
callbacks to tpci200
On Wed, Sep 12, 2012 at 02:59:26PM +0300, Dan Carpenter wrote:
> On Wed, Sep 12, 2012 at 01:21:17PM +0200, Samuel Iglesias Gonsálvez wrote:
> > On Wed, 2012-09-12 at 14:13 +0300, Dan Carpenter wrote:
> > > On Wed, Sep 12, 2012 at 11:28:33AM +0200, Jens Taprogge wrote:
> > > > On Tue, Sep 11, 2012 at 11:47:02AM +0300, Dan Carpenter wrote:
> > > > > > +static int tpci200_get_clockrate(struct ipack_device *dev)
> > > > > > +{
> > > > > > + struct tpci200_board *tpci200 = check_slot(dev);
> > > > > > + __le16 __iomem *addr;
> > > > >
> > > > > The point of the underscores in the __le16 is that you don't want to
> > > > > pollute user space headers in glibc with a bunch of kernel typedefs.
> > > > > It is not needed here. (Or if it is, then we would need to replace
> > > > > the u16 uses as well).
> > > >
> > > > I was under the impression that "__le16" is used to indicate the
> > > > byteorder of the pointed to memory. As far as I can see that
> > > > information is lost when we use u16. Am I missing something?
> > > >
> > >
> > > Use the no-underscore version unless it's inside a header which is
> > > exported to userspace.
> > >
> > > le16 __iomem *addr;
> > >
> >
> > But it is not declared in linux/types, it is?
> >
> > I have found only this typedef in a quick search:
> >
> > http://lxr.linux.no/#linux+v3.5.3/fs/ntfs/types.h#L28
> >
> > Should we define them in ipack.h header file or they are defined in
> > other place?
> >
>
> Oh crap! You're right. That's embarrassing. I'm just totally
> wrong here. Sorry for that.
>
> regards,
> dan carpenter
Sam,
can you please add the endianess-aware versions back? Patch attached.
One of the earlier uses was not correct.
Best Regards,
Jens
View attachment "0001-staging-ipack-bridges-tpci200-Use-endianess-aware-ty.patch" of type "text/x-diff" (2614 bytes)
Powered by blists - more mailing lists