All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH] Staging: lustre: Use list_for_each_entry instead of list_for_each
Date: Fri, 26 Feb 2016 06:23:03 +0000	[thread overview]
Message-ID: <20160226062303.GA28519@kroah.com> (raw)
In-Reply-To: <1456424237-10589-1-git-send-email-bhumirks@gmail.com>

On Thu, Feb 25, 2016 at 11:47:17PM +0530, Bhumika Goyal wrote:
> Use list_for_each_entry instead of list_for_each and list_entry as it
> simplifies the code. Done using coccinelle:
> 
> @@
> type T,T2;
> identifier I1,I2;
> expression e1,e2;
> iterator name list_for_each_entry;
> iterator name list_for_each;
> @@
> 
> - T *I1;
> ...
> - list_for_each(I1,e1)
> + list_for_each_entry(I2,e1,e2)
> {
> ...when!=T *I1;
> - I2=list_entry(I1,T2,e2);
> ...
> }
> ...when!=I2;
> 
> @@
> type T,T2,T3;
> identifier I1,I2,I3;
> expression e1,e2;
> @@
> 
> - T *I1;
> + T3 *I3;
> ...
> - list_for_each(I1,e1)
> + list_for_each_entry(I3,e1,e2)
> {
> ...when!=T *I1;
> - T3 *I3=list_entry(I1,T2,e2);
> ...
> }
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  .../staging/lustre/lustre/obdecho/echo_client.c    |  4 +--
>  drivers/staging/lustre/lustre/ptlrpc/client.c      | 31 +++++-----------------
>  2 files changed, 8 insertions(+), 27 deletions(-)

ALWAYS test build your patches, otherwise you will end up with grumpy
maintainers complaining you didn't test build your patches and they
broke the build.

Hint, this broke the build.  Not good :(


  reply	other threads:[~2016-02-26  6:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 18:17 [PATCH] Staging: lustre: Use list_for_each_entry instead of list_for_each Bhumika Goyal
2016-02-26  6:23 ` Greg KH [this message]
2016-02-26  9:27 ` [PATCH v2] " Bhumika Goyal

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=20160226062303.GA28519@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhumirks@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.