fix section mismatches
cover fix section mismatches
Following patch set fix all section mismatches for a allnoconfig, allyesconfig, defconfig build of x86 - 64bit. The builds were all done with CONFIG_DEBUG_SECTION_MISMATCH enabled.
The fixes are spread all over the tree but none of them are invasive in nature.
diffstat for the full patchset reports:
33 files changed, 58 insertions(+), 58 deletions(-)
A total of 66 section mismatch warnings are fixed.
I have for each patch tried to identify the relevant persons and added them to Cc.
Andrew - can we suck it all into -mm or do you have other preferences? I expect over time the respective maintainers will pick up the patches, review them and apply them. (Call me naive).
Patches will follow and the full diff is included below for easier review.
And before anyone ask... I started out with x86 64bit but I plan to take a look at other architectures when these are in mainline. But do not wait for me - please fix the warning yourself.
Sam
Sam Ravnborg (27):
serial: silence section mismatch warnings in 8250_pci
rtc: silence section mismatch warning in rtc-test
pcmcia: silence section mismatch warnings from class_interface variables
pcmcia: silence section mismatch warnings from pci_driver variables
cpu: fix section mismatch warnings in hotcpu_register
cpu: fix section mismatch warning in unregister_cpu_notifier
cpu: fix section mismatch warnings in *cpu_down
cpu: fix section mismatch warning in reference to register_cpu_notifier
x86: fix section mismatch warning in setup_64.c:nearby_node
x86: fix section mismatch in setup_64.c:srat_detect_node
acpi: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify
x86: fix section mismatch warning in topology.c:arch_register_cpu drivers/base/cpu: fix section mismatch in cpu.c:store_online
hwmon: fix section mismatch in coretemp
cpufreq: fix section mismatch warnings
scsi: fix section mismatch in aic94xx
acer-wmi: fix section mismatch warnings
video: fix section mismatch warnings in uvesafb
tpm: fix section mismatch warning
[ALSA] caiaq - fix section mismatch warning
x86: fix section mismatch in srat_64.c:reserve_hotadd
x86: fix section mismatch in head_64.S:initial_code
x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit
pcmcia: annotate cb_alloc with __ref
pci: fix section mismatch warning in pci_scan_child_bus
acpi: fix section mismatch in acpi_pci_root_add
[ALSA] hdsp - fix section mismatch warnings
arch/x86/kernel/head_64.S | 2 +- arch/x86/kernel/setup_64.c | 4 ++-- arch/x86/kernel/topology.c | 2 +- arch/x86/mm/srat_64.c | 2 +- arch/x86/pci/common.c | 2 +- drivers/acpi/pci_root.c | 2 +- drivers/acpi/processor_core.c | 4 ++-- drivers/base/cpu.c | 4 ++-- drivers/char/tpm/tpm_nsc.c | 2 +- drivers/cpufreq/cpufreq.c | 2 +- drivers/cpufreq/cpufreq_stats.c | 2 +- drivers/hwmon/coretemp.c | 4 ++-- drivers/misc/acer-wmi.c | 6 +++--- drivers/pci/hotplug-pci.c | 2 +- drivers/pci/hotplug/acpiphp_glue.c | 2 +- drivers/pci/hotplug/cpci_hotplug_pci.c | 2 +- drivers/pci/hotplug/pciehp_pci.c | 2 +- drivers/pci/hotplug/shpchp_pci.c | 2 +- drivers/pci/probe.c | 8 ++++---- drivers/pcmcia/cardbus.c | 2 +- drivers/pcmcia/ds.c | 2 +- drivers/pcmcia/i82092.c | 6 +++--- drivers/pcmcia/pd6729.c | 6 +++--- drivers/pcmcia/rsrc_nonstatic.c | 2 +- drivers/pcmcia/socket_sysfs.c | 2 +- drivers/rtc/rtc-test.c | 8 ++++---- drivers/scsi/aic94xx/aic94xx_init.c | 4 ++-- drivers/serial/8250_pci.c | 2 +- drivers/video/uvesafb.c | 2 +- include/linux/cpu.h | 2 +- kernel/cpu.c | 10 +++++----- sound/pci/rme9652/hdsp.c | 6 +++--- sound/usb/caiaq/caiaq-device.c | 6 +++--- 33 files changed, 58 insertions(+), 58 deletions(-)
arch/x86/kernel/head_64.S +1 -1
@@ -250,7 +250,7 @@ ENTRY(secondary_startup_64) lretq /* SMP bootup changes these two */ - __CPUINITDATA + __REFDATA .align 8 ENTRY(initial_code) .quad x86_64_start_kernel
arch/x86/kernel/setup_64.c +2 -2
@@ -518,7 +518,7 @@ static void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) }#ifdef CONFIG_NUMA -static int nearby_node (int apicid) +static int __cpuinit nearby_node (int apicid) {int i, node;
@@ -791,7 +791,7 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)return 1 ; } -static void srat_detect_node (void ) +static void __cpuinit srat_detect_node (void ) {#ifdef CONFIG_NUMA unsigned node;
arch/x86/kernel/topology.c +1 -1
@@ -34,7 +34,7 @@ static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);#ifdef CONFIG_HOTPLUG_CPU -int arch_register_cpu (int num) +int __ref arch_register_cpu (int num) {/* * CPU0 cannot be offlined due to several
arch/x86/mm/srat_64.c +1 -1
@@ -166,7 +166,7 @@ static inline int save_add_info(void) {return 0;}* Both SPARSE and RESERVE need nodes_add information. * This code supports one contiguous hot add area per node. */ -static int reserve_hotadd (int node,unsigned long start,unsigned long end) +static int __init reserve_hotadd (int node,unsigned long start,unsigned long end) {unsigned long s_pfn = start >>PAGE_SHIFT ;unsigned long e_pfn = end >>PAGE_SHIFT ;
arch/x86/pci/common.c +1 -1
@@ -541,7 +541,7 @@ void pcibios_disable_device (struct pci_dev *dev)pcibios_disable_irq (dev); } -struct pci_bus *pci_scan_bus_with_sysdata (int busno) +struct pci_bus *__devinit pci_scan_bus_with_sysdata (int busno) {struct pci_bus *bus =NULL ;struct pci_sysdata *sd;
drivers/acpi/pci_root.c +1 -1
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) } } -static int acpi_pci_root_add (struct acpi_device *device) +static int __devinit acpi_pci_root_add (struct acpi_device *device) {int result =0 ;struct acpi_pci_root *root =NULL ;
drivers/acpi/processor_core.c +2 -2
@@ -881,8 +881,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)return 0 ; } -static void -acpi_processor_hotplug_notify (acpi_handle handle,u32 event,void *data) +static void __ref acpi_processor_hotplug_notify (acpi_handle handle, +u32 event,void *data) {struct acpi_processor *pr;struct acpi_device *device =NULL ;
drivers/base/cpu.c +2 -2
@@ -28,7 +28,7 @@ static ssize_t show_online(struct sys_device *dev, char *buf)return sprintf (buf,"%u\n" , !!cpu_online (cpu->sysdev.id)); } -static ssize_t store_online (struct sys_device *dev,const char *buf, +static ssize_t __ref store_online (struct sys_device *dev,const char *buf,size_t count) { struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -55,7 +55,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, } static SYSDEV_ATTR(online, 0644, show_online, store_online); -static void __devinit register_cpu_control (struct cpu *cpu) +static void __cpuinit register_cpu_control (struct cpu *cpu) {sysdev_create_file (&cpu->sysdev, &attr_online); }
drivers/char/tpm/tpm_nsc.c +1 -1
@@ -264,7 +264,7 @@ static const struct tpm_vendor_specific tpm_nsc = {static struct platform_device *pdev =NULL ; -static void __devexit tpm_nsc_remove(struct device *dev) +static void tpm_nsc_remove (struct device *dev) {struct tpm_chip *chip =dev_get_drvdata (dev);if ( chip ) {
drivers/cpufreq/cpufreq.c +1 -1
@@ -1783,7 +1783,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,return NOTIFY_OK ; } -static struct notifier_block __cpuinitdata cpufreq_cpu_notifier = +static struct notifier_block __refdata cpufreq_cpu_notifier = { .notifier_call = cpufreq_cpu_callback, };
drivers/cpufreq/cpufreq_stats.c +1 -1
@@ -323,7 +323,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,return NOTIFY_OK ; } -static struct notifier_block cpufreq_stat_cpu_notifier__cpuinitdata = +static struct notifier_block cpufreq_stat_cpu_notifier__refdata = { .notifier_call = cpufreq_stat_cpu_callback, };
drivers/hwmon/coretemp.c +2 -2
@@ -330,7 +330,7 @@ static void coretemp_device_remove(unsigned int cpu)mutex_unlock (&pdev_list_mutex); } -static int coretemp_cpu_callback (struct notifier_block *nfb, +static int __cpuinit coretemp_cpu_callback (struct notifier_block *nfb,unsigned long action,void *hcpu) {unsigned int cpu = (unsigned long ) hcpu;
@@ -347,7 +347,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block coretemp_cpu_notifier = { +static struct notifier_block coretemp_cpu_notifier__refdata = { .notifier_call = coretemp_cpu_callback, };#endif /* !CONFIG_HOTPLUG_CPU */
drivers/misc/acer-wmi.c +3 -3
@@ -756,7 +756,7 @@ static struct led_classdev mail_led = { .brightness_set = mail_led_set, }; -static int __init acer_led_init (struct device *dev) +static int __devinit acer_led_init (struct device *dev) {return led_classdev_register (dev, &mail_led); }
@@ -789,7 +789,7 @@ static struct backlight_ops acer_bl_ops = { .update_status = update_bl_status, }; -static int __init acer_backlight_init (struct device *dev) +static int __devinit acer_backlight_init (struct device *dev) {struct backlight_device *bd;
@@ -808,7 +808,7 @@ static int __init acer_backlight_init(struct device *dev)return 0 ; } -static void __exit acer_backlight_exit(void) +static void acer_backlight_exit (void ) {backlight_device_unregister (acer_backlight_device); }
drivers/pci/hotplug-pci.c +1 -1
@@ -4,7 +4,7 @@#include "pci.h" -unsigned int pci_do_scan_bus (struct pci_bus *bus) +unsigned int __devinit pci_do_scan_bus (struct pci_bus *bus) {unsigned int max;
drivers/pci/hotplug/acpiphp_glue.c +1 -1
@@ -1085,7 +1085,7 @@ static int acpiphp_bus_trim(acpi_handle handle)* This function should be called per *physical slot*, * not per each slot object in ACPI namespace. */ -static int enable_device (struct acpiphp_slot *slot) +static int __ref enable_device (struct acpiphp_slot *slot) {struct pci_dev *dev;struct pci_bus *bus = slot->bridge->pci_bus;
drivers/pci/hotplug/cpci_hotplug_pci.c +1 -1
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)* Device configuration functions */ -int cpci_configure_slot (struct slot * slot) +int __ref cpci_configure_slot (struct slot * slot) {struct pci_bus *parent;int fn;
drivers/pci/hotplug/pciehp_pci.c +1 -1
@@ -167,7 +167,7 @@ static void program_fw_provided_values(struct pci_dev *dev) } } -static int pciehp_add_bridge (struct pci_dev *dev) +static int __ref pciehp_add_bridge (struct pci_dev *dev) {struct pci_bus *parent = dev->bus;int pass, busnr, start = parent->secondary;
drivers/pci/hotplug/shpchp_pci.c +1 -1
@@ -96,7 +96,7 @@ static void program_fw_provided_values(struct pci_dev *dev) } } -int shpchp_configure_device (struct slot *p_slot) +int __ref shpchp_configure_device (struct slot *p_slot) {struct pci_dev *dev;struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate;
drivers/pci/probe.c +4 -4
@@ -286,7 +286,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) } } -void pci_read_bridge_bases (struct pci_bus *child) +void __devinit pci_read_bridge_bases (struct pci_bus *child) {struct pci_dev *dev = child->self;u8 io_base_lo, io_limit_lo;
@@ -472,7 +472,7 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)* them, we proceed to assigning numbers to the remaining buses in * order to avoid overlaps between old and new bus numbers. */ -int pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) +int __devinit pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) {struct pci_bus *child;int is_cardbus = (dev->hdr_type ==PCI_HEADER_TYPE_CARDBUS );
@@ -1008,7 +1008,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)return nr; } -unsigned int pci_scan_child_bus (struct pci_bus *bus) +unsigned int __devinit pci_scan_child_bus (struct pci_bus *bus) {unsigned int devfn, pass, max = bus->secondary;struct pci_dev *dev;
@@ -1116,7 +1116,7 @@ err_out:return NULL ; } -struct pci_bus *pci_scan_bus_parented (struct device *parent, +struct pci_bus *__devinit pci_scan_bus_parented (struct device *parent,int bus,struct pci_ops *ops,void *sysdata) {struct pci_bus *b;
drivers/pcmcia/cardbus.c +1 -1
@@ -209,7 +209,7 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq) } } -int cb_alloc (struct pcmcia_socket * s) +int __ref cb_alloc (struct pcmcia_socket * s) {struct pci_bus *bus = s->cb_dev->subordinate;struct pci_dev *dev;
drivers/pcmcia/ds.c +1 -1
@@ -1520,7 +1520,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,/* the pcmcia_bus_interface is used to handle pcmcia socket devices */ -static struct class_interface pcmcia_bus_interface = { +static struct class_interface pcmcia_bus_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pcmcia_bus_add_socket, .remove_dev = &pcmcia_bus_remove_socket,
drivers/pcmcia/i82092.c +3 -3
@@ -53,7 +53,7 @@ static int i82092aa_socket_resume (struct pci_dev *dev) }#endif -static struct pci_driver i82092aa_pci_drv = { +static struct pci_driver i82092aa_pci_driver = { .name ="i82092aa" , .id_table = i82092aa_pci_ids, .probe = i82092aa_pci_probe,
@@ -709,13 +709,13 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_static int i82092aa_module_init (void ) { -return pci_register_driver (&i82092aa_pci_drv); +return pci_register_driver (&i82092aa_pci_driver); }static void i82092aa_module_exit (void ) {enter ("i82092aa_module_exit" ); -pci_unregister_driver (&i82092aa_pci_drv); +pci_unregister_driver (&i82092aa_pci_driver);if (sockets[0 ].io_base>0 )release_region (sockets[0 ].io_base,2 );leave ("i82092aa_module_exit" );
drivers/pcmcia/pd6729.c +3 -3
@@ -778,7 +778,7 @@ static struct pci_device_id pd6729_pci_ids[] = { };MODULE_DEVICE_TABLE (pci, pd6729_pci_ids); -static struct pci_driver pd6729_pci_drv = { +static struct pci_driver pd6729_pci_driver = { .name ="pd6729" , .id_table = pd6729_pci_ids, .probe = pd6729_pci_probe,
@@ -791,12 +791,12 @@ static struct pci_driver pd6729_pci_drv = {static int pd6729_module_init (void ) { -return pci_register_driver (&pd6729_pci_drv); +return pci_register_driver (&pd6729_pci_driver); }static void pd6729_module_exit (void ) { -pci_unregister_driver (&pd6729_pci_drv); +pci_unregister_driver (&pd6729_pci_driver); }module_init (pd6729_module_init);
drivers/pcmcia/rsrc_nonstatic.c +1 -1
@@ -1045,7 +1045,7 @@ static void __devexit pccard_sysfs_remove_rsrc(struct device *dev,device_remove_file (dev, *attr); } -static struct class_interface pccard_rsrc_interface = { +static struct class_interface pccard_rsrc_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pccard_sysfs_add_rsrc, .remove_dev =__devexit_p (&pccard_sysfs_remove_rsrc),
drivers/pcmcia/socket_sysfs.c +1 -1
@@ -403,7 +403,7 @@ static void __devexit pccard_sysfs_remove_socket(struct device *dev,device_remove_file (dev, *attr); } -struct class_interface pccard_sysfs_interface = { +struct class_interface pccard_sysfs_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pccard_sysfs_add_socket, .remove_dev =__devexit_p (&pccard_sysfs_remove_socket),
drivers/rtc/rtc-test.c +4 -4
@@ -147,7 +147,7 @@ static int __devexit test_remove(struct platform_device *plat_dev)return 0 ; } -static struct platform_driver test_drv = { +static struct platform_driver test_driver = { .probe = test_probe, .remove =__devexit_p (test_remove), .driver = {
@@ -160,7 +160,7 @@ static int __init test_init(void) {int err; -if ((err =platform_driver_register (&test_drv))) +if ((err =platform_driver_register (&test_driver)))return err;if ((test0 =platform_device_alloc ("rtc-test" ,0 )) ==NULL ) {
@@ -191,7 +191,7 @@ exit_free_test0:platform_device_put (test0); exit_driver_unregister: -platform_driver_unregister (&test_drv); +platform_driver_unregister (&test_driver);return err; }
@@ -199,7 +199,7 @@ static void __exit test_exit(void) {platform_device_unregister (test0);platform_device_unregister (test1); -platform_driver_unregister (&test_drv); +platform_driver_unregister (&test_driver); }MODULE_AUTHOR ("Alessandro Zummo <[email protected]>" );
drivers/scsi/aic94xx/aic94xx_init.c +2 -2
@@ -531,10 +531,10 @@ static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)/* The first entry, 0, is used for dynamic ids, the rest for devices * we know about. */ -static struct asd_pcidev_struct { +static const struct asd_pcidev_struct {const char * name;int (*setup)(struct asd_ha_struct *asd_ha); -} asd_pcidev_data[] = { +} asd_pcidev_data[]__devinitconst = {/* Id 0 is used for dynamic ids. */ { .name ="Adaptec AIC-94xx SAS/SATA Host Adapter" , .setup = asd_aic9410_setup
drivers/serial/8250_pci.c +1 -1
@@ -775,7 +775,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,* This list is ordered alphabetically by vendor then device. * Specific entries must come before more generic entries. */ -static struct pci_serial_quirk pci_serial_quirks[] = { +static struct pci_serial_quirk pci_serial_quirks[]__refdata = {/* * ADDI-DATA GmbH communication cards <[email protected]> */
drivers/video/uvesafb.c +1 -1
@@ -44,7 +44,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = {static int mtrr__devinitdata =3 ;/* enable mtrr by default */ static int blank =1 ;/* enable blanking by default */ -static int ypan__devinitdata =1 ;/* 0: scroll, 1: ypan, 2: ywrap */ +static int ypan =1 ;/* 0: scroll, 1: ypan, 2: ywrap */ static int pmi_setpal__devinitdata =1 ;/* use PMI for palette changes */ static int nocrtc__devinitdata ;/* ignore CRTC settings */ static int noedid__devinitdata ;/* don't try DDC transfers */
include/linux/cpu.h +1 -1
@@ -109,7 +109,7 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)extern void get_online_cpus (void );extern void put_online_cpus (void );#define hotcpu_notifier (fn, pri) { \ - static struct notifier_block fn##_nb = \ + static struct notifier_block fn##_nb __cpuinitdata = \ { .notifier_call = fn, .priority = pri }; \ register_cpu_notifier(&fn##_nb); \ }
kernel/cpu.c +5 -5
@@ -136,7 +136,7 @@ static void cpu_hotplug_done(void)mutex_unlock (&cpu_hotplug.lock); }/* Need to know about CPUs going up/down? */ -int __cpuinit register_cpu_notifier (struct notifier_block *nb) +int __ref register_cpu_notifier (struct notifier_block *nb) {int ret;cpu_maps_update_begin ();
@@ -149,7 +149,7 @@ int __cpuinit register_cpu_notifier(struct notifier_block *nb)EXPORT_SYMBOL (register_cpu_notifier); -void unregister_cpu_notifier (struct notifier_block *nb) +void __ref unregister_cpu_notifier (struct notifier_block *nb) {cpu_maps_update_begin ();raw_notifier_chain_unregister (&cpu_chain, nb);
@@ -180,7 +180,7 @@ struct take_cpu_down_param { };/* Take this CPU down. */ -static int take_cpu_down (void *_param) +static int __ref take_cpu_down (void *_param) {struct take_cpu_down_param *param = _param;int err;
@@ -199,7 +199,7 @@ static int take_cpu_down(void *_param) }/* Requires cpu_add_remove_lock to be held */ -static int _cpu_down (unsigned int cpu,int tasks_frozen) +static int __ref _cpu_down (unsigned int cpu,int tasks_frozen) {int err, nr_calls =0 ;struct task_struct *p;
@@ -274,7 +274,7 @@ out_release:return err; } -int cpu_down (unsigned int cpu) +int __ref cpu_down (unsigned int cpu) {int err =0 ;
sound/pci/rme9652/hdsp.c +3 -3
@@ -745,7 +745,7 @@ static int hdsp_get_iobox_version (struct hdsp *hdsp)#ifdef HDSP_FW_LOADER -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp); +static int hdsp_request_fw_loader (struct hdsp *hdsp);#endif static int hdsp_check_for_firmware (struct hdsp *hdsp,int load_on_demand)
@@ -4688,7 +4688,7 @@ static struct snd_pcm_ops snd_hdsp_capture_ops = { .copy = snd_hdsp_capture_copy, }; -static int __devinit snd_hdsp_create_hwdep (struct snd_card *card, +static int snd_hdsp_create_hwdep (struct snd_card *card,struct hdsp *hdsp) {struct snd_hwdep *hw;
@@ -4857,7 +4857,7 @@ static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp#ifdef HDSP_FW_LOADER /* load firmware via hotplug fw loader */ -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp) +static int hdsp_request_fw_loader (struct hdsp *hdsp) {const char *fwfile;const struct firmware *fw;
sound/usb/caiaq/caiaq-device.c +3 -3
@@ -245,7 +245,7 @@ int snd_usb_caiaq_set_auto_msg (struct snd_usb_caiaqdev *dev, tmp, sizeof(tmp)); } -static void setup_card (struct snd_usb_caiaqdev *dev) +static void __devinit setup_card (struct snd_usb_caiaqdev *dev) {int ret;char val[4 ];
@@ -359,7 +359,7 @@ static struct snd_card* create_card(struct usb_device* usb_dev)return card; } -static int init_card (struct snd_usb_caiaqdev *dev) +static int __devinit init_card (struct snd_usb_caiaqdev *dev) {char *c;struct usb_device *usb_dev = dev->chip.dev;
@@ -428,7 +428,7 @@ static int init_card(struct snd_usb_caiaqdev *dev)return 0 ; } -static int snd_probe (struct usb_interface *intf, +static int __devinit snd_probe (struct usb_interface *intf,const struct usb_device_id *id) {int ret;
PATCH 1/27 serial: silence section mismatch warnings in 8250_pci
Fix following warnings:
WARNING: drivers/serial/built-in.o(.data+0x5b8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_ite887x_exit()
WARNING: drivers/serial/built-in.o(.data+0x5e0): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x608): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x658): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x680): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x6a8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x6d0): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x6f8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x720): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x748): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
pci_serial_quirks contains a number of function pointers where the referenced function is annotated __devexit. This is OK so we annotate pci_serial_quirks with __refdata to ignore the __devexit references
--- drivers/serial/8250_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/8250_pci.c +1 -1
@@ -775,7 +775,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,* This list is ordered alphabetically by vendor then device. * Specific entries must come before more generic entries. */ -static struct pci_serial_quirk pci_serial_quirks[] = { +static struct pci_serial_quirk pci_serial_quirks[]__refdata = {/* * ADDI-DATA GmbH communication cards <[email protected]> */
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 2/27 rtc: silence section mismatch warning in rtc-test
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.data+0x253e28): Section mismatch in reference from the variable test_drv to the function .devexit.text:test_remove()
Fix by renaming the platfrom_driver variable from *_drv to *_driver so modpost ignore the reference to an __devexit section.
--- drivers/rtc/rtc-test.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/rtc/rtc-test.c +4 -4
@@ -147,7 +147,7 @@ static int __devexit test_remove(struct platform_device *plat_dev)return 0 ; } -static struct platform_driver test_drv = { +static struct platform_driver test_driver = { .probe = test_probe, .remove =__devexit_p (test_remove), .driver = {
@@ -160,7 +160,7 @@ static int __init test_init(void) {int err; -if ((err =platform_driver_register (&test_drv))) +if ((err =platform_driver_register (&test_driver)))return err;if ((test0 =platform_device_alloc ("rtc-test" ,0 )) ==NULL ) {
@@ -191,7 +191,7 @@ exit_free_test0:platform_device_put (test0); exit_driver_unregister: -platform_driver_unregister (&test_drv); +platform_driver_unregister (&test_driver);return err; }
@@ -199,7 +199,7 @@ static void __exit test_exit(void) {platform_device_unregister (test0);platform_device_unregister (test1); -platform_driver_unregister (&test_drv); +platform_driver_unregister (&test_driver); }MODULE_AUTHOR ("Alessandro Zummo <[email protected]>" );
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 3/27 pcmcia: silence section mismatch warnings from class_interface variables
In reply to Sam RavnborgSilence the following warnings:
WARNING: drivers/pcmcia/built-in.o(.data+0x348): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0x350): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0x6e8): Section mismatch in reference from the variable pcmcia_bus_interface to the function .devinit.text:pcmcia_bus_add_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0xa88): Section mismatch in reference from the variable pccard_rsrc_interface to the function .devinit.text:pccard_sysfs_add_rsrc()
WARNING: drivers/pcmcia/built-in.o(.data+0xa90): Section mismatch in reference from the variable pccard_rsrc_interface to the function .devexit.text:pccard_sysfs_remove_rsrc()
The variables of type class_interface contains references to __devinit and __devexit functions which is OK. Silence warnings by annotating the variables with __refdata.
--- drivers/pcmcia/ds.c | 2 +- drivers/pcmcia/rsrc_nonstatic.c | 2 +- drivers/pcmcia/socket_sysfs.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/pcmcia/ds.c +1 -1
@@ -1520,7 +1520,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,/* the pcmcia_bus_interface is used to handle pcmcia socket devices */ -static struct class_interface pcmcia_bus_interface = { +static struct class_interface pcmcia_bus_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pcmcia_bus_add_socket, .remove_dev = &pcmcia_bus_remove_socket,
drivers/pcmcia/rsrc_nonstatic.c +1 -1
@@ -1045,7 +1045,7 @@ static void __devexit pccard_sysfs_remove_rsrc(struct device *dev,device_remove_file (dev, *attr); } -static struct class_interface pccard_rsrc_interface = { +static struct class_interface pccard_rsrc_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pccard_sysfs_add_rsrc, .remove_dev =__devexit_p (&pccard_sysfs_remove_rsrc),
drivers/pcmcia/socket_sysfs.c +1 -1
@@ -403,7 +403,7 @@ static void __devexit pccard_sysfs_remove_socket(struct device *dev,device_remove_file (dev, *attr); } -struct class_interface pccard_sysfs_interface = { +struct class_interface pccard_sysfs_interface__refdata = { .class = &pcmcia_socket_class, .add_dev = &pccard_sysfs_add_socket, .remove_dev =__devexit_p (&pccard_sysfs_remove_socket),
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 4/27 pcmcia: silence section mismatch warnings from pci_driver variables
In reply to Sam RavnborgSilence following warnings:
WARNING: drivers/pcmcia/built-in.o(.data+0x14e0): Section mismatch in reference from the variable pd6729_pci_drv to the function .devinit.text:pd6729_pci_probe()
WARNING: drivers/pcmcia/built-in.o(.data+0x14e8): Section mismatch in reference from the variable pd6729_pci_drv to the function .devexit.text:pd6729_pci_remove()
WARNING: drivers/pcmcia/built-in.o(.data+0x16c0): Section mismatch in reference from the variable i82092aa_pci_drv to the function .devinit.text:i82092aa_pci_probe()
WARNING: drivers/pcmcia/built-in.o(.data+0x16c8): Section mismatch in reference from the variable i82092aa_pci_drv to the function .devexit.text:i82092aa_pci_remove()
Rename the variables from *_drv to *_driver so modpost ignore the OK references to __devinit/__devexit functions.
--- drivers/pcmcia/i82092.c | 6 +++--- drivers/pcmcia/pd6729.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/pcmcia/i82092.c +3 -3
@@ -53,7 +53,7 @@ static int i82092aa_socket_resume (struct pci_dev *dev) }#endif -static struct pci_driver i82092aa_pci_drv = { +static struct pci_driver i82092aa_pci_driver = { .name ="i82092aa" , .id_table = i82092aa_pci_ids, .probe = i82092aa_pci_probe,
@@ -709,13 +709,13 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_static int i82092aa_module_init (void ) { -return pci_register_driver (&i82092aa_pci_drv); +return pci_register_driver (&i82092aa_pci_driver); }static void i82092aa_module_exit (void ) {enter ("i82092aa_module_exit" ); -pci_unregister_driver (&i82092aa_pci_drv); +pci_unregister_driver (&i82092aa_pci_driver);if (sockets[0 ].io_base>0 )release_region (sockets[0 ].io_base,2 );leave ("i82092aa_module_exit" );
drivers/pcmcia/pd6729.c +3 -3
@@ -778,7 +778,7 @@ static struct pci_device_id pd6729_pci_ids[] = { };MODULE_DEVICE_TABLE (pci, pd6729_pci_ids); -static struct pci_driver pd6729_pci_drv = { +static struct pci_driver pd6729_pci_driver = { .name ="pd6729" , .id_table = pd6729_pci_ids, .probe = pd6729_pci_probe,
@@ -791,12 +791,12 @@ static struct pci_driver pd6729_pci_drv = {static int pd6729_module_init (void ) { -return pci_register_driver (&pd6729_pci_drv); +return pci_register_driver (&pd6729_pci_driver); }static void pd6729_module_exit (void ) { -pci_unregister_driver (&pd6729_pci_drv); +pci_unregister_driver (&pd6729_pci_driver); }module_init (pd6729_module_init);
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 5/27 cpu: fix section mismatch warnings in hotcpu_register
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.data+0x5020): Section mismatch in reference from the variable cpu_vsyscall_notifier_nb.12876 to the function .cpuinit.text:cpu_vsyscall_notifier()
WARNING: vmlinux.o(.data+0x9ce0): Section mismatch in reference from the variable profile_cpu_callback_nb.17654 to the function .devinit.text:profile_cpu_callback()
WARNING: vmlinux.o(.data+0xd380): Section mismatch in reference from the variable workqueue_cpu_callback_nb.15004 to the function .devinit.text:workqueue_cpu_callback()
WARNING: vmlinux.o(.data+0x11d00): Section mismatch in reference from the variable relay_hotcpu_callback_nb.19626 to the function .cpuinit.text:relay_hotcpu_callback()
WARNING: vmlinux.o(.data+0x12970): Section mismatch in reference from the variable cpu_callback_nb.24694 to the function .devinit.text:cpu_callback()
WARNING: vmlinux.o(.data+0x3fee0): Section mismatch in reference from the variable percpu_counter_hotcpu_callback_nb.10903 to the function .cpuinit.text:percpu_counter_hotcpu_callback()
WARNING: vmlinux.o(.data+0x74ce0): Section mismatch in reference from the variable topology_cpu_callback_nb.12506 to the function .cpuinit.text:topology_cpu_callback()
Functions used as argument are by definition only used in HOTPLUG_CPU situations so thay are annotated __cpuinit. Annotate the static variable used by hotcpu_register with __cpuinitdata to match this definition.
--- include/linux/cpu.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/cpu.h +1 -1
@@ -109,7 +109,7 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)extern void get_online_cpus (void );extern void put_online_cpus (void );#define hotcpu_notifier (fn, pri) { \ - static struct notifier_block fn##_nb = \ + static struct notifier_block fn##_nb __cpuinitdata = \ { .notifier_call = fn, .priority = pri }; \ register_cpu_notifier(&fn##_nb); \ }
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 6/27 cpu: fix section mismatch warning in unregister_cpu_notifier
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x75f4e): Section mismatch in reference from the function unregister_cpu_notifier() to the variable .cpuinit.data:cpu_chain
We know that unregister_cpu_notifier is using HOTPLUG_CPU stuff - so ignore these references.
Annotating unregister_cpu_notifier had been another option but this caused far more warnings since not all callers were annotated __cpuinit.
--- kernel/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/cpu.c +1 -1
@@ -149,7 +149,7 @@ int __cpuinit register_cpu_notifier(struct notifier_block *nb)EXPORT_SYMBOL (register_cpu_notifier); -void unregister_cpu_notifier (struct notifier_block *nb) +void __ref unregister_cpu_notifier (struct notifier_block *nb) {cpu_maps_update_begin ();raw_notifier_chain_unregister (&cpu_chain, nb);
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 7/27 cpu: fix section mismatch warnings in *cpu_down
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0x75c8d): Section mismatch in reference from the function take_cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75d2a): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75d4d): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75de4): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
WARNING: vmlinux.o(.text+0x75e33): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain
cpu_down is only used from code surrounded by HOTPLUG_CPU so any references to __cpuinit is OK.
Add a few __ref to tech modpost to ignore the references.
This is just papering over the fact that the cpu hotplug code is fragile with respect to use of HOTPLUG_CPU and in many cases rely on __cpuinit to get rid of code when HOTPLUG_CPU is not enabled.
For now this is the least invasive change.
--- kernel/cpu.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/cpu.c +3 -3
@@ -180,7 +180,7 @@ struct take_cpu_down_param { };/* Take this CPU down. */ -static int take_cpu_down (void *_param) +static int __ref take_cpu_down (void *_param) {struct take_cpu_down_param *param = _param;int err;
@@ -199,7 +199,7 @@ static int take_cpu_down(void *_param) }/* Requires cpu_add_remove_lock to be held */ -static int _cpu_down (unsigned int cpu,int tasks_frozen) +static int __ref _cpu_down (unsigned int cpu,int tasks_frozen) {int err, nr_calls =0 ;struct task_struct *p;
@@ -274,7 +274,7 @@ out_release:return err; } -int cpu_down (unsigned int cpu) +int __ref cpu_down (unsigned int cpu) {int err =0 ;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 8/27 cpu: fix section mismatch warning in reference to register_cpu_notifier
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0xc60): Section mismatch in reference from the function kvm_init() to the function .cpuinit.text:register_cpu_notifier()
WARNING: vmlinux.o(.text+0x33869a): Section mismatch in reference from the function xfs_icsb_init_counters() to the function .cpuinit.text:register_cpu_notifier()
WARNING: vmlinux.o(.text+0x5556a1): Section mismatch in reference from the function acpi_processor_install_hotplug_notify() to the function .cpuinit.text:register_cpu_notifier()
WARNING: vmlinux.o(.text+0xfe6b28): Section mismatch in reference from the function cpufreq_register_driver() to the function .cpuinit.text:register_cpu_notifier()
register_cpu_notifier() are only really defined when HOTPLUG_CPU is enabled. So references to the function are OK. Annotate it with __ref so we do not get warnings from callers and do not get warnings for the functions/data used by register_cpu_notifier().
--- kernel/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/cpu.c +1 -1
@@ -136,7 +136,7 @@ static void cpu_hotplug_done(void)mutex_unlock (&cpu_hotplug.lock); }/* Need to know about CPUs going up/down? */ -int __cpuinit register_cpu_notifier (struct notifier_block *nb) +int __ref register_cpu_notifier (struct notifier_block *nb) {int ret;cpu_maps_update_begin ();
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 9/27 x86: fix section mismatch warning in setup_64.c:nearby_node
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0x1baa2): Section mismatch in reference from the function nearby_node() to the variable .cpuinit.data:apicid_to_node
WARNING: vmlinux.o(.text+0x1bace): Section mismatch in reference from the function nearby_node() to the variable .cpuinit.data:apicid_to_node
nearby_node() were only used by __cpuinit amd_detect_cmp() So annotating nearby_node() __cpuinit was the trivial fix.
--- arch/x86/kernel/setup_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/setup_64.c +1 -1
@@ -518,7 +518,7 @@ static void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) }#ifdef CONFIG_NUMA -static int nearby_node (int apicid) +static int __cpuinit nearby_node (int apicid) {int i, node;
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH 09/27] x86: fix section mismatch warning in setup_64.c:nearby_node
Quoted 6 lines · Sam Ravnborg
Fix following warnings:
WARNING:vmlinux.o(.text+0x1baa2): Section mismatch in reference from the functionnearby_node()to the variable .cpuinit.data:apicid_to_node
WARNING:vmlinux.o(.text+0x1bace): Section mismatch in reference from the functionnearby_node()to the variable .cpuinit.data:apicid_to_node
nearby_node()were only used by__cpuinitamd_detect_cmp()So annotatingnearby_node()__cpuinitwas the trivial fix.
Applied the x86 ones.
Thanks,
tglx
Re: [PATCH 09/27] x86: fix section mismatch warning in setup_64.c:nearby_node
Quoted 10 lines · Thomas Gleixner
Quoted 6 lines · Sam Ravnborg
Fix following warnings:
WARNING:vmlinux.o(.text+0x1baa2): Section mismatch in reference from the functionnearby_node()to the variable .cpuinit.data:apicid_to_node
WARNING:vmlinux.o(.text+0x1bace): Section mismatch in reference from the functionnearby_node()to the variable .cpuinit.data:apicid_to_node
nearby_node()were only used by__cpuinitamd_detect_cmp()So annotatingnearby_node()__cpuinitwas the trivial fix.Applied the x86 ones.
Thanks Thomas.
Sam
PATCH 10/27 x86: fix section mismatch in setup_64.c:srat_detect_node
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0x1bb40): Section mismatch in reference from the function srat_detect_node() to the variable .cpuinit.data:apicid_to_node
WARNING: vmlinux.o(.text+0x1bb70): Section mismatch in reference from the function srat_detect_node() to the function .cpuinit.text:numa_set_node()
srat_detect_node() is only used by __cpuinit init_intel(). So the trivial fix is to annotate srat_detect_node() with __cpuinit.
--- arch/x86/kernel/setup_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/setup_64.c +1 -1
@@ -791,7 +791,7 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)return 1 ; } -static void srat_detect_node (void ) +static void __cpuinit srat_detect_node (void ) {#ifdef CONFIG_NUMA unsigned node;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 11/27 acpi: fix section mismatch in processor_core.c:acpi_processor_hotplug_notify
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x55586c): Section mismatch in reference from the function acpi_processor_hotplug_notify() to the function .cpuinit.text:acpi_processor_start()
acpi_processor_hotplug_notify() may safely reference __cpuinit stuff as it ids defined inside an ACPI_HOTPLUG_CPU block. So annotate it __ref to silence the warning.
--- drivers/acpi/processor_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/processor_core.c +2 -2
@@ -881,8 +881,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)return 0 ; } -static void -acpi_processor_hotplug_notify (acpi_handle handle,u32 event,void *data) +static void __ref acpi_processor_hotplug_notify (acpi_handle handle, +u32 event,void *data) {struct acpi_processor *pr;struct acpi_device *device =NULL ;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 12/27 x86: fix section mismatch warning in topology.c:arch_register_cpu
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x1dfc3): Section mismatch in reference from the function arch_register_cpu() to the function .cpuinit.text:register_cpu()
arch_register_cpu() is only defined for HOTPLUG_CPU code so simple fix is to ignore references by annotating the function __ref.
--- arch/x86/kernel/topology.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/topology.c +1 -1
@@ -34,7 +34,7 @@ static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);#ifdef CONFIG_HOTPLUG_CPU -int arch_register_cpu (int num) +int __ref arch_register_cpu (int num) {/* * CPU0 cannot be offlined due to several
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 13/27 drivers/base/cpu: fix section mismatch in cpu.c:store_online
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x64609c): Section mismatch in reference from the function store_online() to the function .cpuinit.text:cpu_up()
store_online() is defined inside a HOTPLUG_CPU block so references are OK. Ignore references by annotating store_online() with __ref.
Note: This is needed because cpu_up() most likely should not have been __cpuinit but all the hotplug cpu code misuses the __cpuinit annotation.
--- drivers/base/cpu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/base/cpu.c +2 -2
@@ -28,7 +28,7 @@ static ssize_t show_online(struct sys_device *dev, char *buf)return sprintf (buf,"%u\n" , !!cpu_online (cpu->sysdev.id)); } -static ssize_t store_online (struct sys_device *dev,const char *buf, +static ssize_t __ref store_online (struct sys_device *dev,const char *buf,size_t count) { struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -55,7 +55,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, } static SYSDEV_ATTR(online, 0644, show_online, store_online); -static void __devinit register_cpu_control (struct cpu *cpu) +static void __cpuinit register_cpu_control (struct cpu *cpu) {sysdev_create_file (&cpu->sysdev, &attr_online); }
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 14/27 hwmon: fix section mismatch in coretemp
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0xebfd04): Section mismatch in reference from the function coretemp_cpu_callback() to the function .cpuinit.text:coretemp_device_add()
coretemp_cpu_callback() are only used inside a HOTPLUG_CPU block so annotate it __cpuinit. The notifier referencing the function are annotated __refdata to silence warning from the exit function. The unregister function do not use the embedded pointer but clears the variable so the annotation is OK.
--- drivers/hwmon/coretemp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/coretemp.c +2 -2
@@ -330,7 +330,7 @@ static void coretemp_device_remove(unsigned int cpu)mutex_unlock (&pdev_list_mutex); } -static int coretemp_cpu_callback (struct notifier_block *nfb, +static int __cpuinit coretemp_cpu_callback (struct notifier_block *nfb,unsigned long action,void *hcpu) {unsigned int cpu = (unsigned long ) hcpu;
@@ -347,7 +347,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block coretemp_cpu_notifier = { +static struct notifier_block coretemp_cpu_notifier__refdata = { .notifier_call = coretemp_cpu_callback, };#endif /* !CONFIG_HOTPLUG_CPU */
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH 14/27] hwmon: fix section mismatch in coretemp
Hi Sam:
Quoted 40 lines · Sam Ravnborg
Fix following warning:
WARNING:vmlinux.o(.text+0xebfd04): Section mismatch in reference from the functioncoretemp_cpu_callback()to the function .cpuinit.text:coretemp_device_add()
coretemp_cpu_callback()are only used inside aHOTPLUG_CPUblock so annotate it__cpuinit. The notifier referencing the function are annotated__refdatato silence warning from the exit function. The unregister function do not use the embedded pointer but clears the variable so the annotation is OK.Signed-off-by Sam Ravnborg <[email protected]>Cc Mark M. Hoffman <[email protected]>--- drivers/hwmon/coretemp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/hwmon/coretemp.c +2
-2@@ -330,7 +330,7 @@ static void coretemp_device_remove(unsigned int cpu)mutex_unlock (&pdev_list_mutex); } -static int coretemp_cpu_callback (struct notifier_block *nfb, +static int __cpuinit coretemp_cpu_callback (struct notifier_block *nfb,unsigned long action,void *hcpu) {unsigned int cpu = (unsigned long ) hcpu;@@ -347,7 +347,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block coretemp_cpu_notifier = { +static struct notifier_block coretemp_cpu_notifier__refdata = { .notifier_call = coretemp_cpu_callback, };#endif /* !CONFIG_HOTPLUG_CPU */ Signature · 1 line
1.5.4.rc3.14.g44397
This rings a bell... hmmm, commit 59a35bafb223bbb0553ba1a3bb9280bda668a8d8. AFAICT the warning is a false positive, but whatever.
Applied to hwmon-2.6.git/testing, thanks.
Signature · 8 lines
Mark M. Hoffman [email protected] _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 14/27] hwmon: fix section mismatch in coretemp
Quoted 3 lines
This rings a bell... hmmm, commit
59a35bafb223bbb0553ba1a3bb9280bda668a8d8. AFAICT the warning is a false positive, but whatever.
Yes it is - the __refdata is there only to silence modpost.
Quoted 2 lines
Applied to hwmon-2.6.git/testing, thanks.
Thanks,
Sam
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 15/27 cpufreq: fix section mismatch warnings
In reply to Sam RavnborgFix the following warnings:
WARNING: vmlinux.o(.text+0xfe6711): Section mismatch in reference from the function cpufreq_unregister_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.text+0xfe68af): Section mismatch in reference from the function cpufreq_register_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.exit.text+0xc4fa): Section mismatch in reference from the function cpufreq_stats_exit() to the variable .cpuinit.data:cpufreq_stat_cpu_notifier
The warnings were casued by references to unregister_hotcpu_notifier() from normal functions or exit functions.
This is flagged by modpost as a potential error because
it does not know that for the non HOTPLUG_CPU
scenario the unregister_hotcpu_notifier() is a nop.
Silence the warning by replacing the __initdata
annotation with a __refdata annotation.
--- drivers/cpufreq/cpufreq.c | 2 +- drivers/cpufreq/cpufreq_stats.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/cpufreq.c +1 -1
@@ -1783,7 +1783,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,return NOTIFY_OK ; } -static struct notifier_block __cpuinitdata cpufreq_cpu_notifier = +static struct notifier_block __refdata cpufreq_cpu_notifier = { .notifier_call = cpufreq_cpu_callback, };
drivers/cpufreq/cpufreq_stats.c +1 -1
@@ -323,7 +323,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,return NOTIFY_OK ; } -static struct notifier_block cpufreq_stat_cpu_notifier__cpuinitdata = +static struct notifier_block cpufreq_stat_cpu_notifier__refdata = { .notifier_call = cpufreq_stat_cpu_callback, };
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 16/27 scsi: fix section mismatch in aic94xx
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.data+0x17aa88): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
WARNING: vmlinux.o(.data+0x17aa98): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
WARNING: vmlinux.o(.data+0x17aaa8): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9405_setup()
asd_pcidev_data is only used by __devinit asd_pci_probe. So mark is const and annotate it __devinitconst to fix the warnings.
--- drivers/scsi/aic94xx/aic94xx_init.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/aic94xx/aic94xx_init.c +2 -2
@@ -531,10 +531,10 @@ static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)/* The first entry, 0, is used for dynamic ids, the rest for devices * we know about. */ -static struct asd_pcidev_struct { +static const struct asd_pcidev_struct {const char * name;int (*setup)(struct asd_ha_struct *asd_ha); -} asd_pcidev_data[] = { +} asd_pcidev_data[]__devinitconst = {/* Id 0 is used for dynamic ids. */ { .name ="Adaptec AIC-94xx SAS/SATA Host Adapter" , .setup = asd_aic9410_setup
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 17/27 acer-wmi: fix section mismatch warnings
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0x672615): Section mismatch in reference from the function acer_platform_remove() to the function .exit.text:acer_backlight_exit()
WARNING: vmlinux.o(.devinit.text+0x1e859): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_led_init()
WARNING: vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_backlight_init()
Remove __exit annotation from acer_backlight_exit(). We cannot reference a __exit annotated function from non __exit functions.
acer_led_init() and acer_backlight_init() where both annotated __init but used from a __devinit function. This would result in an oops should gcc drop their inlining and the module are hot plugged.
Fix by annotating acer_led_init() and acer_backlight_init() __devinit.
--- drivers/misc/acer-wmi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/misc/acer-wmi.c +3 -3
@@ -756,7 +756,7 @@ static struct led_classdev mail_led = { .brightness_set = mail_led_set, }; -static int __init acer_led_init (struct device *dev) +static int __devinit acer_led_init (struct device *dev) {return led_classdev_register (dev, &mail_led); }
@@ -789,7 +789,7 @@ static struct backlight_ops acer_bl_ops = { .update_status = update_bl_status, }; -static int __init acer_backlight_init (struct device *dev) +static int __devinit acer_backlight_init (struct device *dev) {struct backlight_device *bd;
@@ -808,7 +808,7 @@ static int __init acer_backlight_init(struct device *dev)return 0 ; } -static void __exit acer_backlight_exit(void) +static void acer_backlight_exit (void ) {backlight_device_unregister (acer_backlight_device); }
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH 17/27] acer-wmi: fix section mismatch warnings
Quoted 13 lines · On Sunday 17 February 2008 12:22:54 Sam Ravnborg wrote:
Fix following warnings:
WARNING:vmlinux.o(.text+0x672615): Section mismatch in reference from the functionacer_platform_remove()to the function .exit.text:acer_backlight_exit() WARNING:vmlinux.o(.devinit.text+0x1e859):
Section mismatch in reference from the functionacer_platform_probe()to the function .init.text:acer_led_init() WARNING:vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the functionacer_platform_probe()to the function .init.text:acer_backlight_init()Remove
__exitannotation fromacer_backlight_exit(). We cannot reference a__exitannotated function from non__exitfunctions.
Quoted 7 lines
acer_led_init()andacer_backlight_init()where both annotated__initbut used from a__devinitfunction. This would result in an oops should gcc drop their inlining and the module are hot plugged.Fix by annotating
acer_led_init()andacer_backlight_init()__devinit.Signed-off-by Sam Ravnborg <[email protected]>
Quoted 1 line
Cc Len Brown <[email protected]>
Len, can you apply this to acpi-test? (Unless Andrew wants to take all these through -mm?)
-Carlos
Signature · 3 lines
E-Mail: [email protected] Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D
Re: [PATCH 17/27] acer-wmi: fix section mismatch warnings
Quoted 20 lines · Carlos Corbacho
Quoted 19 lines · On Sunday 17 February 2008 12:22:54 Sam Ravnborg wrote:
Fix following warnings:
WARNING:vmlinux.o(.text+0x672615): Section mismatch in reference from the functionacer_platform_remove()to the function .exit.text:acer_backlight_exit() WARNING:vmlinux.o(.devinit.text+0x1e859):
Section mismatch in reference from the functionacer_platform_probe()to the function .init.text:acer_led_init() WARNING:vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the functionacer_platform_probe()to the function .init.text:acer_backlight_init()Remove
__exitannotation fromacer_backlight_exit(). We cannot reference a__exitannotated function from non__exitfunctions.
acer_led_init()andacer_backlight_init()where both annotated__initbut used from a__devinitfunction. This would result in an oops should gcc drop their inlining and the module are hot plugged.Fix by annotating
acer_led_init()andacer_backlight_init()__devinit.
Quoted 8 lines
Quoted 1 line
Signed-off-by Sam Ravnborg <[email protected]>Signed-off-by Carlos Corbacho <[email protected]>Quoted 1 line
Cc Len Brown <[email protected]>Len, can you apply this to acpi-test? (Unless Andrew wants to take all these through -mm?)
Thanks for the quick reply Carlos.
Sam
PATCH 18/27 video: fix section mismatch warnings in uvesafb
In reply to Sam RavnborgFix following warnings:
WARNING: vmlinux.o(.text+0x51961b): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:mtrr
WARNING: vmlinux.o(.text+0x519641): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:mtrr
WARNING: vmlinux.o(.text+0x519664): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:pmi_setpal
WARNING: vmlinux.o(.text+0x51966a): Section mismatch in reference from the function param_set_scroll() to the variable .devinit.data:pmi_setpal
The function param_set_scroll() referenced the variable named ypan several times. modpost reported a bogus variable name but removing the the __devinitdata annotation of ypan fixed the above warnings.
--- drivers/video/uvesafb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/uvesafb.c +1 -1
@@ -44,7 +44,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = {static int mtrr__devinitdata =3 ;/* enable mtrr by default */ static int blank =1 ;/* enable blanking by default */ -static int ypan__devinitdata =1 ;/* 0: scroll, 1: ypan, 2: ywrap */ +static int ypan =1 ;/* 0: scroll, 1: ypan, 2: ywrap */ static int pmi_setpal__devinitdata =1 ;/* use PMI for palette changes */ static int nocrtc__devinitdata ;/* ignore CRTC settings */ static int noedid__devinitdata ;/* don't try DDC transfers */
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 19/27 tpm: fix section mismatch warning
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.init.text+0x32804): Section mismatch in reference from the function init_nsc() to the function .devexit.text:tpm_nsc_remove()
The function tpm_nsc_remove() are used outside __exit, so remove the __exit annotation to make sure the function is always avilable.
Note: Trying to compare this module with other users of platform_device gve me the impression that this driver needs some work to match other users.
--- drivers/char/tpm/tpm_nsc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/tpm/tpm_nsc.c +1 -1
@@ -264,7 +264,7 @@ static const struct tpm_vendor_specific tpm_nsc = {static struct platform_device *pdev =NULL ; -static void __devexit tpm_nsc_remove(struct device *dev) +static void tpm_nsc_remove (struct device *dev) {struct tpm_chip *chip =dev_get_drvdata (dev);if ( chip ) {
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 20/27 caiaq - fix section mismatch warning
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the function setup_card() to the function .devinit.text:snd_usb_caiaq_control_init()
setup_card() are only used by init_card().init_card() are only used by snd_probe()snd_probe() are used for the .probe parameter in usb_driver.probe
Annotate them all __devinit to fix the warning.
--- sound/usb/caiaq/caiaq-device.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
sound/usb/caiaq/caiaq-device.c +3 -3
@@ -245,7 +245,7 @@ int snd_usb_caiaq_set_auto_msg (struct snd_usb_caiaqdev *dev, tmp, sizeof(tmp)); } -static void setup_card (struct snd_usb_caiaqdev *dev) +static void __devinit setup_card (struct snd_usb_caiaqdev *dev) {int ret;char val[4 ];
@@ -359,7 +359,7 @@ static struct snd_card* create_card(struct usb_device* usb_dev)return card; } -static int init_card (struct snd_usb_caiaqdev *dev) +static int __devinit init_card (struct snd_usb_caiaqdev *dev) {char *c;struct usb_device *usb_dev = dev->chip.dev;
@@ -428,7 +428,7 @@ static int init_card(struct snd_usb_caiaqdev *dev)return 0 ; } -static int snd_probe (struct usb_interface *intf, +static int __devinit snd_probe (struct usb_interface *intf,const struct usb_device_id *id) {int ret;
Signature · 1 line
1.5.4.rc3.14.g44397
Takashi Iwai
AppliedRe: [PATCH 20/27] [ALSA] caiaq - fix section mismatch warning
At Sun, 17 Feb 2008 13:22:57 +0100,
Quoted 8 lines · Sam Ravnborg
Fix following warning:
WARNING:vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the functionsetup_card()to the function .devinit.text:snd_usb_caiaq_control_init()
setup_card()are only used byinit_card().init_card()are only used bysnd_probe()snd_probe()are used for the .probe parameter in usb_driver.probe
Quoted 6 lines
Annotate them all
__devinitto fix the warning.Signed-off-by Sam Ravnborg <[email protected]>Cc Daniel Mack <[email protected]>Cc Takashi Iwai <[email protected]>Cc Jaroslav Kysela <[email protected]>
Thanks, applied to ALSA tree now. I did another fix for this section mismatch, but reverted it now since yours is better :)
Takashi
PATCH 21/27 x86: fix section mismatch in srat_64.c:reserve_hotadd
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x388cc): Section mismatch in reference from the function reserve_hotadd() to the function .init.text:absent_pages_in_range()
reserve_hotadd() are only used by __init acpi_numa_memory_affinity_init(). Annotate reserve_hotadd() with __init is the trivial fix.
--- arch/x86/mm/srat_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/srat_64.c +1 -1
@@ -166,7 +166,7 @@ static inline int save_add_info(void) {return 0;}* Both SPARSE and RESERVE need nodes_add information. * This code supports one contiguous hot add area per node. */ -static int reserve_hotadd (int node,unsigned long start,unsigned long end) +static int __init reserve_hotadd (int node,unsigned long start,unsigned long end) {unsigned long s_pfn = start >>PAGE_SHIFT ;unsigned long e_pfn = end >>PAGE_SHIFT ;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 22/27 x86: fix section mismatch in head_64.S:initial_code
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:x86_64_start_kernel()
initial_code are initially used to hold a function pointer from __init and later from __cpuinit. This confuses modpost and changing initial_code to REFDATA silence the warning. (But now we do not discard the variable anymore).
--- arch/x86/kernel/head_64.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/head_64.S +1 -1
@@ -250,7 +250,7 @@ ENTRY(secondary_startup_64) lretq /* SMP bootup changes these two */ - __CPUINITDATA + __REFDATA .align 8 ENTRY(initial_code) .quad x86_64_start_kernel
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 23/27 x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit
In reply to Sam Ravnborgpci_scan_bus_with_sysdata() is only used from either __init or __devinit functions so annotate it __devinit to match the usage.
--- arch/x86/pci/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/pci/common.c +1 -1
@@ -541,7 +541,7 @@ void pcibios_disable_device (struct pci_dev *dev)pcibios_disable_irq (dev); } -struct pci_bus *pci_scan_bus_with_sysdata (int busno) +struct pci_bus *__devinit pci_scan_bus_with_sysdata (int busno) {struct pci_bus *bus =NULL ;struct pci_sysdata *sd;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 24/27 pcmcia: annotate cb_alloc with __ref
In reply to Sam Ravnborgcb_alloc() uses a function (pci_scan_slot) that will be annotated __devinit.
Annotate cb_alloc() with __ref to tell modpost to ignore this reference.
--- drivers/pcmcia/cardbus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pcmcia/cardbus.c +1 -1
@@ -209,7 +209,7 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq) } } -int cb_alloc (struct pcmcia_socket * s) +int __ref cb_alloc (struct pcmcia_socket * s) {struct pci_bus *bus = s->cb_dev->subordinate;struct pci_dev *dev;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 25/27 pci: fix section mismatch warning in pci_scan_child_bus
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus()
We had plenty of functions that could be annotated __devinit but due to the former restriction that annotated symbols could not be annotated they were not so.
So annotate these function and fix the references from the pci/hotplug/* code to silence the resuting warnings.
--- drivers/pci/hotplug-pci.c | 2 +- drivers/pci/hotplug/acpiphp_glue.c | 2 +- drivers/pci/hotplug/cpci_hotplug_pci.c | 2 +- drivers/pci/hotplug/pciehp_pci.c | 2 +- drivers/pci/hotplug/shpchp_pci.c | 2 +- drivers/pci/probe.c | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-)
drivers/pci/hotplug-pci.c +1 -1
@@ -4,7 +4,7 @@#include "pci.h" -unsigned int pci_do_scan_bus (struct pci_bus *bus) +unsigned int __devinit pci_do_scan_bus (struct pci_bus *bus) {unsigned int max;
drivers/pci/hotplug/acpiphp_glue.c +1 -1
@@ -1085,7 +1085,7 @@ static int acpiphp_bus_trim(acpi_handle handle)* This function should be called per *physical slot*, * not per each slot object in ACPI namespace. */ -static int enable_device (struct acpiphp_slot *slot) +static int __ref enable_device (struct acpiphp_slot *slot) {struct pci_dev *dev;struct pci_bus *bus = slot->bridge->pci_bus;
drivers/pci/hotplug/cpci_hotplug_pci.c +1 -1
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)* Device configuration functions */ -int cpci_configure_slot (struct slot * slot) +int __ref cpci_configure_slot (struct slot * slot) {struct pci_bus *parent;int fn;
drivers/pci/hotplug/pciehp_pci.c +1 -1
@@ -167,7 +167,7 @@ static void program_fw_provided_values(struct pci_dev *dev) } } -static int pciehp_add_bridge (struct pci_dev *dev) +static int __ref pciehp_add_bridge (struct pci_dev *dev) {struct pci_bus *parent = dev->bus;int pass, busnr, start = parent->secondary;
drivers/pci/hotplug/shpchp_pci.c +1 -1
@@ -96,7 +96,7 @@ static void program_fw_provided_values(struct pci_dev *dev) } } -int shpchp_configure_device (struct slot *p_slot) +int __ref shpchp_configure_device (struct slot *p_slot) {struct pci_dev *dev;struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate;
drivers/pci/probe.c +4 -4
@@ -286,7 +286,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) } } -void pci_read_bridge_bases (struct pci_bus *child) +void __devinit pci_read_bridge_bases (struct pci_bus *child) {struct pci_dev *dev = child->self;u8 io_base_lo, io_limit_lo;
@@ -472,7 +472,7 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)* them, we proceed to assigning numbers to the remaining buses in * order to avoid overlaps between old and new bus numbers. */ -int pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) +int __devinit pci_scan_bridge (struct pci_bus *bus,struct pci_dev * dev,int max,int pass) {struct pci_bus *child;int is_cardbus = (dev->hdr_type ==PCI_HEADER_TYPE_CARDBUS );
@@ -1008,7 +1008,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)return nr; } -unsigned int pci_scan_child_bus (struct pci_bus *bus) +unsigned int __devinit pci_scan_child_bus (struct pci_bus *bus) {unsigned int devfn, pass, max = bus->secondary;struct pci_dev *dev;
@@ -1116,7 +1116,7 @@ err_out:return NULL ; } -struct pci_bus *pci_scan_bus_parented (struct device *parent, +struct pci_bus *__devinit pci_scan_bus_parented (struct device *parent,int bus,struct pci_ops *ops,void *sysdata) {struct pci_bus *b;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 26/27 acpi: fix section mismatch in acpi_pci_root_add
In reply to Sam RavnborgFix following warning:
WARNING: vmlinux.o(.text+0x550e85): Section mismatch in reference from the function acpi_pci_root_add() to the function .devinit.text:pci_acpi_scan_root()
acpi_pci_root_add uses a __devinit annotated function and it looks like annotating it __devinit too is the correct fix.
--- drivers/acpi/pci_root.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/pci_root.c +1 -1
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) } } -static int acpi_pci_root_add (struct acpi_device *device) +static int __devinit acpi_pci_root_add (struct acpi_device *device) {int result =0 ;struct acpi_pci_root *root =NULL ;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 27/27 hdsp - fix section mismatch warnings
In reply to Sam RavnborgFix following warnings:
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x34bc): Section mismatch in reference from the function hdsp_check_for_firmware() to the function .devinit.text:hdsp_request_fw_loader()
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x4ac6): Section mismatch in reference from the function snd_hdsp_proc_read() to the function .devinit.text:hdsp_request_fw_loader()
Calling hdsp_request_fw_loader() were triggered from /proc so this is not restricted to init or hotplug.
So removing the __devexit annotation of this function and one of the functions fix the warning.
--- sound/pci/rme9652/hdsp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
sound/pci/rme9652/hdsp.c +3 -3
@@ -745,7 +745,7 @@ static int hdsp_get_iobox_version (struct hdsp *hdsp)#ifdef HDSP_FW_LOADER -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp); +static int hdsp_request_fw_loader (struct hdsp *hdsp);#endif static int hdsp_check_for_firmware (struct hdsp *hdsp,int load_on_demand)
@@ -4688,7 +4688,7 @@ static struct snd_pcm_ops snd_hdsp_capture_ops = { .copy = snd_hdsp_capture_copy, }; -static int __devinit snd_hdsp_create_hwdep (struct snd_card *card, +static int snd_hdsp_create_hwdep (struct snd_card *card,struct hdsp *hdsp) {struct snd_hwdep *hw;
@@ -4857,7 +4857,7 @@ static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp#ifdef HDSP_FW_LOADER /* load firmware via hotplug fw loader */ -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp) +static int hdsp_request_fw_loader (struct hdsp *hdsp) {const char *fwfile;const struct firmware *fw;
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH 27/27] [ALSA] hdsp - fix section mismatch warnings
At Sun, 17 Feb 2008 13:23:04 +0100,
Quoted 9 lines · Sam Ravnborg
Fix following warnings:
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x34bc): Section mismatch in reference from the functionhdsp_check_for_firmware()to the function .devinit.text:hdsp_request_fw_loader()
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x4ac6): Section mismatch in reference from the functionsnd_hdsp_proc_read()to the function .devinit.text:hdsp_request_fw_loader()Calling
hdsp_request_fw_loader()were triggered from /proc so this is not restricted to init or hotplug.
So removing the__devexitannotation of this function and one of the functions fix the warning.
Thanks. The exactly same fix has been already on ALSA tree since weeks ago, but was never pushed...
Takashi
Quoted 42 lines
Signed-off-by Sam Ravnborg <[email protected]>Cc Takashi Iwai <[email protected]>Cc Jaroslav Kysela <[email protected]>--- sound/pci/rme9652/hdsp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)sound/pci/rme9652/hdsp.c +3
-3@@ -745,7 +745,7 @@ static int hdsp_get_iobox_version (struct hdsp *hdsp)#ifdef HDSP_FW_LOADER -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp); +static int hdsp_request_fw_loader (struct hdsp *hdsp);#endif static int hdsp_check_for_firmware (struct hdsp *hdsp,int load_on_demand)@@ -4688,7 +4688,7 @@ static struct snd_pcm_ops snd_hdsp_capture_ops = { .copy = snd_hdsp_capture_copy, }; -static int __devinit snd_hdsp_create_hwdep (struct snd_card *card, +static int snd_hdsp_create_hwdep (struct snd_card *card,struct hdsp *hdsp) {struct snd_hwdep *hw;@@ -4857,7 +4857,7 @@ static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp#ifdef HDSP_FW_LOADER /* load firmware via hotplug fw loader */ -static int __devinit hdsp_request_fw_loader (struct hdsp *hdsp) +static int hdsp_request_fw_loader (struct hdsp *hdsp) {const char *fwfile;const struct firmware *fw;Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH 27/27] [ALSA] hdsp - fix section mismatch warnings
Quoted 7 lines · Takashi Iwai
At Sun, 17 Feb 2008 13:23:04 +0100,
Quoted 5 lines · Sam Ravnborg
Fix following warnings:
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x34bc): Section mismatch in reference from the functionhdsp_check_for_firmware()to the function .devinit.text:hdsp_request_fw_loader()
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x4ac6): Section mismatch in reference from the functionsnd_hdsp_proc_read()to the function .devinit.text:hdsp_request_fw_loader()
Quoted 7 lines
Quoted 4 lines
Calling
hdsp_request_fw_loader()were triggered from /proc so this is not restricted to init or hotplug.
So removing the__devexitannotation of this function and one of the functions fix the warning.Thanks. The exactly same fix has been already on ALSA tree since weeks ago, but was never pushed...
OK, I assume this will be pushed soonish so we can kill another warning.
Sam
Re: [PATCH 27/27] [ALSA] hdsp - fix section mismatch warnings
At Mon, 18 Feb 2008 08:45:08 +0100,
Quoted 14 lines · Sam Ravnborg
Quoted 12 lines · Takashi Iwai
At Sun, 17 Feb 2008 13:23:04 +0100,
Quoted 9 lines · Sam Ravnborg
Fix following warnings:
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x34bc): Section mismatch in reference from the functionhdsp_check_for_firmware()to the function .devinit.text:hdsp_request_fw_loader()
WARNING: sound/pci/rme9652/snd-hdsp.o(.text+0x4ac6): Section mismatch in reference from the functionsnd_hdsp_proc_read()to the function .devinit.text:hdsp_request_fw_loader()Calling
hdsp_request_fw_loader()were triggered from /proc so this is not restricted to init or hotplug.
So removing the__devexitannotation of this function and one of the functions fix the warning.
Quoted 5 lines
Quoted 2 lines
Thanks. The exactly same fix has been already on ALSA tree since weeks ago, but was never pushed...
OK, I assume this will be pushed soonish so we can kill another warning.
I sincerly hope it'll be pushed soonish...
Takashi