Message ID | 20201027175806.20305-2-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/5] driver core: platform: Introduce platform_get_mem_or_io_resource() | expand |
Hi Andy, On 10/27/20 6:58 PM, Andy Shevchenko wrote: > Switch to use new platform_get_mem_or_io_resource() instead of > home grown analogue. > > Cc: Eric Auger <eric.auger@redhat.com> > Cc: Alex Williamson <alex.williamson@redhat.com> > Cc: Cornelia Huck <cohuck@redhat.com> > Cc: kvm@vger.kernel.org > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Eric Auger <eric.auger@redhat.com> Thanks Eric > --- > drivers/vfio/platform/vfio_platform.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c > index 1e2769010089..84afafb6941b 100644 > --- a/drivers/vfio/platform/vfio_platform.c > +++ b/drivers/vfio/platform/vfio_platform.c > @@ -25,19 +25,8 @@ static struct resource *get_platform_resource(struct vfio_platform_device *vdev, > int num) > { > struct platform_device *dev = (struct platform_device *) vdev->opaque; > - int i; > > - for (i = 0; i < dev->num_resources; i++) { > - struct resource *r = &dev->resource[i]; > - > - if (resource_type(r) & (IORESOURCE_MEM|IORESOURCE_IO)) { > - if (!num) > - return r; > - > - num--; > - } > - } > - return NULL; > + return platform_get_mem_or_io_resource(dev, num); > } > > static int get_platform_irq(struct vfio_platform_device *vdev, int i) >
On Thu, Dec 03, 2020 at 01:54:38PM +0100, Auger Eric wrote: > Hi Andy, > > On 10/27/20 6:58 PM, Andy Shevchenko wrote: > > Switch to use new platform_get_mem_or_io_resource() instead of > > home grown analogue. > > > > Cc: Eric Auger <eric.auger@redhat.com> > > Cc: Alex Williamson <alex.williamson@redhat.com> > > Cc: Cornelia Huck <cohuck@redhat.com> > > Cc: kvm@vger.kernel.org > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Acked-by: Eric Auger <eric.auger@redhat.com> Thanks! Greg, do I need to do anything else with this series?
On Tue, 27 Oct 2020 19:58:03 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Switch to use new platform_get_mem_or_io_resource() instead of > home grown analogue. > > Cc: Eric Auger <eric.auger@redhat.com> > Cc: Alex Williamson <alex.williamson@redhat.com> > Cc: Cornelia Huck <cohuck@redhat.com> > Cc: kvm@vger.kernel.org > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/vfio/platform/vfio_platform.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On Tue, 27 Oct 2020 19:58:03 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Switch to use new platform_get_mem_or_io_resource() instead of > home grown analogue. > > Cc: Eric Auger <eric.auger@redhat.com> > Cc: Alex Williamson <alex.williamson@redhat.com> > Cc: Cornelia Huck <cohuck@redhat.com> > Cc: kvm@vger.kernel.org > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/vfio/platform/vfio_platform.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) Acked-by: Alex Williamson <alex.williamson@redhat.com>
On Thu, Dec 03, 2020 at 03:07:19PM +0200, Andy Shevchenko wrote: > On Thu, Dec 03, 2020 at 01:54:38PM +0100, Auger Eric wrote: > > Hi Andy, > > > > On 10/27/20 6:58 PM, Andy Shevchenko wrote: > > > Switch to use new platform_get_mem_or_io_resource() instead of > > > home grown analogue. > > > > > > Cc: Eric Auger <eric.auger@redhat.com> > > > Cc: Alex Williamson <alex.williamson@redhat.com> > > > Cc: Cornelia Huck <cohuck@redhat.com> > > > Cc: kvm@vger.kernel.org > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Acked-by: Eric Auger <eric.auger@redhat.com> > > Thanks! > > Greg, do I need to do anything else with this series? Have them taken by the vfio maintainers? I'm not that person :)
On Wed, Dec 09, 2020 at 03:47:06PM +0100, Greg Kroah-Hartman wrote: > On Thu, Dec 03, 2020 at 03:07:19PM +0200, Andy Shevchenko wrote: > > On Thu, Dec 03, 2020 at 01:54:38PM +0100, Auger Eric wrote: > > > On 10/27/20 6:58 PM, Andy Shevchenko wrote: > > > > Switch to use new platform_get_mem_or_io_resource() instead of > > > > home grown analogue. > > > > > > > > Cc: Eric Auger <eric.auger@redhat.com> > > > > Cc: Alex Williamson <alex.williamson@redhat.com> > > > > Cc: Cornelia Huck <cohuck@redhat.com> > > > > Cc: kvm@vger.kernel.org > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > Acked-by: Eric Auger <eric.auger@redhat.com> > > > > Thanks! > > > > Greg, do I need to do anything else with this series? > > Have them taken by the vfio maintainers? I'm not that person :) But it can't be done with a first patch that provides a new API. The rest seems under your realm, if I didn't miss anything. Btw, VFIO agreed on the change (as per given tags).
On Wed, Dec 09, 2020 at 06:48:16PM +0200, Andy Shevchenko wrote: > On Wed, Dec 09, 2020 at 03:47:06PM +0100, Greg Kroah-Hartman wrote: > > On Thu, Dec 03, 2020 at 03:07:19PM +0200, Andy Shevchenko wrote: > > > On Thu, Dec 03, 2020 at 01:54:38PM +0100, Auger Eric wrote: > > > > On 10/27/20 6:58 PM, Andy Shevchenko wrote: > > > > > Switch to use new platform_get_mem_or_io_resource() instead of > > > > > home grown analogue. > > > > > > > > > > Cc: Eric Auger <eric.auger@redhat.com> > > > > > Cc: Alex Williamson <alex.williamson@redhat.com> > > > > > Cc: Cornelia Huck <cohuck@redhat.com> > > > > > Cc: kvm@vger.kernel.org > > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > Acked-by: Eric Auger <eric.auger@redhat.com> > > > > > > Thanks! > > > > > > Greg, do I need to do anything else with this series? > > > > Have them taken by the vfio maintainers? I'm not that person :) > > But it can't be done with a first patch that provides a new API. > The rest seems under your realm, if I didn't miss anything. > Btw, VFIO agreed on the change (as per given tags). Ok, can you resend all of these, with the vfio tags added, so I know to take them all? thanks, greg k-h
On Wed, Dec 09, 2020 at 05:53:45PM +0100, Greg Kroah-Hartman wrote: > On Wed, Dec 09, 2020 at 06:48:16PM +0200, Andy Shevchenko wrote: > > On Wed, Dec 09, 2020 at 03:47:06PM +0100, Greg Kroah-Hartman wrote: > > > On Thu, Dec 03, 2020 at 03:07:19PM +0200, Andy Shevchenko wrote: > > > > On Thu, Dec 03, 2020 at 01:54:38PM +0100, Auger Eric wrote: ... > > > > Greg, do I need to do anything else with this series? > > > Have them taken by the vfio maintainers? I'm not that person :) > > But it can't be done with a first patch that provides a new API. > > The rest seems under your realm, if I didn't miss anything. > > Btw, VFIO agreed on the change (as per given tags). > Ok, can you resend all of these, with the vfio tags added, so I know to > take them all? Sure. Will do soon.
diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c index 1e2769010089..84afafb6941b 100644 --- a/drivers/vfio/platform/vfio_platform.c +++ b/drivers/vfio/platform/vfio_platform.c @@ -25,19 +25,8 @@ static struct resource *get_platform_resource(struct vfio_platform_device *vdev, int num) { struct platform_device *dev = (struct platform_device *) vdev->opaque; - int i; - for (i = 0; i < dev->num_resources; i++) { - struct resource *r = &dev->resource[i]; - - if (resource_type(r) & (IORESOURCE_MEM|IORESOURCE_IO)) { - if (!num) - return r; - - num--; - } - } - return NULL; + return platform_get_mem_or_io_resource(dev, num); } static int get_platform_irq(struct vfio_platform_device *vdev, int i)
Switch to use new platform_get_mem_or_io_resource() instead of home grown analogue. Cc: Eric Auger <eric.auger@redhat.com> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Cc: kvm@vger.kernel.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/vfio/platform/vfio_platform.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)