projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
486d8b9
)
IB/srpt: Use ARRAY_SIZE() instead of open-coding
author
Roland Dreier
<roland@purestorage.com>
Thu, 2 Feb 2012 20:55:58 +0000
(12:55 -0800)
committer
Roland Dreier
<roland@purestorage.com>
Thu, 2 Feb 2012 20:55:58 +0000
(12:55 -0800)
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/srpt/ib_srpt.c
b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 284cb5092ee46930c5bffa02090d479b49152e50..38ef61dbee0a139c001a7027c0b65bfbe39daa5b 100644
(file)
--- a/
drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/
drivers/infiniband/ulp/srpt/ib_srpt.c
@@
-3264,8
+3264,7
@@
static void srpt_add_one(struct ib_device *device)
for (i = 0; i < sdev->srq_size; ++i)
srpt_post_recv(sdev, sdev->ioctx_ring[i]);
- WARN_ON(sdev->device->phys_port_cnt
- > sizeof(sdev->port)/sizeof(sdev->port[0]));
+ WARN_ON(sdev->device->phys_port_cnt > ARRAY_SIZE(sdev->port));
for (i = 1; i <= sdev->device->phys_port_cnt; i++) {
sport = &sdev->port[i - 1];