Skip to contentSkip to conversation

drm/xen-front: Fix loop timeout

PATCH Applied Dan Carpenter 2 participants 5 messages May 8, 2018

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

PATCH 3/3 drm/xen-front: Fix loop timeout

If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1.

Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")
drivers/gpu/drm/xen/xen_drm_front.c +1 -1
index 378cb7ce0db5..3345ac71b391 100644
@@ -778,7 +778,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) {
Reviewed-by on v1 3/3
#1 lore raw
Quoted 5 lines · Dan Carpenter

If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1.

Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")

Thank you,

Quoted 17 lines
drivers/gpu/drm/xen/xen_drm_front.c +1 -1
index 378cb7ce0db5..3345ac71b391 100644
@@ -778,7 +778,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) {

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 9 lines · Oleksandr Andrushchenko
Quoted 6 lines · Dan Carpenter

If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1.

Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display

frontend")

Thank you,

Applied to drm-misc-next,
Thank you

Quoted 19 lines
Quoted 18 lines
drivers/gpu/drm/xen/xen_drm_front.c +0 -0
index 378cb7ce0db5..3345ac71b391 100644
@@ -778,7 +778,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) {
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Oleksandr Andrushchenko
Quoted 8 lines · Oleksandr Andrushchenko
Quoted 5 lines · Dan Carpenter

If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1.

Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")

Thank you,

Applied to drm-misc-next,
Thank you

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xen/xen_drm_front.c +0 -0
index 378cb7ce0db5..3345ac71b391 100644
@@ -778,7 +778,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
        */
       while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",

                       XenbusStateUnknown) != XenbusStateInitWait) &&

Quoted 9 lines
Quoted 8 lines

-                     to--)
+                     --to)
          msleep(10);
        if (!to) {
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

Reviewed-by on v1 3/3
#4 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1.

Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")

Thank you,

Quoted 13 lines
drivers/gpu/drm/xen/xen_drm_front.c +1 -1
index 378cb7ce0db5..3345ac71b391 100644
@@ -778,7 +778,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) {
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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