diff options
author | Roland Dreier <roland@purestorage.com> | 2012-02-02 15:55:58 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-02-02 15:55:58 -0500 |
commit | f225066b64eaffe3a51ee488fb750c82fbcd971c (patch) | |
tree | 59f61ecdcdc8b2e371044c1a31eaafa1c83cb093 /drivers/infiniband/ulp/srpt | |
parent | 486d8b9f88cd0871a716e2f16873e811ee6c1ece (diff) |
IB/srpt: Use ARRAY_SIZE() instead of open-coding
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/srpt')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 284cb5092ee4..38ef61dbee0a 100644 --- 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) | |||
3264 | for (i = 0; i < sdev->srq_size; ++i) | 3264 | for (i = 0; i < sdev->srq_size; ++i) |
3265 | srpt_post_recv(sdev, sdev->ioctx_ring[i]); | 3265 | srpt_post_recv(sdev, sdev->ioctx_ring[i]); |
3266 | 3266 | ||
3267 | WARN_ON(sdev->device->phys_port_cnt | 3267 | WARN_ON(sdev->device->phys_port_cnt > ARRAY_SIZE(sdev->port)); |
3268 | > sizeof(sdev->port)/sizeof(sdev->port[0])); | ||
3269 | 3268 | ||
3270 | for (i = 1; i <= sdev->device->phys_port_cnt; i++) { | 3269 | for (i = 1; i <= sdev->device->phys_port_cnt; i++) { |
3271 | sport = &sdev->port[i - 1]; | 3270 | sport = &sdev->port[i - 1]; |