mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument
Various APIs use 'pval' naming for 'pointer to val'. rdma_pci_dma_map() uses 'plen' for 'PCI length', but since 'PCI' is already explicit in the function name, simplify and rename the argument 'len'. No logical change. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Yuval Shaia <yuval.shaia.ml@gmail.com> Tested-by: Yuval Shaia <yuval.shaia.ml@gmail.com> Message-Id: <20220111184309.28637-7-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
fd5e451edb
commit
ce0a798285
2 changed files with 8 additions and 8 deletions
|
@ -17,29 +17,29 @@
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "rdma_utils.h"
|
#include "rdma_utils.h"
|
||||||
|
|
||||||
void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen)
|
void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t len)
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
hwaddr len = plen;
|
hwaddr pci_len = len;
|
||||||
|
|
||||||
if (!addr) {
|
if (!addr) {
|
||||||
rdma_error_report("addr is NULL");
|
rdma_error_report("addr is NULL");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = pci_dma_map(dev, addr, &len, DMA_DIRECTION_TO_DEVICE);
|
p = pci_dma_map(dev, addr, &pci_len, DMA_DIRECTION_TO_DEVICE);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
rdma_error_report("pci_dma_map fail, addr=0x%"PRIx64", len=%"PRId64,
|
rdma_error_report("pci_dma_map fail, addr=0x%"PRIx64", len=%"PRId64,
|
||||||
addr, len);
|
addr, pci_len);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len != plen) {
|
if (pci_len != len) {
|
||||||
rdma_pci_dma_unmap(dev, p, len);
|
rdma_pci_dma_unmap(dev, p, pci_len);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_rdma_pci_dma_map(addr, p, len);
|
trace_rdma_pci_dma_map(addr, p, pci_len);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ typedef struct RdmaProtectedGSList {
|
||||||
GSList *list;
|
GSList *list;
|
||||||
} RdmaProtectedGSList;
|
} RdmaProtectedGSList;
|
||||||
|
|
||||||
void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen);
|
void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t len);
|
||||||
void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);
|
void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);
|
||||||
void rdma_protected_gqueue_init(RdmaProtectedGQueue *list);
|
void rdma_protected_gqueue_init(RdmaProtectedGQueue *list);
|
||||||
void rdma_protected_gqueue_destroy(RdmaProtectedGQueue *list);
|
void rdma_protected_gqueue_destroy(RdmaProtectedGQueue *list);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue