public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: "Cédric Le Goater" <clg@kaod•org>, linuxppc-dev@lists•ozlabs.org
Cc: "Cédric Le Goater" <clg@kaod•org>
Subject: Re: [PATCH 04/11] powerpc/xive: Introduce xive_core_debugfs_create()
Date: Thu, 18 Nov 2021 20:21:13 +1100	[thread overview]
Message-ID: <87v90plsza.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20211105102636.1016378-5-clg@kaod.org>

Cédric Le Goater <clg@kaod•org> writes:

> and fix some compile issues when !CONFIG_DEBUG_FS.
>
> Signed-off-by: Cédric Le Goater <clg@kaod•org>
> ---
>  arch/powerpc/sysdev/xive/common.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index 3d558cad1f19..b71cc1020296 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
...
> @@ -1779,10 +1782,18 @@ static int xive_core_debug_show(struct seq_file *m, void *private)
>  }
>  DEFINE_SHOW_ATTRIBUTE(xive_core_debug);
>  
> +static void xive_core_debugfs_create(void)
> +{
> +	debugfs_create_file("xive", 0400, arch_debugfs_dir,
> +			    NULL, &xive_core_debug_fops);
> +}
> +
> +#endif /* CONFIG_DEBUG_FS */
> +
>  int xive_core_debug_init(void)
>  {
> -	if (xive_enabled())
> -		debugfs_create_file("xive", 0400, arch_debugfs_dir,
> -				    NULL, &xive_core_debug_fops);
> +	if (xive_enabled() && IS_ENABLED(CONFIG_DEBUG_FS))
> +		xive_core_debugfs_create();
> +
>  	return 0;
>  }

For skiroot_defconfig this gives me:

  arch/powerpc/sysdev/xive/common.c: In function ‘xive_core_init’:
  arch/powerpc/sysdev/xive/common.c:1676:2: error: implicit declaration of function ‘xive_core_debugfs_create’; did you mean ‘xive_core_debug_init’? [-Werror=implicit-function-declaration]
   1676 |  xive_core_debugfs_create();
        |  ^~~~~~~~~~~~~~~~~~~~~~~~
        |  xive_core_debug_init
  cc1: all warnings being treated as errors


We need an empty inline stub of xive_core_debugfs_create() for the
CONFIG_DEBUG_FS=n case.

I'm wondering though why do we have xive_core_debug_init() at all, why
don't we just initialise the debugfs files in xive_core_init()?

cheers

  reply	other threads:[~2021-11-18  9:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 10:26 [PATCH 00/11] powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV Cédric Le Goater
2021-11-05 10:26 ` [PATCH 01/11] powerpc/xive: Replace pr_devel() by pr_debug() to ease debug Cédric Le Goater
2021-11-05 10:26 ` [PATCH 02/11] powerpc/xive: Introduce an helper to print out interrupt characteristics Cédric Le Goater
2021-11-05 10:26 ` [PATCH 03/11] powerpc/xive: Activate StoreEOI on P10 Cédric Le Goater
2021-11-05 10:26 ` [PATCH 04/11] powerpc/xive: Introduce xive_core_debugfs_create() Cédric Le Goater
2021-11-18  9:21   ` Michael Ellerman [this message]
2021-11-18 15:22     ` Cédric Le Goater
2021-11-05 10:26 ` [PATCH 05/11] powerpc/xive: Change the debugfs file 'xive' into a directory Cédric Le Goater
2021-11-05 10:26 ` [PATCH 06/11] powerpc/xive: Rename the 'cpus' debugfs file to 'ipis' Cédric Le Goater
2021-11-05 10:26 ` [PATCH 07/11] powerpc/xive: Add a debugfs file to dump EQs Cédric Le Goater
2021-11-05 10:26 ` [PATCH 08/11] powerpc/xive: Add a debugfs toggle for StoreEOI Cédric Le Goater
2021-11-05 10:26 ` [PATCH 09/11] powerpc/xive: Add a kernel parameter " Cédric Le Goater
2021-11-05 10:26 ` [PATCH 10/11] powerpc/xive: Add a debugfs toggle for save-restore Cédric Le Goater
2021-11-05 10:26 ` [PATCH 11/11] powerpc/smp: Add a doorbell=off kernel parameter Cédric Le Goater
2021-11-11 10:41   ` Michael Ellerman
2021-11-11 16:01     ` Cédric Le Goater
2021-11-18  9:24       ` Michael Ellerman
2021-11-18 15:26         ` Cédric Le Goater
2021-11-25  9:36 ` [PATCH 00/11] powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV Michael Ellerman

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=87v90plsza.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=clg@kaod$(echo .)org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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