The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=46a6cfee1bb61145717166a3bbbd8dbad27fbf36

commit 46a6cfee1bb61145717166a3bbbd8dbad27fbf36
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2023-12-27 21:40:12 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2023-12-28 01:28:25 +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
---
 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 f84fc5bcb1ab..cfd48c98f30e 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -632,7 +632,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,
@@ -1355,7 +1355,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,
@@ -1366,7 +1366,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;
@@ -1402,7 +1402,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;
@@ -1443,7 +1443,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(&params[i]);
                if (ent == NULL) {

Reply via email to