lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/20] Staging: ipack/bridges/tpci200: provide new callbacks to tpci200
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;

regards,
dan carpenter



\
 
 \ /
  Last update: 2012-09-12 14:01    [W:0.257 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site