On Tue, Jan 19, 2016 at 03:38:09PM +1100, Alexey Kardashevskiy wrote: > On 01/19/2016 03:30 PM, David Gibson wrote: > >rtas_st_buffer() appears in spapr.h as though it were a widely used helper, > >but in fact it is only used for saving data in a format used by > >rtas_ibm_get_system_parameter(). This changes it to a local helper more > >specifically for that function. > > > >While we're there fix a couple of small defects in > >rtas_ibm_get_system_parameter: > > - For the string value SPLPAR_CHARACTERISTICS, it wasn't including the > > terminating \0 in the length which it should according to LoPAPR > > 7.3.16.1 > > - It now checks that the supplied buffer has at least enough space for > > the length of the returned data, and returns an error if it does not. > > > >Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> > >--- > > hw/ppc/spapr_rtas.c | 22 ++++++++++++++++++---- > > include/hw/ppc/spapr.h | 28 +++++++++------------------- > > 2 files changed, 27 insertions(+), 23 deletions(-) > > > >diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c > >index 34b12a3..32cdd66 100644 > >--- a/hw/ppc/spapr_rtas.c > >+++ b/hw/ppc/spapr_rtas.c > >@@ -228,6 +228,20 @@ static void rtas_stop_self(PowerPCCPU *cpu, > >sPAPRMachineState *spapr, > > env->msr = 0; > > } > > > >+ > > > Nit: unneeded empty line. Besides that,
Ah, yes, fixed. > Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> Thanks, I've merged this series into ppc-for-2.6. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature