Skip to contentSkip to conversation

crypto: picoxcell - convert sysfs sprintf/snprintf family to sysfs_emit

PATCH Superseded Jiapeng Chong 2 participants 2 messages Feb 4, 2021 – Feb 10, 2021 Crypto API

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: picoxcell - convert sysfs sprintf/snprintf family to sysfs_emit

Fix the following coccicheck warning:

./drivers/crypto/picoxcell_crypto.c:1201:8-16: WARNING: use scnprintf
or sprintf.

---
 drivers/crypto/picoxcell_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/picoxcell_crypto.c +1 -1
index 84f9c16..d7a7def 100644
@@ -1198,7 +1198,7 @@ static ssize_t spacc_stat_irq_thresh_show(struct device *dev,
 {
 	struct spacc_engine *engine = spacc_dev_to_engine(dev);
 
-	return snprintf(buf, PAGE_SIZE, "%u\n", engine->stat_irq_thresh);
+	return sysfs_emit(buf, "%u\n", engine->stat_irq_thresh);
 }
 
 static ssize_t spacc_stat_irq_thresh_store(struct device *dev,
Signature · 7 lines
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 10 lines · Jiapeng Chong

Fix the following coccicheck warning:

./drivers/crypto/picoxcell_crypto.c:1201:8-16: WARNING: use scnprintf
or sprintf.

---
 drivers/crypto/picoxcell_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This driver no longer exists.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt