public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xenbus: prefer list_for_each()
Date: Thu, 7 Jul 2016 14:37:39 +0200	[thread overview]
Message-ID: <577E4D13.10105@suse.com> (raw)
In-Reply-To: <577E21EE02000078000FBDBD@suse.com>

On 07/07/16 09:33, Jan Beulich wrote:
> ... over list_for_each_safe() when list modification if accompanied by
> breaking out of the loop.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  drivers/xen/xenbus/xenbus_dev_frontend.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- 4.7-rc6-xen.orig/drivers/xen/xenbus/xenbus_dev_frontend.c
> +++ 4.7-rc6-xen/drivers/xen/xenbus/xenbus_dev_frontend.c
> @@ -364,7 +364,7 @@ out:
>  
>  static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
>  {
> -	struct watch_adapter *watch, *tmp_watch;
> +	struct watch_adapter *watch;
>  	char *path, *token;
>  	int err, rc;
>  	LIST_HEAD(staging_q);
> @@ -399,7 +399,7 @@ static int xenbus_write_watch(unsigned m
>  		}
>  		list_add(&watch->list, &u->watches);
>  	} else {
> -		list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) {
> +		list_for_each_entry(watch, &u->watches, list) {
>  			if (!strcmp(watch->token, token) &&
>  			    !strcmp(watch->watch.node, path)) {
>  				unregister_xenbus_watch(&watch->watch);
> 
> 

       reply	other threads:[~2016-07-07 12:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <577E21EE02000078000FBDBD@suse.com>
2016-07-07 12:37 ` Juergen Gross [this message]
2016-07-07  7:33 [PATCH] xenbus: prefer list_for_each() Jan Beulich

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=577E4D13.10105@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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