[PATCH 1/1 linux-next] misc: mic: use swap() in scif_node_connect()

From: Fabian Frederick
Date: Wed Jun 10 2015 - 12:40:05 EST


Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/