diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:43:14 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:43:14 +0100 |
commit | 4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b (patch) | |
tree | dce4520f69b3124da7afa76c2bbe5fc1f08313f7 /pcilib/kmem.c | |
parent | 195c28f3074486165b6e0935362810f8a1fb9531 (diff) | |
download | pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.gz pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.bz2 pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.xz pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.zip |
RPM generation
Diffstat (limited to 'pcilib/kmem.c')
-rw-r--r-- | pcilib/kmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pcilib/kmem.c b/pcilib/kmem.c index b103126..e1d60c5 100644 --- a/pcilib/kmem.c +++ b/pcilib/kmem.c @@ -29,7 +29,7 @@ int pcilib_clean_kernel_memory(pcilib_t *ctx, pcilib_kmem_use_t use, pcilib_kmem static int pcilib_free_kernel_buffer(pcilib_t *ctx, pcilib_kmem_list_t *kbuf, size_t i, pcilib_kmem_flags_t flags) { kmem_handle_t kh = {0}; - if (kbuf->buf.blocks[i].ua) munmap(kbuf->buf.blocks[i].ua, kbuf->buf.blocks[i].size + kbuf->buf.blocks[i].alignment_offset); + if (kbuf->buf.blocks[i].ua) munmap((void*)kbuf->buf.blocks[i].ua, kbuf->buf.blocks[i].size + kbuf->buf.blocks[i].alignment_offset); kh.handle_id = kbuf->buf.blocks[i].handle_id; kh.pa = kbuf->buf.blocks[i].pa; kh.flags = flags; @@ -361,7 +361,7 @@ int pcilib_kmem_sync_block(pcilib_t *ctx, pcilib_kmem_handle_t *k, pcilib_kmem_s return 0; } -void* volatile pcilib_kmem_get_ua(pcilib_t *ctx, pcilib_kmem_handle_t *k) { +volatile void *pcilib_kmem_get_ua(pcilib_t *ctx, pcilib_kmem_handle_t *k) { pcilib_kmem_list_t *kbuf = (pcilib_kmem_list_t*)k; return kbuf->buf.addr.ua + kbuf->buf.addr.alignment_offset + kbuf->buf.addr.mmap_offset; } @@ -380,7 +380,7 @@ uintptr_t pcilib_kmem_get_ba(pcilib_t *ctx, pcilib_kmem_handle_t *k) { return 0; } -void* volatile pcilib_kmem_get_block_ua(pcilib_t *ctx, pcilib_kmem_handle_t *k, size_t block) { +volatile void *pcilib_kmem_get_block_ua(pcilib_t *ctx, pcilib_kmem_handle_t *k, size_t block) { pcilib_kmem_list_t *kbuf = (pcilib_kmem_list_t*)k; return kbuf->buf.blocks[block].ua + kbuf->buf.blocks[block].alignment_offset + kbuf->buf.blocks[block].mmap_offset; } |