git: 55205beabb0f - stable/14 - sa: Make sa_param_table[] const and static
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Jan 2024 13:48:08 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55205beabb0fb5dbd7c73e5632f70a6eeacd2909 commit 55205beabb0fb5dbd7c73e5632f70a6eeacd2909 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-12-27 21:40:12 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-01-04 13:42:35 +0000 sa: Make sa_param_table[] const and static No functional change intended. Reviewed by: ken, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43204 (cherry picked from commit 46a6cfee1bb61145717166a3bbbd8dbad27fbf36) --- sys/cam/scsi/scsi_sa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index 07b917daa0c0..aaf79b74a509 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -633,7 +633,7 @@ static struct sa_prot_map *safindprotent(char *name, struct sa_prot_map *table, int table_ents); static int sasetprotents(struct cam_periph *periph, struct mtparamset *ps, int num_params); -static struct sa_param_ent *safindparament(struct mtparamset *ps); +static const struct sa_param_ent *safindparament(struct mtparamset *ps); static int saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, int need_copy); static int saextget(struct cdev *dev, struct cam_periph *periph, @@ -1356,7 +1356,7 @@ typedef enum { SA_PARAM_TYPE_NODE } sa_param_type; -struct sa_param_ent { +static const struct sa_param_ent { char *name; sa_param_type param_type; int (*set_func)(struct cam_periph *periph, struct mtparamset *ps, @@ -1367,7 +1367,7 @@ struct sa_param_ent { {"protection.", SA_PARAM_TYPE_NODE, sasetprotents } }; -static struct sa_param_ent * +static const struct sa_param_ent * safindparament(struct mtparamset *ps) { unsigned int i; @@ -1403,7 +1403,7 @@ saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, int i, contig_ents; int error; struct mtparamset *params, *first; - struct sa_param_ent *first_ent; + const struct sa_param_ent *first_ent; error = 0; params = NULL; @@ -1444,7 +1444,7 @@ saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, first = NULL; first_ent = NULL; for (i = 0; i < list->num_params; i++) { - struct sa_param_ent *ent; + const struct sa_param_ent *ent; ent = safindparament(¶ms[i]); if (ent == NULL) {