From: Peter Xu <peterx@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-trivial@nongnu.org, Jason Wang <jasowang@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/1] util: Make some iova_tree parameters const
Date: Wed, 13 Oct 2021 05:35:21 +0800 [thread overview]
Message-ID: <YWX/mWSZSs1zvKVz@t490s> (raw)
In-Reply-To: <20211012155001.811160-2-eperezma@redhat.com>
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 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>
--
Peter Xu
next prev parent reply other threads:[~2021-10-12 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 15:50 [PATCH 0/1] util: Make some iova_tree functions parameters const Eugenio Pérez
2021-10-12 15:50 ` [PATCH 1/1] util: Make some iova_tree " Eugenio Pérez
2021-10-12 21:35 ` Peter Xu [this message]
2021-10-12 22:21 ` Philippe Mathieu-Daudé
2021-10-13 18:26 ` Eugenio Perez Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YWX/mWSZSs1zvKVz@t490s \
--to=peterx@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).