public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add missing include in lib/rational.c
@ 2009-10-08  7:54 Sascha Hauer
  2009-10-08  8:39 ` WANG Cong
  2009-10-08 15:30 ` Oskar Schirmer
  0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2009-10-08  7:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Oskar Schirmer


Hi,

Here is a little patch to fix a compiler warning

fixes:

lib/rational.c:62: warning: data definition has no type or storage class
lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
lib/rational.c:62: warning: parameter names (without types) in function declaration

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 lib/rational.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/rational.c b/lib/rational.c
index b3c099b..3ed247b 100644
--- a/lib/rational.c
+++ b/lib/rational.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
-- 
1.6.4.3


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] add missing include in lib/rational.c
  2009-10-08  7:54 [PATCH] add missing include in lib/rational.c Sascha Hauer
@ 2009-10-08  8:39 ` WANG Cong
  2009-10-08 15:30 ` Oskar Schirmer
  1 sibling, 0 replies; 4+ messages in thread
From: WANG Cong @ 2009-10-08  8:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-kernel, Oskar Schirmer

Sascha Hauer <s.hauer@pengutronix.de> writes:

> Hi,
>
> Here is a little patch to fix a compiler warning
>
> fixes:
>
> lib/rational.c:62: warning: data definition has no type or storage class
> lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
> lib/rational.c:62: warning: parameter names (without types) in function declaration
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>

> ---
>  lib/rational.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/rational.c b/lib/rational.c
> index b3c099b..3ed247b 100644
> --- a/lib/rational.c
> +++ b/lib/rational.c
> @@ -7,6 +7,7 @@
>   */
>  
>  #include <linux/rational.h>
> +#include <linux/module.h>
>  
>  /*
>   * calculate best rational approximation for a given fraction
> -- 
> 1.6.4.3

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

* Re: [PATCH] add missing include in lib/rational.c
  2009-10-08  7:54 [PATCH] add missing include in lib/rational.c Sascha Hauer
  2009-10-08  8:39 ` WANG Cong
@ 2009-10-08 15:30 ` Oskar Schirmer
  2009-12-22 16:11   ` Uwe Kleine-König
  1 sibling, 1 reply; 4+ messages in thread
From: Oskar Schirmer @ 2009-10-08 15:30 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-kernel, Oskar Schirmer

On Thu, Oct 08, 2009 at 09:54:03 +0200, Sascha Hauer wrote:
> 
> Hi,
> 
> Here is a little patch to fix a compiler warning
> 
> fixes:
> 
> lib/rational.c:62: warning: data definition has no type or storage class
> lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
> lib/rational.c:62: warning: parameter names (without types) in function declaration

Oh yes, we didnt use it with modules up to now.
Thank You for the fix.

> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Acked-by: Oskar Schirmer <os@emlix.com>

> ---
>  lib/rational.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/rational.c b/lib/rational.c
> index b3c099b..3ed247b 100644
> --- a/lib/rational.c
> +++ b/lib/rational.c
> @@ -7,6 +7,7 @@
>   */
>  
>  #include <linux/rational.h>
> +#include <linux/module.h>
>  
>  /*
>   * calculate best rational approximation for a given fraction
> -- 
> 1.6.4.3
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 

-- 
oskar schirmer, emlix gmbh, http://www.emlix.com
fon +49 551 30664-0, fax -11, bahnhofsallee 1b, 37081 göttingen, germany
sitz der gesellschaft: göttingen, amtsgericht göttingen hr b 3160
geschäftsführer: dr. uwe kracke, ust-idnr.: de 205 198 055

emlix - your embedded linux partner

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

* [PATCH] add missing include in lib/rational.c
  2009-10-08 15:30 ` Oskar Schirmer
@ 2009-12-22 16:11   ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2009-12-22 16:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Oskar Schirmer, Andrew Morton

From: Sascha Hauer <s.ha...@pengutronix.de>

This fixes:

lib/rational.c:62: warning: data definition has no type or storage class
lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
lib/rational.c:62: warning: parameter names (without types) in function declaration

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
Hi,

Oskar Schirmer wrote:
> > lib/rational.c:62: warning: data definition has no type or storage
> > class
> > lib/rational.c:62: warning: type defaults to 'int' in declaration of
> > 'EXPORT_SYMBOL'
> > lib/rational.c:62: warning: parameter names (without types) in
> > function declaration
>
> Oh yes, we didnt use it with modules up to now.
Note this has nothing to do if the symbol is used in modules or not.
It's just that EXPORT_SYMBOL (which publishes the symbol to the module
linker).  I havn't checked, but I assume the compiler interprets

	EXPORT_SYMBOL(rational_best_approximation);

just as declaration of a function EXPORT_SYMBOL and doesn't generate the
needed magic to actually export rational_best_approximation.

Best regards
Uwe
---
 lib/rational.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/rational.c b/lib/rational.c
index b3c099b..3ed247b 100644
--- a/lib/rational.c
+++ b/lib/rational.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
-- 
1.6.5.2


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

end of thread, other threads:[~2009-12-22 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08  7:54 [PATCH] add missing include in lib/rational.c Sascha Hauer
2009-10-08  8:39 ` WANG Cong
2009-10-08 15:30 ` Oskar Schirmer
2009-12-22 16:11   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox