diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-02-02 14:12:16 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-02-13 21:37:04 -0500 |
commit | 80e6e9c1dabb940dc7900f37c05f07280af90ac8 (patch) | |
tree | e2baa9d640ebb549b20c341940cfb32a5794cad7 /Kconfig | |
parent | eee549e1e3a4ec87353a5b85a51a7896394981d5 (diff) |
scsi: NCR53c406a: avoid section mismatch with LTO
Building with link time optimizations produces a false-positive section
mismatch warning:
WARNING: vmlinux.o(.data+0xf7e8): Section mismatch in reference from the variable driver_template.lto_priv.6914 to the function .init.text:NCR53c406a_detect()
The variable driver_template.lto_priv.6914 references
the function __init NCR53c406a_detect()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
The ->detect callback is always entered from the init_this_scsi_driver()
init function, but apparently LTO turns the optimized direct function
call into an indirect call through a non-__initdata pointer.
All drivers using init_this_scsi_driver() are for ancient hardware, and
most don't mark the detect() callback as __init(), so I'm just removing
the annotation here to kill off the warning instead of doing a larger
rework.
[mkp: typo]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions