All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove "#include<linux/virtio.h>"
@ 2021-06-21  8:02 Cai Huoqing
  2021-06-21 20:08   ` kernel test robot
  0 siblings, 1 reply; 4+ messages in thread
From: Cai Huoqing @ 2021-06-21  8:02 UTC (permalink / raw)
  To: kraxel; +Cc: kvm, Cai Huoqing

virtio_config.h already includes virtio.h. so remove it

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/vdpa/virtio_pci/vp_vdpa.c  | 1 -
 drivers/virtio/virtio.c            | 1 -
 drivers/virtio/virtio_input.c      | 1 -
 drivers/virtio/virtio_mmio.c       | 1 -
 drivers/virtio/virtio_pci_common.h | 1 -
 drivers/virtio/virtio_ring.c       | 1 -
 drivers/virtio/virtio_vdpa.c       | 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
index c76ebb531212..8cb6fa86f055 100644
--- a/drivers/vdpa/virtio_pci/vp_vdpa.c
+++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
@@ -12,7 +12,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/vdpa.h>
-#include <linux/virtio.h>
 #include <linux/virtio_config.h>
 #include <linux/virtio_ring.h>
 #include <linux/virtio_pci.h>
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 4b15c00c0a0a..06b6c8c86ae5 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -1,5 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <linux/virtio.h>
 #include <linux/spinlock.h>
 #include <linux/virtio_config.h>
 #include <linux/module.h>
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index ce51ae165943..ab8439a94f73 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <linux/module.h>
-#include <linux/virtio.h>
 #include <linux/virtio_config.h>
 #include <linux/input.h>
 #include <linux/slab.h>
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 56128b9c46eb..5061ff088dd1 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -64,7 +64,6 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <linux/virtio.h>
 #include <linux/virtio_config.h>
 #include <uapi/linux/virtio_mmio.h>
 #include <linux/virtio_ring.h>
diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h
index beec047a8f8d..acae912fdb12 100644
--- a/drivers/virtio/virtio_pci_common.h
+++ b/drivers/virtio/virtio_pci_common.h
@@ -21,7 +21,6 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
-#include <linux/virtio.h>
 #include <linux/virtio_config.h>
 #include <linux/virtio_ring.h>
 #include <linux/virtio_pci.h>
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 88f0b16b11b8..0766bb227211 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -3,7 +3,6 @@
  *
  *  Copyright 2007 Rusty Russell IBM Corporation
  */
-#include <linux/virtio.h>
 #include <linux/virtio_ring.h>
 #include <linux/virtio_config.h>
 #include <linux/device.h>
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index e28acf482e0c..80f75401296e 100644
--- a/drivers/virtio/virtio_vdpa.c
+++ b/drivers/virtio/virtio_vdpa.c
@@ -13,7 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/uuid.h>
-#include <linux/virtio.h>
 #include <linux/vdpa.h>
 #include <linux/virtio_config.h>
 #include <linux/virtio_ring.h>
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove "#include<linux/virtio.h>"
  2021-06-21  8:02 [PATCH] remove "#include<linux/virtio.h>" Cai Huoqing
@ 2021-06-21 20:08   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-21 20:08 UTC (permalink / raw)
  To: Cai Huoqing, kraxel; +Cc: kbuild-all, kvm, Cai Huoqing

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

Hi Cai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cai-Huoqing/remove-include-linux-virtio-h/20210621-160457
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13311e74253fe64329390df80bed3f07314ddd61
config: i386-randconfig-r025-20210621 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b3608bd9d8be6e557c4291deb2f6da3e8e04c01f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cai-Huoqing/remove-include-linux-virtio-h/20210621-160457
        git checkout b3608bd9d8be6e557c4291deb2f6da3e8e04c01f
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x2c): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x38): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x44): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x50): undefined reference to `X86_FEATURE_XMM2'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45682 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove "#include<linux/virtio.h>"
@ 2021-06-21 20:08   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-21 20:08 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]

Hi Cai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cai-Huoqing/remove-include-linux-virtio-h/20210621-160457
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13311e74253fe64329390df80bed3f07314ddd61
config: i386-randconfig-r025-20210621 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b3608bd9d8be6e557c4291deb2f6da3e8e04c01f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cai-Huoqing/remove-include-linux-virtio-h/20210621-160457
        git checkout b3608bd9d8be6e557c4291deb2f6da3e8e04c01f
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x2c): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x38): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x44): undefined reference to `X86_FEATURE_XMM2'
   ld: drivers/virtio/virtio_ring.o:(.altinstructions+0x50): undefined reference to `X86_FEATURE_XMM2'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45682 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove "#include<linux/virtio.h>"
       [not found] <20210621074914.193-1-caihuoqing@baidu.com>
