diff options
author | John Levon <john.levon@nutanix.com> | 2021-04-15 18:45:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 18:45:14 +0100 |
commit | c0fcc59abead719b2c983934905a6c3ecd0522b6 (patch) | |
tree | f58736ea6facad03c208f99a8e5c136819e2c211 /lib/pci.c | |
parent | f7e9ff4496cc53caf8217b6210e29628ec60561d (diff) | |
download | libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.zip libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.tar.gz libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.tar.bz2 |
remove vfu_get_region_info() (#444)
This is only used internally, and not really useful.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib/pci.c')
-rw-r--r-- | lib/pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -48,12 +48,11 @@ pci_hdr_write_bar(vfu_ctx_t *vfu_ctx, uint16_t bar_index, const char *buf) { uint32_t cfg_addr; unsigned long mask; - vfu_reg_info_t *reg_info = vfu_get_region_info(vfu_ctx); vfu_pci_hdr_t *hdr; assert(vfu_ctx != NULL); - if (reg_info[bar_index].size == 0) { + if (vfu_ctx->reg_info[bar_index].size == 0) { return; } @@ -64,10 +63,10 @@ pci_hdr_write_bar(vfu_ctx_t *vfu_ctx, uint16_t bar_index, const char *buf) vfu_log(vfu_ctx, LOG_DEBUG, "BAR%d addr 0x%x", bar_index, cfg_addr); if (cfg_addr == 0xffffffff) { - cfg_addr = ~(reg_info[bar_index].size) + 1; + cfg_addr = ~(vfu_ctx->reg_info[bar_index].size) + 1; } - if ((reg_info[bar_index].flags & VFU_REGION_FLAG_MEM)) { + if ((vfu_ctx->reg_info[bar_index].flags & VFU_REGION_FLAG_MEM)) { mask = PCI_BASE_ADDRESS_MEM_MASK; } else { mask = PCI_BASE_ADDRESS_IO_MASK; |