Re: [PATCH] Add forward declaration of struct device

From: Jiri Kosina
Date: Wed Jan 19 2011 - 09:56:55 EST


On Mon, 20 Dec 2010, Rolf Eike Beer wrote:

> This fixes this warning when including linux/dmapool.h first:
>
> warning: âstruct deviceâ declared inside parameter list
> warning: its scope is only this definition or declaration, which is probably not what you want

In what situation do you see this warning? (the one you have posted
doesn't show the filename that is being compiled).

>
> Signed-off-by: Rolf Eike Beer <eike-kernel@xxxxxxxxx>
> ---
> include/linux/dmapool.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h
> index 022e34f..52456aa 100644
> --- a/include/linux/dmapool.h
> +++ b/include/linux/dmapool.h
> @@ -14,6 +14,8 @@
> #include <asm/io.h>
> #include <asm/scatterlist.h>
>
> +struct device;
> +
> struct dma_pool *dma_pool_create(const char *name, struct device *dev,
> size_t size, size_t align, size_t allocation);
>

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