All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 1/6] tools/libxl: Introduce min and max macros
Date: Wed, 11 Mar 2015 12:07:09 +0000	[thread overview]
Message-ID: <1426075629.21353.211.camel@citrix.com> (raw)
In-Reply-To: <1425668741-28003-2-git-send-email-andrew.cooper3@citrix.com>

On Fri, 2015-03-06 at 19:05 +0000, Andrew Cooper wrote:
> This is the same set used by libxc.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> 
> ---
> v2: Don't use reserved identifiers in min_t/max_t
> ---
>  tools/libxl/libxl_internal.h |   16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 934465a..fcbec7f 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -108,6 +108,22 @@
>  
>  #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
>  
> +#define min(X, Y) ({                             \
> +            const typeof (X) _x = (X);           \
> +            const typeof (Y) _y = (Y);           \

You've avoided the reserved-by-C names here, but IIRC a single
underscore is reserved by POSIX.

However since you've just copied from libxc, I think we can live with
this until someone find the energy to fix them all:
        Acked-by: Ian Campbell <ian.campbell@citrix.com>

Ian.

  reply	other threads:[~2015-03-11 12:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 19:05 [PATCH v2 0/6] tools/libxl: Improvements to libxl__datacopier Andrew Cooper
2015-03-06 19:05 ` [PATCH v2 1/6] tools/libxl: Introduce min and max macros Andrew Cooper
2015-03-11 12:07   ` Ian Campbell [this message]
2015-03-06 19:05 ` [PATCH v2 2/6] tools/libxl: Update datacopier to support sending data only Andrew Cooper
2015-03-11 12:07   ` Ian Campbell
2015-03-06 19:05 ` [PATCH v2 3/6] tools/libxl: Avoid overrunning static buffer with prefixdata Andrew Cooper
2015-03-11 12:09   ` Ian Campbell
2015-03-06 19:05 ` [PATCH v2 4/6] tools/libxl: Allow limiting amount copied by datacopier Andrew Cooper
2015-03-11 12:15   ` Ian Campbell
2015-03-11 12:23     ` Andrew Cooper
2015-03-11 12:31       ` Ian Campbell
2015-03-06 19:05 ` [PATCH v2 5/6] tools/libxl: Extend datacopier to support reading into a buffer Andrew Cooper
2015-03-11 12:19   ` Ian Campbell
2015-03-16 13:31     ` Ross Lagerwall
2015-03-06 19:05 ` [PATCH v2 6/6] tools/libxl: Adjust datacopiers POLLHUP handling when the fd is also readable Andrew Cooper
2015-03-11 12:21   ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2015-03-11 13:42 [PATCH] x86/domctl: Improve XEN_DOMCTL_hypercall_init error handling Jan Beulich
2015-03-12 11:01 ` [PATCH v2 1/6] tools/libxl: Introduce min and max macros Andrew Cooper
2015-03-12 11:02   ` Andrew Cooper

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=1426075629.21353.211.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.