# \[PATCH v2\] crypto: caam - Replace DEFINE\_SIMPLE\_ATTRIBUTE with DEFINE\_DEBUGFS\_ATTRIBUTE

- Subsystems: CRYPTO API, FREESCALE CAAM (Cryptographic Acceleration and Assurance Module) DRIVER, THE REST
- Maintainers: Herbert Xu, "David S. Miller", Horia Geantă, Pankaj Gupta, Sahil Malhotra, Linus Torvalds
- List: linux-crypto
- 3 messages, 3 authors
- Page: https://ratatoskr.run/linux-crypto/2021/02/6254530/t

## \[PATCH v2\] crypto: caam - Replace DEFINE\_SIMPLE\_ATTRIBUTE with DEFINE\_DEBUGFS\_ATTRIBUTE

- From: Jiapeng Chong \<hidden\>
- Date: 2021-02-02 02:07:34 
- Message: https://ratatoskr.run/linux-crypto/2021/02/6254530.md

```text
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 <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
Changes in v2:
  -Modified subject.

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

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
 /*
-- 
1.8.3.1

```

## Re: \[PATCH v2\] crypto: caam - Replace DEFINE\_SIMPLE\_ATTRIBUTE with DEFINE\_DEBUGFS\_ATTRIBUTE

- From: Horia Geantă \<horia.geanta@nxp.com\>
- Date: 2021-02-02 12:09:10 
- Message: https://ratatoskr.run/linux-crypto/2021/02/6255112.md

```text
On 2/2/2021 4:06 AM, 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 <redacted>
> Signed-off-by: Jiapeng Chong <redacted>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia
```

## Re: \[PATCH v2\] crypto: caam - Replace DEFINE\_SIMPLE\_ATTRIBUTE with DEFINE\_DEBUGFS\_ATTRIBUTE

- From: Herbert Xu \<herbert@gondor.apana.org.au\>
- Date: 2021-02-10 07:23:48 
- Message: https://ratatoskr.run/linux-crypto/2021/02/6265308.md

```text
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 <redacted>
> Signed-off-by: Jiapeng Chong <redacted>
> ---
> Changes in v2:
>   -Modified subject.
> 
>  drivers/crypto/caam/debugfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu [ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
```
