Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev constify



details:   https://anonhg.NetBSD.org/src/rev/08f04ffb129a
branches:  trunk
changeset: 323620:08f04ffb129a
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jun 23 06:40:43 2018 +0000

description:
constify

diffstat:

 sys/dev/ic/awi.c      |  8 ++++----
 sys/dev/ic/elinkxl.c  |  8 ++++----
 sys/dev/ic/rt2860.c   |  6 +++---
 sys/dev/ic/wi.c       |  9 ++++-----
 sys/dev/pci/ahd_pci.c |  6 +++---
 sys/dev/pci/auacer.c  |  6 +++---
 sys/dev/pci/siside.c  |  8 ++++----
 7 files changed, 25 insertions(+), 26 deletions(-)

diffs (226 lines):

diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c  Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/ic/awi.c  Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awi.c,v 1.92 2017/05/23 02:19:14 ozaki-r Exp $ */
+/*     $NetBSD: awi.c,v 1.93 2018/06/23 06:40:43 maxv Exp $    */
 
 /*-
  * Copyright (c) 1999,2000,2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.92 2017/05/23 02:19:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.93 2018/06/23 06:40:43 maxv Exp $");
 
 #include "opt_inet.h"
 
@@ -159,7 +159,7 @@
         (((u_int8_t *)(p))[2] = (((u_int32_t)(v) >> 16) & 0xff)),      \
         (((u_int8_t *)(p))[3] = (((u_int32_t)(v) >> 24) & 0xff)))
 
-struct awi_chanset awi_chanset[] = {
+static const struct awi_chanset awi_chanset[] = {
     /* PHY type        domain            min max def */
     { AWI_PHY_TYPE_FH, AWI_REG_DOMAIN_JP,  6, 17,  6 },
     { AWI_PHY_TYPE_FH, AWI_REG_DOMAIN_ES,  0, 26,  1 },
