Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186187
b: refs/heads/master
c: 19b629f
h: refs/heads/master
i:
  186185: fd66ad3
  186183: 26f6afb
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Mar 6, 2010
1 parent 73ac466 commit 9c8de9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 984b3f5746ed2cde3d184651dabf26980f2b66e5
refs/heads/master: 19b629f581320999ddb9f6597051b79cdb53459c
21 changes: 5 additions & 16 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,10 +1193,7 @@ static int method_in_use(struct ib_mad_mgmt_method_table **method,
{
int i;

for (i = find_first_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS);
i < IB_MGMT_MAX_METHODS;
i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
1+i)) {
for_each_set_bit(i, mad_reg_req->method_mask, IB_MGMT_MAX_METHODS) {
if ((*method)->agent[i]) {
printk(KERN_ERR PFX "Method %d already in use\n", i);
return -EINVAL;
Expand Down Expand Up @@ -1330,13 +1327,9 @@ static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req,
goto error3;

/* Finally, add in methods being registered */
for (i = find_first_bit(mad_reg_req->method_mask,
IB_MGMT_MAX_METHODS);
i < IB_MGMT_MAX_METHODS;
i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
1+i)) {
for_each_set_bit(i, mad_reg_req->method_mask, IB_MGMT_MAX_METHODS)
(*method)->agent[i] = agent_priv;
}

return 0;

error3:
Expand Down Expand Up @@ -1429,13 +1422,9 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
goto error4;

/* Finally, add in methods being registered */
for (i = find_first_bit(mad_reg_req->method_mask,
IB_MGMT_MAX_METHODS);
i < IB_MGMT_MAX_METHODS;
i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
1+i)) {
for_each_set_bit(i, mad_reg_req->method_mask, IB_MGMT_MAX_METHODS)
(*method)->agent[i] = agent_priv;
}

return 0;

error4:
Expand Down

0 comments on commit 9c8de9a

Please sign in to comment.