samples: Import OnePlus Changes

Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
Cyber Knight 2021-09-26 02:17:29 +08:00
parent 6869d7554a
commit f1f4eae14d
No known key found for this signature in database
GPG Key ID: 23BD4CCD326E9D64
1 changed files with 2 additions and 2 deletions

View File

@ -414,9 +414,9 @@ mic_virtio_copy(struct mic_info *mic, int fd,
static inline unsigned _vring_size(unsigned int num, unsigned long align)
{
return _ALIGN_UP(((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num)
return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num)
+ align - 1) & ~(align - 1))
+ sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num, 4);
+ sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num;
}
/*