Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222276 > unrolled thread

[PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h

Started byArd Biesheuvel <ard.biesheuvel@linaro.org>
First post2015-09-10 18:10 +0200
Last post2015-09-10 18:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-09-10 18:10 +0200
    Re: [PATCH] mm/early_ioremap: add explicit #include of  asm/early_ioremap.h Mark Salter <msalter@redhat.com> - 2015-09-10 18:40 +0200

#1222276 — [PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2015-09-10 18:10 +0200
Subject[PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h
Message-ID<q7cA9-6pV-9@gated-at.bofh.it>
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 <ard.biesheuvel@linaro.org>
---

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 <linux/mm.h>
 #include <linux/vmalloc.h>
 #include <asm/fixmap.h>
+#include <asm/early_ioremap.h>
 
 #ifdef CONFIG_MMU
 static int early_ioremap_debug __initdata;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1222293 — Re: [PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h

FromMark Salter <msalter@redhat.com>
Date2015-09-10 18:40 +0200
SubjectRe: [PATCH] mm/early_ioremap: add explicit #include of asm/early_ioremap.h
Message-ID<q7d3c-6Y6-23@gated-at.bofh.it>
In reply to#1222276
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 <ard.biesheuvel@linaro.org>
> ---

Acked-by: Mark Salter <msalter@redhat.com>

> 
> 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 <linux/mm.h>
>  #include <linux/vmalloc.h>
>  #include <asm/fixmap.h>
> +#include <asm/early_ioremap.h>
>  
>  #ifdef CONFIG_MMU
>  static int early_ioremap_debug __initdata;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web