Skip to contentSkip to conversation

net/ifc: fix build with type virtio16

PATCH Applied Xiao Wang 3 participants 3 messages Oct 8, 2018 Network drivers

lore
Share & tools
lore

Xiao Wang

author
#0 lore raw

PATCH 1/1 net/ifc: fix build with type virtio16

The typedef of "__virtio16" is introduced into Linux kernel in v3.19. To prevent build error on old kernel, this patch replaces the "__virtio" usage with "uint16_t".

Fixes d7fe5a2861e7 ("net/ifc: support live migration")
---
 drivers/net/ifc/ifcvf_vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ifc/ifcvf_vdpa.c +1 -1
index 7d3085d8d..9d5594678 100644
@@ -285,7 +285,7 @@ ifcvf_used_ring_log(struct ifcvf_hw *hw, uint32_t queue, uint8_t *log_buf)
 
 	pfn = hw->vring[queue].used / PAGE_SIZE;
 	size = hw->vring[queue].size * sizeof(struct vring_used_elem) +
-			sizeof(__virtio16) * 3;
+			sizeof(uint16_t) * 3;
 
 	for (i = 0; i <= size / PAGE_SIZE; i++)
 		__sync_fetch_and_or_8(&log_buf[(pfn + i) / 8],
Signature · 1 line
2.15.1
#2 lore raw

08/10/2018 14:52, Ferruh Yigit:

Quoted 10 lines · Xiao Wang
Quoted 7 lines

The typedef of "__virtio16" is introduced into Linux kernel in v3.19. To prevent build error on old kernel, this patch replaces the "__virtio" usage with "uint16_t".

Fixes d7fe5a2861e7 ("net/ifc: support live migration")

Applied, thanks