Patchwork [U-Boot,v2] include/linux/byteorder: Always defines __fswab64, __swab64p and __swab64s

login
register
mail settings
Submitter Nobuhiro Iwamatsu
Date Nov. 15, 2012, 7:35 a.m.
Message ID <1352964926-18021-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
Download mbox | patch
Permalink /patch/199202/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Nobuhiro Iwamatsu - Nov. 15, 2012, 7:35 a.m.
When __BYTEORDER_HAS_U64__ is not defined, we got warning following:

-----
/tmp/include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
/tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ‘__swab64p’
		[-Wimplicit-function-declaration]
-----

Usually, __arch__swab64* required for __fswab64,  __swab64p and __swab64s
is defined.  Therefore, __BYTEORDER_HAS_U64__ is unnecessary.
This removes __BYTEORDER_HAS_U64__.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Kim Phillips <kim.phillips@freescale.com>
---
v2: Fix mail address.

 include/linux/byteorder/swab.h |    2 --
 1 file changed, 2 deletions(-)
Kim Phillips - Nov. 16, 2012, 12:49 a.m.
On Thu, 15 Nov 2012 16:35:26 +0900
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> wrote:

> When __BYTEORDER_HAS_U64__ is not defined, we got warning following:
> 
> -----
> /tmp/include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
> /tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ‘__swab64p’
> 		[-Wimplicit-function-declaration]
> -----
> 
> Usually, __arch__swab64* required for __fswab64,  __swab64p and __swab64s
> is defined.  Therefore, __BYTEORDER_HAS_U64__ is unnecessary.
> This removes __BYTEORDER_HAS_U64__.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> CC: Kim Phillips <kim.phillips@freescale.com>
> ---
> v2: Fix mail address.

Reviewed-by: Kim Phillips <kim.phillips@freescale.com>

Kim
Nobuhiro Iwamatsu - Nov. 30, 2012, 5:58 a.m.
Hi,  Tom.

Could you pick this patch?

Best regards,
  Nobuhiro

On Fri, Nov 16, 2012 at 9:49 AM, Kim Phillips
<kim.phillips@freescale.com> wrote:
> On Thu, 15 Nov 2012 16:35:26 +0900
> Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> wrote:
>
>> When __BYTEORDER_HAS_U64__ is not defined, we got warning following:
>>
>> -----
>> /tmp/include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
>> /tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ‘__swab64p’
>>               [-Wimplicit-function-declaration]
>> -----
>>
>> Usually, __arch__swab64* required for __fswab64,  __swab64p and __swab64s
>> is defined.  Therefore, __BYTEORDER_HAS_U64__ is unnecessary.
>> This removes __BYTEORDER_HAS_U64__.
>>
>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
>> CC: Kim Phillips <kim.phillips@freescale.com>
>> ---
>> v2: Fix mail address.
>
> Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
>
> Kim
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Tom Rini - Dec. 3, 2012, 1:43 p.m.
On Thu, Nov 15, 2012 at 04:35:26PM +0900, Nobuhiro Iwamatsu wrote:

> When __BYTEORDER_HAS_U64__ is not defined, we got warning following:
> 
> -----
> /tmp/include/linux/byteorder/little_endian.h: In function ???__cpu_to_be64p???:
> /tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ???__swab64p???
> 		[-Wimplicit-function-declaration]
> -----
> 
> Usually, __arch__swab64* required for __fswab64,  __swab64p and __swab64s
> is defined.  Therefore, __BYTEORDER_HAS_U64__ is unnecessary.
> This removes __BYTEORDER_HAS_U64__.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> CC: Kim Phillips <kim.phillips@freescale.com>
> ---
> v2: Fix mail address.
> 
>  include/linux/byteorder/swab.h |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h
> index bb4a046..4334fa7 100644
> --- a/include/linux/byteorder/swab.h
> +++ b/include/linux/byteorder/swab.h
> @@ -122,7 +122,6 @@ static __inline__ void __swab32s(__u32 *addr)
>  	__arch__swab32s(addr);
>  }
>  
> -#ifdef __BYTEORDER_HAS_U64__
>  static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
>  {
>  #  ifdef __SWAB_64_THRU_32__
> @@ -141,7 +140,6 @@ static __inline__ void __swab64s(__u64 *addr)
>  {
>  	__arch__swab64s(addr);
>  }
> -#endif /* __BYTEORDER_HAS_U64__ */
>  
>  #if defined(__KERNEL__)
>  #define swab16 __swab16

Applied to u-boot/master, thanks!

Patch

diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h
index bb4a046..4334fa7 100644
--- a/include/linux/byteorder/swab.h
+++ b/include/linux/byteorder/swab.h
@@ -122,7 +122,6 @@  static __inline__ void __swab32s(__u32 *addr)
 	__arch__swab32s(addr);
 }
 
-#ifdef __BYTEORDER_HAS_U64__
 static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
 {
 #  ifdef __SWAB_64_THRU_32__
@@ -141,7 +140,6 @@  static __inline__ void __swab64s(__u64 *addr)
 {
 	__arch__swab64s(addr);
 }
-#endif /* __BYTEORDER_HAS_U64__ */
 
 #if defined(__KERNEL__)
 #define swab16 __swab16