LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: cgel.zte@gmail.com, arnd@arndb.de
Cc: Zeal Robot <zealci@zte.com.cn>,
	Changcheng Deng <deng.changcheng@zte.com.cn>,
	linux-kernel@vger.kernel.org, paulus@samba.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with  DEFINE_DEBUGFS_ATTRIBUTE
Date: Wed, 22 Dec 2021 11:08:38 +1100	[thread overview]
Message-ID: <87h7b1lcvt.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20211221144814.480849-1-deng.changcheng@zte.com.cn>

cgel.zte@gmail.com writes:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck warning:
> ./arch/powerpc/platforms/cell/axon_msi.c: 456: 0-23: WARNING: fops_msic
> should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>
> Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for
> debugfs files.

But it also says:

  //# Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
  //# imposes some significant overhead as compared to
  //# DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Your patch doesn't change it to use debugfs_create_file_unsafe(),
shouldn't it?

cheers

> diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
> index 354a58c1e6f2..47bb0ae8d6c9 100644
> --- a/arch/powerpc/platforms/cell/axon_msi.c
> +++ b/arch/powerpc/platforms/cell/axon_msi.c
> @@ -453,7 +453,7 @@ static int msic_get(void *data, u64 *val)
>  	return 0;
>  }
>  
> -DEFINE_SIMPLE_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
>  
>  void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic)
>  {
> -- 
> 2.25.1

  reply	other threads:[~2021-12-22  0:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 14:48 [PATCH] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE cgel.zte
2021-12-22  0:08 ` Michael Ellerman [this message]
2021-12-22  9:06   ` [PATCH v2] " cgel.zte

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=87h7b1lcvt.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=arnd@arndb.de \
    --cc=cgel.zte@gmail.com \
    --cc=deng.changcheng@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=zealci@zte.com.cn \
    /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