<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>In my irq.c, there are a piece of code:<br><br>static int __init s3c2416_irq_add(struct sys_device *sysdev)<br>{<br>    printk(KERN_INFO &quot;S3C2416: IRQ Support\n&quot;);<br>
<br>    s3c2416_add_sub(IRQ_LCD, s3c2416_irq_demux_lcd, &amp;s3c2416_irq_lcd,<br>            IRQ_S3C2443_LCD2, IRQ_S3C2443_LCD4);<br><br>    s3c2416_add_sub(IRQ_S3C2443_DMA, s3c2416_irq_demux_dma,<br>            &amp;s3c2416_irq_dma, IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5);<br>
<br>    s3c2416_add_sub(IRQ_S3C2443_UART3, s3c2416_irq_demux_uart3,<br>            &amp;s3c2416_irq_uart3,<br>            IRQ_S3C2443_RX3, IRQ_S3C2443_ERR3);<br><br>    s3c2416_add_sub(IRQ_WDT, s3c2416_irq_demux_wdtac97,<br>
            &amp;s3c2416_irq_wdtac97,<br>            IRQ_S3C2443_WDT, IRQ_S3C2443_AC97);<br><br>    return 0;<br>}<br><br>static struct sysdev_driver s3c2416_irq_driver = {<br>    .add        = s3c2416_irq_add,<br>};<br><br>
</div>it triggers a warning:<br><br>WARNING: vmlinux.o(.data+0x15a0): Section mismatch in reference from the variable s3c2416_irq_driver to the function .init.text:s3c2416_irq_add()<br>The variable s3c2416_irq_driver references<br>
the function __init s3c2416_irq_add()<br>If the reference is valid then annotate the<br>variable with __init* or __refdata (see linux/init.h) or name the variable:<br>*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console<br>
<br></div>But after I changed the variable definition to:<br>static struct sysdev_driver __init s3c2416_irq_driver = {<br>    .add        = s3c2416_irq_add,<br>};<br></div>I then got a compile time error:<br>arch/arm/mach-s3c2416/irq.c:237:15: warning: &#39;__cold__&#39; attribute ignored [-Wattributes]<br>
arch/arm/mach-s3c2416/irq.c:237:36: error: &#39;no_instrument_function&#39; attribute applies only to functions<br><br></div>So I don&#39;t know how to fix the warning correctly.  Could anyone please help? Thanks in advance.<br>
<br clear="all"><div><div><div><div><div><div><div><div><br>-- <br>Life is the only flaw in an otherwise perfect nonexistence<br>    -- Schopenhauer<br><br>narke<br>public key at <a href="http://subkeys.pgp.net:11371">http://subkeys.pgp.net:11371</a> (<a href="mailto:narkewoody@gmail.com">narkewoody@gmail.com</a>)
</div></div></div></div></div></div></div></div></div>