From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756092AbbJ1QCY (ORCPT ); Wed, 28 Oct 2015 12:02:24 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:25723 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbbJ1QCX convert rfc822-to-8bit (ORCPT ); Wed, 28 Oct 2015 12:02:23 -0400 Date: Wed, 28 Oct 2015 16:02:19 +0000 From: Catalin Marinas To: Nicolas Iooss Cc: "linux-kernel@vger.kernel.org" , Andrew Morton Subject: Re: [PATCH] mm: kmemleak: mark kmemleak_init prototype as __init Message-ID: <20151028160219.GC8899@e104818-lin.cambridge.arm.com> References: <1436060821-29353-1-git-send-email-nicolas.iooss_linux@m4x.org> MIME-Version: 1.0 In-Reply-To: <1436060821-29353-1-git-send-email-nicolas.iooss_linux@m4x.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-OriginalArrivalTime: 28 Oct 2015 16:02:19.0808 (UTC) FILETIME=[06420200:01D1119A] X-MC-Unique: 0AVfXZtUSqufq8w_3AMp9A-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 05, 2015 at 02:47:01AM +0100, Nicolas Iooss wrote: > 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, Acked-by: Catalin Marinas I forgot about this patch. Andrew, could you please queue this patch for 4.4? Thanks. -- Catalin