drm: subsytem-wide debugfs functions refactor
Subsystems (21)
v2 cover drm: subsytem-wide debugfs functions refactor
This series includes work on various debugfs functions both in drm/core and across various drivers in the subsystem.
Since commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() does not fail and only returns zero. This series therefore removes the left over error handling and checks for its return value across drm drivers.
As a result of these changes, most drm_debugfs functions are converted to return void in this series. This also enables the drm_driver, debugfs_init() hook to be changed to return void.
v2: individual driver patches have been converted to have debugfs functions return 0 instead of void to prevent breaking individual driver builds.
The last patch then converts the .debugfs_hook() and its users across all drivers to return void.
Wambui Karuga (17):
drm/tegra: remove checks for debugfs functions return value drm/tilcdc: remove check for return value of debugfs functions. drm/v3d: make v3d_debugfs_init() return 0
drm/vc4: remove check of return value of drm_debugfs functions drm/arc: make arcgpu_debugfs_init() return 0.
drm/arm: make hdlcd_debugfs_init() return 0
drm/etnaviv: remove check for return value of
drm_debugfs_create_files()
drm/msm: remove checks for return value of drm_debugfs_create_files() drm/sti: remove use of drm_debugfs functions as return values drm/vram-helper: make drm_vram_mm_debugfs_init() return 0 drm/nouveau: make nouveau_drm_debugfs_init() return 0 drm/pl111: make pl111_debugfs_init return 0
drm/omap: remove checks for return value of drm_debugfs functions drm/i915: have *_debugfs_init() functions return void.
drm: make various debugfs_init() functions return 0 drm/debugfs: remove checks for return value of drm_debugfs functions.
drm: convert .debugfs_init() hook to return void.
drivers/gpu/drm/arc/arcpgu_drv.c | 7 +-- drivers/gpu/drm/arm/hdlcd_drv.c | 7 +-- drivers/gpu/drm/arm/malidp_drv.c | 3 +- drivers/gpu/drm/drm_atomic.c | 8 ++-- drivers/gpu/drm/drm_client.c | 8 ++-- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_debugfs.c | 45 +++++-------------- drivers/gpu/drm/drm_framebuffer.c | 8 ++-- drivers/gpu/drm/drm_gem_vram_helper.c | 14 ++---- drivers/gpu/drm/drm_internal.h | 2 +- drivers/gpu/drm/drm_mipi_dbi.c | 6 +-- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 18 ++------ .../drm/i915/display/intel_display_debugfs.c | 8 ++-- .../drm/i915/display/intel_display_debugfs.h | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++-- drivers/gpu/drm/i915/i915_debugfs.h | 4 +- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 18 +++----- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 14 ++---- drivers/gpu/drm/msm/msm_debugfs.c | 23 +++------- drivers/gpu/drm/msm/msm_debugfs.h | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 2 +- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 26 +++++------ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 8 ++-- drivers/gpu/drm/omapdrm/omap_debugfs.c | 29 +++--------- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/pl111/pl111_debugfs.c | 8 ++-- drivers/gpu/drm/pl111/pl111_drm.h | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 21 +++------ drivers/gpu/drm/qxl/qxl_drv.h | 13 +++--- drivers/gpu/drm/qxl/qxl_ttm.c | 6 +-- drivers/gpu/drm/sti/sti_compositor.c | 6 +-- drivers/gpu/drm/sti/sti_compositor.h | 4 +- drivers/gpu/drm/sti/sti_crtc.c | 2 +- drivers/gpu/drm/sti/sti_cursor.c | 14 +++--- drivers/gpu/drm/sti/sti_drv.c | 16 ++----- drivers/gpu/drm/sti/sti_dvo.c | 13 +++--- drivers/gpu/drm/sti/sti_gdp.c | 7 +-- drivers/gpu/drm/sti/sti_hda.c | 13 +++--- drivers/gpu/drm/sti/sti_hdmi.c | 13 +++--- drivers/gpu/drm/sti/sti_hqvdp.c | 12 ++--- drivers/gpu/drm/sti/sti_mixer.c | 10 ++--- drivers/gpu/drm/sti/sti_mixer.h | 2 +- drivers/gpu/drm/sti/sti_tvout.c | 13 +++--- drivers/gpu/drm/sti/sti_vid.c | 8 ++-- drivers/gpu/drm/sti/sti_vid.h | 2 +- drivers/gpu/drm/tegra/dc.c | 11 +---- drivers/gpu/drm/tegra/drm.c | 8 ++-- drivers/gpu/drm/tegra/dsi.c | 11 +---- drivers/gpu/drm/tegra/hdmi.c | 11 +---- drivers/gpu/drm/tegra/sor.c | 11 +---- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 17 ++----- drivers/gpu/drm/v3d/v3d_debugfs.c | 8 ++-- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- drivers/gpu/drm/vc4/vc4_debugfs.c | 11 ++--- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 3 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- include/drm/drm_client.h | 2 +- include/drm/drm_debugfs.h | 16 +++---- include/drm/drm_drv.h | 2 +- include/drm/drm_gem_vram_helper.h | 2 +- include/drm/drm_mipi_dbi.h | 2 +- 63 files changed, 204 insertions(+), 380 deletions(-)
Signature · 1 line
2.25.1
PATCH v2 1/17 drm/tegra: remove checks for debugfs functions return value
Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) there is no need to check the return value of drm_debugfs_create_files(). Therefore, remove the return checks and error handling of the drm_debugfs_create_files() function from various debugfs init functions in drm/tegra and have them return 0 directly.
v2: remove conversion of tegra_debugfs_init() to void to avoid build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/tegra/dc.c | 11 +---------- drivers/gpu/drm/tegra/drm.c | 7 ++++--- drivers/gpu/drm/tegra/dsi.c | 11 +---------- drivers/gpu/drm/tegra/hdmi.c | 11 +---------- drivers/gpu/drm/tegra/sor.c | 11 +---------- 5 files changed, 8 insertions(+), 43 deletions(-)
drivers/gpu/drm/tegra/dc.c +1 -10
@@ -1496,7 +1496,6 @@ static int tegra_dc_late_register(struct drm_crtc *crtc)struct drm_minor *minor = crtc->dev->primary;struct dentry *root;struct tegra_dc *dc =to_tegra_dc (crtc); -int err;#ifdef CONFIG_DEBUG_FS root = crtc->debugfs_entry;
@@ -1512,17 +1511,9 @@ static int tegra_dc_late_register(struct drm_crtc *crtc)for (i =0 ; i < count; i++) dc->debugfs_files[i].data = dc; - err =drm_debugfs_create_files (dc->debugfs_files, count, root, minor); -if (err <0 ) - goto free; +drm_debugfs_create_files (dc->debugfs_files, count, root, minor);return 0 ; - -free: -kfree (dc->debugfs_files); - dc->debugfs_files =NULL ; - -return err; }static void tegra_dc_early_unregister (struct drm_crtc *crtc)
drivers/gpu/drm/tegra/drm.c +4 -3
@@ -841,9 +841,10 @@ static struct drm_info_list tegra_debugfs_list[] = {static int tegra_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (tegra_debugfs_list, -ARRAY_SIZE (tegra_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (tegra_debugfs_list, +ARRAY_SIZE (tegra_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }#endif
drivers/gpu/drm/tegra/dsi.c +1 -10
@@ -234,7 +234,6 @@ static int tegra_dsi_late_register(struct drm_connector *connector)struct drm_minor *minor = connector->dev->primary;struct dentry *root = connector->debugfs_entry;struct tegra_dsi *dsi =to_dsi (output); -int err; dsi->debugfs_files =kmemdup (debugfs_files,sizeof (debugfs_files),GFP_KERNEL );
@@ -244,17 +243,9 @@ static int tegra_dsi_late_register(struct drm_connector *connector)for (i =0 ; i < count; i++) dsi->debugfs_files[i].data = dsi; - err =drm_debugfs_create_files (dsi->debugfs_files, count, root, minor); -if (err <0 ) - goto free; +drm_debugfs_create_files (dsi->debugfs_files, count, root, minor);return 0 ; - -free: -kfree (dsi->debugfs_files); - dsi->debugfs_files =NULL ; - -return err; }static void tegra_dsi_early_unregister (struct drm_connector *connector)
drivers/gpu/drm/tegra/hdmi.c +1 -10
@@ -1064,7 +1064,6 @@ static int tegra_hdmi_late_register(struct drm_connector *connector)struct drm_minor *minor = connector->dev->primary;struct dentry *root = connector->debugfs_entry;struct tegra_hdmi *hdmi =to_hdmi (output); -int err; hdmi->debugfs_files =kmemdup (debugfs_files,sizeof (debugfs_files),GFP_KERNEL );
@@ -1074,17 +1073,9 @@ static int tegra_hdmi_late_register(struct drm_connector *connector)for (i =0 ; i < count; i++) hdmi->debugfs_files[i].data = hdmi; - err =drm_debugfs_create_files (hdmi->debugfs_files, count, root, minor); -if (err <0 ) - goto free; +drm_debugfs_create_files (hdmi->debugfs_files, count, root, minor);return 0 ; - -free: -kfree (hdmi->debugfs_files); - hdmi->debugfs_files =NULL ; - -return err; }static void tegra_hdmi_early_unregister (struct drm_connector *connector)
drivers/gpu/drm/tegra/sor.c +1 -10
@@ -1687,7 +1687,6 @@ static int tegra_sor_late_register(struct drm_connector *connector)struct drm_minor *minor = connector->dev->primary;struct dentry *root = connector->debugfs_entry;struct tegra_sor *sor =to_sor (output); -int err; sor->debugfs_files =kmemdup (debugfs_files,sizeof (debugfs_files),GFP_KERNEL );
@@ -1697,17 +1696,9 @@ static int tegra_sor_late_register(struct drm_connector *connector)for (i =0 ; i < count; i++) sor->debugfs_files[i].data = sor; - err =drm_debugfs_create_files (sor->debugfs_files, count, root, minor); -if (err <0 ) - goto free; +drm_debugfs_create_files (sor->debugfs_files, count, root, minor);return 0 ; - -free: -kfree (sor->debugfs_files); - sor->debugfs_files =NULL ; - -return err; }static void tegra_sor_early_unregister (struct drm_connector *connector)
Signature · 1 line
2.25.1
PATCH v2 2/17 drm/tilcdc: remove check for return value of debugfs functions.
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails. Therefore, remove the check and error handling of the return value of drm_debugfs_create_files() as it is not needed in tilcdc_debugfs_init().
Also remove local variables that are not used after the changes.
v2: remove conversion of tilcdc_debugfs_init() to void to avoid build breakage and enable individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +4 -11
@@ -480,24 +480,17 @@ static struct drm_info_list tilcdc_debugfs_list[] = {static int tilcdc_debugfs_init (struct drm_minor *minor) { -struct drm_device *dev = minor->dev;struct tilcdc_module *mod; -int ret; - ret =drm_debugfs_create_files (tilcdc_debugfs_list, -ARRAY_SIZE (tilcdc_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (tilcdc_debugfs_list, +ARRAY_SIZE (tilcdc_debugfs_list), + minor->debugfs_root, minor);list_for_each_entry (mod, &module_list, list)if (mod->funcs->debugfs_init) mod->funcs->debugfs_init (mod, minor); -if (ret) { -dev_err (dev->dev,"could not install tilcdc_debugfs_list\n" ); -return ret; - } - -return ret; +return 0 ; }#endif
Signature · 1 line
2.25.1
PATCH v2 3/17 drm/v3d: make v3d_debugfs_init() return 0
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of v3d_debugfs_init() and have the function return 0 directly instead.
v2: remove conversion of v3d_debugfs_init() to void to avoid build breakage and enable individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/v3d/v3d_debugfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/v3d/v3d_debugfs.c +4 -3
@@ -261,7 +261,8 @@ static const struct drm_info_list v3d_debugfs_list[] = {int v3d_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (v3d_debugfs_list, -ARRAY_SIZE (v3d_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (v3d_debugfs_list, +ARRAY_SIZE (v3d_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }
Signature · 1 line
2.25.1
PATCH v2 4/17 drm/vc4: remove check of return value of drm_debugfs functions
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove unnecessary check and error handling for the return value of drm_debugfs_create_files() in vc4_debugfs_init().
v2: remove conversion of vc4_debugfs_init() to void to enable individual compilation and avoid build issues and breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/vc4/vc4_debugfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/vc4/vc4_debugfs.c +2 -5
@@ -30,11 +30,8 @@ vc4_debugfs_init(struct drm_minor *minor) minor->debugfs_root, &vc4->load_tracker_enabled);list_for_each_entry (entry, &vc4->debugfs_list, link) { -int ret =drm_debugfs_create_files (&entry->info,1 , - minor->debugfs_root, minor); - -if (ret) -return ret; +drm_debugfs_create_files (&entry->info,1 , + minor->debugfs_root, minor); }return 0 ;
Signature · 1 line
2.25.1
PATCH v2 5/17 drm/arc: make arcgpu_debugfs_init() return 0.
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of arcpgu_debugfs_init() and have the latter function return 0 directly.
v2: convert the function to return 0 instead of void to avoid breaking the build and ensure that this individual patch compiles properly.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/arc/arcpgu_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/arc/arcpgu_drv.c +4 -2
@@ -139,8 +139,10 @@ static struct drm_info_list arcpgu_debugfs_list[] = {static int arcpgu_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (arcpgu_debugfs_list, -ARRAY_SIZE (arcpgu_debugfs_list), minor->debugfs_root, minor); +drm_debugfs_create_files (arcpgu_debugfs_list, +ARRAY_SIZE (arcpgu_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }#endif
Signature · 1 line
2.25.1
RE: [PATCH v2 05/17] drm/arc: make arcgpu_debugfs_init() return 0.
Hi Wambui,
Quoted 13 lines
-----Original Message-----
From: Wambui Karuga <[email protected]>
Sent: Tuesday, March 10, 2020 8:31 PM
To: [email protected]; [email protected]; Alexey Brodkin <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH v2 05/17] drm/arc: makearcgpu_debugfs_init()return 0.Since commit
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofarcpgu_debugfs_init()and have the latter function return 0 directly.
Quoted 5 lines
v2: convert the function to return 0 instead of void to avoid breaking the build and ensure that this individual patch compiles properly.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>
Thanks for the patch!
PATCH v2 6/17 drm/arm: make hdlcd_debugfs_init() return 0
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of hdlcd_debugfs_init() and have the latter function return 0 directly.
v2: make hdlcd_debugfs_init() return 0 instead of void to ensure that each patch compiles individually.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/arm/hdlcd_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/hdlcd_drv.c +4 -2
@@ -226,8 +226,10 @@ static struct drm_info_list hdlcd_debugfs_list[] = {static int hdlcd_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (hdlcd_debugfs_list, -ARRAY_SIZE (hdlcd_debugfs_list), minor->debugfs_root, minor); +drm_debugfs_create_files (hdlcd_debugfs_list, +ARRAY_SIZE (hdlcd_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }#endif
Signature · 1 line
2.25.1
Re: [PATCH v2 06/17] drm/arm: make hdlcd_debugfs_init() return 0
Quoted 11 lines · Wambui Karuga
Since commit
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofhdlcd_debugfs_init()and have the latter function return 0 directly.v2: make
hdlcd_debugfs_init()return 0 instead of void to ensure that each patch compiles individually.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>
Best regards,
Liviu
Quoted 24 lines
--- drivers/gpu/drm/arm/hdlcd_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/arm/hdlcd_drv.c +4
-2@@ -226,8 +226,10 @@ static struct drm_info_list hdlcd_debugfs_list[] = {static int hdlcd_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (hdlcd_debugfs_list, -ARRAY_SIZE (hdlcd_debugfs_list), minor->debugfs_root, minor); +drm_debugfs_create_files (hdlcd_debugfs_list, +ARRAY_SIZE (hdlcd_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }#endif Signature · 1 line
2.25.1
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develPATCH v2 7/17 drm/etnaviv: remove check for return value of drm_debugfs_create_files()
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and only returns 0. Therefore, remove the unnecessary check of its return value and error handling in etnaviv_debugfs_init() and have the function return 0 directly.
v2: have etnaviv_debugfs_init() return 0 instead of void to ensure individual compilation and avoid build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/gpu/drm/etnaviv/etnaviv_drv.c +4 -12
@@ -233,19 +233,11 @@ static struct drm_info_list etnaviv_debugfs_list[] = {static int etnaviv_debugfs_init (struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -int ret; - - ret =drm_debugfs_create_files (etnaviv_debugfs_list, -ARRAY_SIZE (etnaviv_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (etnaviv_debugfs_list, +ARRAY_SIZE (etnaviv_debugfs_list), + minor->debugfs_root, minor); -if (ret) { -dev_err (dev->dev,"could not install etnaviv_debugfs_list\n" ); -return ret; - } - -return ret; +return 0 ; }#endif
Signature · 1 line
2.25.1
Re: [PATCH v2 07/17] drm/etnaviv: remove check for return value of drm_debugfs_create_files()
Quoted 11 lines · Wambui Karuga
Since commit
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and only returns 0. Therefore, remove the unnecessary check of its return value and error handling inetnaviv_debugfs_init()and have the function return 0 directly.v2: have
etnaviv_debugfs_init()return 0 instead of void to ensure individual compilation and avoid build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)drivers/gpu/drm/etnaviv/etnaviv_drv.c +4
-12@@ -233,19 +233,11 @@ static struct drm_info_list etnaviv_debugfs_list[] = {static int etnaviv_debugfs_init (struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -int ret; - - ret =drm_debugfs_create_files (etnaviv_debugfs_list, -ARRAY_SIZE (etnaviv_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (etnaviv_debugfs_list, +ARRAY_SIZE (etnaviv_debugfs_list), + minor->debugfs_root, minor); -if (ret) { -dev_err (dev->dev,"could not install etnaviv_debugfs_list\n" ); -return ret; - } - -return ret; +return 0 ; }#endif
PATCH v2 8/17 drm/msm: remove checks for return value of drm_debugfs_create_files()
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files never fails and only returns 0. Therefore, the unnecessary checks for its return value and error handling in various debugfs_init() functions in drm/msm and have the functions return 0 directly.
v2: have debug functions return 0 instead of void to avoid build breakage and ensure standalone compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 12 +++--------- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 14 +++----------- drivers/gpu/drm/msm/msm_debugfs.c | 13 ++++--------- 3 files changed, 10 insertions(+), 29 deletions(-)
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c +3 -9
@@ -151,21 +151,15 @@ DEFINE_SIMPLE_ATTRIBUTE(reset_fops, NULL, reset_set, "%llx\n");int a5xx_debugfs_init (struct msm_gpu *gpu,struct drm_minor *minor) {struct drm_device *dev; -int ret;if (!minor)return 0 ; dev = minor->dev; - ret =drm_debugfs_create_files (a5xx_debugfs_list, -ARRAY_SIZE (a5xx_debugfs_list), - minor->debugfs_root, minor); - -if (ret) { -DRM_DEV_ERROR (dev->dev,"could not install a5xx_debugfs_list\n" ); -return ret; - } +drm_debugfs_create_files (a5xx_debugfs_list, +ARRAY_SIZE (a5xx_debugfs_list), + minor->debugfs_root, minor);debugfs_create_file ("reset" ,S_IWUGO , minor->debugfs_root, dev, &reset_fops);
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +3 -11
@@ -259,17 +259,9 @@ static struct drm_info_list mdp5_debugfs_list[] = {static int mdp5_kms_debugfs_init (struct msm_kms *kms,struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -int ret; - - ret =drm_debugfs_create_files (mdp5_debugfs_list, -ARRAY_SIZE (mdp5_debugfs_list), - minor->debugfs_root, minor); - -if (ret) { -DRM_DEV_ERROR (dev->dev,"could not install mdp5_debugfs_list\n" ); -return ret; - } +drm_debugfs_create_files (mdp5_debugfs_list, +ARRAY_SIZE (mdp5_debugfs_list), + minor->debugfs_root, minor);return 0 ; }
drivers/gpu/drm/msm/msm_debugfs.c +4 -9
@@ -220,14 +220,9 @@ int msm_debugfs_init(struct drm_minor *minor)struct msm_drm_private *priv = dev->dev_private;int ret; - ret =drm_debugfs_create_files (msm_debugfs_list, -ARRAY_SIZE (msm_debugfs_list), - minor->debugfs_root, minor); - -if (ret) { -DRM_DEV_ERROR (dev->dev,"could not install msm_debugfs_list\n" ); -return ret; - } +drm_debugfs_create_files (msm_debugfs_list, +ARRAY_SIZE (msm_debugfs_list), + minor->debugfs_root, minor);debugfs_create_file ("gpu" ,S_IRUSR , minor->debugfs_root, dev, &msm_gpu_fops);
@@ -238,7 +233,7 @@ int msm_debugfs_init(struct drm_minor *minor) return ret; } -return ret; +return 0 ; }#endif
Signature · 1 line
2.25.1
PATCH v2 9/17 drm/sti: remove use of drm_debugfs functions as return values
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails, and should return void. This change therefore removes it uses as a return value in various functions across drm/sti.
With these changes, the affected functions have been changed to use a void return value.
v2: convert sti_mixer_debugfs_init() and sti_compositor_debugfs_init() to return void too. Also have sti_drm_dbg_init() to return 0 to avoid build issues.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/sti/sti_compositor.c | 6 ++---- drivers/gpu/drm/sti/sti_compositor.h | 4 ++-- drivers/gpu/drm/sti/sti_crtc.c | 2 +- drivers/gpu/drm/sti/sti_cursor.c | 14 ++++++++------ drivers/gpu/drm/sti/sti_drv.c | 13 +++---------- drivers/gpu/drm/sti/sti_dvo.c | 13 +++++-------- drivers/gpu/drm/sti/sti_gdp.c | 7 ++++--- drivers/gpu/drm/sti/sti_hda.c | 13 +++++-------- drivers/gpu/drm/sti/sti_hdmi.c | 13 +++++-------- drivers/gpu/drm/sti/sti_hqvdp.c | 12 +++++++----- drivers/gpu/drm/sti/sti_mixer.c | 10 +++++----- drivers/gpu/drm/sti/sti_mixer.h | 2 +- drivers/gpu/drm/sti/sti_tvout.c | 13 +++++-------- drivers/gpu/drm/sti/sti_vid.c | 8 ++++---- drivers/gpu/drm/sti/sti_vid.h | 2 +- 15 files changed, 58 insertions(+), 74 deletions(-)
drivers/gpu/drm/sti/sti_compositor.c +2 -4
@@ -42,8 +42,8 @@ static const struct sti_compositor_data stih407_compositor_data = { }, }; -int sti_compositor_debugfs_init (struct sti_compositor *compo, -struct drm_minor *minor) +void sti_compositor_debugfs_init (struct sti_compositor *compo, +struct drm_minor *minor) {unsigned int i;
@@ -54,8 +54,6 @@ int sti_compositor_debugfs_init(struct sti_compositor *compo,for (i =0 ; i <STI_MAX_MIXER ; i++)if (compo->mixer[i])sti_mixer_debugfs_init (compo->mixer[i], minor); - -return 0 ; } static int sti_compositor_bind(struct device *dev,
drivers/gpu/drm/sti/sti_compositor.h +2 -2
@@ -79,7 +79,7 @@ struct sti_compositor { struct notifier_block vtg_vblank_nb[STI_MAX_MIXER]; }; -int sti_compositor_debugfs_init (struct sti_compositor *compo, -struct drm_minor *minor); +void sti_compositor_debugfs_init (struct sti_compositor *compo, +struct drm_minor *minor);#endif
drivers/gpu/drm/sti/sti_crtc.c +1 -1
@@ -319,7 +319,7 @@ static int sti_crtc_late_register(struct drm_crtc *crtc)struct sti_compositor *compo =dev_get_drvdata (mixer->dev);if (drm_crtc_index (crtc) ==0 ) -return sti_compositor_debugfs_init (compo, crtc->dev->primary); +sti_compositor_debugfs_init (compo, crtc->dev->primary);return 0 ; }
drivers/gpu/drm/sti/sti_cursor.c +8 -6
@@ -131,17 +131,17 @@ static struct drm_info_list cursor_debugfs_files[] = { { "cursor", cursor_dbg_show, 0, NULL }, }; -static int cursor_debugfs_init (struct sti_cursor *cursor, -struct drm_minor *minor) +static void cursor_debugfs_init (struct sti_cursor *cursor, +struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (cursor_debugfs_files); i++) cursor_debugfs_files[i].data = cursor; -return drm_debugfs_create_files (cursor_debugfs_files, -ARRAY_SIZE (cursor_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (cursor_debugfs_files, +ARRAY_SIZE (cursor_debugfs_files), + minor->debugfs_root, minor); }static void sti_cursor_argb8888_to_clut8 (struct sti_cursor *cursor,u32 *src)
@@ -342,7 +342,9 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane)struct sti_plane *plane =to_sti_plane (drm_plane);struct sti_cursor *cursor =to_sti_cursor (plane); -return cursor_debugfs_init (cursor, drm_plane->dev->primary); +cursor_debugfs_init (cursor, drm_plane->dev->primary); + +return 0 ; }static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
drivers/gpu/drm/sti/sti_drv.c +3 -10
@@ -94,22 +94,15 @@ static struct drm_info_list sti_drm_dbg_list[] = {static int sti_drm_dbg_init (struct drm_minor *minor) { -int ret; - - ret =drm_debugfs_create_files (sti_drm_dbg_list, -ARRAY_SIZE (sti_drm_dbg_list), - minor->debugfs_root, minor); -if (ret) - goto err; +drm_debugfs_create_files (sti_drm_dbg_list, +ARRAY_SIZE (sti_drm_dbg_list), + minor->debugfs_root, minor);debugfs_create_file ("fps_show" ,S_IRUGO |S_IWUSR , minor->debugfs_root, minor->dev, &sti_drm_fps_fops);DRM_INFO ("%s: debugfs installed\n" ,DRIVER_NAME );return 0 ; -err: -DRM_ERROR ("%s: cannot install debugfs\n" ,DRIVER_NAME ); -return ret; }static const struct drm_mode_config_funcs sti_mode_config_funcs = {
drivers/gpu/drm/sti/sti_dvo.c +5 -8
@@ -197,16 +197,16 @@ static struct drm_info_list dvo_debugfs_files[] = { { "dvo", dvo_dbg_show, 0, NULL }, }; -static int dvo_debugfs_init (struct sti_dvo *dvo,struct drm_minor *minor) +static void dvo_debugfs_init (struct sti_dvo *dvo,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (dvo_debugfs_files); i++) dvo_debugfs_files[i].data = dvo; -return drm_debugfs_create_files (dvo_debugfs_files, -ARRAY_SIZE (dvo_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (dvo_debugfs_files, +ARRAY_SIZE (dvo_debugfs_files), + minor->debugfs_root, minor); }static void sti_dvo_disable (struct drm_bridge *bridge)
@@ -406,10 +406,7 @@ static int sti_dvo_late_register(struct drm_connector *connector) = to_sti_dvo_connector(connector);struct sti_dvo *dvo = dvo_connector->dvo; -if (dvo_debugfs_init (dvo, dvo->drm_dev->primary)) { -DRM_ERROR ("DVO debugfs setup failed\n" ); -return -EINVAL ; - } +dvo_debugfs_init (dvo, dvo->drm_dev->primary);return 0 ; }
drivers/gpu/drm/sti/sti_gdp.c +4 -3
@@ -343,9 +343,10 @@ static int gdp_debugfs_init(struct sti_gdp *gdp, struct drm_minor *minor)for (i =0 ; i < nb_files; i++) gdp_debugfs_files[i].data = gdp; -return drm_debugfs_create_files (gdp_debugfs_files, - nb_files, - minor->debugfs_root, minor); +drm_debugfs_create_files (gdp_debugfs_files, + nb_files, + minor->debugfs_root, minor); +return 0 ; }static int sti_gdp_fourcc2format (int fourcc)
drivers/gpu/drm/sti/sti_hda.c +5 -8
@@ -367,16 +367,16 @@ static struct drm_info_list hda_debugfs_files[] = { { "hda", hda_dbg_show, 0, NULL }, }; -static int hda_debugfs_init (struct sti_hda *hda,struct drm_minor *minor) +static void hda_debugfs_init (struct sti_hda *hda,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (hda_debugfs_files); i++) hda_debugfs_files[i].data = hda; -return drm_debugfs_create_files (hda_debugfs_files, -ARRAY_SIZE (hda_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (hda_debugfs_files, +ARRAY_SIZE (hda_debugfs_files), + minor->debugfs_root, minor); }/**
@@ -643,10 +643,7 @@ static int sti_hda_late_register(struct drm_connector *connector) = to_sti_hda_connector(connector);struct sti_hda *hda = hda_connector->hda; -if (hda_debugfs_init (hda, hda->drm_dev->primary)) { -DRM_ERROR ("HDA debugfs setup failed\n" ); -return -EINVAL ; - } +hda_debugfs_init (hda, hda->drm_dev->primary);return 0 ; }
drivers/gpu/drm/sti/sti_hdmi.c +5 -8
@@ -727,16 +727,16 @@ static struct drm_info_list hdmi_debugfs_files[] = { { "hdmi", hdmi_dbg_show, 0, NULL }, }; -static int hdmi_debugfs_init (struct sti_hdmi *hdmi,struct drm_minor *minor) +static void hdmi_debugfs_init (struct sti_hdmi *hdmi,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (hdmi_debugfs_files); i++) hdmi_debugfs_files[i].data = hdmi; -return drm_debugfs_create_files (hdmi_debugfs_files, -ARRAY_SIZE (hdmi_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (hdmi_debugfs_files, +ARRAY_SIZE (hdmi_debugfs_files), + minor->debugfs_root, minor); }static void sti_hdmi_disable (struct drm_bridge *bridge)
@@ -1113,10 +1113,7 @@ static int sti_hdmi_late_register(struct drm_connector *connector) = to_sti_hdmi_connector(connector);struct sti_hdmi *hdmi = hdmi_connector->hdmi; -if (hdmi_debugfs_init (hdmi, hdmi->drm_dev->primary)) { -DRM_ERROR ("HDMI debugfs setup failed\n" ); -return -EINVAL ; - } +hdmi_debugfs_init (hdmi, hdmi->drm_dev->primary);return 0 ; }
drivers/gpu/drm/sti/sti_hqvdp.c +7 -5
@@ -639,16 +639,16 @@ static struct drm_info_list hqvdp_debugfs_files[] = { { "hqvdp", hqvdp_dbg_show, 0, NULL }, }; -static int hqvdp_debugfs_init (struct sti_hqvdp *hqvdp,struct drm_minor *minor) +static void hqvdp_debugfs_init (struct sti_hqvdp *hqvdp,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (hqvdp_debugfs_files); i++) hqvdp_debugfs_files[i].data = hqvdp; -return drm_debugfs_create_files (hqvdp_debugfs_files, -ARRAY_SIZE (hqvdp_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (hqvdp_debugfs_files, +ARRAY_SIZE (hqvdp_debugfs_files), + minor->debugfs_root, minor); }/**
@@ -1274,7 +1274,9 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane)struct sti_plane *plane =to_sti_plane (drm_plane);struct sti_hqvdp *hqvdp =to_sti_hqvdp (plane); -return hqvdp_debugfs_init (hqvdp, drm_plane->dev->primary); +hqvdp_debugfs_init (hqvdp, drm_plane->dev->primary); + +return 0 ; }static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
drivers/gpu/drm/sti/sti_mixer.c +5 -5
@@ -178,7 +178,7 @@ static struct drm_info_list mixer1_debugfs_files[] = { { "mixer_aux", mixer_dbg_show, 0, NULL }, }; -int sti_mixer_debugfs_init (struct sti_mixer *mixer,struct drm_minor *minor) +void sti_mixer_debugfs_init (struct sti_mixer *mixer,struct drm_minor *minor) {unsigned int i;struct drm_info_list *mixer_debugfs_files;
@@ -194,15 +194,15 @@ int sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor) nb_files =ARRAY_SIZE (mixer1_debugfs_files);break ;default : -return -EINVAL ; +return ; }for (i =0 ; i < nb_files; i++) mixer_debugfs_files[i].data = mixer; -return drm_debugfs_create_files (mixer_debugfs_files, - nb_files, - minor->debugfs_root, minor); +drm_debugfs_create_files (mixer_debugfs_files, + nb_files, + minor->debugfs_root, minor); }void sti_mixer_set_background_status (struct sti_mixer *mixer,bool enable)
drivers/gpu/drm/sti/sti_mixer.h +1 -1
@@ -58,7 +58,7 @@ int sti_mixer_active_video_area(struct sti_mixer *mixer,void sti_mixer_set_background_status (struct sti_mixer *mixer,bool enable); -int sti_mixer_debugfs_init (struct sti_mixer *mixer,struct drm_minor *minor); +void sti_mixer_debugfs_init (struct sti_mixer *mixer,struct drm_minor *minor);/* depth in Cross-bar control = z order */ #define GAM_MIXER_NB_DEPTH_LEVEL 6
drivers/gpu/drm/sti/sti_tvout.c +5 -8
@@ -570,16 +570,16 @@ static struct drm_info_list tvout_debugfs_files[] = { { "tvout", tvout_dbg_show, 0, NULL }, }; -static int tvout_debugfs_init (struct sti_tvout *tvout,struct drm_minor *minor) +static void tvout_debugfs_init (struct sti_tvout *tvout,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (tvout_debugfs_files); i++) tvout_debugfs_files[i].data = tvout; -return drm_debugfs_create_files (tvout_debugfs_files, -ARRAY_SIZE (tvout_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (tvout_debugfs_files, +ARRAY_SIZE (tvout_debugfs_files), + minor->debugfs_root, minor); }static void sti_tvout_encoder_dpms (struct drm_encoder *encoder,int mode)
@@ -603,14 +603,11 @@ static void sti_tvout_encoder_destroy(struct drm_encoder *encoder)static int sti_tvout_late_register (struct drm_encoder *encoder) {struct sti_tvout *tvout =to_sti_tvout (encoder); -int ret;if (tvout->debugfs_registered)return 0 ; - ret =tvout_debugfs_init (tvout, encoder->dev->primary); -if (ret) -return ret; +tvout_debugfs_init (tvout, encoder->dev->primary); tvout->debugfs_registered = true;return 0 ;
drivers/gpu/drm/sti/sti_vid.c +4 -4
@@ -124,16 +124,16 @@ static struct drm_info_list vid_debugfs_files[] = { { "vid", vid_dbg_show, 0, NULL }, }; -int vid_debugfs_init (struct sti_vid *vid,struct drm_minor *minor) +void vid_debugfs_init (struct sti_vid *vid,struct drm_minor *minor) {unsigned int i;for (i =0 ; i <ARRAY_SIZE (vid_debugfs_files); i++) vid_debugfs_files[i].data = vid; -return drm_debugfs_create_files (vid_debugfs_files, -ARRAY_SIZE (vid_debugfs_files), - minor->debugfs_root, minor); +drm_debugfs_create_files (vid_debugfs_files, +ARRAY_SIZE (vid_debugfs_files), + minor->debugfs_root, minor); } void sti_vid_commit(struct sti_vid *vid,
drivers/gpu/drm/sti/sti_vid.h +1 -1
@@ -26,6 +26,6 @@ void sti_vid_disable(struct sti_vid *vid);struct sti_vid *sti_vid_create (struct device *dev,struct drm_device *drm_dev,int id,void __iomem *baseaddr); -int vid_debugfs_init (struct sti_vid *vid,struct drm_minor *minor); +void vid_debugfs_init (struct sti_vid *vid,struct drm_minor *minor);#endif
Signature · 1 line
2.25.1
PATCH v2 10/17 drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of drm_vram_mm_debugfs_init(), and have the function return 0 directly.
v2: have drm_vram_mm_debugfs_init() return 0 instead of void to avoid introducing build issues and build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_gem_vram_helper.c +4 -6
@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS ) - ret =drm_debugfs_create_files (drm_vram_mm_debugfs_list, -ARRAY_SIZE (drm_vram_mm_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_vram_mm_debugfs_list, +ARRAY_SIZE (drm_vram_mm_debugfs_list), + minor->debugfs_root, minor);#endif -return ret; +return 0 ; }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);
Signature · 1 line
2.25.1
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0
drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )
Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Thanks, Daniel
Quoted 15 lines
drivers/gpu/drm/drm_gem_vram_helper.c +4
-4- ret =drm_debugfs_create_files (drm_vram_mm_debugfs_list, -ARRAY_SIZE (drm_vram_mm_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_vram_mm_debugfs_list, +ARRAY_SIZE (drm_vram_mm_debugfs_list), + minor->debugfs_root, minor);#endif -return ret; +return 0 ; }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);Signature · 1 line
2.25.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling without CONFIG_DEBUG_FS, this function is run and the drm_debugfs_create_files() does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?
Thanks,
wambui karuga
Quoted 21 lines
Quoted 15 lines
drivers/gpu/drm/drm_gem_vram_helper.c +4
-5- ret =drm_debugfs_create_files (drm_vram_mm_debugfs_list, -ARRAY_SIZE (drm_vram_mm_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_vram_mm_debugfs_list, +ARRAY_SIZE (drm_vram_mm_debugfs_list), + minor->debugfs_root, minor);#endif -return ret; +return 0 ; }EXPORT_SYMBOL (drm_vram_mm_debugfs_init); --2.25.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?
Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Greg, has anyone ever suggested to convert the debugfs_create_file function (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as __maybe_unused and let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...
-Daniel
Quoted 25 lines
Thanks,
wambui karugaQuoted 21 lines
Quoted 13 lines
drivers/gpu/drm/drm_gem_vram_helper.c +4
-5- ret =drm_debugfs_create_files (drm_vram_mm_debugfs_list, -ARRAY_SIZE (drm_vram_mm_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_vram_mm_debugfs_list, +ARRAY_SIZE (drm_vram_mm_debugfs_list), + minor->debugfs_root, minor);#endif -return ret; +return 0 ; }EXPORT_SYMBOL (drm_vram_mm_debugfs_init); --Quoted 2 lines
2.25.1
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 51 lines · Daniel Vetter
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Quoted 5 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...
No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The variables will not be used, so the compiler should just optimize them away properly.
No checks for CONFIG_DEBUG_FS should be needed anywhere in .c code.
thanks,
greg k-h
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 59 lines · Greg KH
Quoted 51 lines · Daniel Vetter
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Quoted 5 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...
Quoted 6 lines
No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The variables will not be used, so the compiler should just optimize them away properly.
No checks for
CONFIG_DEBUG_FSshould be needed anywhere in .c code.
So the trouble with this one is that the static inline functions for the debugfs file are wrapped in a #if too, and hence if we drop the #if around the function call stuff won't compile. Should we drop all the #if in the .c file and assume the compiler will remove all the dead code and dead functions?
-Daniel (who has no idea how this all works really)
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 65 lines · Daniel Vetter
Quoted 64 lines · Greg KH
Quoted 51 lines · Daniel Vetter
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Quoted 5 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The variables will not be used, so the compiler should just optimize them away properly.
Quoted 7 lines
Quoted 1 line
No checks for
CONFIG_DEBUG_FSshould be needed anywhere in .c code.So the trouble with this one is that the static inline functions for the debugfs file are wrapped in a #if too, and hence if we drop the #if around the function call stuff won't compile. Should we drop all the #if in the .c file and assume the compiler will remove all the dead code and dead functions?
Yes you should :)
there should not be any need for #if in a .c file for debugfs stuff.
thanks,
greg k-h
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 74 lines · Greg KH
Quoted 65 lines · Daniel Vetter
Quoted 64 lines · Greg KH
Quoted 51 lines · Daniel Vetter
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Quoted 5 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The variables will not be used, so the compiler should just optimize them away properly.
Quoted 7 lines
Quoted 1 line
No checks for
CONFIG_DEBUG_FSshould be needed anywhere in .c code.So the trouble with this one is that the static inline functions for the debugfs file are wrapped in a #if too, and hence if we drop the #if around the function call stuff won't compile. Should we drop all the #if in the .c file and assume the compiler will remove all the dead code and dead functions?
Quoted 3 lines
Yes you should :)
there should not be any need for #if in a .c file for debugfs stuff.
Wambui, can you pls try that out? I.e. removing all the #if for CONFIG_DEBUG_FS from that file.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Quoted 75 lines · Daniel Vetter
Quoted 74 lines · Greg KH
Quoted 72 lines · Daniel Vetter
Quoted 59 lines · Greg KH
Quoted 51 lines · Daniel Vetter
Quoted 39 lines · Wambui Karuga
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid introducing build issues and build breakage.References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list drm_vram_mm_debugfs_list[] = { · line 1051
Quoted 6 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {*/ int drm_vram_mm_debugfs_init (struct drm_minor *minor) { -int ret =0 ; -#if defined(CONFIG_DEBUG_FS )Just noticed that this #if here is not needed, we already have a dummy function for that case. Care to write a quick patch to remove it? On top of this patch series here ofc, I'm in the processing of merging the entire pile.
Quoted 6 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way possible.
Quoted 5 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...Quoted 6 lines
No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The variables will not be used, so the compiler should just optimize them away properly.
No checks for
CONFIG_DEBUG_FSshould be needed anywhere in .c code.So the trouble with this one is that the static inline functions for the debugfs file are wrapped in a #if too, and hence if we drop the #if around the function call stuff won't compile. Should we drop all the #if in the .c file and assume the compiler will remove all the dead code and dead functions?
Quoted 6 lines
Quoted 3 lines
Yes you should :)
there should not be any need for #if in a .c file for debugfs stuff.
Wambui, can you pls try that out? I.e. removing all the #if for
CONFIG_DEBUG_FSfrom that file.
Removing them works with CONFIG_DEBUG_FS enabled or disabled. I can send a patch for that.
wambui karuga
Quoted 6 lines
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Thomas Zimmermann
maintainerRe: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
Hi
Am 19.03.20 um 13:27 schrieb Wambui Karuga:
Quoted 97 lines · Daniel Vetter
Quoted 94 lines · Greg KH
Quoted 92 lines · Daniel Vetter
Quoted 81 lines
Quoted 79 lines · Greg KH
Quoted 64 lines · Daniel Vetter
Quoted 48 lines · Wambui Karuga
Quoted 43 lines · Daniel Vetter
Quoted 26 lines · Wambui Karuga
Since
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never
fails and should return void. Therefore, remove its use as the return value ofdrm_vram_mm_debugfs_init(), and have the function return 0 directly.v2: have
drm_vram_mm_debugfs_init()return 0 instead of void to avoid
introducing build issues and build breakage.References:
https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.htmlSigned-off-by Wambui Karuga <[email protected]>---
drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-0drivers/gpu/drm/drm_gem_vram_helper.c static const struct drm_info_list · line 1052
Quoted 7 lines
drivers/gpu/drm/drm_gem_vram_helper.c +0
-2@@ -1048,14 +1048,12 @@ static const struct drm_info_listdrm_vram_mm_debugfs_list[] = { */ int drm_vram_mm_debugfs_init(struct drm_minor *minor) { - int ret = 0; - #if defined(CONFIG_DEBUG_FS)Just noticed that this #if here is not needed, we already have a dummy
function for that case. Care to write a quick patch to remove it? On top
of this patch series here ofc, I'm in the processing of merging the entire
pile.Quoted 8 lines
Quoted 1 line
Thanks, Daniel
Hi Daniel,
Without this check here, and compiling withoutCONFIG_DEBUG_FS, this function is run and thedrm_debugfs_create_files()does not have access to
the parameters also protected by an #if above this function. So the change
throws an error for me. Is that correct?Hm right. Other drivers don't #ifdef out their debugfs file functions ... kinda a bit disappointing that we can't do this in the neatest way
possible.Quoted 6 lines
Greg, has anyone ever suggested to convert the
debugfs_create_filefunction (and similar things) to macros that don't use any of the arguments, and then also annotating all the static functions/tables as__maybe_unusedand let the compiler garbage collect everything? Instead of explicit #ifdef in all the drivers ...No, no one has suggested that, having the functions be static inline should make it all "just work" properly if debugfs is not enabled. The
variables will not be used, so the compiler should just optimize them away properly.Quoted 7 lines
Quoted 1 line
No checks for
CONFIG_DEBUG_FSshould be needed anywhere in .c code.So the trouble with this one is that the static inline functions for the debugfs file are wrapped in a #if too, and hence if we drop the #if around the function call stuff won't compile. Should we drop all the #if in the .c file and assume the compiler will remove all the dead code and dead functions?
Yes you should :)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
there should not be any need for #if in a .c file for debugfs stuff.
Wambui, can you pls try that out? I.e. removing all the #if for
CONFIG_DEBUG_FSfrom that file.Removing them works with
CONFIG_DEBUG_FSenabled or disabled. I can send a patch for that.
Please do. Removing explicit checks for CONFIG_ is usually a good thing.
Best regards
Thomas
Quoted 12 lines
wambui karuga
Quoted 6 lines
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 11/17 drm/nouveau: make nouveau_drm_debugfs_init() return 0
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check for the the return value of debugfs_create_file() and drm_debugfs_create_files(). Therefore, remove unnecessary checks and error handling in nouveau_drm_debugfs_init() and have the function return 0 directly.
v2: have nouveau_drm_debugfs_init() return 0 instead of void so as not to introduce any build warnings to enable individual patch compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +8 -12
@@ -222,22 +222,18 @@ nouveau_drm_debugfs_init(struct drm_minor *minor) {struct nouveau_drm *drm =nouveau_drm (minor->dev);struct dentry *dentry; -int i, ret; +int i;for (i =0 ; i <ARRAY_SIZE (nouveau_debugfs_files); i++) { - dentry =debugfs_create_file (nouveau_debugfs_files[i].name, -S_IRUGO |S_IWUSR , - minor->debugfs_root, minor->dev, - nouveau_debugfs_files[i].fops); -if (!dentry) -return -ENOMEM ; +debugfs_create_file (nouveau_debugfs_files[i].name, +S_IRUGO |S_IWUSR , + minor->debugfs_root, minor->dev, + nouveau_debugfs_files[i].fops); } - ret =drm_debugfs_create_files (nouveau_debugfs_list, -NOUVEAU_DEBUGFS_ENTRIES , - minor->debugfs_root, minor); -if (ret) -return ret; +drm_debugfs_create_files (nouveau_debugfs_list, +NOUVEAU_DEBUGFS_ENTRIES , + minor->debugfs_root, minor);/* Set the size of the vbios since we know it, and it's confusing to * userspace if it wants to seek() but the file has a length of 0
Signature · 1 line
2.25.1
PATCH v2 12/17 drm/pl111: make pl111_debugfs_init return 0
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) drm_debugfs_create_files() should return void. Therefore, remove its use as the return value in pl111_debugfs_init(), and have the function return 0 directly.
v2: have pl111_debugfs_init() return 0 instead of void to avoid build breakage for individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/pl111/pl111_debugfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/pl111/pl111_debugfs.c +5 -3
@@ -54,7 +54,9 @@ static const struct drm_info_list pl111_debugfs_list[] = {int pl111_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (pl111_debugfs_list, -ARRAY_SIZE (pl111_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (pl111_debugfs_list, +ARRAY_SIZE (pl111_debugfs_list), + minor->debugfs_root, minor); + +return 0 ; }
Signature · 1 line
2.25.1
PATCH v2 13/17 drm/omap: remove checks for return value of drm_debugfs functions
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check the return value for drm_debugfs_create_files(). Therefore remove the checks for the return value and subsequent error handling in omap_debugfs_init().
These changes also enables the changing of omap_debugfs_init() to return 0 directly.
v2: convert omap_debugfs_init() to return 0 instead of void to avoid introduction of build issues and enable individual driver compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/omapdrm/omap_debugfs.c | 27 +++++++------------------- 1 file changed, 7 insertions(+), 20 deletions(-)
drivers/gpu/drm/omapdrm/omap_debugfs.c +7 -20
@@ -82,29 +82,16 @@ static struct drm_info_list omap_dmm_debugfs_list[] = {int omap_debugfs_init (struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -int ret; - - ret =drm_debugfs_create_files (omap_debugfs_list, -ARRAY_SIZE (omap_debugfs_list), - minor->debugfs_root, minor); - -if (ret) { -dev_err (dev->dev,"could not install omap_debugfs_list\n" ); -return ret; - } +drm_debugfs_create_files (omap_debugfs_list, +ARRAY_SIZE (omap_debugfs_list), + minor->debugfs_root, minor);if (dmm_is_available ()) - ret =drm_debugfs_create_files (omap_dmm_debugfs_list, -ARRAY_SIZE (omap_dmm_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (omap_dmm_debugfs_list, +ARRAY_SIZE (omap_dmm_debugfs_list), + minor->debugfs_root, minor); -if (ret) { -dev_err (dev->dev,"could not install omap_dmm_debugfs_list\n" ); -return ret; - } - -return ret; +return 0 ; }#endif
Signature · 1 line
2.25.1
PATCH v2 14/17 drm/i915: have *_debugfs_init() functions return void.
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of debugfs_init() functions and have the functions return void.
v2: convert intel_display_debugfs_register() stub to return void too.
--- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_display_debugfs.h | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/i915_debugfs.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +4 -4
@@ -1927,7 +1927,7 @@ static const struct { {"i915_edp_psr_debug", &i915_edp_psr_debug_fops}, }; -int intel_display_debugfs_register (struct drm_i915_private *i915) +void intel_display_debugfs_register (struct drm_i915_private *i915) {struct drm_minor *minor = i915->drm.primary;int i;
@@ -1940,9 +1940,9 @@ int intel_display_debugfs_register(struct drm_i915_private *i915) intel_display_debugfs_files[i].fops); } -return drm_debugfs_create_files (intel_display_debugfs_list, -ARRAY_SIZE (intel_display_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (intel_display_debugfs_list, +ARRAY_SIZE (intel_display_debugfs_list), + minor->debugfs_root, minor); }static int i915_panel_show (struct seq_file *m,void *data)
drivers/gpu/drm/i915/display/intel_display_debugfs.h +2 -2
@@ -10,10 +10,10 @@ struct drm_connector;struct drm_i915_private ;#ifdef CONFIG_DEBUG_FS -int intel_display_debugfs_register (struct drm_i915_private *i915); +void intel_display_debugfs_register (struct drm_i915_private *i915);int intel_connector_debugfs_add (struct drm_connector *connector);#else -static inline int intel_display_debugfs_register (struct drm_i915_private *i915) {return 0 ; } +static inline void intel_display_debugfs_register (struct drm_i915_private *i915) {}static inline int intel_connector_debugfs_add (struct drm_connector *connector) {return 0 ; }#endif
drivers/gpu/drm/i915/i915_debugfs.c +4 -4
@@ -2392,7 +2392,7 @@ static const struct i915_debugfs_files { {"i915_guc_log_relay", &i915_guc_log_relay_fops}, }; -int i915_debugfs_register (struct drm_i915_private *dev_priv) +void i915_debugfs_register (struct drm_i915_private *dev_priv) {struct drm_minor *minor = dev_priv->drm.primary;int i;
@@ -2409,7 +2409,7 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv) i915_debugfs_files[i].fops); } -return drm_debugfs_create_files (i915_debugfs_list, -I915_DEBUGFS_ENTRIES , - minor->debugfs_root, minor); +drm_debugfs_create_files (i915_debugfs_list, +I915_DEBUGFS_ENTRIES , + minor->debugfs_root, minor); }
drivers/gpu/drm/i915/i915_debugfs.h +2 -2
@@ -12,10 +12,10 @@ struct drm_i915_private;struct seq_file ;#ifdef CONFIG_DEBUG_FS -int i915_debugfs_register (struct drm_i915_private *dev_priv); +void i915_debugfs_register (struct drm_i915_private *dev_priv);void i915_debugfs_describe_obj (struct seq_file *m,struct drm_i915_gem_object *obj);#else -static inline int i915_debugfs_register (struct drm_i915_private *dev_priv) {return 0 ; } +static inline void i915_debugfs_register (struct drm_i915_private *dev_priv) {}static inline void i915_debugfs_describe_obj (struct seq_file *m,struct drm_i915_gem_object *obj) {}#endif
Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 14/17] drm/i915: have *_debugfs_init() functions return void.
Quoted 9 lines · Wambui Karuga
Since commit
987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()never fails and should return void. Therefore, remove its use as the return value ofdebugfs_init()functions and have the functions return void.v2: convert
intel_display_debugfs_register()stub to return void too.Signed-off-by Wambui Karuga <[email protected]>
Quoted 90 lines
--- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_display_debugfs.h | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++---- drivers/gpu/drm/i915/i915_debugfs.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_display_debugfs.c +4
-4@@ -1927,7 +1927,7 @@ static const struct { {"i915_edp_psr_debug", &i915_edp_psr_debug_fops}, }; -int intel_display_debugfs_register (struct drm_i915_private *i915) +void intel_display_debugfs_register (struct drm_i915_private *i915) {struct drm_minor *minor = i915->drm.primary;int i;@@ -1940,9 +1940,9 @@ int intel_display_debugfs_register(struct drm_i915_private *i915) intel_display_debugfs_files[i].fops); } -return drm_debugfs_create_files (intel_display_debugfs_list, -ARRAY_SIZE (intel_display_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (intel_display_debugfs_list, +ARRAY_SIZE (intel_display_debugfs_list), + minor->debugfs_root, minor); }static int i915_panel_show (struct seq_file *m,void *data)drivers/gpu/drm/i915/display/intel_display_debugfs.h +2
-2@@ -10,10 +10,10 @@ struct drm_connector;struct drm_i915_private ;#ifdef CONFIG_DEBUG_FS -int intel_display_debugfs_register (struct drm_i915_private *i915); +void intel_display_debugfs_register (struct drm_i915_private *i915);int intel_connector_debugfs_add (struct drm_connector *connector);#else -static inline int intel_display_debugfs_register (struct drm_i915_private *i915) {return 0 ; } +static inline void intel_display_debugfs_register (struct drm_i915_private *i915) {}static inline int intel_connector_debugfs_add (struct drm_connector *connector) {return 0 ; }#endif drivers/gpu/drm/i915/i915_debugfs.c +4
-4@@ -2392,7 +2392,7 @@ static const struct i915_debugfs_files { {"i915_guc_log_relay", &i915_guc_log_relay_fops}, }; -int i915_debugfs_register (struct drm_i915_private *dev_priv) +void i915_debugfs_register (struct drm_i915_private *dev_priv) {struct drm_minor *minor = dev_priv->drm.primary;int i;@@ -2409,7 +2409,7 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv) i915_debugfs_files[i].fops); } -return drm_debugfs_create_files (i915_debugfs_list, -I915_DEBUGFS_ENTRIES , - minor->debugfs_root, minor); +drm_debugfs_create_files (i915_debugfs_list, +I915_DEBUGFS_ENTRIES , + minor->debugfs_root, minor); }drivers/gpu/drm/i915/i915_debugfs.h +2
-2@@ -12,10 +12,10 @@ struct drm_i915_private;struct seq_file ;#ifdef CONFIG_DEBUG_FS -int i915_debugfs_register (struct drm_i915_private *dev_priv); +void i915_debugfs_register (struct drm_i915_private *dev_priv);void i915_debugfs_describe_obj (struct seq_file *m,struct drm_i915_gem_object *obj);#else -static inline int i915_debugfs_register (struct drm_i915_private *dev_priv) {return 0 ; } +static inline void i915_debugfs_register (struct drm_i915_private *dev_priv) {}static inline void i915_debugfs_describe_obj (struct seq_file *m,struct drm_i915_gem_object *obj) {}#endif
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 15/17 drm: make various debugfs_init() functions return 0
In reply to Wambui KarugaSince commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails and should return void. Therefore, remove its use as the return value of various debugfs_init() functions in drm, and have these functions return 0 directly.
v2: convert debugfs_init() functions to return 0 instead of void to avoid build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/drm_atomic.c | 7 ++++--- drivers/gpu/drm/drm_client.c | 8 +++++--- drivers/gpu/drm/drm_framebuffer.c | 8 +++++--- 3 files changed, 14 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_atomic.c +4 -3
@@ -1643,8 +1643,9 @@ static const struct drm_info_list drm_atomic_debugfs_list[] = {int drm_atomic_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (drm_atomic_debugfs_list, -ARRAY_SIZE (drm_atomic_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_atomic_debugfs_list, +ARRAY_SIZE (drm_atomic_debugfs_list), + minor->debugfs_root, minor); +return 0 ; }#endif
drivers/gpu/drm/drm_client.c +5 -3
@@ -459,8 +459,10 @@ static const struct drm_info_list drm_client_debugfs_list[] = {int drm_client_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (drm_client_debugfs_list, -ARRAY_SIZE (drm_client_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_client_debugfs_list, +ARRAY_SIZE (drm_client_debugfs_list), + minor->debugfs_root, minor); + +return 0 ; }#endif
drivers/gpu/drm/drm_framebuffer.c +5 -3
@@ -1209,8 +1209,10 @@ static const struct drm_info_list drm_framebuffer_debugfs_list[] = {int drm_framebuffer_debugfs_init (struct drm_minor *minor) { -return drm_debugfs_create_files (drm_framebuffer_debugfs_list, -ARRAY_SIZE (drm_framebuffer_debugfs_list), - minor->debugfs_root, minor); +drm_debugfs_create_files (drm_framebuffer_debugfs_list, +ARRAY_SIZE (drm_framebuffer_debugfs_list), + minor->debugfs_root, minor); + +return 0 ; }#endif
Signature · 1 line
2.25.1
PATCH v2 16/17 drm/debugfs: remove checks for return value of drm_debugfs functions.
In reply to Wambui KarugaSince 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to check the return value of drm_debugfs_create_files(). Therefore, remove remove unnecessary checks and error handling statement blocks for its return value.
These changes also enable changing drm_debugfs_create_files() to return void.
--- drivers/gpu/drm/drm_debugfs.c | 33 +++++++-------------------------- include/drm/drm_debugfs.h | 16 +++++++--------- 2 files changed, 14 insertions(+), 35 deletions(-)
drivers/gpu/drm/drm_debugfs.c +7 -26
@@ -172,8 +172,8 @@ static const struct file_operations drm_debugfs_fops = {* &struct drm_info_list in the given root directory. These files will be removed * automatically on drm_debugfs_cleanup(). */ -int drm_debugfs_create_files (const struct drm_info_list *files,int count, -struct dentry *root,struct drm_minor *minor) +void drm_debugfs_create_files (const struct drm_info_list *files,int count, +struct dentry *root,struct drm_minor *minor) {struct drm_device *dev = minor->dev;struct drm_info_node *tmp;
@@ -199,7 +199,6 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count,list_add (&tmp->list, &minor->debugfs_list);mutex_unlock (&minor->debugfs_lock); } -return 0 ; }EXPORT_SYMBOL (drm_debugfs_create_files);
@@ -215,35 +214,17 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,sprintf (name,"%d" , minor_id); minor->debugfs_root =debugfs_create_dir (name, root); - ret =drm_debugfs_create_files (drm_debugfs_list,DRM_DEBUGFS_ENTRIES , - minor->debugfs_root, minor); -if (ret) { -debugfs_remove (minor->debugfs_root); - minor->debugfs_root =NULL ; -DRM_ERROR ("Failed to create core drm debugfs files\n" ); -return ret; - } +drm_debugfs_create_files (drm_debugfs_list,DRM_DEBUGFS_ENTRIES , + minor->debugfs_root, minor);if (drm_drv_uses_atomic_modeset (dev)) { - ret =drm_atomic_debugfs_init (minor); -if (ret) { -DRM_ERROR ("Failed to create atomic debugfs files\n" ); -return ret; - } +drm_atomic_debugfs_init (minor); }if (drm_core_check_feature (dev,DRIVER_MODESET )) { - ret =drm_framebuffer_debugfs_init (minor); -if (ret) { -DRM_ERROR ("Failed to create framebuffer debugfs file\n" ); -return ret; - } +drm_framebuffer_debugfs_init (minor); - ret =drm_client_debugfs_init (minor); -if (ret) { -DRM_ERROR ("Failed to create client debugfs file\n" ); -return ret; - } +drm_client_debugfs_init (minor); }if (dev->driver->debugfs_init) {
include/drm/drm_debugfs.h +7 -9
@@ -80,18 +80,16 @@ struct drm_info_node { };#if defined(CONFIG_DEBUG_FS ) -int drm_debugfs_create_files (const struct drm_info_list *files, -int count,struct dentry *root, -struct drm_minor *minor); +void drm_debugfs_create_files (const struct drm_info_list *files, +int count,struct dentry *root, +struct drm_minor *minor);int drm_debugfs_remove_files (const struct drm_info_list *files,int count,struct drm_minor *minor);#else -static inline int drm_debugfs_create_files (const struct drm_info_list *files, -int count,struct dentry *root, -struct drm_minor *minor) -{ -return 0 ; -} +static inline void drm_debugfs_create_files (const struct drm_info_list *files, +int count,struct dentry *root, +struct drm_minor *minor) +{}static inline int drm_debugfs_remove_files (const struct drm_info_list *files,int count,struct drm_minor *minor)
Signature · 1 line
2.25.1
PATCH v2 17/17 drm: convert .debugfs_init() hook to return void.
In reply to Wambui KarugaAs a result of commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) and changes to various debugfs functions in drm/core and across various drivers, there is no need for the drm_driver.debugfs_init() hook to have a return value. Therefore, declare it as void.
This also includes refactoring all users of the .debugfs_init() hook to return void across the subsystem.
v2: include changes to the hook and drivers that use it in one patch to prevent driver breakage and enable individual successful compilation of this change.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
--- drivers/gpu/drm/arc/arcpgu_drv.c | 3 +-- drivers/gpu/drm/arm/hdlcd_drv.c | 3 +-- drivers/gpu/drm/arm/malidp_drv.c | 3 +-- drivers/gpu/drm/drm_atomic.c | 3 +-- drivers/gpu/drm/drm_client.c | 4 +--- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_debugfs.c | 12 +++--------- drivers/gpu/drm/drm_framebuffer.c | 4 +--- drivers/gpu/drm/drm_gem_vram_helper.c | 6 +----- drivers/gpu/drm/drm_internal.h | 2 +- drivers/gpu/drm/drm_mipi_dbi.c | 6 +----- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +--- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 6 ++---- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 +- drivers/gpu/drm/msm/msm_debugfs.c | 12 +++--------- drivers/gpu/drm/msm/msm_debugfs.h | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 2 +- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 6 ++---- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 8 +++----- drivers/gpu/drm/omapdrm/omap_debugfs.c | 4 +--- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/gpu/drm/pl111/pl111_debugfs.c | 4 +--- drivers/gpu/drm/pl111/pl111_drm.h | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 21 +++++++-------------- drivers/gpu/drm/qxl/qxl_drv.h | 13 +++++-------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ++---- drivers/gpu/drm/sti/sti_drv.c | 3 +-- drivers/gpu/drm/tegra/drm.c | 3 +-- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +--- drivers/gpu/drm/v3d/v3d_debugfs.c | 3 +-- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- drivers/gpu/drm/vc4/vc4_debugfs.c | 4 +--- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- include/drm/drm_client.h | 2 +- include/drm/drm_drv.h | 2 +- include/drm/drm_gem_vram_helper.h | 2 +- include/drm/drm_mipi_dbi.h | 2 +- 39 files changed, 58 insertions(+), 118 deletions(-)
drivers/gpu/drm/arc/arcpgu_drv.c +1 -2
@@ -137,12 +137,11 @@ static struct drm_info_list arcpgu_debugfs_list[] = { { "clocks", arcpgu_show_pxlclock, 0 }, }; -static int arcpgu_debugfs_init(struct drm_minor *minor) +static void arcpgu_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(arcpgu_debugfs_list, ARRAY_SIZE(arcpgu_debugfs_list), minor->debugfs_root, minor); - return 0; } #endif
drivers/gpu/drm/arm/hdlcd_drv.c +1 -2
@@ -224,12 +224,11 @@ static struct drm_info_list hdlcd_debugfs_list[] = { { "clocks", hdlcd_show_pxlclock, 0 }, }; -static int hdlcd_debugfs_init(struct drm_minor *minor) +static void hdlcd_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(hdlcd_debugfs_list, ARRAY_SIZE(hdlcd_debugfs_list), minor->debugfs_root, minor); - return 0; } #endif
drivers/gpu/drm/arm/malidp_drv.c +1 -2
@@ -548,7 +548,7 @@ static const struct file_operations malidp_debugfs_fops = { .release = single_release, }; -static int malidp_debugfs_init (struct drm_minor *minor) +static void malidp_debugfs_init (struct drm_minor *minor) {struct malidp_drm *malidp = minor->dev->dev_private;
@@ -557,7 +557,6 @@ static int malidp_debugfs_init(struct drm_minor *minor)spin_lock_init (&malidp->errors_lock);debugfs_create_file ("debug" ,S_IRUGO |S_IWUSR , minor->debugfs_root, minor->dev, &malidp_debugfs_fops); - return 0; }#endif //CONFIG_DEBUG_FS
drivers/gpu/drm/drm_atomic.c +1 -2
@@ -1641,11 +1641,10 @@ static const struct drm_info_list drm_atomic_debugfs_list[] = { {"state", drm_state_info, 0}, }; -int drm_atomic_debugfs_init(struct drm_minor *minor) +void drm_atomic_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(drm_atomic_debugfs_list, ARRAY_SIZE(drm_atomic_debugfs_list), minor->debugfs_root, minor); - return 0; } #endif
drivers/gpu/drm/drm_client.c +1 -3
@@ -457,12 +457,10 @@ static const struct drm_info_list drm_client_debugfs_list[] = { { "internal_clients", drm_client_debugfs_internal_clients, 0 }, }; -int drm_client_debugfs_init(struct drm_minor *minor) +void drm_client_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(drm_client_debugfs_list, ARRAY_SIZE(drm_client_debugfs_list), minor->debugfs_root, minor); - - return 0; } #endif
drivers/gpu/drm/drm_crtc_internal.h +1 -1
@@ -224,7 +224,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,/* drm_atomic.c */ #ifdef CONFIG_DEBUG_FS struct drm_minor ; -int drm_atomic_debugfs_init (struct drm_minor *minor); +void drm_atomic_debugfs_init (struct drm_minor *minor);#endif int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
drivers/gpu/drm/drm_debugfs.c +3 -9
@@ -207,7 +207,6 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id, {struct drm_device *dev = minor->dev;char name[64 ]; -int ret;INIT_LIST_HEAD (&minor->debugfs_list);mutex_init (&minor->debugfs_lock);
@@ -227,14 +226,9 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,drm_client_debugfs_init (minor); } -if (dev->driver->debugfs_init) { - ret = dev->driver->debugfs_init (minor); -if (ret) { -DRM_ERROR ("DRM: Driver failed to initialize " -"/sys/kernel/debug/dri.\n" ); -return ret; - } - } +if (dev->driver->debugfs_init) + dev->driver->debugfs_init (minor); +return 0 ; }
drivers/gpu/drm/drm_framebuffer.c +1 -3
@@ -1207,12 +1207,10 @@ static const struct drm_info_list drm_framebuffer_debugfs_list[] = { { "framebuffer", drm_framebuffer_info, 0 }, }; -int drm_framebuffer_debugfs_init(struct drm_minor *minor) +void drm_framebuffer_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(drm_framebuffer_debugfs_list, ARRAY_SIZE(drm_framebuffer_debugfs_list), minor->debugfs_root, minor); - - return 0; } #endif
drivers/gpu/drm/drm_gem_vram_helper.c +1 -5
@@ -1042,18 +1042,14 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {* * @minor: drm minor device. * -* Returns: -* 0 on success, or -* a negative error code otherwise. */ -int drm_vram_mm_debugfs_init (struct drm_minor *minor) +void drm_vram_mm_debugfs_init (struct drm_minor *minor) {#if defined(CONFIG_DEBUG_FS )drm_debugfs_create_files (drm_vram_mm_debugfs_list,ARRAY_SIZE (drm_vram_mm_debugfs_list), minor->debugfs_root, minor);#endif -return 0 ; }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);
drivers/gpu/drm/drm_internal.h +1 -1
@@ -235,4 +235,4 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,/* drm_framebuffer.c */ void drm_framebuffer_print_info (struct drm_printer *p,unsigned int indent,const struct drm_framebuffer *fb); -int drm_framebuffer_debugfs_init (struct drm_minor *minor); +void drm_framebuffer_debugfs_init (struct drm_minor *minor);
drivers/gpu/drm/drm_mipi_dbi.c +1 -5
@@ -1308,10 +1308,8 @@ static const struct file_operations mipi_dbi_debugfs_command_fops = {* controller or getting the read command values. * Drivers can use this as their &drm_driver->debugfs_init callback. * -* Returns: -* Zero on success, negative error code on failure. */ -int mipi_dbi_debugfs_init (struct drm_minor *minor) +void mipi_dbi_debugfs_init (struct drm_minor *minor) {struct mipi_dbi_dev *dbidev =drm_to_mipi_dbi_dev (minor->dev);umode_t mode =S_IFREG |S_IWUSR ;
@@ -1320,8 +1318,6 @@ int mipi_dbi_debugfs_init(struct drm_minor *minor) mode |=S_IRUGO ;debugfs_create_file ("command" , mode, minor->debugfs_root, dbidev, &mipi_dbi_debugfs_command_fops); - -return 0 ; }EXPORT_SYMBOL (mipi_dbi_debugfs_init);
drivers/gpu/drm/etnaviv/etnaviv_drv.c +1 -3
@@ -231,13 +231,11 @@ static struct drm_info_list etnaviv_debugfs_list[] = { {"ring", show_each_gpu, 0, etnaviv_ring_show}, }; -static int etnaviv_debugfs_init(struct drm_minor *minor) +static void etnaviv_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(etnaviv_debugfs_list, ARRAY_SIZE(etnaviv_debugfs_list), minor->debugfs_root, minor); - - return 0; } #endif
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c +2 -4
@@ -148,12 +148,12 @@ reset_set(void *data, u64 val)DEFINE_SIMPLE_ATTRIBUTE (reset_fops,NULL , reset_set,"%llx\n" ); -int a5xx_debugfs_init (struct msm_gpu *gpu,struct drm_minor *minor) +void a5xx_debugfs_init (struct msm_gpu *gpu,struct drm_minor *minor) {struct drm_device *dev;if (!minor) -return 0 ; +return ; dev = minor->dev;
@@ -163,6 +163,4 @@ int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor)debugfs_create_file ("reset" ,S_IWUGO , minor->debugfs_root, dev, &reset_fops); - -return 0 ; }
drivers/gpu/drm/msm/adreno/a5xx_gpu.h +1 -1
@@ -41,7 +41,7 @@ struct a5xx_gpu {#define to_a5xx_gpu (x) container_of(x, struct a5xx_gpu, base)#ifdef CONFIG_DEBUG_FS -int a5xx_debugfs_init (struct msm_gpu *gpu,struct drm_minor *minor); +void a5xx_debugfs_init (struct msm_gpu *gpu,struct drm_minor *minor);#endif /*
drivers/gpu/drm/msm/msm_debugfs.c +3 -9
@@ -214,11 +214,10 @@ int msm_debugfs_late_init(struct drm_device *dev)return ret; } -int msm_debugfs_init (struct drm_minor *minor) +void msm_debugfs_init (struct drm_minor *minor) {struct drm_device *dev = minor->dev;struct msm_drm_private *priv = dev->dev_private; -int ret; drm_debugfs_create_files(msm_debugfs_list, ARRAY_SIZE(msm_debugfs_list),
@@ -227,13 +226,8 @@ int msm_debugfs_init(struct drm_minor *minor)debugfs_create_file ("gpu" ,S_IRUSR , minor->debugfs_root, dev, &msm_gpu_fops); -if (priv->kms && priv->kms->funcs->debugfs_init) { - ret = priv->kms->funcs->debugfs_init (priv->kms, minor); -if (ret) -return ret; - } - - return 0; +if (priv->kms && priv->kms->funcs->debugfs_init) + priv->kms->funcs->debugfs_init(priv->kms, minor); }#endif
drivers/gpu/drm/msm/msm_debugfs.h +1 -1
@@ -8,7 +8,7 @@#define __MSM_DEBUGFS_H__#ifdef CONFIG_DEBUG_FS -int msm_debugfs_init (struct drm_minor *minor); +void msm_debugfs_init (struct drm_minor *minor);#endif #endif /* __MSM_DEBUGFS_H__ */
drivers/gpu/drm/msm/msm_gpu.h +1 -1
@@ -57,7 +57,7 @@ struct msm_gpu_funcs {void (*show)(struct msm_gpu *gpu,struct msm_gpu_state *state,struct drm_printer *p);/* for generation specific debugfs: */ -int (*debugfs_init)(struct msm_gpu *gpu,struct drm_minor *minor); +void (*debugfs_init)(struct msm_gpu *gpu,struct drm_minor *minor);#endif unsigned long (*gpu_busy)(struct msm_gpu *gpu);struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu);
drivers/gpu/drm/nouveau/nouveau_debugfs.c +2 -4
@@ -217,7 +217,7 @@ static const struct nouveau_debugfs_files { {"pstate", &nouveau_pstate_fops}, }; -int +void nouveau_drm_debugfs_init (struct drm_minor *minor) {struct nouveau_drm *drm =nouveau_drm (minor->dev);
@@ -240,12 +240,10 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)*/ dentry =debugfs_lookup ("vbios.rom" , minor->debugfs_root);if (!dentry) -return 0 ; +return ;d_inode (dentry)->i_size = drm->vbios.length;dput (dentry); - -return 0 ; }int
drivers/gpu/drm/nouveau/nouveau_debugfs.h +3 -5
@@ -18,15 +18,13 @@ nouveau_debugfs(struct drm_device *dev) return nouveau_drm(dev)->debugfs; } -extern int nouveau_drm_debugfs_init (struct drm_minor *); +extern void nouveau_drm_debugfs_init (struct drm_minor *);extern int nouveau_debugfs_init (struct nouveau_drm *);extern void nouveau_debugfs_fini (struct nouveau_drm *);#else -static inline int +static inline void nouveau_drm_debugfs_init (struct drm_minor *minor) -{ -return 0 ; -} +{}static inline int nouveau_debugfs_init (struct nouveau_drm *drm)
drivers/gpu/drm/omapdrm/omap_debugfs.c +1 -3
@@ -80,7 +80,7 @@ static struct drm_info_list omap_dmm_debugfs_list[] = { {"tiler_map", tiler_map_show, 0}, }; -int omap_debugfs_init (struct drm_minor *minor) +void omap_debugfs_init (struct drm_minor *minor) { drm_debugfs_create_files(omap_debugfs_list, ARRAY_SIZE(omap_debugfs_list),
@@ -90,8 +90,6 @@ int omap_debugfs_init(struct drm_minor *minor)drm_debugfs_create_files (omap_dmm_debugfs_list,ARRAY_SIZE (omap_dmm_debugfs_list), minor->debugfs_root, minor); - - return 0; }#endif
drivers/gpu/drm/omapdrm/omap_drv.h +1 -1
@@ -82,6 +82,6 @@ struct omap_drm_private { }; -int omap_debugfs_init (struct drm_minor *minor); +void omap_debugfs_init (struct drm_minor *minor);#endif /* __OMAPDRM_DRV_H__ */
drivers/gpu/drm/pl111/pl111_debugfs.c +1 -3
@@ -51,12 +51,10 @@ static const struct drm_info_list pl111_debugfs_list[] = { {"regs", pl111_debugfs_regs, 0}, }; -int +void pl111_debugfs_init (struct drm_minor *minor) {drm_debugfs_create_files (pl111_debugfs_list,ARRAY_SIZE (pl111_debugfs_list), minor->debugfs_root, minor); - -return 0 ; }
drivers/gpu/drm/pl111/pl111_drm.h +1 -1
@@ -84,6 +84,6 @@ struct pl111_drm_dev_private {int pl111_display_init (struct drm_device *dev);irqreturn_t pl111_irq (int irq,void *data); -int pl111_debugfs_init (struct drm_minor *minor); +void pl111_debugfs_init (struct drm_minor *minor);#endif /* _PL111_DRM_H_ */
drivers/gpu/drm/qxl/qxl_debugfs.c +7 -14
@@ -79,36 +79,30 @@ static struct drm_info_list qxl_debugfs_list[] = {#define QXL_DEBUGFS_ENTRIES ARRAY_SIZE(qxl_debugfs_list)#endif -int +void qxl_debugfs_init (struct drm_minor *minor) {#if defined(CONFIG_DEBUG_FS ) -int r;struct qxl_device *dev = (struct qxl_device *) minor->dev->dev_private;drm_debugfs_create_files (qxl_debugfs_list,QXL_DEBUGFS_ENTRIES , minor->debugfs_root, minor); - r =qxl_ttm_debugfs_init (dev); -if (r) { -DRM_ERROR ("Failed to init TTM debugfs\n" ); -return r; - } +qxl_ttm_debugfs_init (dev);#endif -return 0 ; } -int qxl_debugfs_add_files (struct qxl_device *qdev, -struct drm_info_list *files, -unsigned int nfiles) +void qxl_debugfs_add_files (struct qxl_device *qdev, +struct drm_info_list *files, +unsigned int nfiles) {unsigned int i;for (i =0 ; i < qdev->debugfs_count; i++) {if (qdev->debugfs[i].files == files) {/* Already registered */ -return 0 ; +return ; } }
@@ -116,7 +110,7 @@ int qxl_debugfs_add_files(struct qxl_device *qdev,if (i >QXL_DEBUGFS_MAX_COMPONENTS ) {DRM_ERROR ("Reached maximum number of debugfs components.\n" );DRM_ERROR ("Report so we increase QXL_DEBUGFS_MAX_COMPONENTS.\n" ); -return -EINVAL ; +return ; } qdev->debugfs[qdev->debugfs_count].files = files; qdev->debugfs[qdev->debugfs_count].num_files = nfiles;
@@ -126,5 +120,4 @@ int qxl_debugfs_add_files(struct qxl_device *qdev, qdev->ddev.primary->debugfs_root, qdev->ddev.primary);#endif -return 0 ; }
drivers/gpu/drm/qxl/qxl_drv.h +5 -8
@@ -190,9 +190,6 @@ struct qxl_debugfs {unsigned int num_files; }; -int qxl_debugfs_add_files (struct qxl_device *rdev, -struct drm_info_list *files, -unsigned int nfiles);int qxl_debugfs_fence_init (struct qxl_device *rdev);struct qxl_device ;
@@ -442,8 +439,8 @@ int qxl_garbage_collect(struct qxl_device *qdev);/* debugfs */ -int qxl_debugfs_init (struct drm_minor *minor); -int qxl_ttm_debugfs_init (struct qxl_device *qdev); +void qxl_debugfs_init (struct drm_minor *minor); +void qxl_ttm_debugfs_init (struct qxl_device *qdev);/* qxl_prime.c */ int qxl_gem_prime_pin (struct drm_gem_object *obj);
@@ -461,9 +458,9 @@ int qxl_gem_prime_mmap(struct drm_gem_object *obj,int qxl_irq_init (struct qxl_device *qdev);irqreturn_t qxl_irq_handler (int irq,void *arg); -int qxl_debugfs_add_files (struct qxl_device *qdev, -struct drm_info_list *files, -unsigned int nfiles); +void qxl_debugfs_add_files (struct qxl_device *qdev, +struct drm_info_list *files, +unsigned int nfiles);int qxl_surface_id_alloc (struct qxl_device *qdev,struct qxl_bo *surf);
drivers/gpu/drm/qxl/qxl_ttm.c +2 -4
@@ -322,7 +322,7 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) }#endif -int qxl_ttm_debugfs_init (struct qxl_device *qdev) +void qxl_ttm_debugfs_init (struct qxl_device *qdev) {#if defined(CONFIG_DEBUG_FS )static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES ];
@@ -343,8 +343,6 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev) qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_PRIV].priv; } -return qxl_debugfs_add_files (qdev, qxl_mem_types_list, i); -#else -return 0 ; +qxl_debugfs_add_files (qdev, qxl_mem_types_list, i);#endif }
drivers/gpu/drm/sti/sti_drv.c +1 -2
@@ -92,7 +92,7 @@ static struct drm_info_list sti_drm_dbg_list[] = { {"fps_get", sti_drm_fps_dbg_show, 0}, }; -static int sti_drm_dbg_init (struct drm_minor *minor) +static void sti_drm_dbg_init (struct drm_minor *minor) { drm_debugfs_create_files(sti_drm_dbg_list, ARRAY_SIZE(sti_drm_dbg_list),
@@ -102,7 +102,6 @@ static int sti_drm_dbg_init(struct drm_minor *minor) minor->dev, &sti_drm_fps_fops);DRM_INFO ("%s: debugfs installed\n" ,DRIVER_NAME ); -return 0 ; }static const struct drm_mode_config_funcs sti_mode_config_funcs = {
drivers/gpu/drm/tegra/drm.c +1 -2
@@ -839,12 +839,11 @@ static struct drm_info_list tegra_debugfs_list[] = { { "iova", tegra_debugfs_iova, 0 }, }; -static int tegra_debugfs_init(struct drm_minor *minor) +static void tegra_debugfs_init(struct drm_minor *minor) { drm_debugfs_create_files(tegra_debugfs_list, ARRAY_SIZE(tegra_debugfs_list), minor->debugfs_root, minor); - return 0; } #endif
drivers/gpu/drm/tilcdc/tilcdc_drv.c +1 -3
@@ -478,7 +478,7 @@ static struct drm_info_list tilcdc_debugfs_list[] = { { "mm", tilcdc_mm_show, 0 }, }; -static int tilcdc_debugfs_init (struct drm_minor *minor) +static void tilcdc_debugfs_init (struct drm_minor *minor) {struct tilcdc_module *mod;
@@ -489,8 +489,6 @@ static int tilcdc_debugfs_init(struct drm_minor *minor)list_for_each_entry (mod, &module_list, list)if (mod->funcs->debugfs_init) mod->funcs->debugfs_init(mod, minor); - - return 0; }#endif
drivers/gpu/drm/v3d/v3d_debugfs.c +1 -2
@@ -258,11 +258,10 @@ static const struct drm_info_list v3d_debugfs_list[] = { {"bo_stats", v3d_debugfs_bo_stats, 0}, }; -int +void v3d_debugfs_init (struct drm_minor *minor) {drm_debugfs_create_files (v3d_debugfs_list,ARRAY_SIZE (v3d_debugfs_list), minor->debugfs_root, minor); -return 0 ; }
drivers/gpu/drm/v3d/v3d_drv.h +1 -1
@@ -316,7 +316,7 @@ struct drm_gem_object *v3d_prime_import_sg_table(struct drm_device *dev, struct sg_table *sgt);/* v3d_debugfs.c */ -int v3d_debugfs_init (struct drm_minor *minor); +void v3d_debugfs_init (struct drm_minor *minor);/* v3d_fence.c */ extern const struct dma_fence_ops v3d_fence_ops;
drivers/gpu/drm/vc4/vc4_debugfs.c +1 -3
@@ -20,7 +20,7 @@ struct vc4_debugfs_info_entry {* Called at drm_dev_register() time on each of the minors registered * by the DRM device, to attach the debugfs files. */ -int +void vc4_debugfs_init (struct drm_minor *minor) {struct vc4_dev *vc4 =to_vc4_dev (minor->dev);
@@ -33,8 +33,6 @@ vc4_debugfs_init(struct drm_minor *minor)drm_debugfs_create_files (&entry->info,1 , minor->debugfs_root, minor); } - -return 0 ; }static int vc4_debugfs_regset32 (struct seq_file *m,void *unused)
drivers/gpu/drm/vc4/vc4_drv.h +1 -1
@@ -759,7 +759,7 @@ void vc4_crtc_get_margins(struct drm_crtc_state *state, unsigned int *top, unsigned int *bottom);/* vc4_debugfs.c */ -int vc4_debugfs_init (struct drm_minor *minor); +void vc4_debugfs_init (struct drm_minor *minor);#ifdef CONFIG_DEBUG_FS void vc4_debugfs_add_file(struct drm_device *drm, const char *filename,
drivers/gpu/drm/virtio/virtgpu_debugfs.c +1 -2
@@ -72,11 +72,10 @@ static struct drm_info_list virtio_gpu_debugfs_list[] = {#define VIRTIO_GPU_DEBUGFS_ENTRIES ARRAY_SIZE(virtio_gpu_debugfs_list) -int +void virtio_gpu_debugfs_init (struct drm_minor *minor) {drm_debugfs_create_files (virtio_gpu_debugfs_list,VIRTIO_GPU_DEBUGFS_ENTRIES , minor->debugfs_root, minor); -return 0 ; }
drivers/gpu/drm/virtio/virtgpu_drv.h +1 -1
@@ -379,6 +379,6 @@ struct drm_gem_object *virtgpu_gem_prime_import_sg_table( struct sg_table *sgt);/* virgl debugfs */ -int virtio_gpu_debugfs_init (struct drm_minor *minor); +void virtio_gpu_debugfs_init (struct drm_minor *minor);#endif
include/drm/drm_client.h +1 -1
@@ -188,6 +188,6 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode); drm_for_each_connector_iter(connector, iter) \if (connector->connector_type !=DRM_MODE_CONNECTOR_WRITEBACK ) -int drm_client_debugfs_init(struct drm_minor *minor); +void drm_client_debugfs_init(struct drm_minor *minor);#endif
include/drm/drm_drv.h +1 -1
@@ -323,7 +323,7 @@ struct drm_driver {* * Allows drivers to create driver-specific debugfs files. */ -int (*debugfs_init)(struct drm_minor *minor); +void (*debugfs_init)(struct drm_minor *minor);/** * @gem_free_object: deconstructor for drm_gem_objects
include/drm/drm_gem_vram_helper.h +1 -1
@@ -196,7 +196,7 @@ static inline struct drm_vram_mm *drm_vram_mm_of_bdev( return container_of(bdev, struct drm_vram_mm, bdev); } -int drm_vram_mm_debugfs_init (struct drm_minor *minor); +void drm_vram_mm_debugfs_init (struct drm_minor *minor);/* * Helpers for integration with struct drm_device
include/drm/drm_mipi_dbi.h +1 -1
@@ -192,7 +192,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, })#ifdef CONFIG_DEBUG_FS -int mipi_dbi_debugfs_init (struct drm_minor *minor); +void mipi_dbi_debugfs_init (struct drm_minor *minor);#else #define mipi_dbi_debugfs_init NULL#endif
Signature · 1 line
2.25.1
Quoted 11 lines · Wambui Karuga
This series includes work on various debugfs functions both in drm/core and across various drivers in the subsystem.
Since commit987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()does not fail and only returns zero. This series therefore removes the left over error handling and checks for its return value across drm drivers.As a result of these changes, most
drm_debugfsfunctions are converted to return void in this series. This also enables thedrm_driver,debugfs_init()hook to be changed to return void.
Quoted 5 lines
v2: individual driver patches have been converted to have debugfs functions return 0 instead of void to prevent breaking individual driver builds.
The last patch then converts the .debugfs_hook() and its users across all drivers to return void.
This looks much better to me, nice job:
Quoted 12 lines · Greg KH
Quoted 11 lines · Wambui Karuga
This series includes work on various debugfs functions both in drm/core and across various drivers in the subsystem.
Since commit987d65d01356(drm: debugfs: makedrm_debugfs_create_files()never fail),drm_debugfs_create_files()does not fail and only returns zero. This series therefore removes the left over error handling and checks for its return value across drm drivers.As a result of these changes, most
drm_debugfsfunctions are converted to return void in this series. This also enables thedrm_driver,debugfs_init()hook to be changed to return void.
Quoted 7 lines
Quoted 5 lines
v2: individual driver patches have been converted to have debugfs functions return 0 instead of void to prevent breaking individual driver builds.
The last patch then converts the .debugfs_hook() and its users across all drivers to return void.This looks much better to me, nice job:
Yup, really nice all!
Quoted 1 line
Reviewed-by Greg Kroah-Hartman <[email protected]>
Thanks for the patches (and the review), everything queued up in drm-misc-next. But missed the 5.7 feature freeze in drm unfortunately, so heading for 5.8. Apologies for being a bit too distracted past week and not merging this a bit more timely.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch