Re: [PATCH] hw/scsi/megasas: Simplify using the ldst API

2021-12-18 Thread Philippe Mathieu-Daudé
On 12/18/21 01:36, Richard Henderson wrote: > On 12/17/21 3:15 PM, Philippe Mathieu-Daudé wrote: >> -    cdb[3] = (len >> 8) & 0xff; >> -    cdb[4] = (len & 0xff); >> +    stw_be_p(&cdb[2], len); > > Wrong offset.  Otherwise, >_< > Reviewed-by: Richard Henderson Thank you.

Re: [PATCH] hw/scsi/megasas: Simplify using the ldst API

2021-12-17 Thread Richard Henderson
On 12/17/21 3:15 PM, Philippe Mathieu-Daudé wrote: -cdb[3] = (len >> 8) & 0xff; -cdb[4] = (len & 0xff); +stw_be_p(&cdb[2], len); Wrong offset. Otherwise, Reviewed-by: Richard Henderson r~

[PATCH] hw/scsi/megasas: Simplify using the ldst API

2021-12-17 Thread Philippe Mathieu-Daudé
This code is easier to review using the load/store API. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/megasas.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 619b66ef0f3..066f30e3f22 100644 --- a/hw/scsi/meg