[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 01/20] rbtree: add const qualifier to some functions



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.
> 
> 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:
> 
> warning: passing argument 1 of ‘rb_next’ discards qualifiers from
> pointer target
> type
> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
> Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> [Linux commit f4b477c47332367d35686bd2b808c2156b96d7c7]
> 
> Ported to Xen.
> 
> Signed-off-by: Praveen Kumar <kpraveen.lkml@xxxxxxxxx>
>
With authorship (the From: field) fixed as Jan suggested,

Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>

(The remark on the authorship applies of course to all the patches,
even if I don't explicitly state it again).

Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.