[RFC PATCH 2/3] powerpc/pseries: Define & use a type for the plpar_hcall() retvals

David Laight David.Laight at ACULAB.COM
Thu Oct 20 01:38:25 AEDT 2016


From: Balbir Singh
> Sent: 19 October 2016 15:00
...
> Here is an example
> 
> -	*slot = retbuf[0];
> +	*slot = retvals.v[0];
> 
> Could we hide retvals.v[0] under a macro like
> 
> *slot = hcalls_ret_val(retvals, 0);

Ugg..

> Since we could end up with similar issues if
> someone dereferenced retvals.v[4]

The compiler will detect that these days.

	David



More information about the Linuxppc-dev mailing list