netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kbuild-all@01.org, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org, kwankhede@nvidia.com,
	alex.williamson@redhat.com, mst@redhat.com, tiwei.bie@intel.com,
	sebott@linux.ibm.com, airlied@linux.ie,
	Jason Wang <jasowang@redhat.com>,
	heiko.carstens@de.ibm.com,
	virtualization@lists.linux-foundation.org,
	rob.miller@broadcom.com, lulu@redhat.com, eperezma@redhat.com,
	pasic@linux.ibm.com, borntraeger@de.ibm.com,
	haotian.wang@sifive.com, zhi.a.wang@intel.com,
	farman@linux.ibm.com, idos@mellanox.com, gor@linux.ibm.com,
	cunming.liang@intel.com, rodrigo.vivi@intel.com,
	xiao.w.wang@intel.com, freude@linux.ibm.com, parav@mellanox.com,
	zhihong.wang@intel.com, akrowiak@linux.ibm.com,
	netdev@vger.kernel.org, cohuck@redhat.com, oberpar@linux.ibm.com,
	maxime.coquelin@redhat.com, lingshan.zhu@intel.com
Subject: Re: [PATCH 2/6] mdev: introduce device specific ops
Date: Mon, 23 Sep 2019 23:20:12 +0800	[thread overview]
Message-ID: <201909232342.R079Gsby%lkp@intel.com> (raw)
In-Reply-To: <20190923130331.29324-3-jasowang@redhat.com>

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

Hi Jason,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190920]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Jason-Wang/mdev-based-hardware-virtio-offloading-support/20190923-210738
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

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

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/vfio_mdev.h:10:0,
                    from <command-line>:0:
>> include/linux/mdev.h:25:34: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    int mdev_set_iommu_device(struct device *dev, struct device *iommu_device);
                                     ^~~~~~
>> include/linux/mdev.h:62:27: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration
     int     (*create)(struct kobject *kobj, struct mdev_device *mdev);
                              ^~~~~~~
