Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1442836 > unrolled thread
| Started by | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| First post | 2016-07-13 22:50 +0200 |
| Last post | 2016-07-13 23:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH V8 7/9] vfio, platform: make reset driver a requirement by default Sinan Kaya <okaya@codeaurora.org> - 2016-07-13 22:50 +0200
Re: [PATCH V8 7/9] vfio, platform: make reset driver a requirement by default Alex Williamson <alex.williamson@redhat.com> - 2016-07-13 23:20 +0200
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Date | 2016-07-13 22:50 +0200 |
| Subject | Re: [PATCH V8 7/9] vfio, platform: make reset driver a requirement by default |
| Message-ID | <rUzgu-87F-25@gated-at.bofh.it> |
On 6/23/2016 2:59 PM, Alex Williamson wrote:
>> -static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
>> > +static int vfio_platform_get_reset(struct vfio_platform_device *vdev)
>> > {
>> > if (vdev->acpihid)
>> > - return;
>> > + return vfio_platform_acpi_has_reset(vdev) ? 0 : -ENOENT;
>> >
>> > vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
>> > &vdev->reset_module);
>> > @@ -140,6 +140,8 @@ static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
>> > vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
>> > &vdev->reset_module);
>> > }
>> > +
>> > + return vdev->of_reset ? 0 : -ENOENT;
>> > }
> nit, this looks more like a:
>
> static bool vfio_platform_has_reset(...)
> ...
> return vfio_platform_acpi_has_reset() == 0;
>
> ...
>
> return vdev->of_reset != NULL
>
Sorry, I didn't understand this comment. The code has get and put functions for DT.
These functions are not useful for ACPI. This is the reason for the above change.
Can you be more specific?
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
[toc] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-07-13 23:20 +0200 |
| Subject | Re: [PATCH V8 7/9] vfio, platform: make reset driver a requirement by default |
| Message-ID | <rUzJv-7e-1@gated-at.bofh.it> |
| In reply to | #1442836 |
On Wed, 13 Jul 2016 16:48:32 -0400
Sinan Kaya <okaya@codeaurora.org> wrote:
> On 6/23/2016 2:59 PM, Alex Williamson wrote:
> >> -static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
> >> > +static int vfio_platform_get_reset(struct vfio_platform_device *vdev)
> >> > {
> >> > if (vdev->acpihid)
> >> > - return;
> >> > + return vfio_platform_acpi_has_reset(vdev) ? 0 : -ENOENT;
> >> >
> >> > vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
> >> > &vdev->reset_module);
> >> > @@ -140,6 +140,8 @@ static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
> >> > vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
> >> > &vdev->reset_module);
> >> > }
> >> > +
> >> > + return vdev->of_reset ? 0 : -ENOENT;
> >> > }
> > nit, this looks more like a:
> >
> > static bool vfio_platform_has_reset(...)
> > ...
> > return vfio_platform_acpi_has_reset() == 0;
> >
> > ...
> >
> > return vdev->of_reset != NULL
> >
>
> Sorry, I didn't understand this comment. The code has get and put functions for DT.
> These functions are not useful for ACPI. This is the reason for the above change.
>
> Can you be more specific?
It was sort of cryptic, I'm not entirely sure I can make sense of it
either. It think I was mainly suggesting that it looked more like a
bool function so we could just return true/false, but we are actually
setting the of_reset function as part of this, so there is a 'get'
aspect. Feel free to ignore this comment. Thanks,
Alex
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web