gcc4 fixes for sn2
PATCH 1/1 gcc4 fixes for sn2
This patch is needed since "warning: use of cast expressions as lvalues is deprecated" turned into an error in gcc4. We can use the convenience macros for read access and explicit assignments for initialization. I thought about using Alexandre's fixes, but this seemed a little simpler.
Signed-off-by Jesse Barnes <[email protected]>
Thanks,
Jesse
===== arch/ia64/sn/kernel/io_init.c 1.7 vs edited =====
arch/ia64/sn/kernel/io_init.c +3 -3
@@ -201,7 +201,7 @@struct pci_dev *host_pci_dev;int status =0 ; -SN_PCIDEV_INFO (dev) =kmalloc (sizeof (struct pcidev_info ),GFP_KERNEL ); + dev->sysdata =kmalloc (sizeof (struct pcidev_info ),GFP_KERNEL );if (SN_PCIDEV_INFO (dev) <=0 )BUG ();/* Cannot afford to run out of memory */ memset (SN_PCIDEV_INFO (dev),0 ,sizeof (struct pcidev_info ));
@@ -309,8 +309,8 @@* after this point. */ -PCI_CONTROLLER (bus) = controller; -SN_PCIBUS_BUSSOFT (bus) = provider_soft; + bus->sysdata = controller; +PCI_CONTROLLER (bus)->platform_data = provider_soft; nasid =NASID_GET (SN_PCIBUS_BUSSOFT (bus)->bs_base); cnode =nasid_to_cnodeid (nasid);