[PATCH] gpu/drm/amdgpu: Include only if CONFIG_DEBUG_FS is set
Hello Alex, 2015-07-14 11:11 GMT+06:00 Alex Deucher : > > 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.
[PATCH] gpu/drm/amdgpu: Include only if CONFIG_DEBUG_FS is set
On Tue, Jul 14, 2015 at 4:18 AM, Alexander Kuleshov wrote: > Hello Alex, > > 2015-07-14 11:11 GMT+06:00 Alex Deucher : >> >> 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
[PATCH] gpu/drm/amdgpu: Include only if CONFIG_DEBUG_FS is set
On 14.07.2015 10:18, Alexander Kuleshov wrote: > Hello Alex, > > 2015-07-14 11:11 GMT+06:00 Alex Deucher : >> 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.
[PATCH] gpu/drm/amdgpu: Include only if CONFIG_DEBUG_FS is set
On Mon, Jul 13, 2015 at 7:03 AM, Alexander Kuleshov wrote: > We have no need to include if the CONFIG_DEBUG_FS option > is not set. > This patch breaks the build with debugfs enabled. Alex > Signed-off-by: Alexander Kuleshov > --- > 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 > #include > -#include > #include > #include > #include > @@ -44,2 +43,2 @@ > #include "vi.h" > #include "bif/bif_4_1_d.h" > > +#ifdef CONFIG_DEBUG_FS > +#include > +#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 at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] gpu/drm/amdgpu: Include only if CONFIG_DEBUG_FS is set
We have no need to include if the CONFIG_DEBUG_FS option is not set. Signed-off-by: Alexander Kuleshov --- 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 #include -#include #include #include #include @@ -44,2 +43,2 @@ #include "vi.h" #include "bif/bif_4_1_d.h" +#ifdef CONFIG_DEBUG_FS +#include +#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