qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] bswap.h: export bswap_le


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/2] bswap.h: export bswap_le
Date: Wed, 12 Mar 2014 15:21:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 03/10/2014 12:43 PM, Michael S. Tsirkin wrote:
> it's a handy API for cases where we want to
> get size in bits as a parameter.
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  include/qemu/bswap.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
> index 0cb7c05..4489ad9 100644
> --- a/include/qemu/bswap.h
> +++ b/include/qemu/bswap.h
> @@ -423,9 +423,4 @@ static inline unsigned long leul_to_cpu(unsigned long v)
>  #endif
>  }
>  
> -#undef le_bswap
> -#undef be_bswap
> -#undef le_bswaps
> -#undef be_bswaps

I don't like this because the bits "as parameter" must be constant
in order for token pasting to work.  Better to just use the existing
function calls.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]