Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp939815ybz; Wed, 29 Apr 2020 12:06:13 -0700 (PDT) X-Google-Smtp-Source: APiQypIO6JhU+EVEz7sgFO4O8dSqiJ1Xi1bg21beLWVq9LopK69R2LZwhTYzRymvgwtZY7Mmb3sS X-Received: by 2002:a50:e8cb:: with SMTP id l11mr4068525edn.174.1588187173283; Wed, 29 Apr 2020 12:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588187173; cv=none; d=google.com; s=arc-20160816; b=puWTHtgwc4SvDaBmkTBLrmfu2newIkXNQux+0oGv9OPdQBkFKG9XU7rV5F8HeMhysS evK1tfpy+Nn/GuR8Bng/UkzhC4GEOyI2yWrxvr3WdHRLmsZNMUOVmObBiHWeH6KTo65W CYkvGBZDOVvNUixD5wG1ZVx9sGRFl2OBOJZcd0+LG8l7CGIwlTQYMSWB7G6cI/OYgq8J OjD37KqeVuaDEEGbD1IuaX4rhhf85EpSoYyoqVz/tJIDs2uOvyyQ3XG/35ueIJuS+IJv I3iokcBbkxMB5ReytFg6rRknWLqWzmzyymHkGKf9B6RgtewkNEC0QbYoryv6OpbqavLB i/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YOJrnNIAgZAeonU3OOr0+u7I9gkwfvrRILQ1JDqnXR4=; b=o9BcMKWkO2YGd259sKAAG5AXHOwNz1V8c3ky3aFJ6eYs8zRTTCZ/FA1Hgp5sNaDgTX KaQhDed8UNb6K06V+R6R2k2Ef3UR3+5pOAuVBtdpxD1Du1ApaiURvtIED6jrUvwpbYP6 hd16c1a7jWpwDTHePUdIQ7t2gBwMLbPporGwv7Hwi4Ov2rV/jKHlzZU9kLaEaYeTJ6b8 a8/Bu+rK4j/O/ptmgDZsIavxCof0dYebrhbVUpaKH0jO1U/0TPUP4oLv2ZjauQXlHHNE NajgdiTtAurJ9MZJoZC0MGdCTNj0UOO84llITUo7/ar/x1sgUaw7tCJw/w16WlKPExxQ pJsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si4440383ejr.501.2020.04.29.12.05.49; Wed, 29 Apr 2020 12:06:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbgD2TCD (ORCPT + 99 others); Wed, 29 Apr 2020 15:02:03 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44269 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgD2TCD (ORCPT ); Wed, 29 Apr 2020 15:02:03 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MUY9w-1jcdPt3kW0-00QWZG; Wed, 29 Apr 2020 21:01:22 +0200 From: Arnd Bergmann To: Ard Biesheuvel , Ingo Molnar , Jerry Snitselaar Cc: Arnd Bergmann , Ard Biesheuvel , Ben Dooks , Dave Young , Jarkko Sakkinen , Lukas Wunner , Lyude Paul , Matthew Garrett , Octavian Purdila , Peter Jones , Peter Zijlstra , Scott Talbert , Thomas Gleixner , linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] efi/tpm: fix section mismatch warning Date: Wed, 29 Apr 2020 21:01:08 +0200 Message-Id: <20200429190119.43595-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ZQnTjnUaD3Ot3Nx9eVP2/03GaU0JA4GRDpusvqc79KiO4fUHV7z xbCc99Kr8a1zJJE/r4bO0Q47fh+gOYXqvMEruI2hqCMZW/f96D/07cYwGJnjvGbRf0QYvGa AMxgwBy1kWiVvyyalES1BaAtiU6NPyGlrSvjv+GzdcJsq9wtDZIW17AmoNdVJMst0obhgPq ZtBIEXgn3++a0vuwB8Rrg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:eoASaEfANZA=:UKYNanq8Tate2hME67jf0h HFfVw5eEnAwV2ivqhWR10qdqEdCv1a/qH6+I1GUsQxdb5fSJg2p6lrkbKfR5fE+VkR1jStuAE vdlwseanNyzYnYPr/IK92xAXWRJsKbD8hzPQy+wW4OCnLKAu4mr7PZVANZ/2Vvyw9aAo+/kfv HOGPCihZSJ5NHcXqDB4sMDZnWEx4EFDNwPRN2zlmFMkWQpEt7qNQxV7Cko6eYgRTKPFKYw8ug luD8JtZccLzQ1F614k8UJnfxA/4Hm/lf2RrzFDzl6skwPh2C533wIsyYwh0kdjZb925DZIviL qkk+iKL0wG19l3fDIu8L5nKkjz4FqOV6qe3lbbV3PwZcZyF6EAdLuLHI+WtqQRHQaK42K36k+ vfTQhNM6n1RRXh4GU4SDRXXr7rs1Q0+X2ygEeFZZ2zPdtMf1IbrvSIoI0b6eukMM7JuKCYGoR 62odyLSl1Mh+mEkFX9rq7IILGbbNuIM8m0xGW5OXbdVwgccDWLRwFPS48XvKePoM6uvfFIrJe VWLVZP99LysMhyAwj6vAP8nM1xuHPt0oYb2Z38d6GUZIpbo0VrQyqElgoNlHkXWgHoBvdu7Sy ssYDxqMdy3rDwOas9hhs04+3fSHEDkxcdkLIQdI3TfBNoYO10BFb52q5HynGfHvlBS7HypmOp Xzy8IVQOlKP42yNGNIXWOOq745r7tsoZOtd4hlQlnBd4bZf3bCZRVi8uBfE7NefGf3vG145yF VH/3/ipt6Udrv4zPUIsxu7sC36zEbaKDVaR9OxAi+Kdh25JO5JtPuaitxehAnkJSWdPU9BHAg hEn5TMsMst+vMlNCOwANobfLlaTMcLgSm+Prswy1rgbevxfr9U= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building with gcc-10 causes a harmless warning about a section mismatch: WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap() The function tpm2_calc_event_log_size() references the function __init early_memunmap(). This is often because tpm2_calc_event_log_size lacks a __init annotation or the annotation of early_memunmap is wrong. Add the missing annotation. Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing") Signed-off-by: Arnd Bergmann --- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index 31f9f0e369b9..55b031d2c989 100644 --- a/drivers/firmware/efi/tpm.c +++ b/drivers/firmware/efi/tpm.c @@ -16,7 +16,7 @@ int efi_tpm_final_log_size; EXPORT_SYMBOL(efi_tpm_final_log_size); -static int tpm2_calc_event_log_size(void *data, int count, void *size_info) +static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info) { struct tcg_pcr_event2_head *header; int event_size, size = 0; -- 2.26.0