All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions
@ 2013-01-16 12:39 Gabor Juhos
  2013-01-16 12:39 ` [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline' Gabor Juhos
  2013-01-22 20:50 ` [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Daniel Schwierzeck
  0 siblings, 2 replies; 4+ messages in thread
From: Gabor Juhos @ 2013-01-16 12:39 UTC (permalink / raw)
  To: u-boot

All other IO accessor functions are using the
'inline' directive. Use that also for the __in*s
to make it consistent with the other variants.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>

---
NOTE: checkpatch.pl throwns an error for the patch:

  0001-MIPS-use-inline-directive-for-__in-s-functions.patch:24: ERROR: open brace '{' following function declarations go on the next line
  total: 1 errors, 0 warnings, 8 lines checked

However that error is already present if the
'arch/mips/include/asm/io.h' file is checked
with checkpatch.pl. The cleanup should be
done in a separare patch.
---
 arch/mips/include/asm/io.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 80eab75..50466f2 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -268,7 +268,7 @@ __OUT1(s##c_p) __OUT2(m) : : "r" (__ioswab##w(value)), "ir" (port), "r" (mips_io
 	SLOW_DOWN_IO; }
 
 #define __IN1(t,s) \
-extern __inline__ t __in##s(unsigned int port) { t _v;
+extern inline t __in##s(unsigned int port) { t _v;
 
 /*
  * Required nops will be inserted by the assembler
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline'
  2013-01-16 12:39 [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Gabor Juhos
@ 2013-01-16 12:39 ` Gabor Juhos
  2013-01-22 20:50   ` Daniel Schwierzeck
  2013-01-22 20:50 ` [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Daniel Schwierzeck
  1 sibling, 1 reply; 4+ messages in thread
From: Gabor Juhos @ 2013-01-16 12:39 UTC (permalink / raw)
  To: u-boot

The currently used 'extern inline' directive causes
the following compiler warnings if CONFIG_SWAP_IO_SPACE
is defined:

  <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc_p' which is not static [enabled by default]
  <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl_p' which is not static [enabled by default]
  <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc' which is not static [enabled by default]
  <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl' which is not static [enabled by default]
  <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc_p' which is not static [enabled by default]
  <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw_p' which is not static [enabled by default]
  <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc' which is not static [enabled by default]
  <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw' which is not static [enabled by default]
  <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc_p' which is not static [enabled by default]
  <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl_p' which is not static [enabled by default]
  <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc' which is not static [enabled by default]
  <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl' which is not static [enabled by default]
  <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc_p' which is not static [enabled by default]
  <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw_p' which is not static [enabled by default]
  <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc' which is not static [enabled by default]
  <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw' which is not static [enabled by default]

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>

---
NOTE: checkpatch.pl throwns some errors/warnings for the patch:

  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:42: ERROR: open brace '{' following function declarations go on the next line
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:51: ERROR: open brace '{' following function declarations go on the next line
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: WARNING: line over 80 characters
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: ERROR: "foo * bar" should be "foo *bar"
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: ERROR: open brace '{' following function declarations go on the next line
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: WARNING: line over 80 characters
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: ERROR: "foo * bar" should be "foo *bar"
  0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: ERROR: open brace '{' following function declarations go on the next line

However those errors are already present if the
'arch/mips/include/asm/io.h' file is checked
with checkpatch.pl. The cleanup should be done
in a separare patch.
---
 arch/mips/include/asm/io.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 50466f2..3864c80 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -254,7 +254,7 @@ out:
  */
 
 #define __OUT1(s) \
-extern inline void __out##s(unsigned int value, unsigned int port) {
+static inline void __out##s(unsigned int value, unsigned int port) {
 
 #define __OUT2(m) \
 __asm__ __volatile__ ("s" #m "\t%0,%1(%2)"
@@ -268,7 +268,7 @@ __OUT1(s##c_p) __OUT2(m) : : "r" (__ioswab##w(value)), "ir" (port), "r" (mips_io
 	SLOW_DOWN_IO; }
 
 #define __IN1(t,s) \
-extern inline t __in##s(unsigned int port) { t _v;
+static inline t __in##s(unsigned int port) { t _v;
 
 /*
  * Required nops will be inserted by the assembler
@@ -283,7 +283,7 @@ __IN1(t,s##_p) __IN2(m) : "=r" (_v) : "i" (0), "r" (mips_io_port_base+port)); SL
 __IN1(t,s##c_p) __IN2(m) : "=r" (_v) : "ir" (port), "r" (mips_io_port_base)); SLOW_DOWN_IO; return __ioswab##w(_v); }
 
 #define __INS1(s) \
-extern inline void __ins##s(unsigned int port, void * addr, unsigned long count) {
+static inline void __ins##s(unsigned int port, void * addr, unsigned long count) {
 
 #define __INS2(m) \
 if (count) \
@@ -311,7 +311,7 @@ __INS1(s##c) __INS2(m) \
 	: "$1");}
 
 #define __OUTS1(s) \
-extern inline void __outs##s(unsigned int port, const void * addr, unsigned long count) {
+static inline void __outs##s(unsigned int port, const void * addr, unsigned long count) {
 
 #define __OUTS2(m) \
 if (count) \
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions
  2013-01-16 12:39 [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Gabor Juhos
  2013-01-16 12:39 ` [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline' Gabor Juhos
@ 2013-01-22 20:50 ` Daniel Schwierzeck
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2013-01-22 20:50 UTC (permalink / raw)
  To: u-boot

2013/1/16 Gabor Juhos <juhosg@openwrt.org>:
> All other IO accessor functions are using the
> 'inline' directive. Use that also for the __in*s
> to make it consistent with the other variants.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
>
> ---
> NOTE: checkpatch.pl throwns an error for the patch:
>
>   0001-MIPS-use-inline-directive-for-__in-s-functions.patch:24: ERROR: open brace '{' following function declarations go on the next line
>   total: 1 errors, 0 warnings, 8 lines checked
>
> However that error is already present if the
> 'arch/mips/include/asm/io.h' file is checked
> with checkpatch.pl. The cleanup should be
> done in a separare patch.
> ---
>  arch/mips/include/asm/io.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

applied to u-boot-mips/master, thanks

-- 
Best regards,
Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline'
  2013-01-16 12:39 ` [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline' Gabor Juhos
@ 2013-01-22 20:50   ` Daniel Schwierzeck
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2013-01-22 20:50 UTC (permalink / raw)
  To: u-boot

2013/1/16 Gabor Juhos <juhosg@openwrt.org>:
> The currently used 'extern inline' directive causes
> the following compiler warnings if CONFIG_SWAP_IO_SPACE
> is defined:
>
>   <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc' which is not static [enabled by default]
>   <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl' which is not static [enabled by default]
>   <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc' which is not static [enabled by default]
>   <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw' which is not static [enabled by default]
>   <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc' which is not static [enabled by default]
>   <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl' which is not static [enabled by default]
>   <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw_p' which is not static [enabled by default]
>   <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc' which is not static [enabled by default]
>   <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw' which is not static [enabled by default]
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
>
> ---
> NOTE: checkpatch.pl throwns some errors/warnings for the patch:
>
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:42: ERROR: open brace '{' following function declarations go on the next line
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:51: ERROR: open brace '{' following function declarations go on the next line
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: WARNING: line over 80 characters
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: ERROR: "foo * bar" should be "foo *bar"
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:60: ERROR: open brace '{' following function declarations go on the next line
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: WARNING: line over 80 characters
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: ERROR: "foo * bar" should be "foo *bar"
>   0002-MIPS-convert-IO-port-accessor-functions-to-static-in.patch:69: ERROR: open brace '{' following function declarations go on the next line
>
> However those errors are already present if the
> 'arch/mips/include/asm/io.h' file is checked
> with checkpatch.pl. The cleanup should be done
> in a separare patch.
> ---
>  arch/mips/include/asm/io.h |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

applied to u-boot-mips/master, thanks

-- 
Best regards,
Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-22 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 12:39 [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Gabor Juhos
2013-01-16 12:39 ` [U-Boot] [PATCH 2/2] MIPS: convert IO port accessor functions to 'static inline' Gabor Juhos
2013-01-22 20:50   ` Daniel Schwierzeck
2013-01-22 20:50 ` [U-Boot] [PATCH 1/2] MIPS: use inline directive for __in*s functions Daniel Schwierzeck

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.