From: Chris Malley <mail@chrismalley.co.uk>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] CORE: Use list_for_each_entry[_safe] where appropriate.
Date: Sat, 17 May 2008 21:08:05 +0100 [thread overview]
Message-ID: <1211054885.9960.6.camel@localhost> (raw)
In-Reply-To: <20080517194914.GA21674@logfs.org>
On Sat, 2008-05-17 at 21:49 +0200, Jörn Engel wrote:
> On Sat, 17 May 2008 18:54:05 +0100, Chris Malley wrote:
> >
> > From: Chris Malley <mail@chrismalley.co.uk>
> >
> > Should be no functional changes, just a bit of janitorial work
> > to remove temporary pointers and make some functions a bit more readable.
>
>
> > - struct list_head *this;
> > + struct mtd_blktrans_dev *this;
> > int last_devnum = -1;
> > struct gendisk *gd;
> >
> > @@ -221,25 +221,24 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
> > BUG();
> > }
> >
> > - list_for_each(this, &tr->devs) {
> > - struct mtd_blktrans_dev *d = list_entry(this, struct mtd_blktrans_dev, list);
>
> I guess whoever originally wrote the code used "d" for ..._dev. And in
> spite of being just one letter, I find it more descriptive than "this".
> Would you mind killing "this" instead of "d"? And likewise in the other
> hunks, always nuke "this", as it has zero descriptiveness.
OK, I wasn't sure what people preferred; I'll change to use the original
identifiers.
> Otherwise a nice cleanup. Did you check that the resulting object code
> remains identical?
Not yet, I'll do this before posting an updated version. Thanks for the
feedback.
Chris
next prev parent reply other threads:[~2008-05-17 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-17 17:54 [PATCH] [MTD] CORE: Use list_for_each_entry[_safe] where appropriate Chris Malley
2008-05-17 19:49 ` Jörn Engel
2008-05-17 20:08 ` Chris Malley [this message]
2008-05-18 19:37 ` [PATCH] [MTD] CORE: Use list_for_each_entry[_safe] where appropriate (2nd attempt) Chris Malley
2008-05-19 11:38 ` Jörn Engel
2008-05-19 19:11 ` [PATCH] [MTD] CORE: Use list_for_each_entry[_safe] where appropriate (3rd attempt) Chris Malley
2008-05-19 19:27 ` Jörn Engel
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=1211054885.9960.6.camel@localhost \
--to=mail@chrismalley.co.uk \
--cc=joern@logfs.org \
--cc=linux-mtd@lists.infradead.org \
/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