From patchwork Thu Feb 18 14:01:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102747 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp605045lbl; Thu, 18 Feb 2016 06:04:22 -0800 (PST) X-Received: by 10.66.136.231 with SMTP id qd7mr10271350pab.51.1455804262420; Thu, 18 Feb 2016 06:04:22 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si9678123pfi.36.2016.02.18.06.04.22; Thu, 18 Feb 2016 06:04:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946314AbcBROES (ORCPT + 30 others); Thu, 18 Feb 2016 09:04:18 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:63418 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946181AbcBROEO (ORCPT ); Thu, 18 Feb 2016 09:04:14 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MdLhj-1aF0ec0XBL-00IVn2; Thu, 18 Feb 2016 15:03:41 +0100 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ard Biesheuvel , Nicolas Pitre , Jon Medhurst , Marc Zyngier , Kees Cook , Catalin Marinas , Laura Abbott , linux-kernel@vger.kernel.org Subject: [PATCH 3/9] ARM: make free_memmap as __init Date: Thu, 18 Feb 2016 15:01:55 +0100 Message-Id: <1455804123-2526139-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455804123-2526139-1-git-send-email-arnd@arndb.de> References: <1455804123-2526139-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:gq2l2xzuE8epLvgcdcRcWQ/NsAhEanrWvf4mB+/NuA57oumlaw3 r54D596ABkA5ja6jI9bFjVPDysjjVWUO3b4a4eWpChvFJyziL7aJD/BkFPYL7ZPOz3eTbef DCeHha/7I90mdJKH//AUZTzF4OJAQ9EBLRUFx9jnaeaxRdkROiVGQ1bP19GUNM0N0aAMrCt Ptlk6ZWFyFlSQPRUfO0IQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:NwxXmCbLBw8=:EI9phpV5LBJtnSj4xVTYzm QPyQSYjxgEanvoXkLzg2WzCm4M9CcJkPQtV8v9g8xGbyvpz6M+kenTW5HlV5sRagdm/kJLdtY uq007NlKGD2JN+eOfaet4UUpQW8oMrNm2sP9HJon9QrRz894f83PkB2Jr/sEQjxHUerFMe6Ec V7LEI/Cd7uVSveD8Mo3WoZf5hcqRFObJaLpHK6nn/DnfJDhscRkFrGVgdfAm50jya1T3C1ICI uzg3jJlQV4PxhV71DAEIo1bTkctYqjbZcF82cJg8K5vil++D5i2cQh0FwFKcpQ/l/mC9MOAHY gFUX5ANke7Vk4h4nziXHipzwT04JIBzAsdluRZgkC2tFNJyuXHVOwsRFzDXwUyqXuM+rPrzn0 jKF3RjQe/QA0nkgHaoxLaVyprygv2VWPFTbk/i5k/f5aK84uWJdVvmmJA/B4GOGEOtdwbavpG NpZuEGbxFULr1f1csVj9U0dwlAGUciayemWi0BkqwwLjNX84urdw9WaSrqv+OSbKjZ6Jwu3B4 YOdnaPouxypAq3QV1dCUk2tv74qLZQ1tNXQ7lk7WEEd2+H6QfmbgKuL87HhbdQ07fFg15QOzP kGq1W9ku6/pJA+WR8fFOup8gTosp6LbWBYpxmrg613/eV+N04UCtBP7fvEjPeDI03J3pzwkmK En1FXFoaqNb9sFsMLaUUDPYIexGGyztldchaD472w65xkUnGgYtlVUQhhmNPOIsNqqQ4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org free_memmap is an inline function, but gcc may choose to ignore that when CONFIG_OPTIMIZE_INLINING is set. In that case it is put in the .text section, causing a kbuild warning: WARNING: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in reference from the function free_memmap() to the function .init.text:__memblock_free_early() The function free_memmap() references the function __init __memblock_free_early(). This is often because free_memmap lacks a __init annotation or the annotation of __memblock_free_early is wrong. FATAL: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. This marks the function both inline and __init, which is a correct annotation and avoids the problem. Signed-off-by: Arnd Bergmann --- arch/arm/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 370581aeb871..a4db267c35b2 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -330,7 +330,7 @@ static inline void poison_init_mem(void *s, size_t count) *p++ = 0xe7fddef0; } -static inline void +static inline void __init free_memmap(unsigned long start_pfn, unsigned long end_pfn) { struct page *start_pg, *end_pg;