Module Name:    src
Committed By:   maxv
Date:           Sat Feb  8 07:24:46 UTC 2020

Modified Files:
        src/sys/dev/pci: if_alc.c if_alcreg.h

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_alcreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.48 src/sys/dev/pci/if_alc.c:1.49
--- src/sys/dev/pci/if_alc.c:1.48	Tue Feb  4 05:44:14 2020
+++ src/sys/dev/pci/if_alc.c	Sat Feb  8 07:24:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.48 2020/02/04 05:44:14 thorpej Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.49 2020/02/08 07:24:46 maxv Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon <yong...@freebsd.org>
@@ -78,7 +78,7 @@
 /*
  * Devices supported by this driver.
  */
-static struct alc_ident alc_ident_table[] = {
+static const struct alc_ident alc_ident_table[] = {
 	{ PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8131, 9 * 1024,
 		"Atheros AR8131 PCIe Gigabit Ethernet" },
 	{ PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8132, 9 * 1024,
@@ -128,7 +128,7 @@ static int	alc_dma_alloc(struct alc_soft
 static void	alc_dma_free(struct alc_softc *);
 static void	alc_dsp_fixup(struct alc_softc *, int);
 static int	alc_encap(struct alc_softc *, struct mbuf **);
-static struct alc_ident *
+static const struct alc_ident *
 		alc_find_ident(struct pci_attach_args *);
 static void	alc_get_macaddr(struct alc_softc *);
 static void	alc_get_macaddr_813x(struct alc_softc *);
@@ -172,7 +172,7 @@ static void	alc_tick(void *);
 static void	alc_txeof(struct alc_softc *);
 static void	alc_init_pcie(struct alc_softc *);
 
-static uint32_t alc_dma_burst[] = { 128, 256, 512, 1024, 2048, 4096, 0, 0 };
+static const uint32_t alc_dma_burst[] = { 128, 256, 512, 1024, 2048, 4096, 0, 0 };
 
 CFATTACH_DECL_NEW(alc, sizeof(struct alc_softc),
     alc_match, alc_attach, alc_detach, NULL);
@@ -574,10 +574,10 @@ alc_mediachange(struct ifnet *ifp)
 	return (error);
 }
 
-static struct alc_ident *
+static const struct alc_ident *
 alc_find_ident(struct pci_attach_args *pa)
 {
-	struct alc_ident *ident;
+	const struct alc_ident *ident;
 	uint16_t vendor, devid;
 
 	vendor = PCI_VENDOR(pa->pa_id);

Index: src/sys/dev/pci/if_alcreg.h
diff -u src/sys/dev/pci/if_alcreg.h:1.8 src/sys/dev/pci/if_alcreg.h:1.9
--- src/sys/dev/pci/if_alcreg.h:1.8	Thu Oct 17 09:13:48 2019
+++ src/sys/dev/pci/if_alcreg.h	Sat Feb  8 07:24:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alcreg.h,v 1.8 2019/10/17 09:13:48 msaitoh Exp $	*/
+/*	$NetBSD: if_alcreg.h,v 1.9 2020/02/08 07:24:46 maxv Exp $	*/
 /*	$OpenBSD: if_alcreg.h,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon <yong...@freebsd.org>
@@ -1451,7 +1451,7 @@ struct alc_softc {
 	pcitag_t		sc_pcitag;
 
 	void			*sc_irq_handle;
-	struct alc_ident	*alc_ident;
+	const struct alc_ident	*alc_ident;
 	struct mii_data		sc_miibus;
 	int			alc_rev;
 	int			alc_expcap;

Reply via email to