nvme: tweak unit test PCI config space accessors

Make nvme_pcicfg_read32 set the referenced variable and make
nvme_pcicfg_write32 appear to read it so that the compiler doesn't warn
about unused/uninitialized data.

Change-Id: I4f06c0cca2fc11a8c6c5a60543c1c50a2f6a412d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-09-22 12:37:21 -07:00
parent 7f9d22a494
commit a6cf458c9d

View File

@ -61,8 +61,8 @@ do \
while (0);
#define nvme_free_request(buf) free(buf)
#define nvme_pcicfg_read32(handle, var, offset)
#define nvme_pcicfg_write32(handle, var, offset)
#define nvme_pcicfg_read32(handle, var, offset) do { *(var) = 0xFFFFFFFFu; } while (0)
#define nvme_pcicfg_write32(handle, var, offset) do { (void)(var); } while (0)
static inline
int nvme_pcicfg_map_bar(void *pci_handle, int bar, int read_only, void **addr)