[PATCH] cpus: Drop declaration of cpu_remove()

Greg Kurz posted 1 patch 3 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/160268285707.1107461.15035929822602623985.stgit@bahia.lan
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
include/hw/core/cpu.h |    8 --------
1 file changed, 8 deletions(-)
[PATCH] cpus: Drop declaration of cpu_remove()
Posted by Greg Kurz 3 years, 7 months ago
cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0,
but its prototype wasn't removed. We could possibly keep the shorter
cpu_remove() naming but it seems better to highligth that this blocks
until the CPU thread is joined.

Fixes: dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
Cc: pbonzini@redhat.com
Signed-off-by: Greg Kurz <groug@kaod.org>
---
 include/hw/core/cpu.h |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 4879f2502659..ace443e88297 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -924,14 +924,6 @@ void cpu_exit(CPUState *cpu);
 void cpu_resume(CPUState *cpu);
 
 /**
- * cpu_remove:
- * @cpu: The CPU to remove.
- *
- * Requests the CPU to be removed.
- */
-void cpu_remove(CPUState *cpu);
-
- /**
  * cpu_remove_sync:
  * @cpu: The CPU to remove.
  *



Re: [PATCH] cpus: Drop declaration of cpu_remove()
Posted by Philippe Mathieu-Daudé 3 years, 7 months ago
On 10/14/20 3:40 PM, Greg Kurz wrote:
> cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0,
> but its prototype wasn't removed. We could possibly keep the shorter
> cpu_remove() naming but it seems better to highligth that this blocks
> until the CPU thread is joined.
> 
> Fixes: dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
> Cc: pbonzini@redhat.com
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>   include/hw/core/cpu.h |    8 --------
>   1 file changed, 8 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


Re: [PATCH] cpus: Drop declaration of cpu_remove()
Posted by Laurent Vivier 3 years, 6 months ago
Le 14/10/2020 à 15:40, Greg Kurz a écrit :
> cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0,
> but its prototype wasn't removed. We could possibly keep the shorter
> cpu_remove() naming but it seems better to highligth that this blocks
> until the CPU thread is joined.
> 
> Fixes: dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
> Cc: pbonzini@redhat.com
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  include/hw/core/cpu.h |    8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> index 4879f2502659..ace443e88297 100644
> --- a/include/hw/core/cpu.h
> +++ b/include/hw/core/cpu.h
> @@ -924,14 +924,6 @@ void cpu_exit(CPUState *cpu);
>  void cpu_resume(CPUState *cpu);
>  
>  /**
> - * cpu_remove:
> - * @cpu: The CPU to remove.
> - *
> - * Requests the CPU to be removed.
> - */
> -void cpu_remove(CPUState *cpu);
> -
> - /**
>   * cpu_remove_sync:
>   * @cpu: The CPU to remove.
>   *
> 
> 
> 
Applied to my trivial-patches branch.

Thanks,
Laurent