|
From: Eric V. H. <er...@gm...> - 2005-08-28 21:50:29
|
On 8/28/05, Alexey Dobriyan <ado...@gm...> 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.
>=20
> > - buf->p[0] =3D val;
> > - buf->p[1] =3D val >> 8;
> > + *(u16 *) buf->p =3D cpu_to_le16(val);
>=20
> *(__le16 *)
>=20
> > - ret =3D buf->p[0] | (buf->p[1] << 8);
> > + ret =3D le16_to_cpu(*(u16 *)buf->p);
>=20
> *(__le16 *) etc.
>=20
> Otherwise sparse will warn.
>=20
It didn't give me any complaints -- I'm building my kernels with a
recent (updated today) version of sparse and built with C=3D1 -- am I
not invoking it correctly?
-eric
|