aboutsummaryrefslogtreecommitdiff
path: root/slof
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2019-11-07 16:48:37 +1100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2019-11-11 15:22:32 +1100
commit10c1e52deea07e0ef2bc04578aa37c1568954074 (patch)
tree650c3b6361f933d49066497a73224771c9a7cbdb /slof
parent899d98836513bb3d6a4f4e48ef7cee887ee5f57b (diff)
downloadSLOF-10c1e52deea07e0ef2bc04578aa37c1568954074.zip
SLOF-10c1e52deea07e0ef2bc04578aa37c1568954074.tar.gz
SLOF-10c1e52deea07e0ef2bc04578aa37c1568954074.tar.bz2
allocator: Fix format strings for DEBUG
This silences multiple gcc warnings; no functional change otherwise. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'slof')
-rw-r--r--slof/allocator.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/slof/allocator.c b/slof/allocator.c
index e8f8858..054c1d8 100644
--- a/slof/allocator.c
+++ b/slof/allocator.c
@@ -119,7 +119,7 @@ unsigned long SLOF_bm_allocator_init(unsigned long start, unsigned long size,
struct bitmap *bm;
unsigned long alloc_size, bm_size, n_bits;
- dprintf("enter start %x, size %d, block-size %d\n", start, size, blocksize);
+ dprintf("enter start %lx, size %ld, block-size %ld\n", start, size, blocksize);
if (!size)
return 0;
@@ -164,8 +164,8 @@ unsigned long SLOF_bm_alloc(unsigned long handle, unsigned long size)
if (bitpos == -1)
return -1;
- dprintf("BMW %d, bitpos %d\n", i, bitpos);
- dprintf("size %d, block_size %d, n_bits %d\n", size, bm->block_size, n_bits);
+ dprintf("BMW bitpos %d\n", bitpos);
+ dprintf("size %ld, block_size %ld, n_bits %ld\n", size, bm->block_size, n_bits);
for(i = bitpos; i < (bitpos + n_bits); i++) {
#ifdef DEBUG
if (!bm_test_bit(bm->bmw, i))
@@ -175,7 +175,7 @@ unsigned long SLOF_bm_alloc(unsigned long handle, unsigned long size)
}
bm->free_blocks -= n_bits;
addr = bm->start + bitpos * bm->block_size;
- dprintf("BMW %d, bitpos %d addr %lx free_blocks %d\n", i, bitpos, addr, bm->free_blocks);
+ dprintf("BMW %d, bitpos %d addr %lx free_blocks %ld\n", i, bitpos, addr, bm->free_blocks);
return addr;
}
@@ -201,8 +201,8 @@ void SLOF_bm_free(unsigned long handle, unsigned long ptr, unsigned long size)
bm->free_blocks += n_bits;
#ifdef DEBUG
- dprintf("addr %lx, bitpos %d\n", addr, bitpos);
- dprintf("size %d, block_size %d, n_bits %d, free_blocks %d\n", size, bm->block_size, n_bits, bm->free_blocks);
+ dprintf("addr %lx, bitpos %ld\n", addr, bitpos);
+ dprintf("size %ld, block_size %ld, n_bits %ld, free_blocks %ld\n", size, bm->block_size, n_bits, bm->free_blocks);
if (addr % bm->block_size) {
dprintf("Warning: Address not aligned addr %lx\n", addr);
}