Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: hisilicon - fix the format string type error

1. The return value val of sec_debugfs_atomic64_get is of the
u64 type, but %lld instead of %llu is used in DEFINE_DEBUGFS_ATTRIBUTE.
Fix it.
2. In debugfs.c, since the types of q_depth and xeq_depth are u16,
the results of q_depth - 1 and xeq_depth - 1 are int rather than
u16. Use %d for int.

Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Zhushuai Yin and committed by
Herbert Xu
f94f6cff 02c64052

+3 -3
+2 -2
drivers/crypto/hisilicon/debugfs.c
··· 305 305 306 306 ret = kstrtou32(presult, 0, e_id); 307 307 if (ret || *e_id >= q_depth) { 308 - dev_err(dev, "Please input sqe num (0-%u)", q_depth - 1); 308 + dev_err(dev, "Please input sqe num (0-%d)", q_depth - 1); 309 309 return -EINVAL; 310 310 } 311 311 ··· 388 388 } 389 389 390 390 if (xeqe_id >= xeq_depth) { 391 - dev_err(dev, "Please input eqe or aeqe num (0-%u)", xeq_depth - 1); 391 + dev_err(dev, "Please input eqe or aeqe num (0-%d)", xeq_depth - 1); 392 392 return -EINVAL; 393 393 } 394 394
+1 -1
drivers/crypto/hisilicon/sec2/sec_main.c
··· 909 909 } 910 910 911 911 DEFINE_DEBUGFS_ATTRIBUTE(sec_atomic64_ops, sec_debugfs_atomic64_get, 912 - sec_debugfs_atomic64_set, "%lld\n"); 912 + sec_debugfs_atomic64_set, "%llu\n"); 913 913 914 914 static int sec_regs_show(struct seq_file *s, void *unused) 915 915 {