All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
@ 2015-07-13 11:03 Alexander Kuleshov
  2015-07-14  5:11   ` Alex Deucher
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kuleshov @ 2015-07-13 11:03 UTC (permalink / raw)
  To: David Airlie, Alex Deucher, Christian König, Jammy Zhou,
	yanyang1, Marek Olšák, Maninder Singh
  Cc: dri-devel, linux-kernel, Alexander Kuleshov

We have no need to include <linux/debugfs.h> if the CONFIG_DEBUG_FS option
is not set.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ba46be3..23dbfa4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -27,7 +27,6 @@
  */
 #include <linux/console.h>
 #include <linux/slab.h>
-#include <linux/debugfs.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/amdgpu_drm.h>
@@ -44,2 +43,2 @@
 #include "vi.h"
 #include "bif/bif_4_1_d.h"

+#ifdef CONFIG_DEBUG_FS
+#include <linux/debugfs.h>
+#endif
+
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
 static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);

--
2.5.0-rc1


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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
  2015-07-13 11:03 [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set Alexander Kuleshov
@ 2015-07-14  5:11   ` Alex Deucher
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2015-07-14  5:11 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: David Airlie, Alex Deucher, Christian König, Jammy Zhou,
	yanyang1, Marek Olšák, Maninder Singh, LKML,
	Maling list - DRI developers

On Mon, Jul 13, 2015 at 7:03 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> We have no need to include <linux/debugfs.h> if the CONFIG_DEBUG_FS option
> is not set.
>

This patch breaks the build with debugfs enabled.

Alex

> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index ba46be3..23dbfa4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -27,7 +27,6 @@
>   */
>  #include <linux/console.h>
>  #include <linux/slab.h>
> -#include <linux/debugfs.h>
>  #include <drm/drmP.h>
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/amdgpu_drm.h>
> @@ -44,2 +43,2 @@
>  #include "vi.h"
>  #include "bif/bif_4_1_d.h"
>
> +#ifdef CONFIG_DEBUG_FS
> +#include <linux/debugfs.h>
> +#endif
> +
>  static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
>  static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
>
> --
> 2.5.0-rc1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
@ 2015-07-14  5:11   ` Alex Deucher
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2015-07-14  5:11 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: Marek Olšák, LKML, Maling list - DRI developers,
	Maninder Singh, yanyang1, Alex Deucher, Christian König

On Mon, Jul 13, 2015 at 7:03 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> We have no need to include <linux/debugfs.h> if the CONFIG_DEBUG_FS option
> is not set.
>

This patch breaks the build with debugfs enabled.

Alex

> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index ba46be3..23dbfa4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -27,7 +27,6 @@
>   */
>  #include <linux/console.h>
>  #include <linux/slab.h>
> -#include <linux/debugfs.h>
>  #include <drm/drmP.h>
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/amdgpu_drm.h>
> @@ -44,2 +43,2 @@
>  #include "vi.h"
>  #include "bif/bif_4_1_d.h"
>
> +#ifdef CONFIG_DEBUG_FS
> +#include <linux/debugfs.h>
> +#endif
> +
>  static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
>  static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
>
> --
> 2.5.0-rc1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
  2015-07-14  5:11   ` Alex Deucher
  (?)
@ 2015-07-14  8:18   ` Alexander Kuleshov
  2015-07-14  8:23       ` Christian König
  2015-07-14 14:29       ` Alex Deucher
  -1 siblings, 2 replies; 8+ messages in thread
From: Alexander Kuleshov @ 2015-07-14  8:18 UTC (permalink / raw)
  To: Alex Deucher
  Cc: David Airlie, Alex Deucher, Christian König, Jammy Zhou,
	yanyang1, Marek Olšák, Maninder Singh, LKML,
	Maling list - DRI developers

Hello Alex,

2015-07-14 11:11 GMT+06:00 Alex Deucher <alexdeucher@gmail.com>:
>
> This patch breaks the build with debugfs enabled.
>

I've tried to built with CONFIG_DEBUG_FS={y/n} and it builds
successfully. Did I miss something?
Maybe I need to enable/disable anything else CONFIG_*?

Thank you.

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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
  2015-07-14  8:18   ` Alexander Kuleshov
@ 2015-07-14  8:23       ` Christian König
  2015-07-14 14:29       ` Alex Deucher
  1 sibling, 0 replies; 8+ messages in thread
From: Christian König @ 2015-07-14  8:23 UTC (permalink / raw)
  To: Alexander Kuleshov, Alex Deucher
  Cc: David Airlie, Alex Deucher, Jammy Zhou, yanyang1,
	Marek Olšák, Maninder Singh, LKML,
	Maling list - DRI developers

On 14.07.2015 10:18, Alexander Kuleshov wrote:
> Hello Alex,
>
> 2015-07-14 11:11 GMT+06:00 Alex Deucher <alexdeucher@gmail.com>:
>> This patch breaks the build with debugfs enabled.
>>
> I've tried to built with CONFIG_DEBUG_FS={y/n} and it builds
> successfully. Did I miss something?
> Maybe I need to enable/disable anything else CONFIG_*?

Price question is why do you want to conditionally include this header 
in the first place?

If the kernel isn't build with CONFIG_DEBUG_FS we shouldn't use the 
defines, but otherwise they don't seem to hurt.

Regards,
Christian.

>
> Thank you.


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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
@ 2015-07-14  8:23       ` Christian König
  0 siblings, 0 replies; 8+ messages in thread
From: Christian König @ 2015-07-14  8:23 UTC (permalink / raw)
  To: Alexander Kuleshov, Alex Deucher
  Cc: Marek Olšák, LKML, Maling list - DRI developers,
	Maninder Singh, yanyang1, Alex Deucher

On 14.07.2015 10:18, Alexander Kuleshov wrote:
> Hello Alex,
>
> 2015-07-14 11:11 GMT+06:00 Alex Deucher <alexdeucher@gmail.com>:
>> This patch breaks the build with debugfs enabled.
>>
> I've tried to built with CONFIG_DEBUG_FS={y/n} and it builds
> successfully. Did I miss something?
> Maybe I need to enable/disable anything else CONFIG_*?

Price question is why do you want to conditionally include this header 
in the first place?

If the kernel isn't build with CONFIG_DEBUG_FS we shouldn't use the 
defines, but otherwise they don't seem to hurt.

Regards,
Christian.

>
> Thank you.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
  2015-07-14  8:18   ` Alexander Kuleshov
@ 2015-07-14 14:29       ` Alex Deucher
  2015-07-14 14:29       ` Alex Deucher
  1 sibling, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2015-07-14 14:29 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: David Airlie, Alex Deucher, Christian König, Jammy Zhou,
	yanyang1, Marek Olšák, Maninder Singh, LKML,
	Maling list - DRI developers

On Tue, Jul 14, 2015 at 4:18 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> Hello Alex,
>
> 2015-07-14 11:11 GMT+06:00 Alex Deucher <alexdeucher@gmail.com>:
>>
>> This patch breaks the build with debugfs enabled.
>>
>
> I've tried to built with CONFIG_DEBUG_FS={y/n} and it builds
> successfully. Did I miss something?
> Maybe I need to enable/disable anything else CONFIG_*?
>
> Thank you.

Here's the error:
  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_device.o
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function
‘amdgpu_debugfs_regs_init’:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1984:2: error: implicit
declaration of function ‘debugfs_create_file’
[-Werror=implicit-function-declaration]
  ent = debugfs_create_file("amdgpu_regs", S_IFREG | S_IRUGO, root,
  ^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1984:6: warning: assignment
makes pointer from integer without a cast [enabled by default]
  ent = debugfs_create_file("amdgpu_regs", S_IFREG | S_IRUGO, root,
      ^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function
‘amdgpu_debugfs_regs_cleanup’:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1996:2: error: implicit
declaration of function ‘debugfs_remove’
[-Werror=implicit-function-declaration]
  debugfs_remove(adev->debugfs_regs);
  ^
cc1: some warnings being treated as errors
make[4]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_device.o] Error 1
make[3]: *** [drivers/gpu/drm/amd/amdgpu] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2

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

* Re: [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set
@ 2015-07-14 14:29       ` Alex Deucher
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2015-07-14 14:29 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: Marek Olšák, LKML, Maling list - DRI developers,
	Maninder Singh, yanyang1, Alex Deucher, Christian König

On Tue, Jul 14, 2015 at 4:18 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> Hello Alex,
>
> 2015-07-14 11:11 GMT+06:00 Alex Deucher <alexdeucher@gmail.com>:
>>
>> This patch breaks the build with debugfs enabled.
>>
>
> I've tried to built with CONFIG_DEBUG_FS={y/n} and it builds
> successfully. Did I miss something?
> Maybe I need to enable/disable anything else CONFIG_*?
>
> Thank you.

Here's the error:
  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_device.o
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function
‘amdgpu_debugfs_regs_init’:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1984:2: error: implicit
declaration of function ‘debugfs_create_file’
[-Werror=implicit-function-declaration]
  ent = debugfs_create_file("amdgpu_regs", S_IFREG | S_IRUGO, root,
  ^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1984:6: warning: assignment
makes pointer from integer without a cast [enabled by default]
  ent = debugfs_create_file("amdgpu_regs", S_IFREG | S_IRUGO, root,
      ^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function
‘amdgpu_debugfs_regs_cleanup’:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1996:2: error: implicit
declaration of function ‘debugfs_remove’
[-Werror=implicit-function-declaration]
  debugfs_remove(adev->debugfs_regs);
  ^
cc1: some warnings being treated as errors
make[4]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_device.o] Error 1
make[3]: *** [drivers/gpu/drm/amd/amdgpu] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2015-07-14 14:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 11:03 [PATCH] gpu/drm/amdgpu: Include <linux/debugfs.h> only if CONFIG_DEBUG_FS is set Alexander Kuleshov
2015-07-14  5:11 ` Alex Deucher
2015-07-14  5:11   ` Alex Deucher
2015-07-14  8:18   ` Alexander Kuleshov
2015-07-14  8:23     ` Christian König
2015-07-14  8:23       ` Christian König
2015-07-14 14:29     ` Alex Deucher
2015-07-14 14:29       ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.