[SLOF] [PATCH v2 02/19] fix code style in byteorder.h

Thomas Huth thuth at redhat.com
Wed Jan 20 23:32:16 AEDT 2016


On 20.01.2016 13:10, Nikunj A Dadhania wrote:
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
>  include/byteorder.h | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/include/byteorder.h b/include/byteorder.h
> index 60ca672..8ae680f 100644
> --- a/include/byteorder.h
> +++ b/include/byteorder.h
> @@ -19,38 +19,32 @@
>  
>  #include <stdint.h>
>  
> -static inline uint16_t
> -bswap_16 (uint16_t x)
> +static inline uint16_t bswap_16 (uint16_t x)
>  {
>  	return __builtin_bswap16(x);
>  }
>  
> -static inline uint32_t
> -bswap_32 (uint32_t x)
> +static inline uint32_t bswap_32 (uint32_t x)
>  {
>  	return __builtin_bswap32(x);
>  }
>  
> -static inline uint64_t
> -bswap_64 (uint64_t x)
> +static inline uint64_t bswap_64 (uint64_t x)
>  {
>  	return __builtin_bswap64(x);
>  }
>  
> -static inline void
> -bswap_16p (uint16_t *x)
> +static inline void bswap_16p (uint16_t *x)
>  {
>  	*x = __builtin_bswap16(*x);
>  }
>  
> -static inline void
> -bswap_32p (uint32_t *x)
> +static inline void bswap_32p (uint32_t *x)
>  {
>  	*x = __builtin_bswap32(*x);
>  }
>  
> -static inline void
> -bswap_64p (uint64_t *x)
> +static inline void bswap_64p (uint64_t *x)
>  {
>  	*x = __builtin_bswap64(*x);
>  }

Maybe we should also introduce a proper CODING_STYLE document for SLOF
that mandates how format functions? (pointing to the Linux kernel coding
style document for C code should likely be enough, but some coding style
for Forth code would be good, too)

Anyway, patch looks fine, so:

Reviewed-by: Thomas Huth <thuth at redhat.com>



More information about the SLOF mailing list