xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: david.vrabel@citrix.com, boris.ostrovsky@oracle.com,
	Juergen Gross <JGross@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, netdev@vger.kernel.org
Subject: [PATCH] xen-netfront: prefer xenbus_write() over xenbus_printf() where possible
Date: Thu, 07 Jul 2016 02:00:00 -0600	[thread overview]
Message-ID: <577E282002000078000FBECB@prv-mh.provo.novell.com> (raw)

... as being the simpler variant.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 drivers/net/xen-netfront.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- 4.7-rc6-prefer-xenbus_write.orig/drivers/net/xen-netfront.c
+++ 4.7-rc6-prefer-xenbus_write/drivers/net/xen-netfront.c
@@ -1886,26 +1886,25 @@ again:
 	}
 
 	/* The remaining keys are not queue-specific */
-	err = xenbus_printf(xbt, dev->nodename, "request-rx-copy", "%u",
-			    1);
+	err = xenbus_write(xbt, dev->nodename, "request-rx-copy", "1");
 	if (err) {
 		message = "writing request-rx-copy";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-rx-notify", "1");
 	if (err) {
 		message = "writing feature-rx-notify";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-sg", "1");
 	if (err) {
 		message = "writing feature-sg";
 		goto abort_transaction;
 	}
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d", 1);
+	err = xenbus_write(xbt, dev->nodename, "feature-gso-tcpv4", "1");
 	if (err) {
 		message = "writing feature-gso-tcpv4";
 		goto abort_transaction;




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

             reply	other threads:[~2016-07-07  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  8:00 Jan Beulich [this message]
2016-07-07 11:12 ` [PATCH] xen-netfront: prefer xenbus_write() over xenbus_printf() where possible David Vrabel
     [not found] ` <577E3918.5030303@citrix.com>
2016-07-07 12:05   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577E282002000078000FBECB@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).