diff mbox

[3/3] drm/xen-front: Fix loop timeout

Message ID 20180508092829.GC661@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter May 8, 2018, 9:28 a.m. UTC
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")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Oleksandr Andrushchenko May 8, 2018, 9:37 a.m. UTC | #1
On 05/08/2018 12:28 PM, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thank you,
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
> index 378cb7ce0db5..3345ac71b391 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
> @@ -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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Oleksandr Andrushchenko May 8, 2018, 11:49 a.m. UTC | #2
On 05/08/2018 12:37 PM, Oleksandr Andrushchenko wrote:
> On 05/08/2018 12:28 PM, Dan Carpenter wrote:
>> 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")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Thank you,
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Applied to drm-misc-next,
Thank you
>> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c 
>> b/drivers/gpu/drm/xen/xen_drm_front.c
>> index 378cb7ce0db5..3345ac71b391 100644
>> --- a/drivers/gpu/drm/xen/xen_drm_front.c
>> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
>> @@ -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
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 378cb7ce0db5..3345ac71b391 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -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) {