Skip to contentSkip to conversation

IPMI: fix devinit placement

PATCH In review Randy.Dunlap 2 participants 3 messages Apr 12, 2006 – Apr 13, 2006 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPMI: fix devinit placement

From: Randy Dunlap <[email protected]>

gcc complains about __devinit in the wrong location:
drivers/char/ipmi/ipmi_si_intf.c:2205: warning: '__section__' attribute does not apply to types

---
 drivers/char/ipmi/ipmi_si_intf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +2 -2
@@ -2198,11 +2198,11 @@ static inline void wait_for_timer_and_th
 	}
 }
 
-static struct ipmi_default_vals
+static __devinit struct ipmi_default_vals
 {
 	int type;
 	int port;
-} __devinit ipmi_defaults[] =
+} ipmi_defaults[] =
 {
 	{ .type = SI_KCS, .port = 0xca2 },
 	{ .type = SI_SMIC, .port = 0xca9 },

---

#1 lore raw

Looks fine to me. Thanks.

-Corey

Quoted 31 lines · Randy.Dunlap

From: Randy Dunlap <[email protected]>

gcc complains about __devinit in the wrong location:
drivers/char/ipmi/ipmi_si_intf.c:2205: warning: '__section__' attribute does not apply to types

---
drivers/char/ipmi/ipmi_si_intf.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +2 -3
@@ -2198,11 +2198,11 @@ static inline void wait_for_timer_and_th
 	}
 }
 
-static struct ipmi_default_vals
+static __devinit struct ipmi_default_vals
 {
 	int type;
 	int port;
-} __devinit ipmi_defaults[] =
+} ipmi_defaults[] =
 {
 	{ .type = SI_KCS, .port = 0xca2 },
 	{ .type = SI_SMIC, .port = 0xca9 },
 
 
---
#2 lore raw

PATCH 1/1 IPMI: fix devinit placement (take 2)

In reply to Randy.Dunlap

From: Randy Dunlap <[email protected]>

gcc complains about __devinit in the wrong location:
drivers/char/ipmi/ipmi_si_intf.c:2205: warning: '__section__' attribute does not apply to types

Actually for data it should be __devinitdata instead of __devinit. Otherwise it causes another gcc section mismatch error.

---
 drivers/char/ipmi/ipmi_si_intf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +2 -2
@@ -2198,11 +2198,11 @@ static inline void wait_for_timer_and_th
 	}
 }
 
-static struct ipmi_default_vals
+static __devinitdata struct ipmi_default_vals
 {
 	int type;
 	int port;
-} __devinit ipmi_defaults[] =
+} ipmi_defaults[] =
 {
 	{ .type = SI_KCS, .port = 0xca2 },
 	{ .type = SI_SMIC, .port = 0xca9 },

---