Skip to contentSkip to conversation

ALSA: xen-front: fix a loop timeout

PATCH Applied Dan Carpenter 3 participants 5 messages May 31, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: xen-front: fix a loop timeout

We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned().

Fixes cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
sound/xen/xen_snd_front.c +1 -1
index c18973a9bc9b..b089b13b5160 100644
@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
 	 */
 	while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
 				     XenbusStateUnknown) != XenbusStateInitWait) &&
-				     to--)
+	       --to)
 		msleep(10);
 
 	if (!to) {
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Dan Carpenter

We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned().

Fixes cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
sound/xen/xen_snd_front.c +0 -0
index c18973a9bc9b..b089b13b5160 100644

sound/xen/xen_snd_front.c static int xen_drv_remove(struct xenbus_device *dev) · line 340

Quoted 8 lines
sound/xen/xen_snd_front.c +1 -1
@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
  	 */
  	while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
  				     XenbusStateUnknown) != XenbusStateInitWait) &&
-				     to--)
+	       --to)
  		msleep(10);
 
  	if (!to) {

Thank you for your patch,

Applied
#2 lore raw
Quoted 22 lines · Oleksandr Andrushchenko
Quoted 12 lines · Dan Carpenter

We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned().

Fixes cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
sound/xen/xen_snd_front.c +0 -0
index c18973a9bc9b..b089b13b5160 100644

sound/xen/xen_snd_front.c static int xen_drv_remove(struct xenbus_device *dev) · line 339

Quoted 7 lines
sound/xen/xen_snd_front.c +1 -1
@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
  	 */
  	while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
  				     XenbusStateUnknown) != XenbusStateInitWait) &&
-				     to--)
+	       --to)
  		msleep(10);
    	if (!to) {

Thank you for your patch,

Quoted 1 line

Applied, thanks.

Takashi

Applied
#3 lore raw
In reply to Oleksandr Andrushchenko
Quoted 22 lines · Oleksandr Andrushchenko
Quoted 12 lines · Dan Carpenter

We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned().

Fixes cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
sound/xen/xen_snd_front.c +0 -0
index c18973a9bc9b..b089b13b5160 100644

sound/xen/xen_snd_front.c static int xen_drv_remove(struct xenbus_device *dev) · line 339

Quoted 7 lines
sound/xen/xen_snd_front.c +1 -1
@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
  	 */
  	while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
  				     XenbusStateUnknown) != XenbusStateInitWait) &&
-				     to--)
+	       --to)
  		msleep(10);
    	if (!to) {

Thank you for your patch,

Quoted 1 line

Applied, thanks.

Takashi

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Dan Carpenter
Quoted 12 lines · Dan Carpenter

We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned().

Fixes cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
sound/xen/xen_snd_front.c +0 -0
index c18973a9bc9b..b089b13b5160 100644

sound/xen/xen_snd_front.c static int xen_drv_remove(struct xenbus_device *dev) · line 340

Quoted 8 lines
sound/xen/xen_snd_front.c +1 -1
@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
  	 */
  	while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
  				     XenbusStateUnknown) != XenbusStateInitWait) &&
-				     to--)
+	       --to)
  		msleep(10);
 
  	if (!to) {

Thank you for your patch,

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel