Re: [PATCH 5/9] vfio-pci/zdev: remove unused vdev argument

2021-02-02 Thread Alex Williamson
On Tue, 2 Feb 2021 08:57:55 +0100
Cornelia Huck  wrote:

> On Mon, 1 Feb 2021 16:28:24 +
> Max Gurtovoy  wrote:
> 
> > Zdev static functions does not use vdev argument. Remove it.  
> 
> s/does not use/do not use the/
> 
> > 
> > Signed-off-by: Max Gurtovoy 
> > ---
> >  drivers/vfio/pci/vfio_pci_zdev.c | 20 
> >  1 file changed, 8 insertions(+), 12 deletions(-)  
> 
> Reviewed-by: Cornelia Huck 

Applied 5&6 to vfio next branch for v5.12 w/ Matt and Connie's R-b and
trivial fix above.  Thanks,

Alex



Re: [PATCH 5/9] vfio-pci/zdev: remove unused vdev argument

2021-02-02 Thread Cornelia Huck
On Mon, 1 Feb 2021 16:28:24 +
Max Gurtovoy  wrote:

> Zdev static functions does not use vdev argument. Remove it.

s/does not use/do not use the/

> 
> Signed-off-by: Max Gurtovoy 
> ---
>  drivers/vfio/pci/vfio_pci_zdev.c | 20 
>  1 file changed, 8 insertions(+), 12 deletions(-)

Reviewed-by: Cornelia Huck 



Re: [PATCH 5/9] vfio-pci/zdev: remove unused vdev argument

2021-02-01 Thread Matthew Rosato

On 2/1/21 11:28 AM, Max Gurtovoy wrote:

Zdev static functions does not use vdev argument. Remove it.

Signed-off-by: Max Gurtovoy 


Huh.  I must have dropped the use of vdev somewhere during review 
versions.  Thanks!


Reviewed-by: Matthew Rosato 

@Alex/@Connie This one is just a cleanup and could also go separately 
from this set if it makes sense.



---
  drivers/vfio/pci/vfio_pci_zdev.c | 20 
  1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/vfio/pci/vfio_pci_zdev.c b/drivers/vfio/pci/vfio_pci_zdev.c
index 7b20b34b1034..175096fcd902 100644
--- a/drivers/vfio/pci/vfio_pci_zdev.c
+++ b/drivers/vfio/pci/vfio_pci_zdev.c
@@ -24,8 +24,7 @@
  /*
   * Add the Base PCI Function information to the device info region.
   */
-static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
  {
struct vfio_device_info_cap_zpci_base cap = {
.header.id = VFIO_DEVICE_INFO_CAP_ZPCI_BASE,
@@ -45,8 +44,7 @@ static int zpci_base_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
  /*
   * Add the Base PCI Function Group information to the device info region.
   */
-static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
- struct vfio_info_cap *caps)
+static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
  {
struct vfio_device_info_cap_zpci_group cap = {
.header.id = VFIO_DEVICE_INFO_CAP_ZPCI_GROUP,
@@ -66,8 +64,7 @@ static int zpci_group_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
  /*
   * Add the device utility string to the device info region.
   */
-static int zpci_util_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_util_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
  {
struct vfio_device_info_cap_zpci_util *cap;
int cap_size = sizeof(*cap) + CLP_UTIL_STR_LEN;
@@ -90,8 +87,7 @@ static int zpci_util_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
  /*
   * Add the function path string to the device info region.
   */
-static int zpci_pfip_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_pfip_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
  {
struct vfio_device_info_cap_zpci_pfip *cap;
int cap_size = sizeof(*cap) + CLP_PFIP_NR_SEGMENTS;
@@ -123,21 +119,21 @@ int vfio_pci_info_zdev_add_caps(struct vfio_pci_device 
*vdev,
if (!zdev)
return -ENODEV;
  
-	ret = zpci_base_cap(zdev, vdev, caps);

+   ret = zpci_base_cap(zdev, caps);
if (ret)
return ret;
  
-	ret = zpci_group_cap(zdev, vdev, caps);

+   ret = zpci_group_cap(zdev, caps);
if (ret)
return ret;
  
  	if (zdev->util_str_avail) {

-   ret = zpci_util_cap(zdev, vdev, caps);
+   ret = zpci_util_cap(zdev, caps);
if (ret)
return ret;
}
  
-	ret = zpci_pfip_cap(zdev, vdev, caps);

+   ret = zpci_pfip_cap(zdev, caps);
  
  	return ret;

  }





[PATCH 5/9] vfio-pci/zdev: remove unused vdev argument

2021-02-01 Thread Max Gurtovoy
Zdev static functions does not use vdev argument. Remove it.

Signed-off-by: Max Gurtovoy 
---
 drivers/vfio/pci/vfio_pci_zdev.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/vfio/pci/vfio_pci_zdev.c b/drivers/vfio/pci/vfio_pci_zdev.c
index 7b20b34b1034..175096fcd902 100644
--- a/drivers/vfio/pci/vfio_pci_zdev.c
+++ b/drivers/vfio/pci/vfio_pci_zdev.c
@@ -24,8 +24,7 @@
 /*
  * Add the Base PCI Function information to the device info region.
  */
-static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
 {
struct vfio_device_info_cap_zpci_base cap = {
.header.id = VFIO_DEVICE_INFO_CAP_ZPCI_BASE,
@@ -45,8 +44,7 @@ static int zpci_base_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
 /*
  * Add the Base PCI Function Group information to the device info region.
  */
-static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
- struct vfio_info_cap *caps)
+static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
 {
struct vfio_device_info_cap_zpci_group cap = {
.header.id = VFIO_DEVICE_INFO_CAP_ZPCI_GROUP,
@@ -66,8 +64,7 @@ static int zpci_group_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
 /*
  * Add the device utility string to the device info region.
  */
-static int zpci_util_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_util_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
 {
struct vfio_device_info_cap_zpci_util *cap;
int cap_size = sizeof(*cap) + CLP_UTIL_STR_LEN;
@@ -90,8 +87,7 @@ static int zpci_util_cap(struct zpci_dev *zdev, struct 
vfio_pci_device *vdev,
 /*
  * Add the function path string to the device info region.
  */
-static int zpci_pfip_cap(struct zpci_dev *zdev, struct vfio_pci_device *vdev,
-struct vfio_info_cap *caps)
+static int zpci_pfip_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
 {
struct vfio_device_info_cap_zpci_pfip *cap;
int cap_size = sizeof(*cap) + CLP_PFIP_NR_SEGMENTS;
@@ -123,21 +119,21 @@ int vfio_pci_info_zdev_add_caps(struct vfio_pci_device 
*vdev,
if (!zdev)
return -ENODEV;
 
-   ret = zpci_base_cap(zdev, vdev, caps);
+   ret = zpci_base_cap(zdev, caps);
if (ret)
return ret;
 
-   ret = zpci_group_cap(zdev, vdev, caps);
+   ret = zpci_group_cap(zdev, caps);
if (ret)
return ret;
 
if (zdev->util_str_avail) {
-   ret = zpci_util_cap(zdev, vdev, caps);
+   ret = zpci_util_cap(zdev, caps);
if (ret)
return ret;
}
 
-   ret = zpci_pfip_cap(zdev, vdev, caps);
+   ret = zpci_pfip_cap(zdev, caps);
 
return ret;
 }
-- 
2.25.4