lkml.org 
[lkml]   [2005]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.13-rc6-mm2] v9fs: use standard kernel byteswapping routines
On Sun, Aug 28, 2005 at 04:43:27PM -0500, Eric Van Hensbergen wrote:
> On 8/28/05, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > On Sun, Aug 28, 2005 at 04:05:07PM -0500, Eric Van Hensbergen wrote:
> > > [PATCH] v9fs: use standard kernel byteswapping routines
> > >
> > > Originally suggested by hch, we have removed our byteswap code
> > > and replaced it with calls to the standard kernel byteswapping code.
> >
> > > - buf->p[0] = val;
> > > - buf->p[1] = val >> 8;
> > > + *(u16 *) buf->p = cpu_to_le16(val);
> >
> > *(__le16 *)
> >
> > > - ret = buf->p[0] | (buf->p[1] << 8);
> > > + ret = le16_to_cpu(*(u16 *)buf->p);
> >
> > *(__le16 *) etc.
> >
> > Otherwise sparse will warn.
> >
>
> It didn't give me any complaints -- I'm building my kernels with a
> recent (updated today) version of sparse and built with C=1 -- am I
> not invoking it correctly?

C=1 CHECK="sparse -Wbitwise"

This flag is not enabled by default. However, some of us are cleaning up
endian noise and not adding more would be nice.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-28 23:54    [W:0.053 / U:1.480 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site