summaryrefslogtreecommitdiff
path: root/net/rds/ib.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-07-08 12:38:59 +0300
committerPeter Zijlstra <peterz@infradead.org>2020-07-08 12:38:59 +0300
commitfaa2fd7cbad4609d06d7904c0a80cf2f8cd23678 (patch)
tree3a5bfcc8879b719aec97cb73ed6e020cde502546 /net/rds/ib.h
parent01e377c539ca52a6c753d0fdbe93b3b8fcd66a1c (diff)
parentce3614daabea8a2d01c1dd17ae41d1ec5e5ae7db (diff)
downloadlinux-faa2fd7cbad4609d06d7904c0a80cf2f8cd23678.tar.xz
Merge branch 'sched/urgent'
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r--net/rds/ib.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 5ae069d39eab..8dfff43cf07f 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -264,7 +264,13 @@ struct rds_ib_device {
int *vector_load;
};
-#define ibdev_to_node(ibdev) dev_to_node((ibdev)->dev.parent)
+static inline int ibdev_to_node(struct ib_device *ibdev)
+{
+ struct device *parent;
+
+ parent = ibdev->dev.parent;
+ return parent ? dev_to_node(parent) : NUMA_NO_NODE;
+}
#define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev)
/* bits for i_ack_flags */