Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638890 > unrolled thread
| Started by | Laura Abbott <labbott@redhat.com> |
|---|---|
| First post | 2017-05-10 16:50 +0200 |
| Last post | 2017-05-10 19:20 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] drm/prime: include device.h Laura Abbott <labbott@redhat.com> - 2017-05-10 16:50 +0200
Re: [PATCH] drm/prime: include device.h Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-10 16:50 +0200
[PATCHv2] drm/prime: Forward declare struct device Laura Abbott <labbott@redhat.com> - 2017-05-10 19:10 +0200
Re: [PATCHv2] drm/prime: Forward declare struct device Sumit Semwal <sumit.semwal@linaro.org> - 2017-05-10 19:20 +0200
| From | Laura Abbott <labbott@redhat.com> |
|---|---|
| Date | 2017-05-10 16:50 +0200 |
| Subject | [PATCH] drm/prime: include device.h |
| Message-ID | <tFB69-1Xf-17@gated-at.bofh.it> |
Explictly add linux/device.h to ensure struct device is defined:
In file included from include/drm/drm_file.h:38:0,
from drivers/gpu/drm/drm_file.c:38:
include/drm/drm_prime.h:71:14: warning: 'struct device' declared inside
parameter list will not be visible outside of this definition or
declaration
struct device *attach_dev);
^~~~~~
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
Sorry, missed sending this out
---
include/drm/drm_prime.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 46fd1fb..8ef37c8 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -35,6 +35,7 @@
#include <linux/mutex.h>
#include <linux/rbtree.h>
#include <linux/scatterlist.h>
+#include <linux/device.h>
/**
* struct drm_prime_file_private - per-file tracking for PRIME
--
2.7.4
[toc] | [next] | [standalone]
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Date | 2017-05-10 16:50 +0200 |
| Message-ID | <tFB69-1Xf-21@gated-at.bofh.it> |
| In reply to | #1638890 |
On Wed, May 10, 2017 at 07:40:01AM -0700, Laura Abbott wrote: > Explictly add linux/device.h to ensure struct device is defined: > > In file included from include/drm/drm_file.h:38:0, > from drivers/gpu/drm/drm_file.c:38: > include/drm/drm_prime.h:71:14: warning: 'struct device' declared inside > parameter list will not be visible outside of this definition or > declaration > struct device *attach_dev); We aren't using it for anything other than an opaque pointer, so a struct device; forward decl will suffice? -Chris -- Chris Wilson, Intel Open Source Technology Centre
[toc] | [prev] | [next] | [standalone]
| From | Laura Abbott <labbott@redhat.com> |
|---|---|
| Date | 2017-05-10 19:10 +0200 |
| Subject | [PATCHv2] drm/prime: Forward declare struct device |
| Message-ID | <tFDhD-3pT-17@gated-at.bofh.it> |
| In reply to | #1638892 |
We need a declaration of struct device to avoid warnings:
In file included from include/drm/drm_file.h:38:0,
from drivers/gpu/drm/drm_file.c:38:
include/drm/drm_prime.h:71:14: warning: 'struct device' declared inside
parameter list will not be visible outside of this definition or
declaration
struct device *attach_dev);
^~~~~~
Forward declare it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
v2: Switch to foward declaration instead of including a header.
---
include/drm/drm_prime.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 46fd1fb..59ccab4 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -50,6 +50,8 @@ struct drm_prime_file_private {
struct rb_root handles;
};
+struct device;
+
struct dma_buf_export_info;
struct dma_buf;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Sumit Semwal <sumit.semwal@linaro.org> |
|---|---|
| Date | 2017-05-10 19:20 +0200 |
| Subject | Re: [PATCHv2] drm/prime: Forward declare struct device |
| Message-ID | <tFDrk-3t7-5@gated-at.bofh.it> |
| In reply to | #1638970 |
Hi Laura,
On 10 May 2017 at 22:35, Laura Abbott <labbott@redhat.com> wrote:
>
> We need a declaration of struct device to avoid warnings:
>
> In file included from include/drm/drm_file.h:38:0,
> from drivers/gpu/drm/drm_file.c:38:
> include/drm/drm_prime.h:71:14: warning: 'struct device' declared inside
> parameter list will not be visible outside of this definition or
> declaration
> struct device *attach_dev);
> ^~~~~~
>
> Forward declare it.
>
> Signed-off-by: Laura Abbott <labbott@redhat.com>
Thanks for the patch; feel free to add my
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
> ---
> v2: Switch to foward declaration instead of including a header.
> ---
> include/drm/drm_prime.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
> index 46fd1fb..59ccab4 100644
> --- a/include/drm/drm_prime.h
> +++ b/include/drm/drm_prime.h
> @@ -50,6 +50,8 @@ struct drm_prime_file_private {
> struct rb_root handles;
> };
>
> +struct device;
> +
> struct dma_buf_export_info;
> struct dma_buf;
>
> --
> 2.7.4
>
Best,
Sumit.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web