diff mbox

[1/2] SGI hotplug: fix build failure

Message ID 4A6D1982.80307@jp.fujitsu.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Kenji Kaneshige July 27, 2009, 3:05 a.m. UTC
The commit bd3d99c17039fd05a29587db3f4a180c48da115a ("PCI: Remove
untested Electromechanical Interlock (EMI) support in pciehp."), which
removes the definition of "struct hotplug_slot_attr", broke SGI
hotplug driver. By this commit, we get the following compile error.


drivers/pci/hotplug/sgi_hotplug.c:106: error: variable 'sn_slot_path_attr' has initializer but incomplete type
drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'attr' specified in initializer
drivers/pci/hotplug/sgi_hotplug.c:106: error: extra brace group at end of initializer
drivers/pci/hotplug/sgi_hotplug.c:106: error: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'show' specified in initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hp_destroy':
drivers/pci/hotplug/sgi_hotplug.c:203: error: invalid use of undefined type 'struct hotplug_slot_attribute'
drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hotplug_slot_register':
drivers/pci/hotplug/sgi_hotplug.c:655: error: invalid use of undefined type 'struct hotplug_slot_attribute'


This patch fixes this regression by adding the definition of struct
hotplug_slot_attr into sgi_hotplug.c.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 drivers/pci/hotplug/sgi_hotplug.c |    6 ++++++
 1 file changed, 6 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Barnes July 28, 2009, 4:56 p.m. UTC | #1
On Mon, 27 Jul 2009 12:05:38 +0900
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:

> The commit bd3d99c17039fd05a29587db3f4a180c48da115a ("PCI: Remove
> untested Electromechanical Interlock (EMI) support in pciehp."), which
> removes the definition of "struct hotplug_slot_attr", broke SGI
> hotplug driver. By this commit, we get the following compile error.
> 
> 
> drivers/pci/hotplug/sgi_hotplug.c:106: error: variable
> 'sn_slot_path_attr' has initializer but incomplete type
> drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'attr'
> specified in initializer drivers/pci/hotplug/sgi_hotplug.c:106:
> error: extra brace group at end of initializer
> drivers/pci/hotplug/sgi_hotplug.c:106: error: (near initialization
> for 'sn_slot_path_attr') drivers/pci/hotplug/sgi_hotplug.c:106:
> warning: excess elements in struct initializer
> drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization
> for 'sn_slot_path_attr') drivers/pci/hotplug/sgi_hotplug.c:106:
> error: unknown field 'show' specified in initializer
> drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in
> struct initializer drivers/pci/hotplug/sgi_hotplug.c:106: warning:
> (near initialization for 'sn_slot_path_attr')
> drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hp_destroy':
> drivers/pci/hotplug/sgi_hotplug.c:203: error: invalid use of
> undefined type 'struct hotplug_slot_attribute'
> drivers/pci/hotplug/sgi_hotplug.c: In function
> 'sn_hotplug_slot_register': drivers/pci/hotplug/sgi_hotplug.c:655:
> error: invalid use of undefined type 'struct hotplug_slot_attribute'
> 
> 
> This patch fixes this regression by adding the definition of struct
> hotplug_slot_attr into sgi_hotplug.c.
> 
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> 
> ---
>  drivers/pci/hotplug/sgi_hotplug.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 

Applied these two to linux-next for now, thanks.
Jesse Barnes Aug. 7, 2009, 5:37 p.m. UTC | #2
On Tue, 28 Jul 2009 09:56:46 -0700
Jesse Barnes <jesse.barnes@intel.com> wrote:

> On Mon, 27 Jul 2009 12:05:38 +0900
> Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:
> 
> > The commit bd3d99c17039fd05a29587db3f4a180c48da115a ("PCI: Remove
> > untested Electromechanical Interlock (EMI) support in pciehp."),
> > which removes the definition of "struct hotplug_slot_attr", broke
> > SGI hotplug driver. By this commit, we get the following compile
> > error.
> > 
> > 
> > drivers/pci/hotplug/sgi_hotplug.c:106: error: variable
> > 'sn_slot_path_attr' has initializer but incomplete type
> > drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'attr'
> > specified in initializer drivers/pci/hotplug/sgi_hotplug.c:106:
> > error: extra brace group at end of initializer
> > drivers/pci/hotplug/sgi_hotplug.c:106: error: (near initialization
> > for 'sn_slot_path_attr') drivers/pci/hotplug/sgi_hotplug.c:106:
> > warning: excess elements in struct initializer
> > drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization
> > for 'sn_slot_path_attr') drivers/pci/hotplug/sgi_hotplug.c:106:
> > error: unknown field 'show' specified in initializer
> > drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in
> > struct initializer drivers/pci/hotplug/sgi_hotplug.c:106: warning:
> > (near initialization for 'sn_slot_path_attr')
> > drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hp_destroy':
> > drivers/pci/hotplug/sgi_hotplug.c:203: error: invalid use of
> > undefined type 'struct hotplug_slot_attribute'
> > drivers/pci/hotplug/sgi_hotplug.c: In function
> > 'sn_hotplug_slot_register': drivers/pci/hotplug/sgi_hotplug.c:655:
> > error: invalid use of undefined type 'struct hotplug_slot_attribute'
> > 
> > 
> > This patch fixes this regression by adding the definition of struct
> > hotplug_slot_attr into sgi_hotplug.c.
> > 
> > Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> > 
> > ---
> >  drivers/pci/hotplug/sgi_hotplug.c |    6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> 
> Applied these two to linux-next for now, thanks.

Pulled these over to for-linus now that Mike has tested.  I'll send
them to Linus in the next few days.

Thanks,
diff mbox

Patch

Index: 20090721/drivers/pci/hotplug/sgi_hotplug.c
===================================================================
--- 20090721.orig/drivers/pci/hotplug/sgi_hotplug.c
+++ 20090721/drivers/pci/hotplug/sgi_hotplug.c
@@ -103,6 +103,12 @@  static ssize_t path_show (struct hotplug
 	return retval;
 }
 
+struct hotplug_slot_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct hotplug_slot *, char *);
+	ssize_t (*store)(struct hotplug_slot *, const char *, size_t);
+};
+
 static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
 
 static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)