From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbcGMUsr (ORCPT ); Wed, 13 Jul 2016 16:48:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54942 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbcGMUsg (ORCPT ); Wed, 13 Jul 2016 16:48:36 -0400 Subject: Re: [PATCH V8 7/9] vfio, platform: make reset driver a requirement by default To: Alex Williamson References: <1466437879-32182-1-git-send-email-okaya@codeaurora.org> <1466437879-32182-8-git-send-email-okaya@codeaurora.org> <20160623125955.647008cb@t450s.home> Cc: kvm@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, eric.auger@redhat.com, linux-acpi@vger.kernel.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Baptiste Reynal , linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: Date: Wed, 13 Jul 2016 16:48:32 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160623125955.647008cb@t450s.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.