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:
parent
7f9d22a494
commit
a6cf458c9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user