mirror of
https://github.com/apache/nuttx.git
synced 2026-09-08 01:46:35 +00:00
drivers/vhost-rng: fix the vhost-rng compile error
1. Include the <nuttx/spinlock.h> beacause vhost-rng used spinlock 2. Remove the unused ret; Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
parent
01b308a146
commit
2eaf5de3d9
1 changed files with 1 additions and 2 deletions
|
|
@ -89,7 +89,6 @@ static void vhost_rng_work(FAR void *arg)
|
|||
irqstate_t flags;
|
||||
uint16_t idx;
|
||||
uint32_t len;
|
||||
ssize_t ret;
|
||||
|
||||
vq = priv->hdev->vrings_info[0].vq;
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
|
|
@ -105,7 +104,7 @@ static void vhost_rng_work(FAR void *arg)
|
|||
arc4random_buf(buf, len);
|
||||
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
virtqueue_add_consumed_buffer(vq, idx, (uint32_t)ret);
|
||||
virtqueue_add_consumed_buffer(vq, idx, len);
|
||||
virtqueue_kick(vq);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue