LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Joel Schopp <jschopp@austin.ibm.com>,
	Dmitri Vorobiev <dmitri.vorobiev@gmail.com>,
	Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
	trivial@kernel.org, linux-fsdevel@vger.kernel.org,
	apw@shadowen.org, rdunlap@xenotime.net,
	Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 8/9] bfs: remove multiple assignments
Date: Wed, 30 Jan 2008 16:36:54 +0300	[thread overview]
Message-ID: <47A07D76.6010605@gmail.com> (raw)
In-Reply-To: <20080130130656.GI27894@ZenIV.linux.org.uk>

Al Viro wrote:
> 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...

Yes, you're right. In fact, I felt like sending yet another version
of these patches, but this gets preempted all the time by "the other things".

Dmitri

      reply	other threads:[~2008-01-30 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1201296027-6900-1-git-send-email-dmitri.vorobiev@gmail.com>
     [not found] ` <1201296027-6900-9-git-send-email-dmitri.vorobiev@gmail.com>
     [not found]   ` <Pine.LNX.4.61.0801261833270.1966@ginsburg.homenet>
2008-01-26 23:48     ` Dmitri Vorobiev
2008-01-28  7:02       ` Joel Schopp
2008-01-30 13:06         ` Al Viro
2008-01-30 13:36           ` Dmitri Vorobiev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47A07D76.6010605@gmail.com \
    --to=dmitri.vorobiev@gmail.com \
    --cc=apw@shadowen.org \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=tigran@aivazian.fsnet.co.uk \
    --cc=trivial@kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --subject='Re: [PATCH v2 8/9] bfs: remove multiple assignments' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).