From nobody Sat Jan 06 19:25:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzX1wFVz571HK; Sat, 6 Jan 2024 19:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzW6pjsz3wq4; Sat, 6 Jan 2024 19:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4HXB5UR7TAao2R1A5lF1t5YjzZf5cLhT4/eZAFi7dI=; b=MsBvshl/B9+R3tvUUF6oyF1K13a/9nN6Ugf3akfk7vR8gpwVVYpwMAl5i2uG1G4zqM/fDl +Ifv6ydOlBi8t9Op/l66u0Vzjg++wvXe4cmq4HYQv43ZdiUEIyPAbBXv7sDBIhldpgT/Om wSIKW5ejROwncPN4Od417ZyAJw5zrS9WN2NeBQ8JGSd1ECDar19iWpng8QgtZ8SocSoaki n1W7IlluUOdDzNUi7UufU9fGZ/7ZtysH7LuKy9f3L+4ublB/iwh83m0MNeFAhHeLNW+jZF YYCCF5pFGnY9VAcE7EuLPnVRi0IEGnSN0Wta1T0JCBIBx9H6JqGjMxuL+gSknA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4HXB5UR7TAao2R1A5lF1t5YjzZf5cLhT4/eZAFi7dI=; b=PpEeJCwLe8/mscFsReszLZ7AdR2Qf4Y25cHx+BPcE9pC3oRjnQZVC3+zIoNuZebIWO4dD4 KUoYu2JNTvCpEx6gWTf/ijLPfwDGZYYOd2S9X8JtGDvA7UmngRVikrc2gtbRQ+pZkU26oi HdXdxEN2VuCUqx3SLN9iuB9+qdRg3Ep3L0Ii9f4R5zH8S7vuyXZfMMW7txLewusB2yPiSy 3V5xy8LAvK5JL9NyV1S9dvAy6zA6AguXi2FXkYnPwEFLj711zGfHcXTjScYF6cdy9dUUlZ tRIF4t7vGYL9vuhPAbV8ZEoo2x3xv4oF+7WfAEXE4L3lqh63ilssny2cLOB4aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569128; a=rsa-sha256; cv=none; b=H6FKBypzsDxurXBqS0NSpsEkt0oSbgvSL0QvSW2dhe+ilIISuHvAM0zXZRbT6yylrtbVzk wq7iRYicrKJvnGJcd3y22Hkepk4fNBJLz/pCLJuksJ82JS1ZCxuQ/KAjG97t2ux0680on/ 0SRvEhnaF6jSrhdA92Ds3sVZd6sZwOgyQAmgnao//nmEA4yUYNsKmT+8YATKKihHN1MWeL so3MGQ7+rlYH841y9bI6cXP2O26mVqMi/+h8z8rkw1mGJI/PqGyWEwIr1Hz5mWmSyQq/OS OQfqwUtH6Zz1BnKBstxapuumY+BEgEW/GpJz5xttqQCKpX7HwKNwdWhWAdx3jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzW5vnpzth8; Sat, 6 Jan 2024 19:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPRZW064992; Sat, 6 Jan 2024 19:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPRae064989; Sat, 6 Jan 2024 19:25:27 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:27 GMT Message-Id: <202401061925.406JPRae064989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: 5153206df0f2 - stable/13 - iflib drivers: Constify PCI ID LUTs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5153206df0f29d682cdcad97b67d182b00204ccd Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=5153206df0f29d682cdcad97b67d182b00204ccd commit 5153206df0f29d682cdcad97b67d182b00204ccd Author: Marius Strobl AuthorDate: 2023-08-16 16:49:34 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 22:48:03 +0000 iflib drivers: Constify PCI ID LUTs Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready for this change. While at it, make isc_driver_version strings (static) const where not apparently un-const on purpose, too. This reduces the size of the amd64 GENERIC by about 10 KiB. (cherry picked from commit 51e235148a4becba94e824a44bd69687644a7f56) Conflicts (drivers missing in stable/13): sys/dev/enetc/if_enetc.c sys/dev/enic/if_enic.c --- sys/dev/axgbe/if_axgbe_pci.c | 2 +- sys/dev/bnxt/bnxt.h | 2 +- sys/dev/bnxt/if_bnxt.c | 4 ++-- sys/dev/e1000/if_em.c | 8 ++++---- sys/dev/iavf/iavf_drv_info.h | 2 +- sys/dev/ice/ice_drv_info.h | 2 +- sys/dev/igc/if_igc.c | 2 +- sys/dev/ixgbe/if_ix.c | 4 ++-- sys/dev/ixgbe/if_ixv.c | 4 ++-- sys/dev/ixl/if_ixl.c | 2 +- sys/dev/mgb/if_mgb.c | 2 +- sys/dev/vmware/vmxnet3/if_vmx.c | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 5f5be18b162d..cd498bf1b5d7 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -137,7 +137,7 @@ static struct resource_spec axgbe_pci_mac_spec[] = { { -1, 0 } }; -static pci_vendor_info_t axgbe_vendor_info_array[] = +static const pci_vendor_info_t axgbe_vendor_info_array[] = { PVID(0x1022, 0x1458, "AMD 10 Gigabit Ethernet Driver"), PVID(0x1022, 0x1459, "AMD 10 Gigabit Ethernet Driver"), diff --git a/sys/dev/bnxt/bnxt.h b/sys/dev/bnxt/bnxt.h index 78b7e4ca6bf5..2b5c16e263d7 100644 --- a/sys/dev/bnxt/bnxt.h +++ b/sys/dev/bnxt/bnxt.h @@ -206,7 +206,7 @@ #define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */ -extern char bnxt_driver_version[]; +extern const char bnxt_driver_version[]; typedef void (*bnxt_doorbell_tx)(void *, uint16_t idx); typedef void (*bnxt_doorbell_rx)(void *, uint16_t idx); typedef void (*bnxt_doorbell_rx_cq)(void *, bool); diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index db8b4125e5bd..b7c71e70a576 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -67,7 +67,7 @@ * PCI Device ID Table */ -static pci_vendor_info_t bnxt_vendor_info_array[] = +static const pci_vendor_info_t bnxt_vendor_info_array[] = { PVID(BROADCOM_VENDOR_ID, BCM57301, "Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller"), @@ -303,7 +303,7 @@ static driver_t bnxt_iflib_driver = { */ #define BNXT_DRIVER_VERSION "2.20.0.1" -char bnxt_driver_version[] = BNXT_DRIVER_VERSION; +const char bnxt_driver_version[] = BNXT_DRIVER_VERSION; extern struct if_txrx bnxt_txrx; static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8cf130048128..b0870fd3f2b3 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -36,8 +36,8 @@ /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.7.8-fbsd"; -char igb_driver_version[] = "2.5.19-fbsd"; +static const char em_driver_version[] = "7.7.8-fbsd"; +static const char igb_driver_version[] = "2.5.19-fbsd"; /********************************************************************* * PCI Device ID Table @@ -49,7 +49,7 @@ char igb_driver_version[] = "2.5.19-fbsd"; * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } *********************************************************************/ -static pci_vendor_info_t em_vendor_info_array[] = +static const pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) - lem-class legacy devices */ PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"), @@ -214,7 +214,7 @@ static pci_vendor_info_t em_vendor_info_array[] = PVID_END }; -static pci_vendor_info_t igb_vendor_info_array[] = +static const pci_vendor_info_t igb_vendor_info_array[] = { /* Intel(R) - igb-class devices */ PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"), diff --git a/sys/dev/iavf/iavf_drv_info.h b/sys/dev/iavf/iavf_drv_info.h index ed8e05fe9727..5a84a30662a8 100644 --- a/sys/dev/iavf/iavf_drv_info.h +++ b/sys/dev/iavf/iavf_drv_info.h @@ -66,7 +66,7 @@ const char iavf_driver_version[] = "3.0.26-k"; * to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before * the PVIDV() for it. */ -static pci_vendor_info_t iavf_vendor_info_array[] = { +static const pci_vendor_info_t iavf_vendor_info_array[] = { PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF, "Intel(R) Ethernet Virtual Function 700 Series"), PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF, diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index f258650760bc..41598923dc94 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -85,7 +85,7 @@ const uint8_t ice_rc_version = 0; * to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before * the PVIDV() for it. */ -static pci_vendor_info_t ice_vendor_info_array[] = { +static const pci_vendor_info_t ice_vendor_info_array[] = { PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE, "Intel(R) Ethernet Controller E810-C for backplane"), PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP, diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 82fb0d72070b..3e05d1a7b957 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -46,7 +46,7 @@ * { Vendor ID, Device ID, String } *********************************************************************/ -static pci_vendor_info_t igc_vendor_info_array[] = +static const pci_vendor_info_t igc_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - igc */ PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"), diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index b1cba9f24929..e265fa77ba4b 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -45,7 +45,7 @@ /************************************************************************ * Driver version ************************************************************************/ -char ixgbe_driver_version[] = "4.0.1-k"; +static const char ixgbe_driver_version[] = "4.0.1-k"; /************************************************************************ * PCI Device ID Table @@ -56,7 +56,7 @@ char ixgbe_driver_version[] = "4.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static pci_vendor_info_t ixgbe_vendor_info_array[] = +static const pci_vendor_info_t ixgbe_vendor_info_array[] = { PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"), diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 956acf46ee24..fe23ea226348 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -45,7 +45,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 @@ -56,7 +56,7 @@ char ixv_driver_version[] = "2.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static pci_vendor_info_t ixv_vendor_info_array[] = +static const pci_vendor_info_t ixv_vendor_info_array[] = { PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF, "Intel(R) X520 82599 Virtual Function"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF, "Intel(R) X540 Virtual Function"), diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 23d8fc1c6cbb..c52d5ad287ba 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -63,7 +63,7 @@ * ( Vendor ID, Device ID, Branding String ) *********************************************************************/ -static pci_vendor_info_t ixl_vendor_info_array[] = +static const pci_vendor_info_t ixl_vendor_info_array[] = { PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710, "Intel(R) Ethernet Controller X710 for 10GbE SFP+"), PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B, "Intel(R) Ethernet Controller XL710 for 40GbE backplane"), diff --git a/sys/dev/mgb/if_mgb.c b/sys/dev/mgb/if_mgb.c index e3806300ed9a..7ac93ec020c4 100644 --- a/sys/dev/mgb/if_mgb.c +++ b/sys/dev/mgb/if_mgb.c @@ -86,7 +86,7 @@ #include "ifdi_if.h" #include "miibus_if.h" -static pci_vendor_info_t mgb_vendor_info_array[] = { +static const pci_vendor_info_t mgb_vendor_info_array[] = { PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7430_DEVICE_ID, "Microchip LAN7430 PCIe Gigabit Ethernet Controller"), PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7431_DEVICE_ID, diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index cd313b5b8084..4f2c8cb7f3cc 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -77,7 +77,7 @@ #define VMXNET3_VMWARE_VENDOR_ID 0x15AD #define VMXNET3_VMWARE_DEVICE_ID 0x07B0 -static pci_vendor_info_t vmxnet3_vendor_info_array[] = +static const pci_vendor_info_t vmxnet3_vendor_info_array[] = { PVID(VMXNET3_VMWARE_VENDOR_ID, VMXNET3_VMWARE_DEVICE_ID, "VMware VMXNET3 Ethernet Adapter"), /* required last entry */