Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlSqg-00036y-0v for qemu-devel@nongnu.org; Thu, 02 Oct 2008 14:24:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlSqe-00034t-LM for qemu-devel@nongnu.org; Thu, 02 Oct 2008 14:24:25 -0400 Received: from [199.232.76.173] (port=38395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlSqe-00034g-Es for qemu-devel@nongnu.org; Thu, 02 Oct 2008 14:24:24 -0400 Received: from savannah.gnu.org ([199.232.41.3]:32915 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlSqd-0008Ks-Pg for qemu-devel@nongnu.org; Thu, 02 Oct 2008 14:24:24 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KlSqc-0005MX-TB for qemu-devel@nongnu.org; Thu, 02 Oct 2008 18:24:23 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KlSqc-0005MH-AU for qemu-devel@nongnu.org; Thu, 02 Oct 2008 18:24:22 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Thu, 02 Oct 2008 18:24:22 +0000 Subject: [Qemu-devel] [5395] Make some tables const Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5395 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5395 Author: blueswir1 Date: 2008-10-02 18:24:21 +0000 (Thu, 02 Oct 2008) Log Message: ----------- Make some tables const Modified Paths: -------------- trunk/hw/e1000.c Modified: trunk/hw/e1000.c =================================================================== --- trunk/hw/e1000.c 2008-10-02 18:07:56 UTC (rev 5394) +++ trunk/hw/e1000.c 2008-10-02 18:24:21 UTC (rev 5395) @@ -131,7 +131,7 @@ }; enum { PHY_R = 1, PHY_W = 2, PHY_RW = PHY_R | PHY_W }; -static char phy_regcap[0x20] = { +static const char phy_regcap[0x20] = { [PHY_STATUS] = PHY_R, [M88E1000_EXT_PHY_SPEC_CTRL] = PHY_RW, [PHY_ID1] = PHY_R, [M88E1000_PHY_SPEC_CTRL] = PHY_RW, [PHY_CTRL] = PHY_RW, [PHY_1000T_CTRL] = PHY_RW, @@ -783,7 +783,7 @@ (8 * (addr & 3))) & 0xffff; } -static int mac_regtosave[] = { +static const int mac_regtosave[] = { CTRL, EECD, EERD, GPRC, GPTC, ICR, ICS, IMC, IMS, LEDCTL, MANC, MDIC, MPC, PBA, RCTL, RDBAH, RDBAL, RDH, RDLEN, RDT, STATUS, SWSM, TCTL, TDBAH, TDBAL, TDH, TDLEN, @@ -791,7 +791,7 @@ }; enum { MAC_NSAVE = sizeof mac_regtosave/sizeof *mac_regtosave }; -static struct { +static const struct { int size; int array0; } mac_regarraystosave[] = { {32, RA}, {128, MTA} }; @@ -887,7 +887,7 @@ return 0; } -static uint16_t e1000_eeprom_template[64] = { +static const uint16_t e1000_eeprom_template[64] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x3000, 0x1000, 0x6403, E1000_DEVID, 0x8086, E1000_DEVID, 0x8086, 0x3040, 0x0008, 0x2000, 0x7e14, 0x0048, 0x1000, 0x00d8, 0x0000, 0x2700, @@ -898,7 +898,7 @@ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, }; -static uint16_t phy_reg_init[] = { +static const uint16_t phy_reg_init[] = { [PHY_CTRL] = 0x1140, [PHY_STATUS] = 0x796d, // link initially up [PHY_ID1] = 0x141, [PHY_ID2] = PHY_ID2_INIT, [PHY_1000T_CTRL] = 0x0e00, [M88E1000_PHY_SPEC_CTRL] = 0x360, @@ -907,7 +907,7 @@ [M88E1000_PHY_SPEC_STATUS] = 0xac00, }; -static uint32_t mac_reg_init[] = { +static const uint32_t mac_reg_init[] = { [PBA] = 0x00100030, [LEDCTL] = 0x602, [CTRL] = E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN0 |