Re: [PATCH 1/1] util: Make some iova_tree parameters const

2021-10-13 Thread Eugenio Perez Martin
On Wed, Oct 13, 2021 at 12:21 AM Philippe Mathieu-Daudé wrote: > > On 10/12/21 17:50, Eugenio Pérez wrote: > > 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

Re: [PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 17:50, Eugenio Pérez wrote: > 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 o

Re: [PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Peter Xu
On Tue, Oct 12, 2021 at 05:50:01PM +0200, Eugenio Pérez wrote: > 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 compile

[PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Eugenio Pérez
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