From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T24i9-0006l1-3A for qemu-devel@nongnu.org; Thu, 16 Aug 2012 14:22:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T24i7-0005kA-UY for qemu-devel@nongnu.org; Thu, 16 Aug 2012 14:22:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T24i7-0005jV-MC for qemu-devel@nongnu.org; Thu, 16 Aug 2012 14:22:23 -0400 From: Eduardo Habkost Date: Thu, 16 Aug 2012 13:59:00 -0300 Message-Id: <1345136352-10756-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1345136352-10756-1-git-send-email-ehabkost@redhat.com> References: <1345136352-10756-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 01/13] target-i386/cpu.c: coding style fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, gleb@redhat.com, vijaymohan.pandarathil@hp.com, jan.kiszka@siemens.com, mtosatti@redhat.com, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com, pbonzini@redhat.com, akong@redhat.com, lersek@redhat.com, afaerber@suse.de Changes to make checkpatch.pl happy: - Use "sizeof(...)" instead of "sizeof (...)"; - Spaces around ":"; - Use spaces instead of tabs; - Braces on if statements. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b306805..5a20cc6 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1551,7 +1551,7 @@ static int cpudef_setfield(const char *name, const char *str, void *opaque) g_free((void *)def->name); def->name = g_strdup(str); } else if (!strcmp(name, "model_id")) { - strncpy(def->model_id, str, sizeof (def->model_id)); + strncpy(def->model_id, str, sizeof(def->model_id)); } else if (!strcmp(name, "level")) { setscalar(&def->level, str, &err) } else if (!strcmp(name, "vendor")) { @@ -1587,7 +1587,7 @@ static int cpudef_setfield(const char *name, const char *str, void *opaque) */ static int cpudef_register(QemuOpts *opts, void *opaque) { - x86_def_t *def = g_malloc0(sizeof (x86_def_t)); + x86_def_t *def = g_malloc0(sizeof(x86_def_t)); qemu_opt_foreach(opts, cpudef_setfield, def, 1); def->next = x86_defs; @@ -1874,17 +1874,17 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, } break; case 0x8000000A: - if (env->cpuid_ext3_features & CPUID_EXT3_SVM) { - *eax = 0x00000001; /* SVM Revision */ - *ebx = 0x00000010; /* nr of ASIDs */ - *ecx = 0; - *edx = env->cpuid_svm_features; /* optional features */ - } else { - *eax = 0; - *ebx = 0; - *ecx = 0; - *edx = 0; - } + if (env->cpuid_ext3_features & CPUID_EXT3_SVM) { + *eax = 0x00000001; /* SVM Revision */ + *ebx = 0x00000010; /* nr of ASIDs */ + *ecx = 0; + *edx = env->cpuid_svm_features; /* optional features */ + } else { + *eax = 0; + *ebx = 0; + *ecx = 0; + *edx = 0; + } break; case 0xC0000000: *eax = env->cpuid_xlevel2; -- 1.7.11.2