From: Chenghai Huang <huangchenghai2@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
<fanghao11@huawei.com>, <liulongfang@huawei.com>,
<qianweili@huawei.com>, <wangzhou1@hisilicon.com>,
<yinzhushuai@huawei.com>
Subject: [PATCH 1/5] crypto: hisilicon - fix the format string type error
Date: Mon, 30 Mar 2026 14:25:27 +0800 [thread overview]
Message-ID: <20260330062531.2976138-2-huangchenghai2@huawei.com> (raw)
In-Reply-To: <20260330062531.2976138-1-huangchenghai2@huawei.com>
From: Zhushuai Yin <yinzhushuai@huawei.com>
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>
---
drivers/crypto/hisilicon/debugfs.c | 4 ++--
drivers/crypto/hisilicon/sec2/sec_main.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/hisilicon/debugfs.c b/drivers/crypto/hisilicon/debugfs.c
index 5d8b4112c543..e5878558dc64 100644
--- a/drivers/crypto/hisilicon/debugfs.c
+++ b/drivers/crypto/hisilicon/debugfs.c
@@ -305,7 +305,7 @@ static int q_dump_param_parse(struct hisi_qm *qm, char *s,
ret = kstrtou32(presult, 0, e_id);
if (ret || *e_id >= q_depth) {
- dev_err(dev, "Please input sqe num (0-%u)", q_depth - 1);
+ dev_err(dev, "Please input sqe num (0-%d)", q_depth - 1);
return -EINVAL;
}
@@ -388,7 +388,7 @@ static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, char *name)
}
if (xeqe_id >= xeq_depth) {
- dev_err(dev, "Please input eqe or aeqe num (0-%u)", xeq_depth - 1);
+ dev_err(dev, "Please input eqe or aeqe num (0-%d)", xeq_depth - 1);
return -EINVAL;
}
diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
index 6647b7340827..056bd8f4da5a 100644
--- a/drivers/crypto/hisilicon/sec2/sec_main.c
+++ b/drivers/crypto/hisilicon/sec2/sec_main.c
@@ -909,7 +909,7 @@ static int sec_debugfs_atomic64_set(void *data, u64 val)
}
DEFINE_DEBUGFS_ATTRIBUTE(sec_atomic64_ops, sec_debugfs_atomic64_get,
- sec_debugfs_atomic64_set, "%lld\n");
+ sec_debugfs_atomic64_set, "%llu\n");
static int sec_regs_show(struct seq_file *s, void *unused)
{
--
2.33.0
next prev parent reply other threads:[~2026-03-30 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 6:25 [PATCH 0/5] crypto: hisilicon - series of cleanups and format fixes for hisilicon driver Chenghai Huang
2026-03-30 6:25 ` Chenghai Huang [this message]
2026-03-30 6:25 ` [PATCH 2/5] crypto: hisilicon/qm - add const qualifier to info_name in struct qm_cmd_dump_item Chenghai Huang
2026-03-30 6:25 ` [PATCH 3/5] crypto: hisilicon/qm - remove else after return Chenghai Huang
2026-03-30 6:25 ` [PATCH 4/5] crypto: hisilicon/qm - drop redundant variable initialization Chenghai Huang
2026-03-30 6:25 ` [PATCH 5/5] crypto: hisilicon - remove unused and non-public APIs for qm and sec Chenghai Huang
2026-04-08 8:07 ` [PATCH 0/5] crypto: hisilicon - series of cleanups and format fixes for hisilicon driver liulongfang
2026-04-12 8:50 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260330062531.2976138-2-huangchenghai2@huawei.com \
--to=huangchenghai2@huawei.com \
--cc=davem@davemloft.net \
--cc=fanghao11@huawei.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=qianweili@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=yinzhushuai@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox