Skip to contentSkip to conversation

drivers: input: mouse: Use "static inline" instead of "inline" in "lifebook.h"

PATCH In review Chen Gang 1 participant 2 messages Nov 9, 2014

Subsystems (2)
lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 drivers: input: mouse: Use "static inline" instead of "inline" in "lifebook.h"

For inline function in header file, better to be "static inline", or may cause building break under the latest upstream gcc (although, probably, it should be the gcc's issue).

The related error (with allmodconfig under tile):

MODPOST 4002 modules
ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!

---
 drivers/input/mouse/lifebook.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/lifebook.h +3 -3
index 4c4326c..0baf02a 100644
@@ -16,14 +16,14 @@ void lifebook_module_init(void);
 int lifebook_detect(struct psmouse *psmouse, bool set_properties);
 int lifebook_init(struct psmouse *psmouse);
 #else
-inline void lifebook_module_init(void)
+static inline void lifebook_module_init(void)
 {
 }
-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
+static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
 {
 	return -ENOSYS;
 }
-inline int lifebook_init(struct psmouse *psmouse)
+static inline int lifebook_init(struct psmouse *psmouse)
 {
 	return -ENOSYS;
 }
Signature · 1 line
1.9.3
author
#1 lore raw

After this patch, our tile can pass allmodconfig building. :-)

Thanks.

Quoted 37 lines · Chen Gang

For inline function in header file, better to be "static inline", or may cause building break under the latest upstream gcc (although, probably, it should be the gcc's issue).

The related error (with allmodconfig under tile):

MODPOST 4002 modules
ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!

---
 drivers/input/mouse/lifebook.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/lifebook.h +3 -3
index 4c4326c..0baf02a 100644
@@ -16,14 +16,14 @@ void lifebook_module_init(void);
 int lifebook_detect(struct psmouse *psmouse, bool set_properties);
 int lifebook_init(struct psmouse *psmouse);
 #else
-inline void lifebook_module_init(void)
+static inline void lifebook_module_init(void)
 {
 }
-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
+static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
 {
 	return -ENOSYS;
 }
-inline int lifebook_init(struct psmouse *psmouse)
+static inline int lifebook_init(struct psmouse *psmouse)
 {
 	return -ENOSYS;
 }
Signature · 3 lines
Chen Gang

Open share and attitude like air water and life which God blessed