Skip to content

Commit b291808

Browse files
committed
intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()
The caller of (recently added) matchup_vm_state_with_baremetal() is an __init function and it uses some __initdata data structures, so add the __init annotation to it for consistency. This addresses the following build warnings: WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x51 (section: .text) -> intel_idle_max_cstate_reached (section: .init.text) WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x62 (section: .text) -> cpuidle_state_table (section: .init.data) WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x79 (section: .text) -> icpu (section: .init.data) Fixes: 0fac214 ("intel_idle: Add a "Long HLT" C1 state for the VM guest mode") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
1 parent 0fac214 commit b291808

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/idle/intel_idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2147,7 +2147,7 @@ static void __init intel_idle_cpuidle_devices_uninit(void)
21472147
* All our short idle states are dominated by vmexit/vmenter latencies,
21482148
* not the underlying hardware latencies so we keep our values for these.
21492149
*/
2150-
static void matchup_vm_state_with_baremetal(void)
2150+
static void __init matchup_vm_state_with_baremetal(void)
21512151
{
21522152
int cstate;
21532153

0 commit comments

Comments
 (0)