* [PATCH 1/1 linux-next] staging: lustre: lnet: o2iblnd: use swap() in kiblnd_dev_failover()
@ 2015-06-10 16:32 Fabian Frederick
0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2015-06-10 16:32 UTC (permalink / raw
To: linux-kernel
Cc: Julia Lawall, Fabian Frederick, Oleg Drokin, Andreas Dilger,
Greg Kroah-Hartman, HPDD-discuss, devel
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index a57c5c3..6044337 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -2463,7 +2463,6 @@ int kiblnd_dev_failover(kib_dev_t *dev)
LIST_HEAD(zombie_fpo);
struct rdma_cm_id *cmid = NULL;
kib_hca_dev_t *hdev = NULL;
- kib_hca_dev_t *old;
struct ib_pd *pd;
kib_net_t *net;
struct sockaddr_in addr;
@@ -2555,9 +2554,7 @@ int kiblnd_dev_failover(kib_dev_t *dev)
write_lock_irqsave(&kiblnd_data.kib_global_lock, flags);
- old = dev->ibd_hdev;
- dev->ibd_hdev = hdev; /* take over the refcount */
- hdev = old;
+ swap(dev->ibd_hdev, hdev); /* take over the refcount */
list_for_each_entry(net, &dev->ibd_nets, ibn_list) {
cfs_cpt_for_each(i, lnet_cpt_table()) {
--
2.4.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-10 16:38 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:32 [PATCH 1/1 linux-next] staging: lustre: lnet: o2iblnd: use swap() in kiblnd_dev_failover() 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).