Remove old unused lebitmap code

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-07-22 14:57:12 -07:00
parent fc37ece26b
commit 1cacc50de0
3 changed files with 0 additions and 50 deletions

View File

@@ -1,38 +0,0 @@
#define _GNU_SOURCE /* ffsll */
#include <string.h>
#include "lebitmap.h"
void set_le_bit(__le64 *bits, u64 nr)
{
bits += nr / 64;
*bits = cpu_to_le64(le64_to_cpu(*bits) | (1ULL << (nr & 63)));
}
void clear_le_bit(__le64 *bits, u64 nr)
{
bits += nr / 64;
*bits = cpu_to_le64(le64_to_cpu(*bits) & ~(1ULL << (nr & 63)));
}
int test_le_bit(__le64 *bits, u64 nr)
{
bits += nr / 64;
return !!(le64_to_cpu(*bits) & (1ULL << (nr & 63)));
}
/* returns -1 or nr */
s64 find_first_le_bit(__le64 *bits, s64 count)
{
long nr;
for (nr = 0; count > 0; bits++, nr += 64, count -= 64) {
if (*bits)
return nr + ffsll(le64_to_cpu(*bits)) - 1;
}
return -1;
}

View File

@@ -1,11 +0,0 @@
#ifndef _LEBITMAP_H_
#define _LEBITMAP_H_
#include "sparse.h"
void set_le_bit(__le64 *bits, u64 nr);
void clear_le_bit(__le64 *bits, u64 nr);
int test_le_bit(__le64 *bits, u64 nr);
s64 find_first_le_bit(__le64 *bits, s64 count);
#endif

View File

@@ -15,7 +15,6 @@
#include "format.h"
#include "cmd.h"
#include "crc.h"
#include "lebitmap.h"
/* XXX maybe these go somewhere */
#define SKF "%llu.%u.%llu"