You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/include/hw/sd
Philippe Mathieu-Daudé b82e7a2a1d hw/sd/sdbus: Provide buffer size to sdbus_do_command()
We provide to sdbus_do_command() a pointer to a buffer to be
filled with a varying number of bytes. By not providing the
buffer size, the callee can not check the buffer is big enough.
Pass the buffer size as argument to follow good practices.

sdbus_do_command() doesn't return any error, only the size filled
in the buffer. Convert the returned type to unsigned and remove
the few unreachable lines in callers.

This allow to check for possible overflow in sd_do_command().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250804133406.17456-4-philmd@linaro.org>
6 days ago
..
allwinner-sdhost.h hw: sd: allwinner-sdhost: Add sun50i-a64 SoC support 2 years ago
aspeed_sdhci.h hw/sd/aspeed_sdhci: Add AST2700 Support 8 months ago
bcm2835_sdhost.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 5 years ago
cadence_sdhci.h hw/sd: Add Cadence SDHCI emulation 5 years ago
npcm7xx_sdhci.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 3 years ago
sd.h hw/sd/sdbus: Provide buffer size to sdbus_do_command() 6 days ago
sdhci.h hw/sd/sdhci: Remove need for SDHCI_VENDOR_IMX definition 5 months ago