diff options
Diffstat (limited to 'util/iova-tree.c')
-rw-r--r-- | util/iova-tree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/iova-tree.c b/util/iova-tree.c index 7990692cbd..23ea35b7a4 100644 --- a/util/iova-tree.c +++ b/util/iova-tree.c @@ -42,14 +42,14 @@ IOVATree *iova_tree_new(void) return iova_tree; } -DMAMap *iova_tree_find(IOVATree *tree, DMAMap *map) +const DMAMap *iova_tree_find(const IOVATree *tree, const DMAMap *map) { return g_tree_lookup(tree->tree, map); } -DMAMap *iova_tree_find_address(IOVATree *tree, hwaddr iova) +const DMAMap *iova_tree_find_address(const IOVATree *tree, hwaddr iova) { - DMAMap map = { .iova = iova, .size = 0 }; + const DMAMap map = { .iova = iova, .size = 0 }; return iova_tree_find(tree, &map); } @@ -60,7 +60,7 @@ static inline void iova_tree_insert_internal(GTree *gtree, DMAMap *range) g_tree_insert(gtree, range, range); } -int iova_tree_insert(IOVATree *tree, DMAMap *map) +int iova_tree_insert(IOVATree *tree, const DMAMap *map) { DMAMap *new; @@ -96,9 +96,9 @@ void iova_tree_foreach(IOVATree *tree, iova_tree_iterator iterator) g_tree_foreach(tree->tree, iova_tree_traverse, iterator); } -int iova_tree_remove(IOVATree *tree, DMAMap *map) +int iova_tree_remove(IOVATree *tree, const DMAMap *map) { - DMAMap *overlap; + const DMAMap *overlap; while ((overlap = iova_tree_find(tree, map))) { g_tree_remove(tree->tree, overlap); |