From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Guo Chao <yan@linux.vnet.ibm.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/4] ext4: remove useless assignment in dx_probe()
Date: Mon, 28 Jan 2013 21:37:29 -0500 [thread overview]
Message-ID: <20130129023729.GI7003@thunk.org> (raw)
In-Reply-To: <20130129012150.GB4754@blackbox.djwong.org>
On Mon, Jan 28, 2013 at 05:21:50PM -0800, Darrick J. Wong wrote:
>
> The 'at' variable seems to be used (in a if(0)'d code block) to
> check the results of the binary search against a slow linear search.
> Perhaps we should get rid of the if(0) hunk about 30 lines up? The
> 'at' variable itself could go too, since it seems to be an alias of
> "p - 1" and frame->at.
What I'd suggest doing (if someone is interested in doing the cleanup)
is moving the code into an inline function which is normally #ifdef'ed
to be an empty function, but which could be enabled if we want enable
the debugging cross check. This is what we've done in other parts of
the ext4 code base, and by moving the debugging code so it's not
inline with the rest of the function, it should make it more readable.
- Ted
next prev parent reply other threads:[~2013-01-29 2:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 8:01 [PATCH 1/4] ext4: release buffer when checksum failed Guo Chao
2013-01-18 8:01 ` [PATCH 2/4] ext4: remove unused variable in add_dirent_to_buf() Guo Chao
2013-01-29 1:12 ` Darrick J. Wong
2013-01-29 2:28 ` Theodore Ts'o
2013-01-18 8:01 ` [PATCH 3/4] ext4: remove useless assignment in dx_probe() Guo Chao
2013-01-29 1:21 ` Darrick J. Wong
2013-01-29 2:37 ` Theodore Ts'o [this message]
2013-01-29 2:35 ` Theodore Ts'o
2013-01-18 8:01 ` [PATCH 4/4] ext4: remove unnecessary NULL pointer check Guo Chao
2013-01-29 1:24 ` Darrick J. Wong
2013-01-29 2:40 ` Guo Chao
2013-01-29 2:42 ` Theodore Ts'o
2013-01-18 21:28 ` [PATCH 1/4] ext4: release buffer when checksum failed Darrick J. Wong
2013-01-29 2:25 ` Theodore Ts'o
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=20130129023729.GI7003@thunk.org \
--to=tytso@mit.edu \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=yan@linux.vnet.ibm.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).