From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755506AbbGEKEe (ORCPT ); Sun, 5 Jul 2015 06:04:34 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:45641 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752471AbbGEKE0 (ORCPT ); Sun, 5 Jul 2015 06:04:26 -0400 From: Nicolas Iooss To: Catalin Marinas Cc: linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH] mm: kmemleak: mark kmemleak_init prototype as __init Date: Sun, 5 Jul 2015 09:47:01 +0800 Message-Id: <1436060821-29353-1-git-send-email-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.4.5 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Jul 5 03:47:28 2015 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.001222, queueID=370E314040902 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kmemleak_init() definition in mm/kmemleak.c is marked __init but its prototype in include/linux/kmemleak.h is marked __ref since commit a6186d89c913 ("kmemleak: Mark the early log buffer as __initdata"). This causes a section mismatch which is reported as a warning when building with clang -Wsection, because kmemleak_init() is declared in section .ref.text but defined in .init.text. Fix this by marking kmemleak_init() prototype __init. Signed-off-by: Nicolas Iooss --- include/linux/kmemleak.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h index d0a1f99e24e3..4894c6888bc6 100644 --- a/include/linux/kmemleak.h +++ b/include/linux/kmemleak.h @@ -25,7 +25,7 @@ #ifdef CONFIG_DEBUG_KMEMLEAK -extern void kmemleak_init(void) __ref; +extern void kmemleak_init(void) __init; extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, gfp_t gfp) __ref; extern void kmemleak_alloc_percpu(const void __percpu *ptr, size_t size, -- 2.4.5