[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 19.06.17 at 16:09, <kpraveen.lkml@xxxxxxxxx> wrote:
> On Mon, Jun 19, 2017 at 7:19 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 17.06.17 at 11:32, <kpraveen.lkml@xxxxxxxxx> 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>
>>
>> This looks okay now from a content pov, but I still have a question
>> and a remark.
>>
>> Question: Who's the original author? According to the Linux commit,
>> it's Artem, but without an explicit From: tag I think anyone trying to
>> "git am" you mail would put you in as the author. With this taken
>> care of (which the committer may be willing to do)
>> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
> 
> Thanks for your input.
> Pardon me, I am new to the forum. The Ack you added is only for this patch.

Yes.

> Also, do you want me to add 'From' and resend ?

As said, I think the committer may be able to take care of this. So
re-sending just because of this is likely not required.

> To be precise in below order  :
> 
> 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.
> 
> From: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
> Signed-off-by: Praveen Kumar <kpraveen.lkml@xxxxxxxxx>

Normally From: would go first (before the description text) I think.

Jan

_______________________________________________
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®.