From 0480d2ad8bcef1a71cd9df2d62518679d800bc78 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 2 Sep 2022 20:06:57 +0000 Subject: Constify nam2blk[], chrtoblktbl[] and octeon devmap[]. ok mpi@ millert@ --- sys/arch/loongson/loongson/autoconf.c | 4 ++-- sys/arch/loongson/loongson/conf.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/arch/loongson') diff --git a/sys/arch/loongson/loongson/autoconf.c b/sys/arch/loongson/loongson/autoconf.c index 77b9b90d93a..303a350c8ef 100644 --- a/sys/arch/loongson/loongson/autoconf.c +++ b/sys/arch/loongson/loongson/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.10 2018/04/20 14:08:12 visa Exp $ */ +/* $OpenBSD: autoconf.c,v 1.11 2022/09/02 20:06:56 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. * @@ -149,7 +149,7 @@ device_register(struct device *dev, void *aux) (*sys_platform->device_register)(dev, aux); } -struct nam2blk nam2blk[] = { +const struct nam2blk nam2blk[] = { { "sd", 0 }, { "vnd", 2 }, { "cd", 3 }, diff --git a/sys/arch/loongson/loongson/conf.c b/sys/arch/loongson/loongson/conf.c index 3b939aee0cb..a7dea856e54 100644 --- a/sys/arch/loongson/loongson/conf.c +++ b/sys/arch/loongson/loongson/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.31 2021/11/11 10:03:09 claudio Exp $ */ +/* $OpenBSD: conf.c,v 1.32 2022/09/02 20:06:56 miod Exp $ */ /* * Copyright (c) 1992, 1993 @@ -276,7 +276,7 @@ getnulldev() } -int chrtoblktbl[] = { +const int chrtoblktbl[] = { /* VCHR VBLK */ /* 0 */ NODEV, /* 1 */ NODEV, @@ -303,7 +303,7 @@ int chrtoblktbl[] = { /* 22 */ 8 /* rd */ }; -int nchrtoblktbl = nitems(chrtoblktbl); +const int nchrtoblktbl = nitems(chrtoblktbl); #include -- cgit v1.2.3