ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
PATCH 1/1 ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
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 <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/debugfs.c +1 -1
@@ -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" );
Signature · 1 line
2.20.1.7.g153144c
Quoted 15 lines · Yang Li
Fix the following coccicheck warning:
./fs/ceph/debugfs.c:389:0-23: WARNING:congestion_kb_fopsshould be defined withDEFINE_DEBUGFS_ATTRIBUTEReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/debugfs.c +0
-0
fs/ceph/debugfs.c static int congestion_kb_get(void *data, u64 *val) · line 392
Quoted 8 lines
fs/ceph/debugfs.c +1
-1@@ -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/[email protected]/ https://lore.kernel.org/ceph-devel/1612165930-110076-1-git-send-email-jiapeng.chong@linux.alibaba.com/ https://lore.kernel.org/ceph-devel/[email protected]/
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,
Signature · 1 line
Jeff Layton <[email protected]>