From: "Jörn Engel" <joern@logfs.org>
To: Chris Malley <mail@chrismalley.co.uk>
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:49:15 +0200 [thread overview]
Message-ID: <20080517194914.GA21674@logfs.org> (raw)
In-Reply-To: <1211046845.17244.19.camel@localhost>
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.
Otherwise a nice cleanup. Did you check that the resulting object code
remains identical?
Jörn
--
In America you can have either a flimsy box banged together out of two
by fours and drywall, or a McMansion -- a flimsy box banged together
out of two by fours and drywall, but larger, more dramatic-looking,
and full of expensive fittings.
-- Paul Graham
next prev parent reply other threads:[~2008-05-17 19:49 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 [this message]
2008-05-17 20:08 ` Chris Malley
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=20080517194914.GA21674@logfs.org \
--to=joern@logfs.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mail@chrismalley.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.