[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 01/13] target-i386/cpu.c: coding style fixes
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 01/13] target-i386/cpu.c: coding style fixes |
Date: |
Thu, 16 Aug 2012 13:59:00 -0300 |
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 <address@hidden>
---
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
- [Qemu-devel] [RFC 00/13] CPU init cleanup + CPU model classes (v2), Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 08/13] cpu_x86_register: always initialize 'name' and 'features', Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 02/13] x86_cpudef_setup: coding style change, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 04/13] move CPU x86 object creation to cpu.c, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 13/13] HACK to initialize types later, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 11/13] check for NULL cpu_model outside cpu_x86_find_by_name, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 07/13] cpu_x86_create: move error handling to end of function, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 03/13] i386: x86_def_t: rename 'flags' field, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 01/13] target-i386/cpu.c: coding style fixes,
Eduardo Habkost <=
- [Qemu-devel] [RFC 05/13] rename x86_def_t to X86CPUDefinition, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 09/13] kill cpu_x86_register(), Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 06/13] move X86CPUDefinition to cpu-qom.h, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 10/13] cpu_x86_create: reorder parsing of CPU model string and creation of CPU object, Eduardo Habkost, 2012/08/16
- [Qemu-devel] [RFC 12/13] register a class for each CPU model (v2), Eduardo Habkost, 2012/08/16