LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 linux-next] misc: mic: use swap() in scif_node_connect()
@ 2015-06-10 16:31 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2015-06-10 16:31 UTC (permalink / raw
  To: linux-kernel; +Cc: Julia Lawall, Fabian Frederick

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-10 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 16:31 [PATCH 1/1 linux-next] misc: mic: use swap() in scif_node_connect() Fabian Frederick

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 read-only IMAP folder(s) and NNTP newsgroup(s).