hw/nvme/ctrl: Have nvme_addr_write() take const buffer
The 'buf' argument is not modified, so better pass it as const type. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
736b01642d
commit
e080ce8676
@ -395,7 +395,7 @@ static int nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size)
|
|||||||
return pci_dma_read(&n->parent_obj, addr, buf, size);
|
return pci_dma_read(&n->parent_obj, addr, buf, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nvme_addr_write(NvmeCtrl *n, hwaddr addr, void *buf, int size)
|
static int nvme_addr_write(NvmeCtrl *n, hwaddr addr, const void *buf, int size)
|
||||||
{
|
{
|
||||||
hwaddr hi = addr + size - 1;
|
hwaddr hi = addr + size - 1;
|
||||||
if (hi < addr) {
|
if (hi < addr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user