[PATCH master 1/2] virtio: pci: fix 64-bit incompatibility

Sascha Hauer sha at pengutronix.de
Tue Apr 13 08:19:27 BST 2021


On Sat, Apr 10, 2021 at 12:49:10PM +0200, Ahmad Fatoum wrote:
> device_len is size_t, but written by pci_read_config_dword as a u32.
> Change the type to fix this.
> 
> Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
> ---
>  drivers/virtio/virtio_pci_common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h
> index 32f0f451ab49..8f97d1218838 100644
> --- a/drivers/virtio/virtio_pci_common.h
> +++ b/drivers/virtio/virtio_pci_common.h
> @@ -47,7 +47,7 @@ struct virtio_pci_device {
>  	void __iomem *notify_base;
>  
>  	/* So we can sanity-check accesses. */
> -	size_t device_len;
> +	u32 device_len;
>  
>  	/* Multiply queue_notify_off by this value. (non-legacy mode). */
>  	u32 notify_offset_multiplier;
> -- 
> 2.30.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list