Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757150AbXKWSQU (ORCPT ); Fri, 23 Nov 2007 13:16:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752720AbXKWSQM (ORCPT ); Fri, 23 Nov 2007 13:16:12 -0500 Received: from sovereign.computergmbh.de ([85.214.69.204]:41108 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752520AbXKWSQL (ORCPT ); Fri, 23 Nov 2007 13:16:11 -0500 Date: Fri, 23 Nov 2007 19:16:08 +0100 (CET) From: Jan Engelhardt To: Christoph Hellwig cc: David Chinner , xfs-oss , lkml Subject: Re: [PATCH 9/9] Clean up open coded inode dirty checks In-Reply-To: <20071123180239.GA13229@infradead.org> Message-ID: References: <20071122004422.GO114266761@sgi.com> <20071123180239.GA13229@infradead.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 43 On Nov 23 2007 18:02, Christoph Hellwig wrote: > >> +STATIC_INLINE int xfs_inode_clean(xfs_inode_t *ip) >> +{ >> + return (((ip->i_itemp == NULL) || >> + !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL)) && >> + (ip->i_update_core == 0)); >> +} > >Can we please get rid of this useless STATIC_INLINE junk? It's really >hurting my eyes. > >As does to a lesser extent the verbose style of this >function. I have to disagree, but whatever. >static inline int xfs_inode_clean(struct xfs_inode *ip) ^ ^ could be bool - and const >{ > return (!ip->i_itemp || > !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL)) && > !ip->i_update_core; >} Perhaps for greater readability: static inline bool xfs_inode_clean(const struct xfs_inode *ip) { if (ip->i_itemp == NULL) return true; if (!(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL) && ip->i_update_core == NULL) return true; return false; } - 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/