mirror of
https://github.com/versity/scoutfs.git
synced 2026-06-07 04:02:34 +00:00
Remove old unused lebitmap code
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user