diff mbox

[qom-cpu,v4,09/18] cpu: Turn cpu_get_memory_mapping() into a CPUState hook

Message ID 51B74A4E.2070106@suse.de
State New
Headers show

Commit Message

Andreas Färber June 11, 2013, 4:03 p.m. UTC
Am 11.06.2013 16:56, schrieb Luiz Capitulino:
> On Sun,  9 Jun 2013 18:10:38 +0200
> Andreas Färber <afaerber@suse.de> wrote:
> 
>> Change error reporting from return value to Error argument.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  include/qom/cpu.h                 | 14 ++++++++++++++
>>  include/sysemu/memory_mapping.h   |  2 --
>>  memory_mapping-stub.c             |  6 ------
>>  memory_mapping.c                  |  7 ++++---
>>  qom/cpu.c                         | 16 ++++++++++++++++
>>  target-i386/arch_memory_mapping.c | 12 +++++++-----
>>  target-i386/cpu-qom.h             |  3 +++
>>  target-i386/cpu.c                 |  1 +
>>  8 files changed, 45 insertions(+), 16 deletions(-)
>>
>> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
>> index 1f70240..254be2e 100644
>> --- a/include/qom/cpu.h
>> +++ b/include/qom/cpu.h
[...]
>> @@ -148,6 +152,16 @@ struct CPUState {
>>  bool cpu_paging_enabled(const CPUState *cpu);
>>  
>>  /**
>> + * @cpu: The CPU whose memory mappings are to be obtained.
>> + * @list: Where to write the memory mappings to.
>> + * @errp: Pointer for reporting an #Error.
>> + *
>> + * Returns: 0 if successful.
>> + */
> 
> It turns void now, but you can add:
> 
> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
> 
> When you respin.

Thanks, fixing up as follows:


Andreas
diff mbox

Patch

diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 254be2e..a5bb515 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -152,11 +152,10 @@  struct CPUState {
 bool cpu_paging_enabled(const CPUState *cpu);

 /**
+ * cpu_get_memory_mapping:
  * @cpu: The CPU whose memory mappings are to be obtained.
  * @list: Where to write the memory mappings to.
  * @errp: Pointer for reporting an #Error.
- *
- * Returns: 0 if successful.
  */
 void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
                             Error **errp);