>> include/linux/mdev.h:69:19: error: field 'attr' has incomplete type
     struct attribute attr;
                      ^~~~
   include/linux/mdev.h:70:25: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration
     ssize_t (*show)(struct kobject *kobj, struct device *dev, char *buf);
                            ^~~~~~~
   include/linux/mdev.h:71:26: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration
     ssize_t (*store)(struct kobject *kobj, struct device *dev,
                             ^~~~~~~
>> include/linux/mdev.h:98:23: error: field 'driver' has incomplete type
     struct device_driver driver;
                          ^~~~~~
>> include/linux/mdev.h:106:7: error: unknown type name 'guid_t'
    const guid_t *mdev_uuid(struct mdev_device *mdev);
          ^~~~~~
   In file included from <command-line>:0:0:
>> include/linux/vfio_mdev.h:50:47: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration
     int (*mmap)(struct mdev_device *mdev, struct vm_area_struct *vma);
                                                  ^~~~~~~~~~~~~~

vim +/attr +69 include/linux/mdev.h

7b96953bc640b6 Kirti Wankhede  2016-11-17   14  
8ac13175cbe985 Lu Baolu        2019-04-12   15  /*
8ac13175cbe985 Lu Baolu        2019-04-12   16   * Called by the parent device driver to set the device which represents
8ac13175cbe985 Lu Baolu        2019-04-12   17   * this mdev in iommu protection scope. By default, the iommu device is
8ac13175cbe985 Lu Baolu        2019-04-12   18   * NULL, that indicates using vendor defined isolation.
8ac13175cbe985 Lu Baolu        2019-04-12   19   *
8ac13175cbe985 Lu Baolu        2019-04-12   20   * @dev: the mediated device that iommu will isolate.
8ac13175cbe985 Lu Baolu        2019-04-12   21   * @iommu_device: a pci device which represents the iommu for @dev.
8ac13175cbe985 Lu Baolu        2019-04-12   22   *
8ac13175cbe985 Lu Baolu        2019-04-12   23   * Return 0 for success, otherwise negative error value.
8ac13175cbe985 Lu Baolu        2019-04-12   24   */
8ac13175cbe985 Lu Baolu        2019-04-12  @25  int mdev_set_iommu_device(struct device *dev, struct device *iommu_device);
8ac13175cbe985 Lu Baolu        2019-04-12   26  
8ac13175cbe985 Lu Baolu        2019-04-12   27  struct device *mdev_get_iommu_device(struct device *dev);
8ac13175cbe985 Lu Baolu        2019-04-12   28  
7b96953bc640b6 Kirti Wankhede  2016-11-17   29  /**
42930553a7c11f Alex Williamson 2016-12-30   30   * struct mdev_parent_ops - Structure to be registered for each parent device to
7b96953bc640b6 Kirti Wankhede  2016-11-17   31   * register the device to mdev module.
7b96953bc640b6 Kirti Wankhede  2016-11-17   32   *
7b96953bc640b6 Kirti Wankhede  2016-11-17   33   * @owner:		The module owner.
7b96953bc640b6 Kirti Wankhede  2016-11-17   34   * @dev_attr_groups:	Attributes of the parent device.
7b96953bc640b6 Kirti Wankhede  2016-11-17   35   * @mdev_attr_groups:	Attributes of the mediated device.
7b96953bc640b6 Kirti Wankhede  2016-11-17   36   * @supported_type_groups: Attributes to define supported types. It is mandatory
7b96953bc640b6 Kirti Wankhede  2016-11-17   37   *			to provide supported types.
7b96953bc640b6 Kirti Wankhede  2016-11-17   38   * @create:		Called to allocate basic resources in parent device's
7b96953bc640b6 Kirti Wankhede  2016-11-17   39   *			driver for a particular mediated device. It is
7b96953bc640b6 Kirti Wankhede  2016-11-17   40   *			mandatory to provide create ops.
7b96953bc640b6 Kirti Wankhede  2016-11-17   41   *			@kobj: kobject of type for which 'create' is called.
7b96953bc640b6 Kirti Wankhede  2016-11-17   42   *			@mdev: mdev_device structure on of mediated device
7b96953bc640b6 Kirti Wankhede  2016-11-17   43   *			      that is being created
7b96953bc640b6 Kirti Wankhede  2016-11-17   44   *			Returns integer: success (0) or error (< 0)
7b96953bc640b6 Kirti Wankhede  2016-11-17   45   * @remove:		Called to free resources in parent device's driver for a
7b96953bc640b6 Kirti Wankhede  2016-11-17   46   *			a mediated device. It is mandatory to provide 'remove'
7b96953bc640b6 Kirti Wankhede  2016-11-17   47   *			ops.
7b96953bc640b6 Kirti Wankhede  2016-11-17   48   *			@mdev: mdev_device device structure which is being
7b96953bc640b6 Kirti Wankhede  2016-11-17   49   *			       destroyed
7b96953bc640b6 Kirti Wankhede  2016-11-17   50   *			Returns integer: success (0) or error (< 0)
0baad8a6f6fefa Jason Wang      2019-09-23   51   * @device_ops:         Device specific emulation callback.
0baad8a6f6fefa Jason Wang      2019-09-23   52   *
7b96953bc640b6 Kirti Wankhede  2016-11-17   53   * Parent device that support mediated device should be registered with mdev
42930553a7c11f Alex Williamson 2016-12-30   54   * module with mdev_parent_ops structure.
7b96953bc640b6 Kirti Wankhede  2016-11-17   55   **/
42930553a7c11f Alex Williamson 2016-12-30   56  struct mdev_parent_ops {
7b96953bc640b6 Kirti Wankhede  2016-11-17   57  	struct module   *owner;
7b96953bc640b6 Kirti Wankhede  2016-11-17   58  	const struct attribute_group **dev_attr_groups;
7b96953bc640b6 Kirti Wankhede  2016-11-17   59  	const struct attribute_group **mdev_attr_groups;
7b96953bc640b6 Kirti Wankhede  2016-11-17   60  	struct attribute_group **supported_type_groups;
7b96953bc640b6 Kirti Wankhede  2016-11-17   61  
7b96953bc640b6 Kirti Wankhede  2016-11-17  @62  	int     (*create)(struct kobject *kobj, struct mdev_device *mdev);
7b96953bc640b6 Kirti Wankhede  2016-11-17   63  	int     (*remove)(struct mdev_device *mdev);
0baad8a6f6fefa Jason Wang      2019-09-23   64  	const void *device_ops;
7b96953bc640b6 Kirti Wankhede  2016-11-17   65  };
7b96953bc640b6 Kirti Wankhede  2016-11-17   66  
7b96953bc640b6 Kirti Wankhede  2016-11-17   67  /* interface for exporting mdev supported type attributes */
7b96953bc640b6 Kirti Wankhede  2016-11-17   68  struct mdev_type_attribute {
7b96953bc640b6 Kirti Wankhede  2016-11-17  @69  	struct attribute attr;
7b96953bc640b6 Kirti Wankhede  2016-11-17  @70  	ssize_t (*show)(struct kobject *kobj, struct device *dev, char *buf);
7b96953bc640b6 Kirti Wankhede  2016-11-17   71  	ssize_t (*store)(struct kobject *kobj, struct device *dev,
7b96953bc640b6 Kirti Wankhede  2016-11-17   72  			 const char *buf, size_t count);
7b96953bc640b6 Kirti Wankhede  2016-11-17   73  };
7b96953bc640b6 Kirti Wankhede  2016-11-17   74  
7b96953bc640b6 Kirti Wankhede  2016-11-17   75  #define MDEV_TYPE_ATTR(_name, _mode, _show, _store)		\
7b96953bc640b6 Kirti Wankhede  2016-11-17   76  struct mdev_type_attribute mdev_type_attr_##_name =		\
7b96953bc640b6 Kirti Wankhede  2016-11-17   77  	__ATTR(_name, _mode, _show, _store)
7b96953bc640b6 Kirti Wankhede  2016-11-17   78  #define MDEV_TYPE_ATTR_RW(_name) \
7b96953bc640b6 Kirti Wankhede  2016-11-17   79  	struct mdev_type_attribute mdev_type_attr_##_name = __ATTR_RW(_name)
7b96953bc640b6 Kirti Wankhede  2016-11-17   80  #define MDEV_TYPE_ATTR_RO(_name) \
7b96953bc640b6 Kirti Wankhede  2016-11-17   81  	struct mdev_type_attribute mdev_type_attr_##_name = __ATTR_RO(_name)
7b96953bc640b6 Kirti Wankhede  2016-11-17   82  #define MDEV_TYPE_ATTR_WO(_name) \
7b96953bc640b6 Kirti Wankhede  2016-11-17   83  	struct mdev_type_attribute mdev_type_attr_##_name = __ATTR_WO(_name)
7b96953bc640b6 Kirti Wankhede  2016-11-17   84  
7b96953bc640b6 Kirti Wankhede  2016-11-17   85  /**
7b96953bc640b6 Kirti Wankhede  2016-11-17   86   * struct mdev_driver - Mediated device driver
7b96953bc640b6 Kirti Wankhede  2016-11-17   87   * @name: driver name
7b96953bc640b6 Kirti Wankhede  2016-11-17   88   * @probe: called when new device created
7b96953bc640b6 Kirti Wankhede  2016-11-17   89   * @remove: called when device removed
7b96953bc640b6 Kirti Wankhede  2016-11-17   90   * @driver: device driver structure
6294ee8e0b5153 Jason Wang      2019-09-23   91   * @id_table: the ids serviced by this driver.
7b96953bc640b6 Kirti Wankhede  2016-11-17   92   *
7b96953bc640b6 Kirti Wankhede  2016-11-17   93   **/
7b96953bc640b6 Kirti Wankhede  2016-11-17   94  struct mdev_driver {
7b96953bc640b6 Kirti Wankhede  2016-11-17   95  	const char *name;
7b96953bc640b6 Kirti Wankhede  2016-11-17   96  	int  (*probe)(struct device *dev);
7b96953bc640b6 Kirti Wankhede  2016-11-17   97  	void (*remove)(struct device *dev);
7b96953bc640b6 Kirti Wankhede  2016-11-17  @98  	struct device_driver driver;
6294ee8e0b5153 Jason Wang      2019-09-23   99  	const struct mdev_class_id *id_table;
7b96953bc640b6 Kirti Wankhede  2016-11-17  100  };
7b96953bc640b6 Kirti Wankhede  2016-11-17  101  
7b96953bc640b6 Kirti Wankhede  2016-11-17  102  #define to_mdev_driver(drv)	container_of(drv, struct mdev_driver, driver)
7b96953bc640b6 Kirti Wankhede  2016-11-17  103  
50732af3b65691 Parav Pandit    2019-04-30  104  void *mdev_get_drvdata(struct mdev_device *mdev);
50732af3b65691 Parav Pandit    2019-04-30  105  void mdev_set_drvdata(struct mdev_device *mdev, void *data);
50732af3b65691 Parav Pandit    2019-04-30 @106  const guid_t *mdev_uuid(struct mdev_device *mdev);
7b96953bc640b6 Kirti Wankhede  2016-11-17  107  

:::::: The code at line 69 was first introduced by commit
:::::: 7b96953bc640b6b25665fe17ffca4b668b371f14 vfio: Mediated device Core driver

:::::: TO: Kirti Wankhede <kwankhede@nvidia.com>
:::::: CC: Alex Williamson <alex.williamson@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2019-09-23 15:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 13:03 [PATCH 0/6] mdev based hardware virtio offloading support Jason Wang
2019-09-23 13:03 ` [PATCH 1/6] mdev: class id support Jason Wang
2019-09-23 16:05   ` Alex Williamson
2019-09-24 10:11     ` Jason Wang
2019-09-23 20:58   ` Parav Pandit
2019-09-24 11:20     ` Jason Wang
2019-09-23 21:02   ` Parav Pandit
2019-09-24 11:23     ` Jason Wang
2019-09-23 13:03 ` [PATCH 2/6] mdev: introduce device specific ops Jason Wang
2019-09-23 15:20   ` kbuild test robot [this message]
2019-09-23 15:36     ` Michael S. Tsirkin
2019-09-24 11:23       ` Jason Wang
2019-09-23 22:59   ` Parav Pandit
2019-09-24 11:26     ` Jason Wang
2019-09-23 13:03 ` [PATCH 3/6] mdev: introduce virtio device and its device ops Jason Wang
2019-09-23 13:03 ` [PATCH 4/6] virtio: introduce a mdev based transport Jason Wang
2019-09-23 22:28   ` Parav Pandit
2019-09-24 11:30     ` Jason Wang
2019-09-23 13:03 ` [PATCH 5/6] vringh: fix copy direction of vringh_iov_push_kern() Jason Wang
2019-09-23 15:45   ` Alex Williamson
2019-09-23 16:00     ` Michael S. Tsirkin
2019-09-24 14:04       ` Alex Williamson
2019-09-25 11:56         ` Jason Wang
2019-09-23 13:03 ` [PATCH 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework Jason Wang
2019-09-23 13:59 ` [PATCH 0/6] mdev based hardware virtio offloading support Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201909232342.R079Gsby%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=cunming.liang@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eperezma@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=haotian.wang@sifive.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=idos@mellanox.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@01.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lulu@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=parav@mellanox.com \
    --cc=pasic@linux.ibm.com \
    --cc=rob.miller@broadcom.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sebott@linux.ibm.com \
    --cc=tiwei.bie@intel.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiao.w.wang@intel.com \
    --cc=zhi.a.wang@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).