@ 2021-06-21  9:15 ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2021-06-21  9:15 UTC (permalink / raw)
  To: Cai Huoqing, mst; +Cc: virtualization


在 2021/6/21 下午3:49, Cai Huoqing 写道:
> virtio_config.h already includes virtio.h. so remove it
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>


I think we should not depend on such dependency.

Thanks


> ---
>   drivers/vdpa/virtio_pci/vp_vdpa.c  | 1 -
>   drivers/virtio/virtio.c            | 1 -
>   drivers/virtio/virtio_input.c      | 1 -
>   drivers/virtio/virtio_mmio.c       | 1 -
>   drivers/virtio/virtio_pci_common.h | 1 -
>   drivers/virtio/virtio_ring.c       | 1 -
>   drivers/virtio/virtio_vdpa.c       | 1 -
>   7 files changed, 7 deletions(-)
>
> diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
> index c76ebb531212..8cb6fa86f055 100644
> --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
> +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
> @@ -12,7 +12,6 @@
>   #include <linux/module.h>
>   #include <linux/pci.h>
>   #include <linux/vdpa.h>
> -#include <linux/virtio.h>
>   #include <linux/virtio_config.h>
>   #include <linux/virtio_ring.h>
>   #include <linux/virtio_pci.h>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index 4b15c00c0a0a..06b6c8c86ae5 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -1,5 +1,4 @@
>   // SPDX-License-Identifier: GPL-2.0-only
> -#include <linux/virtio.h>
>   #include <linux/spinlock.h>
>   #include <linux/virtio_config.h>
>   #include <linux/module.h>
> diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
> index ce51ae165943..ab8439a94f73 100644
> --- a/drivers/virtio/virtio_input.c
> +++ b/drivers/virtio/virtio_input.c
> @@ -1,6 +1,5 @@
>   // SPDX-License-Identifier: GPL-2.0-only
>   #include <linux/module.h>
> -#include <linux/virtio.h>
>   #include <linux/virtio_config.h>
>   #include <linux/input.h>
>   #include <linux/slab.h>
> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> index 56128b9c46eb..5061ff088dd1 100644
> --- a/drivers/virtio/virtio_mmio.c
> +++ b/drivers/virtio/virtio_mmio.c
> @@ -64,7 +64,6 @@
>   #include <linux/platform_device.h>
>   #include <linux/slab.h>
>   #include <linux/spinlock.h>
> -#include <linux/virtio.h>
>   #include <linux/virtio_config.h>
>   #include <uapi/linux/virtio_mmio.h>
>   #include <linux/virtio_ring.h>
> diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h
> index beec047a8f8d..acae912fdb12 100644
> --- a/drivers/virtio/virtio_pci_common.h
> +++ b/drivers/virtio/virtio_pci_common.h
> @@ -21,7 +21,6 @@
>   #include <linux/pci.h>
>   #include <linux/slab.h>
>   #include <linux/interrupt.h>
> -#include <linux/virtio.h>
>   #include <linux/virtio_config.h>
>   #include <linux/virtio_ring.h>
>   #include <linux/virtio_pci.h>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 88f0b16b11b8..0766bb227211 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -3,7 +3,6 @@
>    *
>    *  Copyright 2007 Rusty Russell IBM Corporation
>    */
> -#include <linux/virtio.h>
>   #include <linux/virtio_ring.h>
>   #include <linux/virtio_config.h>
>   #include <linux/device.h>
> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
> index e28acf482e0c..80f75401296e 100644
> --- a/drivers/virtio/virtio_vdpa.c
> +++ b/drivers/virtio/virtio_vdpa.c
> @@ -13,7 +13,6 @@
>   #include <linux/kernel.h>
>   #include <linux/slab.h>
>   #include <linux/uuid.h>
> -#include <linux/virtio.h>
>   #include <linux/vdpa.h>
>   #include <linux/virtio_config.h>
>   #include <linux/virtio_ring.h>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-21 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  8:02 [PATCH] remove "#include<linux/virtio.h>" Cai Huoqing
2021-06-21 20:08 ` kernel test robot
2021-06-21 20:08   ` kernel test robot
     [not found] <20210621074914.193-1-caihuoqing@baidu.com>
2021-06-21  9:15 ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.