diff options
author | Juergen Gross <jgross@suse.com> | 2016-10-31 16:58:41 +0300 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2016-11-07 15:55:28 +0300 |
commit | 1080b38db49f7e3075aa9cd5a87f1587282cc0b0 (patch) | |
tree | 8a748b9e4e2b217ba5299ec5f9c08c02a3e2b1b9 /drivers/scsi/xen-scsifront.c | |
parent | 58faf07b76817782ea20c392639569ea613cd439 (diff) | |
download | linux-1080b38db49f7e3075aa9cd5a87f1587282cc0b0.tar.xz |
xen: make use of xenbus_read_unsigned() in xen-scsifront
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>
Diffstat (limited to 'drivers/scsi/xen-scsifront.c')
-rw-r--r-- | drivers/scsi/xen-scsifront.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 9dc8687bf048..7e817c64f385 100644 --- 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, |