2014-02-09 09:45:22

by Alexandre Courbot

[permalink] [raw]
Subject: [PATCH] drm/ttm: declare 'struct device' in ttm_page_alloc.h

Declare 'struct device' explicitly in ttm_page_alloc.h as this file
does not include any file declaring it. This removes the following
warning:

warning: 'struct device' declared inside parameter list

Signed-off-by: Alexandre Courbot <[email protected]>
---
This warning was visible when compiling Nouveau on -next today.

include/drm/ttm/ttm_page_alloc.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index d1f61bf..49a8284 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -29,6 +29,8 @@
#include <drm/ttm/ttm_bo_driver.h>
#include <drm/ttm/ttm_memory.h>

+struct device;
+
/**
* Initialize pool allocator.
*/
--
1.8.5.4


2014-02-10 12:38:07

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] drm/ttm: declare 'struct device' in ttm_page_alloc.h

On Sun, Feb 09, 2014 at 06:43:18PM +0900, Alexandre Courbot wrote:
> Declare 'struct device' explicitly in ttm_page_alloc.h as this file
> does not include any file declaring it. This removes the following
> warning:
>
> warning: 'struct device' declared inside parameter list
>
> Signed-off-by: Alexandre Courbot <[email protected]>
> ---
> This warning was visible when compiling Nouveau on -next today.
>
> include/drm/ttm/ttm_page_alloc.h | 2 ++
> 1 file changed, 2 insertions(+)

I don't think I've seen this on x86, but I've certainly encountered the
same warning when building nouveau on ARM, so:

Reviewed-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (662.00 B)
(No filename) (836.00 B)
Download all attachments

2014-02-20 04:12:39

by Alexandre Courbot

[permalink] [raw]
Subject: Re: [PATCH] drm/ttm: declare 'struct device' in ttm_page_alloc.h

Ping, David?

On Mon, Feb 10, 2014 at 9:37 PM, Thierry Reding
<[email protected]> wrote:
> On Sun, Feb 09, 2014 at 06:43:18PM +0900, Alexandre Courbot wrote:
>> Declare 'struct device' explicitly in ttm_page_alloc.h as this file
>> does not include any file declaring it. This removes the following
>> warning:
>>
>> warning: 'struct device' declared inside parameter list
>>
>> Signed-off-by: Alexandre Courbot <[email protected]>
>> ---
>> This warning was visible when compiling Nouveau on -next today.
>>
>> include/drm/ttm/ttm_page_alloc.h | 2 ++
>> 1 file changed, 2 insertions(+)
>
> I don't think I've seen this on x86, but I've certainly encountered the
> same warning when building nouveau on ARM, so:
>
> Reviewed-by: Thierry Reding <[email protected]>