On 26 June 2018 at 19:20, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > On 06/26/2018 03:03 PM, Peter Maydell wrote: >> We don't actually implement SD command CRC checking, because >> for almost all of our SD controllers the CRC generation is >> done in hardware, and so modelling CRC generation and checking >> would be a bit pointless. (The exception is that milkymist-memcard >> makes the guest software compute the CRC.) >> >> As a result almost all of our SD controller models don't bother >> to set the SDRequest crc field, and the SD card model doesn't >> check it. So the tracing of it in sdbus_do_command() provokes >> Coverity warnings about use of uninitialized data. >> >> Drop the CRC field from the trace; we can always add it back >> if and when we do anything useful with the CRC. >> >> Fixes Coverity issues 1386072, 1386074, 1386076, 1390571. >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> >> --- >> We might also want to try to improve our CRC handling >> (eg so that the controller can say "I have not set the CRC, >> don't bother checking it" or "I have set the CRC, do check >> it because it's come from the guest software"), but let's >> put in the simple tweak to make Coverity happy for the moment. > > Thanks for this simple patch... So simple I couldn't even think of it... > > Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Thanks; applied to target-arm.next. -- PMM