Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438300 > unrolled thread
| Started by | "Jan Beulich" <JBeulich@suse.com> |
|---|---|
| First post | 2016-07-07 10:10 +0200 |
| Last post | 2016-07-07 12:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] xen-blkfront: prefer xenbus_write() over xenbus_printf() where possible "Jan Beulich" <JBeulich@suse.com> - 2016-07-07 10:10 +0200
Re: [PATCH] xen-blkfront: prefer xenbus_write() over xenbus_printf() where possible Roger Pau Monne <roger.pau@citrix.com> - 2016-07-07 11:50 +0200
Re: [PATCH] xen-blkfront: prefer xenbus_write() over xenbus_printf() where possible "Jan Beulich" <JBeulich@suse.com> - 2016-07-07 12:10 +0200
| From | "Jan Beulich" <JBeulich@suse.com> |
|---|---|
| Date | 2016-07-07 10:10 +0200 |
| Subject | [PATCH] xen-blkfront: prefer xenbus_write() over xenbus_printf() where possible |
| Message-ID | <rScxJ-4ic-77@gated-at.bofh.it> |
... as being the simpler variant.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/block/xen-blkfront.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkfront.c
+++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkfront.c
@@ -1825,14 +1825,13 @@ again:
}
kfree(path);
}
- err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
- XEN_IO_PROTO_ABI_NATIVE);
+ err = xenbus_write(xbt, dev->nodename, "protocol",
+ XEN_IO_PROTO_ABI_NATIVE);
if (err) {
message = "writing protocol";
goto abort_transaction;
}
- err = xenbus_printf(xbt, dev->nodename,
- "feature-persistent", "%u", 1);
+ err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "1");
if (err)
dev_warn(&dev->dev,
"writing persistent grants feature to xenbus");
[toc] | [next] | [standalone]
| From | Roger Pau Monne <roger.pau@citrix.com> |
|---|---|
| Date | 2016-07-07 11:50 +0200 |
| Subject | Re: [PATCH] xen-blkfront: prefer xenbus_write() over xenbus_printf() where possible |
| Message-ID | <rSe6u-59g-25@gated-at.bofh.it> |
| In reply to | #1438300 |
On Thu, Jul 07, 2016 at 02:06:33AM -0600, Jan Beulich wrote:
> ... as being the simpler variant.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> drivers/block/xen-blkfront.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> --- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkfront.c
> +++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkfront.c
> @@ -1825,14 +1825,13 @@ again:
> }
> kfree(path);
> }
> - err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
> - XEN_IO_PROTO_ABI_NATIVE);
> + err = xenbus_write(xbt, dev->nodename, "protocol",
> + XEN_IO_PROTO_ABI_NATIVE);
> if (err) {
> message = "writing protocol";
> goto abort_transaction;
> }
> - err = xenbus_printf(xbt, dev->nodename,
> - "feature-persistent", "%u", 1);
> + err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "1");
AFAICT you forgot to replace xenbus_printf with xenbus_write here.
Roger.
[toc] | [prev] | [next] | [standalone]
| From | "Jan Beulich" <JBeulich@suse.com> |
|---|---|
| Date | 2016-07-07 12:10 +0200 |
| Message-ID | <rSepQ-5v6-31@gated-at.bofh.it> |
| In reply to | #1438474 |
>>> On 07.07.16 at 11:44, <roger.pau@citrix.com> wrote:
> On Thu, Jul 07, 2016 at 02:06:33AM -0600, Jan Beulich wrote:
>> ... as being the simpler variant.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> drivers/block/xen-blkfront.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> --- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkfront.c
>> +++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkfront.c
>> @@ -1825,14 +1825,13 @@ again:
>> }
>> kfree(path);
>> }
>> - err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
>> - XEN_IO_PROTO_ABI_NATIVE);
>> + err = xenbus_write(xbt, dev->nodename, "protocol",
>> + XEN_IO_PROTO_ABI_NATIVE);
>> if (err) {
>> message = "writing protocol";
>> goto abort_transaction;
>> }
>> - err = xenbus_printf(xbt, dev->nodename,
>> - "feature-persistent", "%u", 1);
>> + err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "1");
>
> AFAICT you forgot to replace xenbus_printf with xenbus_write here.
Oops, indeed - thanks for noticing.
Jan
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web