Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341641
b: refs/heads/master
c: 481af03
h: refs/heads/master
i:
  341639: 133cdf2
v: v3
  • Loading branch information
Akinobu Mita authored and David S. Miller committed Nov 30, 2012
1 parent a8e56b9 commit 8eafabb
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 6e22ce2c6e4315522526279365d6e86e8f67a5fa
refs/heads/master: 481af03bfbc1e07954310689831ad2695b7c6a44
20 changes: 10 additions & 10 deletions trunk/drivers/isdn/mISDN/tei.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ tei_debug(struct FsmInst *fi, char *fmt, ...)
static int
get_free_id(struct manager *mgr)
{
u64 ids = 0;
DECLARE_BITMAP(ids, 64) = { [0 ... BITS_TO_LONGS(64) - 1] = 0 };
int i;
struct layer2 *l2;

Expand All @@ -261,11 +261,11 @@ get_free_id(struct manager *mgr)
__func__);
return -EBUSY;
}
test_and_set_bit(l2->ch.nr, (u_long *)&ids);
__set_bit(l2->ch.nr, ids);
}
for (i = 1; i < 64; i++)
if (!test_bit(i, (u_long *)&ids))
return i;
i = find_next_zero_bit(ids, 64, 1);
if (i < 64)
return i;
printk(KERN_WARNING "%s: more as 63 layer2 for one device\n",
__func__);
return -EBUSY;
Expand All @@ -274,7 +274,7 @@ get_free_id(struct manager *mgr)
static int
get_free_tei(struct manager *mgr)
{
u64 ids = 0;
DECLARE_BITMAP(ids, 64) = { [0 ... BITS_TO_LONGS(64) - 1] = 0 };
int i;
struct layer2 *l2;

Expand All @@ -288,11 +288,11 @@ get_free_tei(struct manager *mgr)
continue;
i -= 64;

test_and_set_bit(i, (u_long *)&ids);
__set_bit(i, ids);
}
for (i = 0; i < 64; i++)
if (!test_bit(i, (u_long *)&ids))
return i + 64;
i = find_first_zero_bit(ids, 64);
if (i < 64)
return i + 64;
printk(KERN_WARNING "%s: more as 63 dynamic tei for one device\n",
__func__);
return -1;
Expand Down

0 comments on commit 8eafabb

Please sign in to comment.