Skip to content

Commit 41f590e

Browse files
Peng-fuyuanmripard
authored andcommitted
arm/komeda: Remove all CONFIG_DEBUG_FS conditional compilations
Since the debugfs functions have no-op stubs for CONFIG_DEBUG_FS=n, the compiler will optimize the rest away since they are no longer referenced. The benefit of removing the conditional compilation is that the build is actually tested for both CONFIG_DEBUG_FS configuration values. Assuming most developers have it enabled, CONFIG_DEBUG_FS=n is not tested much and may fail the build due to the conditional compilation. Reported-by: k2ci <kernel-bot@kylinos.cn> Signed-off-by: pengfuyuan <pengfuyuan@kylinos.cn> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240606120842.1377267-1-pengfuyuan@kylinos.cn Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Maxime Ripard <mripard@kernel.org>
1 parent c38896c commit 41f590e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/gpu/drm/arm/display/komeda/komeda_dev.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
#include <linux/platform_device.h>
1313
#include <linux/pm_runtime.h>
1414
#include <linux/dma-mapping.h>
15-
#ifdef CONFIG_DEBUG_FS
1615
#include <linux/debugfs.h>
1716
#include <linux/seq_file.h>
18-
#endif
1917

2018
#include <drm/drm_print.h>
2119

@@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x)
4341

4442
DEFINE_SHOW_ATTRIBUTE(komeda_register);
4543

46-
#ifdef CONFIG_DEBUG_FS
4744
static void komeda_debugfs_init(struct komeda_dev *mdev)
4845
{
4946
if (!debugfs_initialized())
@@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
5552
debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root,
5653
&mdev->err_verbosity);
5754
}
58-
#endif
5955

6056
static ssize_t
6157
core_id_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -265,9 +261,7 @@ struct komeda_dev *komeda_dev_create(struct device *dev)
265261

266262
mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS;
267263

268-
#ifdef CONFIG_DEBUG_FS
269264
komeda_debugfs_init(mdev);
270-
#endif
271265

272266
return mdev;
273267

@@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev)
286280

287281
sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group);
288282

289-
#ifdef CONFIG_DEBUG_FS
290283
debugfs_remove_recursive(mdev->debugfs_root);
291-
#endif
292284

293285
if (mdev->aclk)
294286
clk_prepare_enable(mdev->aclk);

0 commit comments

Comments
 (0)