From: NeilBrown <neilb@suse.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
James Simmons <jsimmons@infradead.org>,
linux-kernel@vger.kernel.org, lustre-devel@lists.lustre.org
Subject: Re: [PATCH 08/10] staging: lustre: lov: use list_for_each_entry in lov_obd.c
Date: Wed, 29 Nov 2017 14:01:12 +1100 [thread overview]
Message-ID: <87r2shwzyf.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20171124154341.GA16654@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
Subject: [PATCH] staging: lustre: lov: use list_for_each_entry in lov_obd.c
Using the *_entry macro simplifies the code slightly.
Signed-off-by: NeilBrown <neilb@suse.com>
---
Resubmitted with non-empty changelog text.
Thanks,
NeilBrown
drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 7ce01026a409..ec70c12e5b40 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -828,11 +828,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
static int lov_cleanup(struct obd_device *obd)
{
struct lov_obd *lov = &obd->u.lov;
- struct list_head *pos, *tmp;
- struct pool_desc *pool;
+ struct pool_desc *pool, *tmp;
- list_for_each_safe(pos, tmp, &lov->lov_pool_list) {
- pool = list_entry(pos, struct pool_desc, pool_list);
+ list_for_each_entry_safe(pool, tmp, &lov->lov_pool_list, pool_list) {
/* free pool structs */
CDEBUG(D_INFO, "delete pool %p\n", pool);
/* In the function below, .hs_keycmp resolves to
--
2.14.0.rc0.dirty
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-11-29 3:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 4:59 [PATCH 00/10] staging: lustre: assorted code improvements for list manipulations NeilBrown
2017-10-30 4:59 ` [PATCH 07/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_resource.c NeilBrown
2017-10-30 4:59 ` [PATCH 10/10] staging: lustre: obdclass: simplify cl_lock_fini() NeilBrown
2017-10-30 4:59 ` [PATCH 02/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_extent_shift_kms() NeilBrown
2017-10-30 4:59 ` [PATCH 05/10] staging: lustre: ldlm: use list_first_entry in ldlm_lockd.c NeilBrown
2017-10-30 4:59 ` [PATCH 08/10] staging: lustre: lov: use list_for_each_entry in lov_obd.c NeilBrown
2017-11-24 15:43 ` Greg Kroah-Hartman
2017-11-29 3:01 ` NeilBrown [this message]
2017-11-29 9:40 ` Greg Kroah-Hartman
2017-11-29 11:37 ` NeilBrown
2017-10-30 4:59 ` [PATCH 04/10] staging: lustre: ldlm: use list_for_each_entry in ldlm_lock.c NeilBrown
2017-10-30 4:59 ` [PATCH 03/10] staging: lustre: ldlm: use list_first_entry in ldlm_lock NeilBrown
2017-10-30 4:59 ` [PATCH 01/10] staging: lustre: use list_last_entry to simplify fld_cache_shrink NeilBrown
2017-10-30 4:59 ` [PATCH 06/10] staging: lustre: ldlm: minor list_entry improvements in ldlm_request.c NeilBrown
2017-10-30 4:59 ` [PATCH 09/10] staging: lustre: simplfy lov_finish_set() NeilBrown
2017-11-24 15:44 ` [PATCH 00/10] staging: lustre: assorted code improvements for list manipulations Greg Kroah-Hartman
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=87r2shwzyf.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=andreas.dilger@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.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
all inboxes | Powered by JetHome®