Skip to content

Commit e36bfc0

Browse files
committed
xen/netback: Pass (void *) to virt_to_page()
virt_to_page() takes a virtual address as argument but the driver passes an unsigned long, which works because the target platform(s) uses polymorphic macros to calculate the page. Since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). Fix this up by an explicit (void *) cast. Cc: Wei Liu <wei.liu@kernel.org> Cc: Paul Durrant <paul@xen.org> Cc: xen-devel@lists.xenproject.org Cc: netdev@vger.kernel.org Acked-by: Wei Liu <wei.liu@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent ee59716 commit e36bfc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/xen-netback/netback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ static void xenvif_fill_frags(struct xenvif_queue *queue, struct sk_buff *skb)
689689
prev_pending_idx = pending_idx;
690690

691691
txp = &queue->pending_tx_info[pending_idx].req;
692-
page = virt_to_page(idx_to_kaddr(queue, pending_idx));
692+
page = virt_to_page((void *)idx_to_kaddr(queue, pending_idx));
693693
__skb_fill_page_desc(skb, i, page, txp->offset, txp->size);
694694
skb->len += txp->size;
695695
skb->data_len += txp->size;

0 commit comments

Comments
 (0)