Message ID | 20180531062507.ajgs4splaboukp2v@kili.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/31/2018 09:25 AM, Dan Carpenter wrote: > 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") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c > index c18973a9bc9b..b089b13b5160 100644 > --- a/sound/xen/xen_snd_front.c > +++ b/sound/xen/xen_snd_front.c > @@ -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, Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
On Thu, 31 May 2018 08:44:39 +0200, Oleksandr Andrushchenko wrote: > > On 05/31/2018 09:25 AM, Dan Carpenter wrote: > > 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") > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c > > index c18973a9bc9b..b089b13b5160 100644 > > --- a/sound/xen/xen_snd_front.c > > +++ b/sound/xen/xen_snd_front.c > > @@ -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, > Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Applied, thanks. Takashi
diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c index c18973a9bc9b..b089b13b5160 100644 --- a/sound/xen/xen_snd_front.c +++ b/sound/xen/xen_snd_front.c @@ -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) {
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") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>