Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -5
+1 -5
drivers/scsi/xen-scsifront.c
··· 1060 1060 struct vscsifrnt_info *info) 1061 1061 { 1062 1062 unsigned int sg_grant, nr_segs; 1063 - int ret; 1064 1063 struct Scsi_Host *host = info->host; 1065 1064 1066 - ret = xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg-grant", "%u", 1067 - &sg_grant); 1068 - if (ret != 1) 1069 - sg_grant = 0; 1065 + sg_grant = xenbus_read_unsigned(dev->otherend, "feature-sg-grant", 0); 1070 1066 nr_segs = min_t(unsigned int, sg_grant, SG_ALL); 1071 1067 nr_segs = max_t(unsigned int, nr_segs, VSCSIIF_SG_TABLESIZE); 1072 1068 nr_segs = min_t(unsigned int, nr_segs,