From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 01/20] rbtree: add const qualifier to some functions Date: Mon, 19 Jun 2017 18:39:33 +0200 Message-ID: <1497890373.7405.4.camel@citrix.com> References: <20170617093253.3990-1-kpraveen.lkml@gmail.com> <20170617093253.3990-2-kpraveen.lkml@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7475842273183114429==" Return-path: In-Reply-To: <20170617093253.3990-2-kpraveen.lkml@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Praveen Kumar , xen-devel@lists.xen.org Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org --===============7475842273183114429== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-qqgwOwEF+2umY6kKTei+" --=-qqgwOwEF+2umY6kKTei+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2017-06-17 at 15:02 +0530, Praveen Kumar wrote: > The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls > take a pointer to an RB node or RB root. They do not change the > pointed objects, so add a 'const' qualifier in order to make life > of the users of these functions easier. >=20 > Indeed, if I have my own constant pointer &const struct my_type *p, > and I call 'rb_next(&p->rb)', I get a GCC warning: >=20 > warning: passing argument 1 of =E2=80=98rb_next=E2=80=99 discards qualifi= ers from > pointer target > type >=20 > Signed-off-by: Artem Bityutskiy > Signed-off-by: David Woodhouse > Signed-off-by: Linus Torvalds > [Linux commit f4b477c47332367d35686bd2b808c2156b96d7c7] >=20 > Ported to Xen. >=20 > Signed-off-by: Praveen Kumar > With authorship (the From: field) fixed as Jan suggested, Reviewed-by: Dario Faggioli (The remark on the authorship applies of course to all the patches, even if I don't explicitly state it again). Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-qqgwOwEF+2umY6kKTei+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZR/5GAAoJEBZCeImluHPurXoP/1cZ1RhlsuRUTuUcGYfmQx8a vIPqzq2gMy/CZ+/M+tBjcZ+dMvwwwvLbYi5LP8ZP7Xyn8MhDh27DGRbIwqpih9sr 8n6KxFslUEtgCGpygQRXuGXVXpMDFd9x3AD+cl+RlNdhBaG2l9h0ug4vO0cUtVqQ 2qAFFcp0bZPg+PL9DFhj2Y53yLGTkAeHAYO4owwnFFqN0Di9Zu59CfjYNxPe1xkk rZ7su2bRqRb7HeGGP8xJ2814WzURjflfclG8+jkwUvhHnTnUpYI0kLkSIryEAH8p Hn+NGBrheUZlno9fs2RljhL5rMG09G5pv2Lde6mxn5ewnF7bwfyr27XNgqdZwOaf X0g9fwOraG5mhIzTb8l35yodfsa7BagXCcbv3o3PjbHnL8eSEl7DRmpAXD4oPnd1 jgdv8KuNMfPtyFPPIvV6JhsFU8LwEXSVl2O5ExDnOtkj/CSDXbeEOcbmfyHrSHYe yeGIg75MNO22VcgnlJq8/+TJTBv9LG6d598aN5Svk9nuKZD1MxYpi70Su2aFPwSG QdMR5yYHkvT+yVsmv72VIq7SO8N/Ntxa7Bj6pqbtOJtjxSKetI94K7kDPjF6UmQ6 FzmUqzIn1nE8a24XhnvQwYi7RU5GcOLunlnQfdnMyogvFWu46VG9yGrSNca9ogZS TAMBc9I0S62+BRD6iQGL =/AAu -----END PGP SIGNATURE----- --=-qqgwOwEF+2umY6kKTei+-- --===============7475842273183114429== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============7475842273183114429==--