[PATCH] virtio_pci: drop kernel.h

Michael S. Tsirkin posted 1 patch 1 week, 6 days ago
There is a newer version of this series
include/uapi/linux/virtio_pci.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] virtio_pci: drop kernel.h
Posted by Michael S. Tsirkin 1 week, 6 days ago
UAPI headers really have no business pulling in kernel.h
Drop it - it does not seem to be needed, either.

Fixes: 7c1ae151e812 ("virtio_pci: Introduce device parts access commands")
Cc: "Yishai Hadas" <yishaih@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/uapi/linux/virtio_pci.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index c691ac210ce2..d1b31efc4d7d 100644
--- a/include/uapi/linux/virtio_pci.h
+++ b/include/uapi/linux/virtio_pci.h
@@ -40,7 +40,6 @@
 #define _LINUX_VIRTIO_PCI_H
 
 #include <linux/types.h>
-#include <linux/kernel.h>
 
 #ifndef VIRTIO_PCI_NO_LEGACY
 
-- 
MST
Re: [PATCH] virtio_pci: drop kernel.h
Posted by Michael S. Tsirkin 1 week, 5 days ago
On Tue, Nov 18, 2025 at 06:08:37PM -0500, Michael S. Tsirkin wrote:
> UAPI headers really have no business pulling in kernel.h
> Drop it - it does not seem to be needed, either.
> 
> Fixes: 7c1ae151e812 ("virtio_pci: Introduce device parts access commands")
> Cc: "Yishai Hadas" <yishaih@nvidia.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Oops. Double checked and it's no good - I just had virtio disabled in
the config by mistake. Pls ignore.

> ---
>  include/uapi/linux/virtio_pci.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
> index c691ac210ce2..d1b31efc4d7d 100644
> --- a/include/uapi/linux/virtio_pci.h
> +++ b/include/uapi/linux/virtio_pci.h
> @@ -40,7 +40,6 @@
>  #define _LINUX_VIRTIO_PCI_H
>  
>  #include <linux/types.h>
> -#include <linux/kernel.h>
>  
>  #ifndef VIRTIO_PCI_NO_LEGACY
>  
> -- 
> MST
Re: [PATCH] virtio_pci: drop kernel.h
Posted by Jason Wang 1 week, 5 days ago
On Wed, Nov 19, 2025 at 7:08 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> UAPI headers really have no business pulling in kernel.h
> Drop it - it does not seem to be needed, either.
>
> Fixes: 7c1ae151e812 ("virtio_pci: Introduce device parts access commands")
> Cc: "Yishai Hadas" <yishaih@nvidia.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/uapi/linux/virtio_pci.h | 1 -
>  1 file changed, 1 deletion(-)
>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks