[PATCH v2 6/6] crypto/fsl: add RNG support
Michael Walle
michael at walle.cc
Wed Jun 17 22:55:23 CEST 2020
Am 2020-06-17 22:09, schrieb Horia Geantă:
> On 6/4/2020 6:48 PM, Michael Walle wrote:
>> +static int caam_rng_read(struct udevice *dev, void *data, size_t len)
>> +{
>> + struct caam_rng_platdata *pdata = dev_get_platdata(dev);
>> + u8 *buffer = data;
>> + size_t size;
>> + int ret;
>> +
>> + while (len) {
>> + ret = caam_rng_read_one(pdata);
>> + if (ret)
>> + return ret;
>> +
>> + size = min(len, (size_t)CAAM_RNG_MAX_FIFO_STORE_SIZE);
>> +
>> + memcpy(buffer, pdata->data, len);
> size instead of len.
nice catch.
Thanks for the review!
-michael
More information about the U-Boot
mailing list