Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334736
b: refs/heads/master
c: aa92b33
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Oct 18, 2012
1 parent 71e5d6d commit 7fd8538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: 4e860696e050375ae7fbb06984c19e2bf6a322e0
refs/heads/master: aa92b33c6b93b5ef4ccbaa72afa9c387a96c2ee2
18 changes: 6 additions & 12 deletions trunk/drivers/s390/cio/idset.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* Copyright IBM Corp. 2007
* Copyright IBM Corp. 2007, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/

#include <linux/vmalloc.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#include "idset.h"
#include "css.h"
Expand Down Expand Up @@ -111,20 +112,13 @@ int idset_sch_get_first(struct idset *set, struct subchannel_id *schid)

int idset_is_empty(struct idset *set)
{
int bitnum;

bitnum = find_first_bit(set->bitmap, set->num_ssid * set->num_id);
if (bitnum >= set->num_ssid * set->num_id)
return 1;
return 0;
return bitmap_empty(set->bitmap, set->num_ssid * set->num_id);
}

void idset_add_set(struct idset *to, struct idset *from)
{
unsigned long i, len;
int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
__BITOPS_WORDS(from->num_ssid * from->num_id));

len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
__BITOPS_WORDS(from->num_ssid * from->num_id));
for (i = 0; i < len ; i++)
to->bitmap[i] |= from->bitmap[i];
bitmap_or(to->bitmap, to->bitmap, from->bitmap, len);
}

0 comments on commit 7fd8538

Please sign in to comment.