Skip to content

Commit ff34953

Browse files
Chenghai Huangherbertx
authored andcommitted
crypto: hisilicon/qm - add const qualifier to info_name in struct qm_cmd_dump_item
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>
1 parent f94f6cf commit ff34953

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/crypto/hisilicon/debugfs.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ struct qm_dfx_item {
4545

4646
struct qm_cmd_dump_item {
4747
const char *cmd;
48-
char *info_name;
49-
int (*dump_fn)(struct hisi_qm *qm, char *cmd, char *info_name);
48+
const char *info_name;
49+
int (*dump_fn)(struct hisi_qm *qm, char *cmd, const char *info_name);
5050
};
5151

5252
static struct qm_dfx_item qm_dfx_files[] = {
@@ -151,7 +151,7 @@ static ssize_t qm_cmd_read(struct file *filp, char __user *buffer,
151151
}
152152

153153
static void dump_show(struct hisi_qm *qm, void *info,
154-
unsigned int info_size, char *info_name)
154+
unsigned int info_size, const char *info_name)
155155
{
156156
struct device *dev = &qm->pdev->dev;
157157
u8 *info_curr = info;
@@ -165,7 +165,7 @@ static void dump_show(struct hisi_qm *qm, void *info,
165165
}
166166
}
167167

168-
static int qm_sqc_dump(struct hisi_qm *qm, char *s, char *name)
168+
static int qm_sqc_dump(struct hisi_qm *qm, char *s, const char *name)
169169
{
170170
struct device *dev = &qm->pdev->dev;
171171
struct qm_sqc sqc;
@@ -202,7 +202,7 @@ static int qm_sqc_dump(struct hisi_qm *qm, char *s, char *name)
202202
return 0;
203203
}
204204

205-
static int qm_cqc_dump(struct hisi_qm *qm, char *s, char *name)
205+
static int qm_cqc_dump(struct hisi_qm *qm, char *s, const char *name)
206206
{
207207
struct device *dev = &qm->pdev->dev;
208208
struct qm_cqc cqc;
@@ -239,7 +239,7 @@ static int qm_cqc_dump(struct hisi_qm *qm, char *s, char *name)
239239
return 0;
240240
}
241241

242-
static int qm_eqc_aeqc_dump(struct hisi_qm *qm, char *s, char *name)
242+
static int qm_eqc_aeqc_dump(struct hisi_qm *qm, char *s, const char *name)
243243
{
244244
struct device *dev = &qm->pdev->dev;
245245
struct qm_aeqc aeqc;
@@ -317,7 +317,7 @@ static int q_dump_param_parse(struct hisi_qm *qm, char *s,
317317
return 0;
318318
}
319319

320-
static int qm_sq_dump(struct hisi_qm *qm, char *s, char *name)
320+
static int qm_sq_dump(struct hisi_qm *qm, char *s, const char *name)
321321
{
322322
u16 sq_depth = qm->qp_array->sq_depth;
323323
struct hisi_qp *qp;
@@ -345,7 +345,7 @@ static int qm_sq_dump(struct hisi_qm *qm, char *s, char *name)
345345
return 0;
346346
}
347347

348-
static int qm_cq_dump(struct hisi_qm *qm, char *s, char *name)
348+
static int qm_cq_dump(struct hisi_qm *qm, char *s, const char *name)
349349
{
350350
struct qm_cqe *cqe_curr;
351351
struct hisi_qp *qp;
@@ -363,7 +363,7 @@ static int qm_cq_dump(struct hisi_qm *qm, char *s, char *name)
363363
return 0;
364364
}
365365

366-
static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, char *name)
366+
static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, const char *name)
367367
{
368368
struct device *dev = &qm->pdev->dev;
369369
u16 xeq_depth;

0 commit comments

Comments
 (0)