Patchwork [qom-next,v2,1/5] target-arm/cpu.c: delete un-needed instance/class sizes

login
register
mail settings
Submitter Peter Crosthwaite
Date July 11, 2013, 1:45 a.m.
Message ID <4dacd064382f8e7792bec6547a08492225d85407.1373440128.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/258278/
State New
Headers show

Comments

Peter Crosthwaite - July 11, 2013, 1:45 a.m.
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

QOM automatically inherits class and instance size from the parent
class. No need to redefine as the same value as the parent.

CC: qemu-trivial@nongnu.org

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 target-arm/cpu.c | 2 --
 1 file changed, 2 deletions(-)
Andreas Färber - July 11, 2013, 8:07 a.m.
Am 11.07.2013 03:45, schrieb peter.crosthwaite@xilinx.com:
> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> 
> QOM automatically inherits class and instance size from the parent
> class. No need to redefine as the same value as the parent.

Quoting my original comment:
"It would be fair to mention since which commit because that was
originally not the case."

http://git.qemu.org/?p=qemu.git;a=commit;h=aca59af612840772f18598363b65a25bf02bb569

E.g., "By now, QOM automatically..." or "Since commit ..."

> 
> CC: qemu-trivial@nongnu.org

We have an active ARM maintainer, so no reason to involve qemu-trivial
here by our definition. Possibly that would've required Cc: anyway? Not
actually CC'ed.

> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Still:

Reviewed-by: Andreas Färber <afaerber@suse.de>

PMM, do you want to pick this one up for target-arm.next? The rest
depends on central infrastructure under discussion. Suggest renaming to
"target-arm: Delete un-needed instance/class sizes for ARMCPU
subclasses" for simplicity and so that it aligns nicely with others.

Regards,
Andreas

> ---
> 
>  target-arm/cpu.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 1bc227e..ed53df8 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -823,9 +823,7 @@ static void cpu_register(const ARMCPUInfo *info)
>  {
>      TypeInfo type_info = {
>          .parent = TYPE_ARM_CPU,
> -        .instance_size = sizeof(ARMCPU),
>          .instance_init = info->initfn,
> -        .class_size = sizeof(ARMCPUClass),
>          .class_init = info->class_init,
>      };
>
Peter Maydell - July 11, 2013, 8:18 a.m.
On 11 July 2013 09:07, Andreas Färber <afaerber@suse.de> wrote:
> PMM, do you want to pick this one up for target-arm.next? The rest
> depends on central infrastructure under discussion. Suggest renaming to
> "target-arm: Delete un-needed instance/class sizes for ARMCPU
> subclasses" for simplicity and so that it aligns nicely with others.

I really prefer not to pick up single patches from a series,
it is awkward. A patch series should be a coherent set which
is picked up by whichever subtree it is overall most fitted to.
(Similarly, cc'ing qemu-trivial on one or two patches out of a
set doesn't make much sense.)

thanks
-- PMM

Patch

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 1bc227e..ed53df8 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -823,9 +823,7 @@  static void cpu_register(const ARMCPUInfo *info)
 {
     TypeInfo type_info = {
         .parent = TYPE_ARM_CPU,
-        .instance_size = sizeof(ARMCPU),
         .instance_init = info->initfn,
-        .class_size = sizeof(ARMCPUClass),
         .class_init = info->class_init,
     };