mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
ib_srpt: Introduce ARRAY_SIZE() in srpt_add_one()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3814,8 +3814,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];
|
||||
|
||||
Reference in New Issue
Block a user