projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warning from gmake on BSD
[fio.git]
/
lib
/
axmap.c
diff --git
a/lib/axmap.c
b/lib/axmap.c
index 5b8cb3094d88d6bb6cc6317b5d8c36fc49f502ff..9153df510fc47091a4761e48cf4afe23371957a4 100644
(file)
--- a/
lib/axmap.c
+++ b/
lib/axmap.c
@@
-22,7
+22,6
@@
#include "../arch/arch.h"
#include "axmap.h"
#include "../arch/arch.h"
#include "axmap.h"
-#include "../smalloc.h"
#include "../minmax.h"
#if BITS_PER_LONG == 64
#include "../minmax.h"
#if BITS_PER_LONG == 64
@@
-80,10
+79,10
@@
void axmap_free(struct axmap *axmap)
return;
for (i = 0; i < axmap->nr_levels; i++)
return;
for (i = 0; i < axmap->nr_levels; i++)
-
s
free(axmap->levels[i].map);
+ free(axmap->levels[i].map);
-
s
free(axmap->levels);
-
s
free(axmap);
+ free(axmap->levels);
+ free(axmap);
}
struct axmap *axmap_new(unsigned long nr_bits)
}
struct axmap *axmap_new(unsigned long nr_bits)
@@
-91,7
+90,7
@@
struct axmap *axmap_new(unsigned long nr_bits)
struct axmap *axmap;
unsigned int i, levels;
struct axmap *axmap;
unsigned int i, levels;
- axmap =
s
malloc(sizeof(*axmap));
+ axmap = malloc(sizeof(*axmap));
if (!axmap)
return NULL;
if (!axmap)
return NULL;
@@
-103,7
+102,7
@@
struct axmap *axmap_new(unsigned long nr_bits)
}
axmap->nr_levels = levels;
}
axmap->nr_levels = levels;
- axmap->levels =
s
malloc(axmap->nr_levels * sizeof(struct axmap_level));
+ axmap->levels = malloc(axmap->nr_levels * sizeof(struct axmap_level));
axmap->nr_bits = nr_bits;
for (i = 0; i < axmap->nr_levels; i++) {
axmap->nr_bits = nr_bits;
for (i = 0; i < axmap->nr_levels; i++) {
@@
-111,7
+110,7
@@
struct axmap *axmap_new(unsigned long nr_bits)
al->level = i;
al->map_size = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
al->level = i;
al->map_size = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
- al->map =
s
malloc(al->map_size * sizeof(unsigned long));
+ al->map = malloc(al->map_size * sizeof(unsigned long));
if (!al->map)
goto err;
if (!al->map)
goto err;
@@
-123,9
+122,10
@@
struct axmap *axmap_new(unsigned long nr_bits)
err:
for (i = 0; i < axmap->nr_levels; i++)
if (axmap->levels[i].map)
err:
for (i = 0; i < axmap->nr_levels; i++)
if (axmap->levels[i].map)
-
s
free(axmap->levels[i].map);
+ free(axmap->levels[i].map);
- sfree(axmap->levels);
+ free(axmap->levels);
+ free(axmap);
return NULL;
}
return NULL;
}
@@
-369,7
+369,7
@@
static uint64_t axmap_find_first_free(struct axmap *axmap, unsigned int level,
return (uint64_t) -1ULL;
}
return (uint64_t) -1ULL;
}
-uint64_t axmap_first_free(struct axmap *axmap)
+
static
uint64_t axmap_first_free(struct axmap *axmap)
{
if (firstfree_valid(axmap))
return axmap->first_free;
{
if (firstfree_valid(axmap))
return axmap->first_free;