]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: hisilicon/qm - add const qualifier to info_name in struct qm_cmd_dump_item
authorChenghai Huang <huangchenghai2@huawei.com>
Mon, 30 Mar 2026 06:25:28 +0000 (14:25 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 12 Apr 2026 08:46:28 +0000 (16:46 +0800)
The "info_name" is never changed in struct qm_cmd_dump_item,
make it const.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/debugfs.c

index e5878558dc64c343a625a60ec958f54c25f3ca9f..3ee6de16e3f111ff77707f08e10d7d04cef9c4c1 100644 (file)
@@ -45,8 +45,8 @@ struct qm_dfx_item {
 
 struct qm_cmd_dump_item {
        const char *cmd;
-       char *info_name;
-       int (*dump_fn)(struct hisi_qm *qm, char *cmd, char *info_name);
+       const char *info_name;
+       int (*dump_fn)(struct hisi_qm *qm, char *cmd, const char *info_name);
 };
 
 static struct qm_dfx_item qm_dfx_files[] = {
@@ -151,7 +151,7 @@ static ssize_t qm_cmd_read(struct file *filp, char __user *buffer,
 }
 
 static void dump_show(struct hisi_qm *qm, void *info,
-                    unsigned int info_size, char *info_name)
+                    unsigned int info_size, const char *info_name)
 {
        struct device *dev = &qm->pdev->dev;
        u8 *info_curr = info;
@@ -165,7 +165,7 @@ static void dump_show(struct hisi_qm *qm, void *info,
        }
 }
 
-static int qm_sqc_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_sqc_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        struct device *dev = &qm->pdev->dev;
        struct qm_sqc sqc;
@@ -202,7 +202,7 @@ static int qm_sqc_dump(struct hisi_qm *qm, char *s, char *name)
        return 0;
 }
 
-static int qm_cqc_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_cqc_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        struct device *dev = &qm->pdev->dev;
        struct qm_cqc cqc;
@@ -239,7 +239,7 @@ static int qm_cqc_dump(struct hisi_qm *qm, char *s, char *name)
        return 0;
 }
 
-static int qm_eqc_aeqc_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_eqc_aeqc_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        struct device *dev = &qm->pdev->dev;
        struct qm_aeqc aeqc;
@@ -317,7 +317,7 @@ static int q_dump_param_parse(struct hisi_qm *qm, char *s,
        return 0;
 }
 
-static int qm_sq_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_sq_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        u16 sq_depth = qm->qp_array->sq_depth;
        struct hisi_qp *qp;
@@ -345,7 +345,7 @@ static int qm_sq_dump(struct hisi_qm *qm, char *s, char *name)
        return 0;
 }
 
-static int qm_cq_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_cq_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        struct qm_cqe *cqe_curr;
        struct hisi_qp *qp;
@@ -363,7 +363,7 @@ static int qm_cq_dump(struct hisi_qm *qm, char *s, char *name)
        return 0;
 }
 
-static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, char *name)
+static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, const char *name)
 {
        struct device *dev = &qm->pdev->dev;
        u16 xeq_depth;