diff mbox series

[v2] crypto: caam - Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

Message ID 1612231575-15646-1-git-send-email-jiapeng.chong@linux.alibaba.com
State Superseded
Headers show
Series [v2] crypto: caam - Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE | expand

Commit Message

Jiapeng Chong Feb. 2, 2021, 2:06 a.m. UTC
Fix the following coccicheck warning:

./drivers/crypto/caam/debugfs.c:23:0-23: WARNING: caam_fops_u64_ro
should be defined with DEFINE_DEBUGFS_ATTRIBUTE.

./drivers/crypto/caam/debugfs.c:22:0-23: WARNING: caam_fops_u32_ro
should be defined with DEFINE_DEBUGFS_ATTRIBUTE.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
  -Modified subject.

 drivers/crypto/caam/debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Herbert Xu Feb. 10, 2021, 7:22 a.m. UTC | #1
On Tue, Feb 02, 2021 at 10:06:15AM +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warning:

> 

> ./drivers/crypto/caam/debugfs.c:23:0-23: WARNING: caam_fops_u64_ro

> should be defined with DEFINE_DEBUGFS_ATTRIBUTE.

> 

> ./drivers/crypto/caam/debugfs.c:22:0-23: WARNING: caam_fops_u32_ro

> should be defined with DEFINE_DEBUGFS_ATTRIBUTE.

> 

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

> ---

> Changes in v2:

>   -Modified subject.

> 

>  drivers/crypto/caam/debugfs.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)


Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff mbox series

Patch

diff --git a/drivers/crypto/caam/debugfs.c b/drivers/crypto/caam/debugfs.c
index 8ebf183..806bb20 100644
--- a/drivers/crypto/caam/debugfs.c
+++ b/drivers/crypto/caam/debugfs.c
@@ -19,8 +19,8 @@  static int caam_debugfs_u32_get(void *data, u64 *val)
 	return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u32_ro, caam_debugfs_u32_get, NULL, "%llu\n");
-DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u64_ro, caam_debugfs_u64_get, NULL, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(caam_fops_u32_ro, caam_debugfs_u32_get, NULL, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(caam_fops_u64_ro, caam_debugfs_u64_get, NULL, "%llu\n");
 
 #ifdef CONFIG_CAAM_QI
 /*