diff mbox series

[kvm-unit-tests,v1,1/2] s390x: make smp_cpu_setup() return 0 on success

Message ID 20211202095843.41162-2-david@redhat.com (mailing list archive)
State New, archived
Headers show
Series s390x: firq: floating interrupt test | expand

Commit Message

David Hildenbrand Dec. 2, 2021, 9:58 a.m. UTC
Properly return "0" on success so callers can check if the setup was
successful.

The return value is yet unused, which is why this wasn't noticed so far.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 lib/s390x/smp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth Dec. 2, 2021, 10:30 a.m. UTC | #1
On 02/12/2021 10.58, David Hildenbrand wrote:
> Properly return "0" on success so callers can check if the setup was
> successful.
> 
> The return value is yet unused, which is why this wasn't noticed so far.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>   lib/s390x/smp.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
> index da6d32f..b753eab 100644
> --- a/lib/s390x/smp.c
> +++ b/lib/s390x/smp.c
> @@ -212,6 +212,7 @@ int smp_cpu_setup(uint16_t addr, struct psw psw)
>   	/* Wait until the cpu has finished setup and started the provided psw */
>   	while (lc->restart_new_psw.addr != psw.addr)
>   		mb();
> +	rc = 0;
>   out:
>   	spin_unlock(&lock);
>   	return rc;
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Claudio Imbrenda Dec. 2, 2021, 10:33 a.m. UTC | #2
On Thu,  2 Dec 2021 10:58:42 +0100
David Hildenbrand <david@redhat.com> wrote:

> Properly return "0" on success so callers can check if the setup was
> successful.
> 
> The return value is yet unused, which is why this wasn't noticed so far.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> ---
>  lib/s390x/smp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
> index da6d32f..b753eab 100644
> --- a/lib/s390x/smp.c
> +++ b/lib/s390x/smp.c
> @@ -212,6 +212,7 @@ int smp_cpu_setup(uint16_t addr, struct psw psw)
>  	/* Wait until the cpu has finished setup and started the provided psw */
>  	while (lc->restart_new_psw.addr != psw.addr)
>  		mb();
> +	rc = 0;
>  out:
>  	spin_unlock(&lock);
>  	return rc;
Janosch Frank Dec. 2, 2021, 11:28 a.m. UTC | #3
On 12/2/21 10:58, David Hildenbrand wrote:
> Properly return "0" on success so callers can check if the setup was
> successful.
> 
> The return value is yet unused, which is why this wasn't noticed so far.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>   lib/s390x/smp.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
> index da6d32f..b753eab 100644
> --- a/lib/s390x/smp.c
> +++ b/lib/s390x/smp.c
> @@ -212,6 +212,7 @@ int smp_cpu_setup(uint16_t addr, struct psw psw)
>   	/* Wait until the cpu has finished setup and started the provided psw */
>   	while (lc->restart_new_psw.addr != psw.addr)
>   		mb();
> +	rc = 0;
>   out:
>   	spin_unlock(&lock);
>   	return rc;
> 

oops

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
diff mbox series

Patch

diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
index da6d32f..b753eab 100644
--- a/lib/s390x/smp.c
+++ b/lib/s390x/smp.c
@@ -212,6 +212,7 @@  int smp_cpu_setup(uint16_t addr, struct psw psw)
 	/* Wait until the cpu has finished setup and started the provided psw */
 	while (lc->restart_new_psw.addr != psw.addr)
 		mb();
+	rc = 0;
 out:
 	spin_unlock(&lock);
 	return rc;