From: Auger Eric <eric.auger@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v1 2/5] vfio: platform: Switch to use platform_get_mem_or_io_resource()
Date: Thu, 3 Dec 2020 13:54:38 +0100 [thread overview]
Message-ID: <fb0b02a0-d672-0ff8-be80-b95bdbb58e57@redhat.com> (raw)
In-Reply-To: <20201027175806.20305-2-andriy.shevchenko@linux.intel.com>
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)
>
next prev parent reply other threads:[~2020-12-03 12:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 17:58 [PATCH v1 1/5] driver core: platform: Introduce platform_get_mem_or_io_resource() Andy Shevchenko
2020-10-27 17:58 ` [PATCH v1 2/5] vfio: platform: Switch to use platform_get_mem_or_io_resource() Andy Shevchenko
2020-12-03 12:54 ` Auger Eric [this message]
2020-12-03 13:07 ` Andy Shevchenko
2020-12-09 14:47 ` Greg Kroah-Hartman
2020-12-09 16:48 ` Andy Shevchenko
2020-12-09 16:53 ` Greg Kroah-Hartman
2020-12-09 18:22 ` Andy Shevchenko
2020-12-03 13:22 ` Cornelia Huck
2020-12-03 18:05 ` Alex Williamson
2020-12-03 13:21 ` [PATCH v1 1/5] driver core: platform: Introduce platform_get_mem_or_io_resource() Cornelia Huck
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=fb0b02a0-d672-0ff8-be80-b95bdbb58e57@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cohuck@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).