From owner-svn-src-all@FreeBSD.ORG Sun Jan 29 00:35:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B42C21065670; Sun, 29 Jan 2012 00:35:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D1B8FC1D; Sun, 29 Jan 2012 00:35:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0T0ZNdU007215; Sun, 29 Jan 2012 00:35:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0T0ZN9E007213; Sun, 29 Jan 2012 00:35:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201201290035.q0T0ZN9E007213@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Jan 2012 00:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230694 - stable/9/sys/dev/vr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2012 00:35:23 -0000 Author: marius Date: Sun Jan 29 00:35:22 2012 New Revision: 230694 URL: http://svn.freebsd.org/changeset/base/230694 Log: MFC: r226171 Sprinkle const. Modified: stable/9/sys/dev/vr/if_vr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/vr/if_vr.c ============================================================================== --- stable/9/sys/dev/vr/if_vr.c Sun Jan 29 00:35:22 2012 (r230693) +++ stable/9/sys/dev/vr/if_vr.c Sun Jan 29 00:35:22 2012 (r230694) @@ -114,12 +114,12 @@ MODULE_DEPEND(vr, miibus, 1, 1, 1); #define VR_Q_CSUM (1<<1) #define VR_Q_CAM (1<<2) -static struct vr_type { +static const struct vr_type { u_int16_t vr_vid; u_int16_t vr_did; int vr_quirks; - char *vr_name; -} vr_devs[] = { + const char *vr_name; +} const vr_devs[] = { { VIA_VENDORID, VIA_DEVICEID_RHINE, VR_Q_NEEDALIGN, "VIA VT3043 Rhine I 10/100BaseTX" }, @@ -195,11 +195,11 @@ static void vr_setwol(struct vr_softc *) static void vr_clrwol(struct vr_softc *); static int vr_sysctl_stats(SYSCTL_HANDLER_ARGS); -static struct vr_tx_threshold_table { +static const struct vr_tx_threshold_table { int tx_cfg; int bcr_cfg; int value; -} vr_tx_threshold_tables[] = { +} const vr_tx_threshold_tables[] = { { VR_TXTHRESH_64BYTES, VR_BCR1_TXTHRESH64BYTES, 64 }, { VR_TXTHRESH_128BYTES, VR_BCR1_TXTHRESH128BYTES, 128 }, { VR_TXTHRESH_256BYTES, VR_BCR1_TXTHRESH256BYTES, 256 }, @@ -553,10 +553,10 @@ vr_reset(const struct vr_softc *sc) * Probe for a VIA Rhine chip. Check the PCI vendor and device * IDs against our list and return a match or NULL */ -static struct vr_type * +static const struct vr_type * vr_match(device_t dev) { - struct vr_type *t = vr_devs; + const struct vr_type *t = vr_devs; for (t = vr_devs; t->vr_name != NULL; t++) if ((pci_get_vendor(dev) == t->vr_vid) && @@ -572,7 +572,7 @@ vr_match(device_t dev) static int vr_probe(device_t dev) { - struct vr_type *t; + const struct vr_type *t; t = vr_match(dev); if (t != NULL) { @@ -591,7 +591,7 @@ vr_attach(device_t dev) { struct vr_softc *sc; struct ifnet *ifp; - struct vr_type *t; + const struct vr_type *t; uint8_t eaddr[ETHER_ADDR_LEN]; int error, rid; int i, phy, pmc;