Commit 2d954653 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 5e95ec6f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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];