nvme/test: set phys_addr in stub nvme_malloc()
This prevents warnings about unused phys_addr variable in the unit tests. Change-Id: I022483735ba92eb112e541e6de37dc9a8c5d2b8e Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
5e95ec6f47
commit
2d95465379
@ -35,10 +35,18 @@
|
||||
#define __NVME_IMPL_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define nvme_malloc(tag, size, align, phys_addr) malloc(size)
|
||||
static inline void *
|
||||
nvme_malloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr)
|
||||
{
|
||||
void *buf = calloc(1, size);
|
||||
*phys_addr = (uint64_t)buf;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#define nvme_free(buf) free(buf)
|
||||
#define OUTBUF_SIZE 1024
|
||||
extern char outbuf[OUTBUF_SIZE];
|
||||
|
Loading…
Reference in New Issue
Block a user