fsldma: fix missing header include
PATCH 1/1 fsldma: fix missing header include
The slab.h header is required to use the kmalloc() family of functions. Due to recent kernel changes, this header must be directly included by code that calls into the memory allocator.
---
Without this patch, any code which includes this header fails to build.
arch/powerpc/include/asm/fsldma.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/fsldma.h +1 -0
@@ -11,6 +11,7 @@#ifndef __ARCH_POWERPC_ASM_FSLDMA_H__#define __ARCH_POWERPC_ASM_FSLDMA_H__ +#include <linux/slab.h> #include <linux/dmaengine.h> /*
Signature · 1 line
1.7.1
Quoted 17 lines · On Thu, 2 Sep 2010 12:47:52 -0700 "Ira W. Snyder" <[email protected]> wrote:
The
slab.hheader is required to use thekmalloc()family of functions. Due to recent kernel changes, this header must be directly included by code that calls into the memory allocator.Signed-off-by Ira W. Snyder <[email protected]>---
Without this patch, any code which includes this header fails to build.
arch/powerpc/include/asm/fsldma.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/powerpc/include/asm/fsldma.h +0
-0
arch/powerpc/include/asm/fsldma.h line 16
Quoted 6 lines
arch/powerpc/include/asm/fsldma.h +1
-0@@ -11,6 +11,7 @@#ifndef __ARCH_POWERPC_ASM_FSLDMA_H__#define __ARCH_POWERPC_ASM_FSLDMA_H__ +#include <linux/slab.h> #include <linux/dmaengine.h>
It also needs list.h, but appears to get it via sheer luck.
The functions in that header simply shouldn't have been inlined.
It's peculiar that fsl_dma_slave_append() hardwires GFP_ATOMIC, whereas fsl_dma_slave_alloc() takes a gfp_t.
Quoted 29 lines · Andrew Morton
Quoted 17 lines · On Thu, 2 Sep 2010 12:47:52 -0700 "Ira W. Snyder" <[email protected]> wrote:
The
slab.hheader is required to use thekmalloc()family of functions. Due to recent kernel changes, this header must be directly included by code that calls into the memory allocator.Signed-off-by Ira W. Snyder <[email protected]>---
Without this patch, any code which includes this header fails to build.
arch/powerpc/include/asm/fsldma.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/powerpc/include/asm/fsldma.h +0
-0arch/powerpc/include/asm/fsldma.h line 16
Quoted 6 lines
arch/powerpc/include/asm/fsldma.h +1
-0@@ -11,6 +11,7 @@#ifndef __ARCH_POWERPC_ASM_FSLDMA_H__#define __ARCH_POWERPC_ASM_FSLDMA_H__ +#include <linux/slab.h> #include <linux/dmaengine.h> It also needs
list.h, but appears to get it via sheer luck.
Quoted 5 lines
The functions in that header simply shouldn't have been inlined.
It's peculiar that
fsl_dma_slave_append()hardwiresGFP_ATOMIC, whereasfsl_dma_slave_alloc()takes agfp_t.
Would you like a patch that moves the functions to drivers/dma/fsldma.c and EXPORT_SYMBOL_GPL()'s them? I don't know the consequences to doing so, which is why I avoided it when I wrote arch/powerpc/include/asm/fsldma.h.
Thanks,
Ira
Quoted 30 lines · On Fri, 3 Sep 2010 17:47:24 -0700 "Ira W. Snyder" <[email protected]> wrote:
Quoted 29 lines · Andrew Morton
Quoted 17 lines · On Thu, 2 Sep 2010 12:47:52 -0700 "Ira W. Snyder" <[email protected]> wrote:
The
slab.hheader is required to use thekmalloc()family of functions. Due to recent kernel changes, this header must be directly included by code that calls into the memory allocator.Signed-off-by Ira W. Snyder <[email protected]>---
Without this patch, any code which includes this header fails to build.
arch/powerpc/include/asm/fsldma.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/powerpc/include/asm/fsldma.h +0
-0arch/powerpc/include/asm/fsldma.h line 16
Quoted 6 lines
arch/powerpc/include/asm/fsldma.h +1
-0@@ -11,6 +11,7 @@#ifndef __ARCH_POWERPC_ASM_FSLDMA_H__#define __ARCH_POWERPC_ASM_FSLDMA_H__ +#include <linux/slab.h> #include <linux/dmaengine.h> It also needs
list.h, but appears to get it via sheer luck.
Quoted 8 lines
Quoted 5 lines
The functions in that header simply shouldn't have been inlined.
It's peculiar that
fsl_dma_slave_append()hardwiresGFP_ATOMIC, whereasfsl_dma_slave_alloc()takes agfp_t.Would you like a patch that moves the functions to
drivers/dma/fsldma.cand EXPORT_SYMBOL_GPL()'s them?
Sure, thanks. Then I can harrass Dan with it ;)
Quoted 3 lines
I don't know the consequences to doing
so, which is why I avoided it when I wrotearch/powerpc/include/asm/fsldma.h.
The minimal fix for the bug was appropriate.