From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Van Hensbergen Subject: Re: [PATCH 2.6.13-rc6-mm2] v9fs: use standard kernel byteswapping routines Date: Sun, 28 Aug 2005 16:43:27 -0500 Message-ID: References: <1125263107.17501.23.camel@localhost.localdomain> <20050828214656.GA11613@mipter.zuzino.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Linux FS Devel , V9FS Developers , Linux Kernel , Andrew Morton Return-path: Received: from xproxy.gmail.com ([66.249.82.195]:13690 "EHLO xproxy.gmail.com") by vger.kernel.org with ESMTP id S1750848AbVH1Vn2 convert rfc822-to-8bit (ORCPT ); Sun, 28 Aug 2005 17:43:28 -0400 Received: by xproxy.gmail.com with SMTP id i31so500628wxd for ; Sun, 28 Aug 2005 14:43:27 -0700 (PDT) To: Alexey Dobriyan In-Reply-To: <20050828214656.GA11613@mipter.zuzino.mipt.ru> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 8/28/05, Alexey Dobriyan 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? -eric