/* Returns true if and only if cfg->px_buf is big enough to convert num_pixels RGB color values into SPI frames.  */
static bool num_pixels_ok(const struct ws2812_spi_cfg *cfg, size_t num_pixels)
/* Returns true if and only if cfg->px_buf is big enough to convert num_pixels RGB color values into SPI frames.  */
static bool num_pixels_ok(const struct ws2812_spi_cfg *cfg, size_t num_pixels)
{
	size_t nbytes;
	bool overflow;
	overflow = size_mul_overflow(num_pixels, cfg->num_colors * 8, &nbytes);
	return !overflow && (nbytes <= cfg->px_buf_size);
}