lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Jul 2016 01:58:18 -0600
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Wei Liu" <wei.liu2@...rix.com>
Cc:	<xen-devel@...ts.xenproject.org>, <netdev@...r.kernel.org>
Subject: [PATCH] xen-netback: prefer xenbus_write() over
 xenbus_printf() where possible

... as being the simpler variant.

Signed-off-by: Jan Beulich <jbeulich@...e.com>
---
 drivers/net/xen-netback/xenbus.c |   24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

--- 4.7-rc6-prefer-xenbus_write.orig/drivers/net/xen-netback/xenbus.c
+++ 4.7-rc6-prefer-xenbus_write/drivers/net/xen-netback/xenbus.c
@@ -301,17 +301,15 @@ static int netback_probe(struct xenbus_d
 		}
 
 		/* We support partial checksum setup for IPv6 packets */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-ipv6-csum-offload",
-				    "%d", 1);
+		err = xenbus_write(xbt, dev->nodename,
+				   "feature-ipv6-csum-offload", "1");
 		if (err) {
 			message = "writing feature-ipv6-csum-offload";
 			goto abort_transaction;
 		}
 
 		/* We support rx-copy path. */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-copy", "%d", 1);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-copy", "1");
 		if (err) {
 			message = "writing feature-rx-copy";
 			goto abort_transaction;
@@ -321,24 +319,22 @@ static int netback_probe(struct xenbus_d
 		 * We don't support rx-flip path (except old guests who don't
 		 * grok this feature flag).
 		 */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-flip", "%d", 0);
+		err = xenbus_write(xbt, dev->nodename, "feature-rx-flip", "0");
 		if (err) {
 			message = "writing feature-rx-flip";
 			goto abort_transaction;
 		}
 
 		/* We support dynamic multicast-control. */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-multicast-control", "%d", 1);
+		err = xenbus_write(xbt, dev->nodename,
+				   "feature-multicast-control", "1");
 		if (err) {
 			message = "writing feature-multicast-control";
 			goto abort_transaction;
 		}
 
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-dynamic-multicast-control",
-				    "%d", 1);
+		err = xenbus_write(xbt, dev->nodename,
+				   "feature-dynamic-multicast-control", "1");
 		if (err) {
 			message = "writing feature-dynamic-multicast-control";
 			goto abort_transaction;
@@ -368,9 +364,7 @@ static int netback_probe(struct xenbus_d
 	if (err)
 		pr_debug("Error writing multi-queue-max-queues\n");
 
-	err = xenbus_printf(XBT_NIL, dev->nodename,
-			    "feature-ctrl-ring",
-			    "%u", true);
+	err = xenbus_write(XBT_NIL, dev->nodename, "feature-ctrl-ring", "1");
 	if (err)
 		pr_debug("Error writing feature-ctrl-ring\n");
 



Powered by blists - more mailing lists