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

Re: [Xen-devel] [PATCH] tools/libxc: Introduce typesafe and side-effect safe min()/max() macros



On 10/07/14 10:35, Ian Campbell wrote:
> On Wed, 2014-07-09 at 16:54 +0100, Ian Campbell wrote:
>> On Tue, 2014-07-08 at 14:21 +0100, Andrew Cooper wrote:
>>> Replace the current users, and remove scattered re-definitions.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
>>
>>> -                unsigned long sz = MIN(chunk_bytes, sizeof(xen_pfn_t));
>>> +                unsigned long sz = min((size_t)chunk_bytes, 
>>> sizeof(xen_pfn_t));
>> FWIW on the hyperevisor side we have max_t and min_t to handle these
>> cases where a cast is needed.
> Which I've just noticed/remembered I promoted to xc_private.h in my ARM
> p2m superpages series!

I noticed that.  I guess it depends which patch gets committed first.

This patch is a prerequisite of the writev() patch, which is a
prerequisite for my migration v2.

If you wish, I can do a v2 which moves min_t/max_t at the same time and
uses them in preference.

~Andrew

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


 


Rackspace

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