]> git.proxmox.com Git - mirror_qemu.git/commit
util: Make some iova_tree parameters const
authorEugenio Pérez <eperezma@redhat.com>
Wed, 13 Oct 2021 18:27:13 +0000 (20:27 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Nov 2021 14:57:21 +0000 (15:57 +0100)
commita89b34be5e2550949979c3184d00d5ab3e8dd707
tree75f568ba7b6dc3ff3e165b68aacb1f4cce4ae7df
parent984099911275cd4b703e0d9c35b37dd52928acdd
util: Make some iova_tree parameters const

As qemu guidelines:
Unless a pointer is used to modify the pointed-to storage, give it the
"const" attribute.

In the particular case of iova_tree_find it allows to enforce what is
requested by its comment, since the compiler would shout in case of
modifying or freeing the const-qualified returned pointer.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211013182713.888753-2-eperezma@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/intel_iommu.c
include/qemu/iova-tree.h
util/iova-tree.c