diff mbox series

[kvm-unit-tests,2/9] s390x: topology: Use parameter in stsi_get_sysib

Message ID 20231011085635.1996346-3-nsg@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: topology: Fixes and extension | expand

Commit Message

Nina Schoetterl-Glausch Oct. 11, 2023, 8:56 a.m. UTC
Instead of accessing global pagebuf.

Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
---
 s390x/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Janosch Frank Oct. 11, 2023, 11:05 a.m. UTC | #1
On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
> Instead of accessing global pagebuf.

The fact that you mentioned global pagebuf made me look for a exported 
pagebuf variable in the lib.

Maybe this might be better:

s390x: topology: replace static address with function parameter in 
stsi_get_sysib

If we're given a parameter we should actually use it and not use 
hardcoded values. Let's replace the static pagebuf variable with the 
info function parameter.


Otherwise:
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> ---
>   s390x/topology.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/s390x/topology.c b/s390x/topology.c
> index 53838ed1..e1bb6014 100644
> --- a/s390x/topology.c
> +++ b/s390x/topology.c
> @@ -322,7 +322,7 @@ static int stsi_get_sysib(struct sysinfo_15_1_x *info, int sel2)
>   
>   	report_prefix_pushf("SYSIB");
>   
> -	ret = stsi(pagebuf, 15, 1, sel2);
> +	ret = stsi(info, 15, 1, sel2);
>   
>   	if (max_nested_lvl >= sel2) {
>   		report(!ret, "Valid instruction");
Nico Boehr Oct. 12, 2023, 2:44 p.m. UTC | #2
Quoting Nina Schoetterl-Glausch (2023-10-11 10:56:25)
> Instead of accessing global pagebuf.
> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>

Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
diff mbox series

Patch

diff --git a/s390x/topology.c b/s390x/topology.c
index 53838ed1..e1bb6014 100644
--- a/s390x/topology.c
+++ b/s390x/topology.c
@@ -322,7 +322,7 @@  static int stsi_get_sysib(struct sysinfo_15_1_x *info, int sel2)
 
 	report_prefix_pushf("SYSIB");
 
-	ret = stsi(pagebuf, 15, 1, sel2);
+	ret = stsi(info, 15, 1, sel2);
 
 	if (max_nested_lvl >= sel2) {
 		report(!ret, "Valid instruction");