From: Greg KH <gregkh@linuxfoundation.org>
To: Janani Ravichandran <janani.rvchndrn@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: lustre: ptlrpc: Use list_for_each_entry_safe()
Date: Wed, 2 Mar 2016 08:25:31 -0800 [thread overview]
Message-ID: <20160302162531.GD987@kroah.com> (raw)
In-Reply-To: <20160228222021.GA8699@janani-Inspiron-3521>
On Sun, Feb 28, 2016 at 05:20:21PM -0500, Janani Ravichandran wrote:
> Use list_for_each_entry_safe() instead of a combination of
> list_for_each_safe() and list_entry(). Also remove variable pos
> which becomes useless as a result.
> Semantic patch used:
>
> @a@
> expression pos, n, head;
> expression mem;
> type t;
> identifier var;
> iterator name list_for_each_entry_safe, list_for_each_safe;
> @@
>
> - list_for_each_safe(pos, n, head)
> + list_for_each_entry_safe(var, n, head, mem)
> {
> ... when != var
> - var = \(list_entry \| container_of\)(pos, t, mem);
> ... when != pos
> }
>
> Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
> ---
> drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Does not apply to the tree properly :(
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 22:20 [PATCH] staging: lustre: ptlrpc: Use list_for_each_entry_safe() Janani Ravichandran
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=20160302162531.GD987@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=janani.rvchndrn@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.