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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1433953899-23605-1-git-send-email-fabf@skynet.be>
Date:	Wed, 10 Jun 2015 18:31:38 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel@...r.kernel.org
Cc:	Julia Lawall <Julia.Lawall@...6.fr>,
	Fabian Frederick <fabf@...net.be>
Subject: [PATCH 1/1 linux-next] misc: mic: use swap() in scif_node_connect()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 drivers/misc/mic/scif/scif_nodeqp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/misc/mic/scif/scif_nodeqp.c b/drivers/misc/mic/scif/scif_nodeqp.c
index 41e3bdb..810a89e 100644
--- a/drivers/misc/mic/scif/scif_nodeqp.c
+++ b/drivers/misc/mic/scif/scif_nodeqp.c
@@ -448,7 +448,6 @@ static void scif_node_connect(struct scif_dev *scifdev, int dst)
 	struct list_head *pos, *tmp;
 	struct scifmsg msg;
 	int err;
-	u64 tmppayload;
 
 	if (dst < 1 || dst > scif_info.maxid)
 		return;
@@ -503,9 +502,7 @@ static void scif_node_connect(struct scif_dev *scifdev, int dst)
 	msg.src.node = dev_i->node;
 	msg.dst.node = dev_j->node;
 
-	tmppayload = msg.payload[0];
-	msg.payload[0] = msg.payload[2];
-	msg.payload[2] = tmppayload;
+	swap(msg.payload[0], msg.payload[2]);
 	msg.payload[1] = p2p_ji->ppi_da[SCIF_PPI_MMIO];
 	msg.payload[3] = p2p_ji->ppi_len[SCIF_PPI_APER] << PAGE_SHIFT;
 
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