Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292900
b: refs/heads/master
c: 263d940
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and James Bottomley committed Feb 19, 2012
1 parent 26df941 commit da78993
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: de13e9654e308db6bde49c779410512ad9659bc0
refs/heads/master: 263d9401a332ccec8945841dbc57707dcba1ec7d
18 changes: 8 additions & 10 deletions trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,21 +579,19 @@ static int hpsa_find_target_lun(struct ctlr_info *h,
int i, found = 0;
DECLARE_BITMAP(lun_taken, HPSA_MAX_DEVICES);

memset(&lun_taken[0], 0, HPSA_MAX_DEVICES >> 3);
bitmap_zero(lun_taken, HPSA_MAX_DEVICES);

for (i = 0; i < h->ndevices; i++) {
if (h->dev[i]->bus == bus && h->dev[i]->target != -1)
set_bit(h->dev[i]->target, lun_taken);
__set_bit(h->dev[i]->target, lun_taken);
}

for (i = 0; i < HPSA_MAX_DEVICES; i++) {
if (!test_bit(i, lun_taken)) {
/* *bus = 1; */
*target = i;
*lun = 0;
found = 1;
break;
}
i = find_first_zero_bit(lun_taken, HPSA_MAX_DEVICES);
if (i < HPSA_MAX_DEVICES) {
/* *bus = 1; */
*target = i;
*lun = 0;
found = 1;
}
return !found;
}
Expand Down

0 comments on commit da78993

Please sign in to comment.