On Tue, 7 Jan 2020 20:01:41 +0800 Liu Yi L <yi.l.liu@xxxxxxxxx> wrote: > This patch makes the common functions (module agnostic functions) in > vfio_pci.c to be extern. So that such functions could be moved to a > common source file. > > *) vfio_pci_set_vga_decode > *) vfio_pci_probe_power_state > *) vfio_pci_set_power_state > *) vfio_pci_enable > *) vfio_pci_disable > *) vfio_pci_refresh_config > *) vfio_pci_register_dev_region > *) vfio_pci_ioctl > *) vfio_pci_read > *) vfio_pci_write > *) vfio_pci_mmap > *) vfio_pci_request > *) vfio_pci_err_handlers > *) vfio_pci_reflck_attach > *) vfio_pci_reflck_put > *) vfio_pci_fill_ids I find it a bit hard to understand what "module agnostic functions" are supposed to be. The functions you want to move seem to be some "basic" functions that can be shared between normal vfio-pci and vfio-mdev-pci... maybe talk about "functions that provide basic vfio functionality for pci devices" and also mention the mdev part? [My rationale behind complaining about the commit messages is that if I look at this change in a year from now, I want to be able to know why and to what end that change was made.] > > Cc: Kevin Tian <kevin.tian@xxxxxxxxx> > Cc: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> > Signed-off-by: Liu Yi L <yi.l.liu@xxxxxxxxx> > --- > drivers/vfio/pci/vfio_pci.c | 30 +++++++++++++----------------- > drivers/vfio/pci/vfio_pci_private.h | 15 +++++++++++++++ > 2 files changed, 28 insertions(+), 17 deletions(-)