diff options
| author | maxv <maxv@NetBSD.org> | 2018-06-03 10:24:24 +0000 |
|---|---|---|
| committer | maxv <maxv@NetBSD.org> | 2018-06-03 10:24:24 +0000 |
| commit | f9d509a9f594cd56fd5a1a30ee9539b2c80461b7 (patch) | |
| tree | 2e12b0f5acbaee3bdfdc04dbe6c98cd330f22514 /sys/dev | |
| parent | ad21b507e004c984969bb810552ffea550cd196c (diff) | |
Constify several variables in ixgbe/ so that they land in .rodata (1038
bytes).
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe.c | 14 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixv.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/pci/ixgbe/ixgbe.c b/sys/dev/pci/ixgbe/ixgbe.c index f2ef7089730..e418be7ab9a 100644 --- a/sys/dev/pci/ixgbe/ixgbe.c +++ b/sys/dev/pci/ixgbe/ixgbe.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.158 2018/05/30 09:17:17 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.159 2018/06/03 10:24:24 maxv Exp $ */ /****************************************************************************** @@ -80,7 +80,7 @@ /************************************************************************ * Driver version ************************************************************************/ -char ixgbe_driver_version[] = "4.0.1-k"; +static const char ixgbe_driver_version[] = "4.0.1-k"; /************************************************************************ @@ -92,7 +92,7 @@ char ixgbe_driver_version[] = "4.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static ixgbe_vendor_info_t ixgbe_vendor_info_array[] = +static const ixgbe_vendor_info_t ixgbe_vendor_info_array[] = { {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0}, @@ -266,7 +266,7 @@ static void ixgbe_handle_phy(void *); /* Workqueue handler for deferred work */ static void ixgbe_handle_que_work(struct work *, void *); -static ixgbe_vendor_info_t *ixgbe_lookup(const struct pci_attach_args *); +static const ixgbe_vendor_info_t *ixgbe_lookup(const struct pci_attach_args *); /************************************************************************ * NetBSD Device Interface Entry Points @@ -769,7 +769,7 @@ ixgbe_attach(device_t parent, device_t dev, void *aux) u32 ctrl_ext; u16 high, low, nvmreg; pcireg_t id, subid; - ixgbe_vendor_info_t *ent; + const ixgbe_vendor_info_t *ent; struct pci_attach_args *pa = aux; const char *str; char buf[256]; @@ -5934,10 +5934,10 @@ ixgbe_probe(device_t dev, cfdata_t cf, void *aux) return (ixgbe_lookup(pa) != NULL) ? 1 : 0; } -static ixgbe_vendor_info_t * +static const ixgbe_vendor_info_t * ixgbe_lookup(const struct pci_attach_args *pa) { - ixgbe_vendor_info_t *ent; + const ixgbe_vendor_info_t *ent; pcireg_t subid; INIT_DEBUGOUT("ixgbe_lookup: begin"); diff --git a/sys/dev/pci/ixgbe/ixv.c b/sys/dev/pci/ixgbe/ixv.c index 85693c6d40a..1ad5c91716d 100644 --- a/sys/dev/pci/ixgbe/ixv.c +++ b/sys/dev/pci/ixgbe/ixv.c @@ -1,4 +1,4 @@ -/*$NetBSD: ixv.c,v 1.102 2018/05/30 08:35:26 msaitoh Exp $*/ +/*$NetBSD: ixv.c,v 1.103 2018/06/03 10:24:24 maxv Exp $*/ /****************************************************************************** @@ -46,7 +46,7 @@ /************************************************************************ * Driver version ************************************************************************/ -char ixv_driver_version[] = "2.0.1-k"; +static const char ixv_driver_version[] = "2.0.1-k"; /************************************************************************ * PCI Device ID Table @@ -57,7 +57,7 @@ char ixv_driver_version[] = "2.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static ixgbe_vendor_info_t ixv_vendor_info_array[] = +static const ixgbe_vendor_info_t ixv_vendor_info_array[] = { {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF, 0, 0, 0}, @@ -154,7 +154,7 @@ static void ixv_handle_link(void *); static void ixv_handle_que_work(struct work *, void *); const struct sysctlnode *ixv_sysctl_instance(struct adapter *); -static ixgbe_vendor_info_t *ixv_lookup(const struct pci_attach_args *); +static const ixgbe_vendor_info_t *ixv_lookup(const struct pci_attach_args *); /************************************************************************ * FreeBSD Device Interface Entry Points @@ -259,10 +259,10 @@ ixv_probe(device_t dev, cfdata_t cf, void *aux) #endif } /* ixv_probe */ -static ixgbe_vendor_info_t * +static const ixgbe_vendor_info_t * ixv_lookup(const struct pci_attach_args *pa) { - ixgbe_vendor_info_t *ent; + const ixgbe_vendor_info_t *ent; pcireg_t subid; INIT_DEBUGOUT("ixv_lookup: begin"); @@ -302,7 +302,7 @@ ixv_attach(device_t parent, device_t dev, void *aux) struct ixgbe_hw *hw; int error = 0; pcireg_t id, subid; - ixgbe_vendor_info_t *ent; + const ixgbe_vendor_info_t *ent; const struct pci_attach_args *pa = aux; const char *apivstr; const char *str; |
