Skip to contentSkip to conversation

add missing include in lib/rational.c

PATCH In review Sascha Hauer 4 participants 4 messages Oct 8, 2009 – Dec 22, 2009 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add missing include in lib/rational.c

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

---
 lib/rational.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/rational.c +1 -0
index b3c099b..3ed247b 100644
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
Signature · 8 lines
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 |
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Sascha Hauer

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

Quoted 18 lines
---
 lib/rational.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/rational.c +1 -0
index b3c099b..3ed247b 100644
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
Signature · 1 line
1.6.4.3
Acked-by on v1 1/1
#2 lore raw
In reply to Sascha Hauer
Quoted 10 lines · Sascha Hauer

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.

Quoted 2 lines
Quoted 26 lines
---
 lib/rational.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/rational.c +1 -0
index b3c099b..3ed247b 100644
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
Signature · 8 lines
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 |
Signature · 6 lines
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
#3 lore raw

PATCH 1/1 add missing include in lib/rational.c

From: Sascha Hauer <[email protected]>

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

---
Hi,

Quoted 8 lines · Oskar Schirmer
Quoted 6 lines

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(-)
lib/rational.c +1 -0
index b3c099b..3ed247b 100644
@@ -7,6 +7,7 @@
  */
 
 #include <linux/rational.h>
+#include <linux/module.h>
 
 /*
  * calculate best rational approximation for a given fraction
Signature · 1 line
1.6.5.2