linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add forward declaration of struct device
@ 2010-12-20 16:23 Rolf Eike Beer
  2011-01-19 14:56 ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Rolf Eike Beer @ 2010-12-20 16:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dan Williams, trivial

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

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
 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);
 
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add forward declaration of struct device
  2010-12-20 16:23 [PATCH] Add forward declaration of struct device Rolf Eike Beer
@ 2011-01-19 14:56 ` Jiri Kosina
  2011-01-19 16:01   ` Rolf Eike Beer
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2011-01-19 14:56 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: linux-kernel, Dan Williams

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@sf-tec.de>
> ---
>  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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add forward declaration of struct device
  2011-01-19 14:56 ` Jiri Kosina
@ 2011-01-19 16:01   ` Rolf Eike Beer
  0 siblings, 0 replies; 3+ messages in thread
From: Rolf Eike Beer @ 2011-01-19 16:01 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, Dan Williams

[-- Attachment #1: Type: Text/Plain, Size: 511 bytes --]

Am Mittwoch 19 Januar 2011, 15:56:47 schrieb Jiri Kosina:
> 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).

Nothing (yet) in tree.

Eike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-19 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 16:23 [PATCH] Add forward declaration of struct device Rolf Eike Beer
2011-01-19 14:56 ` Jiri Kosina
2011-01-19 16:01   ` Rolf Eike Beer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).