Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757521AbYA3NHW (ORCPT ); Wed, 30 Jan 2008 08:07:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754195AbYA3NHJ (ORCPT ); Wed, 30 Jan 2008 08:07:09 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:37769 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754461AbYA3NHI (ORCPT ); Wed, 30 Jan 2008 08:07:08 -0500 Date: Wed, 30 Jan 2008 13:06:56 +0000 From: Al Viro To: Joel Schopp Cc: Dmitri Vorobiev , Tigran Aivazian , trivial@kernel.org, linux-fsdevel@vger.kernel.org, apw@shadowen.org, rdunlap@xenotime.net, Linux-kernel Subject: Re: [PATCH v2 8/9] bfs: remove multiple assignments Message-ID: <20080130130656.GI27894@ZenIV.linux.org.uk> References: <1201296027-6900-1-git-send-email-dmitri.vorobiev@gmail.com> <1201296027-6900-9-git-send-email-dmitri.vorobiev@gmail.com> <479BC6E5.5000409@gmail.com> <479D7DEB.7070806@austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <479D7DEB.7070806@austin.ibm.com> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 26 On Mon, Jan 28, 2008 at 01:02:03AM -0600, Joel Schopp wrote: > >>>- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; > >>>+ inode->i_mtime = CURRENT_TIME_SEC; > >>>+ inode->i_atime = CURRENT_TIME_SEC; > >>>+ inode->i_ctime = CURRENT_TIME_SEC; > >>multiple assignments like "x = y = z = value;" can potentially > >>(depending on the compiler and arch) be faster than "x = value; y = > >>value; z=value;" > >> > >>I am surprized that this script complains about them as it is a > >>perfectly valid thing to do in C. > > > >I think it seems wise to ask the maintainers of checkpatch.pl to > >comment on that. I'm Cc:ing them now. > > > > There are plenty of things that are valid to do in C that don't make for > maintainable code. These scripts are designed to make your code easier for > real people to review and maintain. Except that in this case the new variant is not equivalent to the old one... -- 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/