projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2890ea5
)
xen: make use of xenbus_read_unsigned() in xen-pcifront
author
Juergen Gross
<
[email protected]
>
Mon, 31 Oct 2016 13:58:41 +0000
(14:58 +0100)
committer
Juergen Gross
<
[email protected]
>
Mon, 7 Nov 2016 12:55:26 +0000
(13:55 +0100)
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible.
This requires to change the type of the read from int to unsigned,
but this case has been wrong before: negative values are not allowed
for the modified case.
Cc:
[email protected]
Cc:
[email protected]
Signed-off-by: Juergen Gross <
[email protected]
>
Acked-by: Bjorn Helgaas <
[email protected]
>
Acked-by: David Vrabel <
[email protected]
>
drivers/pci/xen-pcifront.c
patch
|
blob
|
history
diff --git
a/drivers/pci/xen-pcifront.c
b/drivers/pci/xen-pcifront.c
index d6ff5e82377d29c719f84fdf4ab6b3db1400edf3..8fc2e9532575679ab60724201fa0181b1679c809 100644
(file)
--- a/
drivers/pci/xen-pcifront.c
+++ b/
drivers/pci/xen-pcifront.c
@@
-1038,10
+1038,8
@@
static int pcifront_detach_devices(struct pcifront_device *pdev)
err = -ENOMEM;
goto out;
}
- err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, "%d",
- &state);
- if (err != 1)
- state = XenbusStateUnknown;
+ state = xenbus_read_unsigned(pdev->xdev->otherend, str,
+ XenbusStateUnknown);
if (state != XenbusStateClosing)
continue;