mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: pengfuyuan <pengfuyuan@kylinos.cn>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	k2ci <kernel-bot@kylinos.cn>
Subject: Re: [PATCH] arm/komeda: Remove all CONFIG_DEBUG_FS conditional compilations
Date: Thu, 6 Jun 2024 13:48:41 +0100	[thread overview]
Message-ID: <ZmGwKbsPfasPTOqx@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20240606120842.1377267-1-pengfuyuan@kylinos.cn>

On Thu, Jun 06, 2024 at 08:08:42PM +0800, pengfuyuan wrote:
> 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>

Thanks for the cleanup!

Best regards,
Liviu

> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> index 14ee79becacb..5ba62e637a61 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> @@ -12,10 +12,8 @@
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/dma-mapping.h>
> -#ifdef CONFIG_DEBUG_FS
>  #include <linux/debugfs.h>
>  #include <linux/seq_file.h>
> -#endif
>  
>  #include <drm/drm_print.h>
>  
> @@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x)
>  
>  DEFINE_SHOW_ATTRIBUTE(komeda_register);
>  
> -#ifdef CONFIG_DEBUG_FS
>  static void komeda_debugfs_init(struct komeda_dev *mdev)
>  {
>  	if (!debugfs_initialized())
> @@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
>  	debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root,
>  			   &mdev->err_verbosity);
>  }
> -#endif
>  
>  static ssize_t
>  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)
>  
>  	mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS;
>  
> -#ifdef CONFIG_DEBUG_FS
>  	komeda_debugfs_init(mdev);
> -#endif
>  
>  	return mdev;
>  
> @@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev)
>  
>  	sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group);
>  
> -#ifdef CONFIG_DEBUG_FS
>  	debugfs_remove_recursive(mdev->debugfs_root);
> -#endif
>  
>  	if (mdev->aclk)
>  		clk_prepare_enable(mdev->aclk);
> -- 
> 2.25.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

      reply	other threads:[~2024-06-06 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 12:08 pengfuyuan
2024-06-06 12:48 ` Liviu Dudau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmGwKbsPfasPTOqx@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-bot@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=pengfuyuan@kylinos.cn \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®