linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@mailbox.org>
To: florian.fainelli@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com,
	gregkh@linuxfoundation.org, umang.jain@ideasonboard.com,
	wahrenst@gmx.net, linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Bernhard Rosenkränzer" <bero@baylibre.com>
Subject: Re: [PATCH] staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set
Date: Fri, 28 Jun 2024 07:17:30 +0200	[thread overview]
Message-ID: <5807549.DvuYhMxLoT@kongar> (raw)
In-Reply-To: <20240627124419.2498642-1-bero@baylibre.com>

Hi Bernhard,

Am Donnerstag, 27. Juni 2024, 14:44:19 MESZ schrieb Bernhard Rosenkränzer:
> Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
> vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the
> dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a
> compile time error.
> 
> Fixes: c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")
> Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com>
> ---
>  .../staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c   | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> index 1f74d0bb33bae..d5f7f61c56269 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> @@ -138,7 +138,7 @@ void vchiq_debugfs_deinit(void)
>  
>  #else /* CONFIG_DEBUG_FS */
>  
> -void vchiq_debugfs_init(void)
> +void vchiq_debugfs_init(struct vchiq_state *state)
>  {
>  }
>  

How about encapsulating the code inside if (IS_ENABLED(CONFIG_DEBUG_FS)) and
remove the #ifdef CONFIG_DEBUG_FS alltogether? AFAIK this will do a
compile test even if CONFIG_DEBUG_FS is unset.

Best regards,
Alexander








      parent reply	other threads:[~2024-06-28  5:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 12:44 [PATCH] staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set Bernhard Rosenkränzer
2024-06-27 13:34 ` Stefan Wahren
2024-06-28  5:17 ` Alexander Stein [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=5807549.DvuYhMxLoT@kongar \
    --to=alexander.stein@mailbox.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bero@baylibre.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=umang.jain@ideasonboard.com \
    --cc=wahrenst@gmx.net \
    /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;
as well as URLs for NNTP newsgroup(s).