From: Greg KH <gregkh@linuxfoundation.org>
To: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: lustre: obdclass: Use list_for_each_entry_safe
Date: Wed, 2 Mar 2016 08:25:29 -0800 [thread overview]
Message-ID: <20160302162529.GC987@kroah.com> (raw)
In-Reply-To: <20160228135431.GA18987@Karyakshetra>
On Sun, Feb 28, 2016 at 07:24:31PM +0530, Bhaktipriya Shridhar wrote:
> Doubly linked lists which are iterated using list_empty
> and list_entry macros have been replaced with list_for_each_entry_safe
> macro.
> This makes the iteration simpler and more readable.
>
> This patch replaces the while loop containing list_empty and list_entry
> with list_for_each_entry_safe.
>
> This was done with Coccinelle.
>
> @@
> expression E1;
> identifier I1, I2;
> type T;
> iterator name list_for_each_entry_safe;
> @@
>
> T *I1;
> + T *tmp;
> ...
> - while (list_empty(&E1) == 0)
> + list_for_each_entry_safe (I1, tmp, &E1, I2)
> {
> ...when != T *I1;
> - I1 = list_entry(E1.next, T, I2);
> ...
> }
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
> drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Does not apply to the tree :(
next prev parent reply other threads:[~2016-03-02 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 13:54 [PATCH] staging: lustre: obdclass: Use list_for_each_entry_safe Bhaktipriya Shridhar
2016-03-02 16:25 ` Greg KH [this message]
2016-03-02 18:48 ` [Outreachy kernel] " Greg KH
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=20160302162529.GC987@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bhaktipriya96@gmail.com \
--cc=outreachy-kernel@googlegroups.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 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.