@@ -1358,7 +1358,7 @@
 {
        int chan, i, error;
        struct ieee80211com *ic = &sc->sc_ic;
-       struct awi_chanset *cs;
+       const struct awi_chanset *cs;
 
        if ((error = awi_mib(sc, AWI_CMD_GET_MIB, AWI_MIB_LOCAL, AWI_WAIT)) ||
            (error = awi_mib(sc, AWI_CMD_GET_MIB, AWI_MIB_ADDR, AWI_WAIT)) ||
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/ic/elinkxl.c      Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.122 2018/06/22 04:17:42 msaitoh Exp $    */
+/*     $NetBSD: elinkxl.c,v 1.123 2018/06/23 06:40:43 maxv Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.122 2018/06/22 04:17:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.123 2018/06/23 06:40:43 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,7 @@
  * Media table for 3c90x chips.  Note that chips with MII have no
  * `native' media.
  */
-struct ex_media ex_native_media[] = {
+static const struct ex_media ex_native_media[] = {
        { ELINK_PCI_10BASE_T,   "10baseT",      IFM_ETHER|IFM_10_T,
          ELINKMEDIA_10BASE_T },
        { ELINK_PCI_10BASE_T,   "10baseT-FDX",  IFM_ETHER|IFM_10_T|IFM_FDX,
@@ -523,7 +523,7 @@
        bus_space_tag_t iot = sc->sc_iot;
        bus_space_handle_t ioh = sc->sc_ioh;
        struct ifmedia *ifm = &sc->ex_mii.mii_media;
-       struct ex_media *exm;
+       const struct ex_media *exm;
        uint16_t config1, reset_options, default_media;
        int defmedia = 0;
        const char *sep = "", *defmedianame = NULL;
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c       Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/ic/rt2860.c       Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rt2860.c,v 1.30 2018/01/14 18:23:03 maxv Exp $ */
+/*     $NetBSD: rt2860.c,v 1.31 2018/06/23 06:40:43 maxv Exp $ */
 /*     $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
 /*     $FreeBSD: head/sys/dev/ral/rt2860.c 306591 2016-10-02 20:35:55Z avos $ */
 
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.30 2018/01/14 18:23:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.31 2018/06/23 06:40:43 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -196,7 +196,7 @@
        RT2860_RF2850
 };
 
-struct {
+static const struct {
        uint8_t n, r, k;
 } rt3090_freqs[] = {
        RT3070_RF3052
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c   Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/ic/wi.c   Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi.c,v 1.245 2018/06/22 04:17:42 msaitoh Exp $ */
+/*     $NetBSD: wi.c,v 1.246 2018/06/23 06:40:43 maxv Exp $    */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.245 2018/06/22 04:17:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.246 2018/06/23 06:40:43 maxv Exp $");
 
 #define WI_HERMES_AUTOINC_WAR  /* Work around data write autoinc bug. */
 #define WI_HERMES_STATS_WAR    /* Work around stats counter bug. */
@@ -243,8 +243,7 @@
 #define WI_INTRS       (WI_EV_RX | WI_EV_ALLOC | WI_EV_INFO | \
                         WI_EV_TX | WI_EV_TX_EXC | WI_EV_CMD)
 
-struct wi_card_ident
-wi_card_ident[] = {
+static const struct wi_card_ident wi_card_ident[] = {
        /* CARD_ID                      CARD_NAME               FIRM_TYPE */
        { WI_NIC_LUCENT_ID,             WI_NIC_LUCENT_STR,      WI_LUCENT },
        { WI_NIC_SONY_ID,               WI_NIC_SONY_STR,        WI_LUCENT },
@@ -2144,7 +2143,7 @@
 STATIC void
 wi_read_nicid(struct wi_softc *sc)
 {
-       struct wi_card_ident *id;
+       const struct wi_card_ident *id;
        char *p;
        int len;
        u_int16_t ver[4];
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/pci/ahd_pci.c
--- a/sys/dev/pci/ahd_pci.c     Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/pci/ahd_pci.c     Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahd_pci.c,v 1.36 2018/01/15 12:43:42 maya Exp $        */
+/*     $NetBSD: ahd_pci.c,v 1.37 2018/06/23 06:45:51 maxv Exp $        */
 
 /*
  * Product specific probe and attach routines for:
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.36 2018/01/15 12:43:42 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.37 2018/06/23 06:45:51 maxv Exp $");
 
 #define AHD_PCI_IOADDR PCI_MAPREG_START        /* I/O Address */
 #define AHD_PCI_MEMADDR        (PCI_MAPREG_START + 4)  /* Mem I/O Address */
@@ -129,7 +129,7 @@
 static ahd_device_setup_t ahd_aic7902_setup;
 static ahd_device_setup_t ahd_aic790X_setup;
 
-static struct ahd_pci_identity ahd_pci_ident_table [] =
+static const struct ahd_pci_identity ahd_pci_ident_table[] =
 {
        /* aic7901 based controllers */
        {
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/pci/auacer.c
--- a/sys/dev/pci/auacer.c      Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/pci/auacer.c      Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auacer.c,v 1.33 2017/06/01 02:45:10 chs Exp $  */
+/*     $NetBSD: auacer.c,v 1.34 2018/06/23 06:45:51 maxv Exp $ */
 
 /*-
  * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.33 2017/06/01 02:45:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.34 2018/06/23 06:45:51 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -189,7 +189,7 @@
 
 static void auacer_reset(struct auacer_softc *sc);
 
-static struct audio_hw_if auacer_hw_if = {
+static const struct audio_hw_if auacer_hw_if = {
        NULL,                   /* open */
        NULL,                   /* close */
        NULL,                   /* drain */
diff -r 0d5181e5d448 -r 08f04ffb129a sys/dev/pci/siside.c
--- a/sys/dev/pci/siside.c      Sat Jun 23 03:32:48 2018 +0000
+++ b/sys/dev/pci/siside.c      Sat Jun 23 06:40:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siside.c,v 1.36 2014/05/31 16:25:29 christos Exp $     */
+/*     $NetBSD: siside.c,v 1.37 2018/06/23 06:45:51 maxv Exp $ */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.36 2014/05/31 16:25:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.37 2018/06/23 06:45:51 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -112,7 +112,7 @@
        }
 }
 
-static struct sis_hostbr_type {
+static const struct sis_hostbr_type {
        u_int16_t id;
        u_int8_t rev;
        u_int8_t udma_mode;
@@ -175,7 +175,7 @@
        {PCI_PRODUCT_SIS_965,   0x00, 6, "965", SIS_TYPE_133NEW},
 };
 
-static struct sis_hostbr_type *sis_hostbr_type_match;
+static const struct sis_hostbr_type *sis_hostbr_type_match;
 
 static int
 sis_hostbr_match(const struct pci_attach_args *pa)



Home | Main Index | Thread Index | Old Index