From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754759AbbIJQfW (ORCPT ); Thu, 10 Sep 2015 12:35:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53942 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbbIJQfU (ORCPT ); Thu, 10 Sep 2015 12:35:20 -0400 Message-ID: <1441902919.18796.10.camel@redhat.com> Subject: Re: [PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h From: Mark Salter To: Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Date: Thu, 10 Sep 2015 12:35:19 -0400 In-Reply-To: <1441900848-18527-1-git-send-email-ard.biesheuvel@linaro.org> References: <1441900848-18527-1-git-send-email-ard.biesheuvel@linaro.org> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-09-10 at 18:00 +0200, Ard Biesheuvel wrote: > Commit 6b0f68e32ea8 ("mm: add utility for early copy from unmapped > ram") introduces a function copy_from_early_mem() into mm/early_ioremap.c > which itself calls early_memremap()/early_memunmap(). However, since > early_memunmap() has not been declared yet at this point in the .c file, > nor by any explicitly included header files, we are depending on a > transitive include of asm/early_ioremap.h to declare it, which is fragile. > > So instead, include this header explicitly. > > Signed-off-by: Ard Biesheuvel > --- Acked-by: Mark Salter > > I ran into this by accident when trying to enable to the generic ioremap > implementation for 32-bit ARM. > > mm/early_ioremap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c > index 23f744d77ce0..17ae14b5aefa 100644 > --- a/mm/early_ioremap.c > +++ b/mm/early_ioremap.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > > #ifdef CONFIG_MMU > static int early_ioremap_debug __initdata;