Skip to content

Commit

Permalink
sbitmap: Delete sbitmap_any_bit_clear()
Browse files Browse the repository at this point in the history
Since the only caller of this function has been deleted, delete this one
also.

Signed-off-by: John Garry <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
John Garry authored and axboe committed Nov 13, 2019
1 parent cb711b9 commit 708edaf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions include/linux/sbitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,6 @@ int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint,
*/
bool sbitmap_any_bit_set(const struct sbitmap *sb);

/**
* sbitmap_any_bit_clear() - Check for an unset bit in a &struct
* sbitmap.
* @sb: Bitmap to check.
*
* Return: true if any bit in the bitmap is clear, false otherwise.
*/
bool sbitmap_any_bit_clear(const struct sbitmap *sb);

#define SB_NR_TO_INDEX(sb, bitnr) ((bitnr) >> (sb)->shift)
#define SB_NR_TO_BIT(sb, bitnr) ((bitnr) & ((1U << (sb)->shift) - 1U))

Expand Down
17 changes: 0 additions & 17 deletions lib/sbitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,6 @@ bool sbitmap_any_bit_set(const struct sbitmap *sb)
}
EXPORT_SYMBOL_GPL(sbitmap_any_bit_set);

bool sbitmap_any_bit_clear(const struct sbitmap *sb)
{
unsigned int i;

for (i = 0; i < sb->map_nr; i++) {
const struct sbitmap_word *word = &sb->map[i];
unsigned long mask = word->word & ~word->cleared;
unsigned long ret;

ret = find_first_zero_bit(&mask, word->depth);
if (ret < word->depth)
return true;
}
return false;
}
EXPORT_SYMBOL_GPL(sbitmap_any_bit_clear);

static unsigned int __sbitmap_weight(const struct sbitmap *sb, bool set)
{
unsigned int i, weight = 0;
Expand Down

0 comments on commit 708edaf

Please sign in to comment.