From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnWfd-00070V-NH for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:02:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnWfZ-00053U-Pc for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:02:05 -0400 Received: from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]:35809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnWfZ-000533-DG for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:02:01 -0400 Received: by mail-io0-x244.google.com with SMTP id 92so2368989iom.2 for ; Fri, 23 Sep 2016 13:02:01 -0700 (PDT) Sender: Richard Henderson References: <1474659936-978-1-git-send-email-ehabkost@redhat.com> <1474659936-978-2-git-send-email-ehabkost@redhat.com> From: Richard Henderson Message-ID: Date: Fri, 23 Sep 2016 13:01:58 -0700 MIME-Version: 1.0 In-Reply-To: <1474659936-978-2-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7] target-i386: Move feature name arrays inside FeatureWordInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Paolo Bonzini , Igor Mammedov On 09/23/2016 12:45 PM, Eduardo Habkost wrote: > It makes it easier to guarantee the arrays are the right size, > and to find information when looking at the code. > > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 370 +++++++++++++++++++++++++----------------------------- > 1 file changed, 170 insertions(+), 200 deletions(-) Reviewed-by: Richard Henderson > static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { > [FEAT_1_EDX] = { > - .feat_names = feature_name, > + .feat_names = { > + "fpu", "vme", "de", "pse", > + "tsc", "msr", "pae", "mce", > + "cx8", "apic", NULL, "sep", > + "mtrr", "pge", "mca", "cmov", > + "pat", "pse36", "pn" /* Intel psn */, "clflush" /* Intel clfsh */, > + NULL, "ds" /* Intel dts */, "acpi", "mmx", > + "fxsr", "sse", "sse2", "ss", > + "ht" /* Intel htt */, "tm", "ia64", "pbe", > + }, Unrelated, but can we make this feature_word_info structure const? It may require the addition of const to other function parameters, in which case the change should be a separate patch. r~