All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
@ 2022-03-22 23:53 Yang Li
  2022-03-23 10:17 ` Jeff Layton
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-03-22 23:53 UTC (permalink / raw)
  To: jlayton; +Cc: xiubli, idryomov, ceph-devel, linux-kernel, Yang Li, Abaci Robot

Fix the following coccicheck warning:
./fs/ceph/debugfs.c:389:0-23: WARNING: congestion_kb_fops should be
defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 fs/ceph/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index bec3c4549c07..05d15a0bbd9b 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -386,7 +386,7 @@ static int congestion_kb_get(void *data, u64 *val)
 	return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(congestion_kb_fops, congestion_kb_get,
+DEFINE_DEBUGFS_ATTRIBUTE(congestion_kb_fops, congestion_kb_get,
 			congestion_kb_set, "%llu\n");
 
 
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
  2022-03-22 23:53 [PATCH -next] ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Yang Li
@ 2022-03-23 10:17 ` Jeff Layton
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2022-03-23 10:17 UTC (permalink / raw)
  To: Yang Li; +Cc: xiubli, idryomov, ceph-devel, linux-kernel, Abaci Robot

On Wed, 2022-03-23 at 07:53 +0800, Yang Li wrote:
> Fix the following coccicheck warning:
> ./fs/ceph/debugfs.c:389:0-23: WARNING: congestion_kb_fops should be
> defined with DEFINE_DEBUGFS_ATTRIBUTE
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  fs/ceph/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index bec3c4549c07..05d15a0bbd9b 100644
> --- a/fs/ceph/debugfs.c
> +++ b/fs/ceph/debugfs.c
> @@ -386,7 +386,7 @@ static int congestion_kb_get(void *data, u64 *val)
>  	return 0;
>  }
>  
> -DEFINE_SIMPLE_ATTRIBUTE(congestion_kb_fops, congestion_kb_get,
> +DEFINE_DEBUGFS_ATTRIBUTE(congestion_kb_fops, congestion_kb_get,
>  			congestion_kb_set, "%llu\n");
>  
>  

I think you're the 4th person to propose this patch. Here are the three
prior postings:

    https://lore.kernel.org/ceph-devel/1577111958-100981-1-git-send-email-chenwandun@huawei.com/
    https://lore.kernel.org/ceph-devel/1612165930-110076-1-git-send-email-jiapeng.chong@linux.alibaba.com/
    https://lore.kernel.org/ceph-devel/20211221143614.480385-1-deng.changcheng@zte.com.cn/

It's not as simple as doing a 1:1 conversion like this. Please look at
the threads above and offer a revised patch or let us know whether you
want us to drop this one.

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-23 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 23:53 [PATCH -next] ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Yang Li
2022-03-23 10:17 ` Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.