function not just parses features but also converts CPU model
name to CPU type, rename it to reflect what it actualy does.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
include/qom/cpu.h | 4 ++--
qom/cpu.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 392ae75..a718daf 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -643,7 +643,7 @@ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model);
CPUState *cpu_create(const char *typename);
/**
- * cpu_parse_features:
+ * cpu_parse_cpu_model:
* @typename: The CPU base type or CPU type.
* @cpu_model: The model string including optional parameters.
*
@@ -652,7 +652,7 @@ CPUState *cpu_create(const char *typename);
* Returns: type of CPU to create or prints error and terminates process
* if an error occurred.
*/
-const char *cpu_parse_features(const char *typename, const char *cpu_model);
+const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model);
/**
* cpu_generic_init:
diff --git a/qom/cpu.c b/qom/cpu.c
index 307d638..199ad57 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -66,7 +66,7 @@ CPUState *cpu_create(const char *typename)
return cpu;
}
-const char *cpu_parse_features(const char *typename, const char *cpu_model)
+const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model)
{
ObjectClass *oc;
CPUClass *cc;
@@ -99,7 +99,7 @@ CPUState *cpu_generic_init(const char *typename, const char *cpu_model)
/* TODO: all callers of cpu_generic_init() need to be converted to
* call cpu_parse_features() only once, before calling cpu_generic_init().
*/
- const char *cpu_type = cpu_parse_features(typename, cpu_model);
+ const char *cpu_type = cpu_parse_cpu_model(typename, cpu_model);
assert(cpu_type);
return cpu_create(cpu_type);
--
2.7.4
Hi Igor,
On 09/04/2017 11:00 AM, Igor Mammedov wrote:
> function not just parses features but also converts CPU model
> name to CPU type, rename it to reflect what it actualy does.
Why not squash this with your 1st patch "split cpu_generic_init()"?
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/qom/cpu.h | 4 ++--
> qom/cpu.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> index 392ae75..a718daf 100644
> --- a/include/qom/cpu.h
> +++ b/include/qom/cpu.h
> @@ -643,7 +643,7 @@ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model);
> CPUState *cpu_create(const char *typename);
>
> /**
> - * cpu_parse_features:
> + * cpu_parse_cpu_model:
> * @typename: The CPU base type or CPU type.
> * @cpu_model: The model string including optional parameters.
> *
> @@ -652,7 +652,7 @@ CPUState *cpu_create(const char *typename);
> * Returns: type of CPU to create or prints error and terminates process
> * if an error occurred.
> */
> -const char *cpu_parse_features(const char *typename, const char *cpu_model);
> +const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model);
>
> /**
> * cpu_generic_init:
> diff --git a/qom/cpu.c b/qom/cpu.c
> index 307d638..199ad57 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -66,7 +66,7 @@ CPUState *cpu_create(const char *typename)
> return cpu;
> }
>
> -const char *cpu_parse_features(const char *typename, const char *cpu_model)
> +const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model)
> {
> ObjectClass *oc;
> CPUClass *cc;
> @@ -99,7 +99,7 @@ CPUState *cpu_generic_init(const char *typename, const char *cpu_model)
> /* TODO: all callers of cpu_generic_init() need to be converted to
> * call cpu_parse_features() only once, before calling cpu_generic_init().
> */
> - const char *cpu_type = cpu_parse_features(typename, cpu_model);
> + const char *cpu_type = cpu_parse_cpu_model(typename, cpu_model);
>
> assert(cpu_type);
> return cpu_create(cpu_type);
>
On Mon, 4 Sep 2017 12:03:09 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Hi Igor,
>
> On 09/04/2017 11:00 AM, Igor Mammedov wrote:
> > function not just parses features but also converts CPU model
> > name to CPU type, rename it to reflect what it actualy does.
>
> Why not squash this with your 1st patch "split cpu_generic_init()"?
there I went with current/exiting way to call that part of code,
and here I'm renaming it to show what it does exactly.
But I don't have any preference here, so I can squash this patch
into 1/6 on respin, if you prefer.
>
> >
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > include/qom/cpu.h | 4 ++--
> > qom/cpu.c | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> > index 392ae75..a718daf 100644
> > --- a/include/qom/cpu.h
> > +++ b/include/qom/cpu.h
> > @@ -643,7 +643,7 @@ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model);
> > CPUState *cpu_create(const char *typename);
> >
> > /**
> > - * cpu_parse_features:
> > + * cpu_parse_cpu_model:
> > * @typename: The CPU base type or CPU type.
> > * @cpu_model: The model string including optional parameters.
> > *
> > @@ -652,7 +652,7 @@ CPUState *cpu_create(const char *typename);
> > * Returns: type of CPU to create or prints error and terminates process
> > * if an error occurred.
> > */
> > -const char *cpu_parse_features(const char *typename, const char *cpu_model);
> > +const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model);
> >
> > /**
> > * cpu_generic_init:
> > diff --git a/qom/cpu.c b/qom/cpu.c
> > index 307d638..199ad57 100644
> > --- a/qom/cpu.c
> > +++ b/qom/cpu.c
> > @@ -66,7 +66,7 @@ CPUState *cpu_create(const char *typename)
> > return cpu;
> > }
> >
> > -const char *cpu_parse_features(const char *typename, const char *cpu_model)
> > +const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model)
> > {
> > ObjectClass *oc;
> > CPUClass *cc;
> > @@ -99,7 +99,7 @@ CPUState *cpu_generic_init(const char *typename, const char *cpu_model)
> > /* TODO: all callers of cpu_generic_init() need to be converted to
> > * call cpu_parse_features() only once, before calling cpu_generic_init().
> > */
> > - const char *cpu_type = cpu_parse_features(typename, cpu_model);
> > + const char *cpu_type = cpu_parse_cpu_model(typename, cpu_model);
> >
> > assert(cpu_type);
> > return cpu_create(cpu_type);
> >
On 04.09.2017 21:06, Igor Mammedov wrote: > On Mon, 4 Sep 2017 12:03:09 -0300 > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > >> Hi Igor, >> >> On 09/04/2017 11:00 AM, Igor Mammedov wrote: >>> function not just parses features but also converts CPU model >>> name to CPU type, rename it to reflect what it actualy does. >> >> Why not squash this with your 1st patch "split cpu_generic_init()"? > there I went with current/exiting way to call that part of code, > and here I'm renaming it to show what it does exactly. > > But I don't have any preference here, so I can squash this patch > into 1/6 on respin, if you prefer. +1 for squashing Thomas
On Tue, 5 Sep 2017 07:38:13 +0200 Thomas Huth <thuth@redhat.com> wrote: > On 04.09.2017 21:06, Igor Mammedov wrote: > > On Mon, 4 Sep 2017 12:03:09 -0300 > > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > > >> Hi Igor, > >> > >> On 09/04/2017 11:00 AM, Igor Mammedov wrote: > >>> function not just parses features but also converts CPU model > >>> name to CPU type, rename it to reflect what it actualy does. > >> > >> Why not squash this with your 1st patch "split cpu_generic_init()"? > > there I went with current/exiting way to call that part of code, > > and here I'm renaming it to show what it does exactly. > > > > But I don't have any preference here, so I can squash this patch > > into 1/6 on respin, if you prefer. > > +1 for squashing ok, will do on respin > > Thomas > >
© 2016 - 2025 Red Hat, Inc.