Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438518
| From | David Vrabel <david.vrabel@citrix.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible |
| Date | 2016-07-07 12:50 +0200 |
| Message-ID | <rSf2y-5Kz-45@gated-at.bofh.it> (permalink) |
| References | <rScxH-4ic-21@gated-at.bofh.it> <rSeJb-5D9-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/07/16 11:26, David Vrabel wrote: > On 07/07/16 09:06, Jan Beulich wrote: >> ... as being the simpler variant. > [...] >> --- 4.7-rc6-prefer-xenbus_write.orig/drivers/block/xen-blkback/xenbus.c >> +++ 4.7-rc6-prefer-xenbus_write/drivers/block/xen-blkback/xenbus.c >> @@ -617,9 +617,9 @@ static int xen_blkbk_probe(struct xenbus >> goto fail; >> } >> >> - err = xenbus_printf(XBT_NIL, dev->nodename, >> - "feature-max-indirect-segments", "%u", >> - MAX_INDIRECT_SEGMENTS); >> + err = xenbus_write(XBT_NIL, dev->nodename, >> + "feature-max-indirect-segments", >> + __stringify(MAX_INDIRECT_SEGMENTS)); > > Yuk :( > > Now someone has to check both __stringify() and MAX_INDIRECT_SEGMENTS to > work out what this actually looks like. In particular, if we ended up with #define MAX_INDIRECT_SEGMENTS 512u or similar then the code is now wrong. David
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible "Jan Beulich" <JBeulich@suse.com> - 2016-07-07 10:10 +0200
Re: [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible Roger Pau Monne <roger.pau@citrix.com> - 2016-07-07 11:50 +0200
Re: [Xen-devel] [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible David Vrabel <david.vrabel@citrix.com> - 2016-07-07 12:30 +0200
Re: [Xen-devel] [PATCH] xen-blkback: prefer xenbus_write() over xenbus_printf() where possible David Vrabel <david.vrabel@citrix.com> - 2016-07-07 12:50 +0200
csiph-web