Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760995AbYBNHEs (ORCPT ); Thu, 14 Feb 2008 02:04:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754764AbYBNHEj (ORCPT ); Thu, 14 Feb 2008 02:04:39 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:46296 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbYBNHEi (ORCPT ); Thu, 14 Feb 2008 02:04:38 -0500 Date: Thu, 14 Feb 2008 02:04:37 -0500 From: Christoph Hellwig To: marcin.slusarz@gmail.com Cc: LKML , Christoph Hellwig Subject: Re: [PATCH] sysv: [bl]e*_add_cpu conversion Message-ID: <20080214070437.GA15395@infradead.org> References: <1202857582-15450-1-git-send-email-marcin.slusarz@gmail.com> <1202857582-15450-17-git-send-email-marcin.slusarz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1202857582-15450-17-git-send-email-marcin.slusarz@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 35 On Wed, Feb 13, 2008 at 12:06:21AM +0100, marcin.slusarz@gmail.com wrote: > From: Marcin Slusarz > > replace all: > big/little_endian_variable = cpu_to_[bl]eX([bl]eX_to_cpu(big/little_endian_variable) + > expression_in_cpu_byteorder); > with: > [bl]eX_add_cpu(&big/little_endian_variable, expression_in_cpu_byteorder); > generated with semantic patch The patch looks correct to me, so ACK. > diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h > index 42d51d1..38ebe3f 100644 > --- a/fs/sysv/sysv.h > +++ b/fs/sysv/sysv.h > @@ -217,9 +217,9 @@ static inline __fs32 fs32_add(struct sysv_sb_info *sbi, __fs32 *n, int d) > if (sbi->s_bytesex == BYTESEX_PDP) > *(__u32*)n = PDP_swab(PDP_swab(*(__u32*)n)+d); > else if (sbi->s_bytesex == BYTESEX_LE) > - *(__le32*)n = cpu_to_le32(le32_to_cpu(*(__le32*)n)+d); > + le32_add_cpu((__le32 *)n, d); > else > - *(__be32*)n = cpu_to_be32(be32_to_cpu(*(__be32*)n)+d); > + be32_add_cpu((__be32 *)n, d); > return *n; but now that you've named the be and le primitives *_add_cpu it would be nice if you could submit a second patch to sysv to rename fs*_add to fs*_add_cpu aswell. -- 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/