search for: features_show

Displaying 20 results from an estimated 46 matches for "features_show".

2017 Dec 26
1
[RFC PATCH] virtio: add space for device features show
...t didichuxing.com> --- drivers/virtio/virtio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 59e36ef..d7d2db1 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -50,9 +50,12 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < sizeof(dev->features)*8; i++) - len += sprintf(buf+len, "%c", + for (i = 0; i < sizeof(dev->features) * 8; i++) { + len += sprintf(buf +...
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
...w(struct device *_d, struct device_attribute *attr, char *buf) { @@ -32,6 +38,8 @@ static ssize_t modalias_show(struct device *_d, return sprintf(buf, "virtio:d%08Xv%08X\n", dev->id.device, dev->id.vendor); } +static DEVICE_ATTR_RO(modalias); + static ssize_t features_show(struct device *_d, struct device_attribute *attr, char *buf) { @@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d, len += sprintf(buf+len, "\n"); return len; } -static struct device_attribute virtio_dev_attrs[] = { - __ATTR_RO(device), - __ATTR_RO(vendor), -...
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
...w(struct device *_d, struct device_attribute *attr, char *buf) { @@ -32,6 +38,8 @@ static ssize_t modalias_show(struct device *_d, return sprintf(buf, "virtio:d%08Xv%08X\n", dev->id.device, dev->id.vendor); } +static DEVICE_ATTR_RO(modalias); + static ssize_t features_show(struct device *_d, struct device_attribute *attr, char *buf) { @@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d, len += sprintf(buf+len, "\n"); return len; } -static struct device_attribute virtio_dev_attrs[] = { - __ATTR_RO(device), - __ATTR_RO(vendor), -...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...w(struct device *_d, struct device_attribute *attr, char *buf) { @@ -32,6 +38,8 @@ static ssize_t modalias_show(struct device *_d, return sprintf(buf, "virtio:d%08Xv%08X\n", dev->id.device, dev->id.vendor); } +static DEVICE_ATTR_RO(modalias); + static ssize_t features_show(struct device *_d, struct device_attribute *attr, char *buf) { @@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d, len += sprintf(buf+len, "\n"); return len; } -static struct device_attribute virtio_dev_attrs[] = { - __ATTR_RO(device), - __ATTR_RO(vendor), -...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...w(struct device *_d, struct device_attribute *attr, char *buf) { @@ -32,6 +38,8 @@ static ssize_t modalias_show(struct device *_d, return sprintf(buf, "virtio:d%08Xv%08X\n", dev->id.device, dev->id.vendor); } +static DEVICE_ATTR_RO(modalias); + static ssize_t features_show(struct device *_d, struct device_attribute *attr, char *buf) { @@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d, len += sprintf(buf+len, "\n"); return len; } -static struct device_attribute virtio_dev_attrs[] = { - __ATTR_RO(device), - __ATTR_RO(vendor), -...
2014 Nov 27
2
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Nov 27
2
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Nov 27
0
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...t_features[i / 8]); > } > out_free: > kfree(features); > kfree(ccw); > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index df598dd..7814b1f 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, > > /* We actually represent this as a bitstring, as it could be > * arbitrary length in future. */ > - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) > + for (i = 0; i < sizeof(dev->features)*8; i++) ... sizeof(dev->features) *...
2014 Nov 27
0
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...t_features[i / 8]); > } > out_free: > kfree(features); > kfree(ccw); > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index df598dd..7814b1f 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, > > /* We actually represent this as a bitstring, as it could be > * arbitrary length in future. */ > - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) > + for (i = 0; i < sizeof(dev->features)*8; i++) ... sizeof(dev->features) *...
2014 Nov 27
1
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...out_free: > > kfree(features); > > kfree(ccw); > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > > index df598dd..7814b1f 100644 > > --- a/drivers/virtio/virtio.c > > +++ b/drivers/virtio/virtio.c > > @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, > > > > /* We actually represent this as a bitstring, as it could be > > * arbitrary length in future. */ > > - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) > > + for (i = 0; i < sizeof(dev->features)*8; i++) >...
2014 Nov 27
1
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...out_free: > > kfree(features); > > kfree(ccw); > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > > index df598dd..7814b1f 100644 > > --- a/drivers/virtio/virtio.c > > +++ b/drivers/virtio/virtio.c > > @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, > > > > /* We actually represent this as a bitstring, as it could be > > * arbitrary length in future. */ > > - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) > > + for (i = 0; i < sizeof(dev->features)*8; i++) >...
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2014 Oct 07
0
[PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index fed0ce1..601efc3 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Oct 22
0
[PATCH RFC v3 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Oct 23
0
[PATCH RFC v4 03/17] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...features; + ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT); + out_free: kfree(features); kfree(ccw); diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index df598dd..7814b1f 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -49,9 +49,9 @@ static ssize_t features_show(struct device *_d, /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ - for (i = 0; i < ARRAY_SIZE(dev->features)*BITS_PER_LONG; i++) + for (i = 0; i < sizeof(dev->features)*8; i++) len += sprintf(buf+len, "%c", - t...