projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58faf07
)
xen: make use of xenbus_read_unsigned() in xen-scsifront
author
Juergen Gross
<jgross@suse.com>
Mon, 31 Oct 2016 13:58:41 +0000
(14:58 +0100)
committer
Juergen Gross
<jgross@suse.com>
Mon, 7 Nov 2016 12:55:28 +0000
(13:55 +0100)
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
drivers/scsi/xen-scsifront.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/xen-scsifront.c
b/drivers/scsi/xen-scsifront.c
index 9dc8687bf0480e53b2d89431ece47f8504fd5779..7e817c64f385135dd8c0a51e08fecbf2ecd3cace 100644
(file)
--- a/
drivers/scsi/xen-scsifront.c
+++ b/
drivers/scsi/xen-scsifront.c
@@
-1060,13
+1060,9
@@
static void scsifront_read_backend_params(struct xenbus_device *dev,
struct vscsifrnt_info *info)
{
unsigned int sg_grant, nr_segs;
- int ret;
struct Scsi_Host *host = info->host;
- ret = xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg-grant", "%u",
- &sg_grant);
- if (ret != 1)
- sg_grant = 0;
+ sg_grant = xenbus_read_unsigned(dev->otherend, "feature-sg-grant", 0);
nr_segs = min_t(unsigned int, sg_grant, SG_ALL);
nr_segs = max_t(unsigned int, nr_segs, VSCSIIF_SG_TABLESIZE);
nr_segs = min_t(unsigned int, nr_segs,