Message ID | 20221018152825.891032-1-rafaelmendsr@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2020300wrs; Tue, 18 Oct 2022 08:29:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ESufSYWfZpkXuNrrT6xN36CP7E6NVye63aNcKsyVafisrQkKyHBDP+ffHixQ0PtYWENWs X-Received: by 2002:a05:6402:190e:b0:45c:d10a:4c1a with SMTP id e14-20020a056402190e00b0045cd10a4c1amr3157938edz.345.1666106974723; Tue, 18 Oct 2022 08:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666106974; cv=none; d=google.com; s=arc-20160816; b=jGW98+khkKUgiUl58SRrYfp9xLu7RV8usmR5CnFjDNDevMZHnEsJhgQDFY/pnS8JhP uxu8bJIJWvfZqqSc69LHw7tXs+gpSuyLwNEaqMw9pqo7VzOwKUwbNqP/2OULXkBxhOSl S9M+pkUrYJYQoRG9DRqaBUX81yi6/Kt2S4ZnqhwUkf7bDE9L8G3NcgaIkIxli0jwjh4d 2enipu0Q8PwQ46LGeKomuylUovOEP4scqhYaJaVyHboXeE/U+Tz2yUTOpULgXJNwPICk B4xmfmSzXq9FJn2GpEL92XxJVLB8QL6BYr6pZyXylBF8c+1BlQddHSABtTs3+j53AoDK 8LJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CYftzAS7d7PwCedU9T1W1h069tO+3o3734rFDNbR850=; b=dFyusTYrd3RLBOSoDzCZKA9wQt3TnEYxy/JhbbI8BNOMXnVrM5wfhP3Yy73B1rbFUd NztL3ntxFnPnRtGOEUC/d5ig62W3uLm2PhaPWpksHL+lS+VL1iJW0AVP856n1Fg0rN/J wA9y9QJVyxbY60pKdRYnDyTmCaIt/x53hdPG9lDue3y26S36FwKlqsCciCuyO+pBSGLX VxtwevaApdoXnuVsskLk6Mb6iLHI/AX9XcISavRCx52cqJQfV4xgY/9PJFE2wG+IQPN1 NLk5v7umukDlmuua5vLZoh7LI2cABaxJRt0zrykMkRFimqzKEkg3AFZqU4vNZulbeODt CNFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Sp2vQd7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk10-20020a1709077f8a00b0078d49f0df9csi13689150ejc.453.2022.10.18.08.29.10; Tue, 18 Oct 2022 08:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Sp2vQd7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbiJRP2l (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 11:28:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbiJRP2i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 11:28:38 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6666BBC46A; Tue, 18 Oct 2022 08:28:36 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1370acb6588so17192659fac.9; Tue, 18 Oct 2022 08:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CYftzAS7d7PwCedU9T1W1h069tO+3o3734rFDNbR850=; b=Sp2vQd7VInnrK7L3fy/MhgrAVqhrdZnXhY+bQj7UU3XtfDqQZKS2vGemUdsfTAVQdd JTOmEk3LlWo+d7f5J1CRyPHEIhA+bSGJdnBcuVn/13hWVk0otPXzQzg7wOClCj3C7ojQ acccD2kfwl+MP8qgTGuWn3bGLq3F911LZO1afOGDA1N1L8yKPJGiBvXSd0xZiFWa32yK 9BrVuIwZwgVudddqepfGIpazbNUElksZt7XjVX2KYsc+orZ6IRYxTy8kOQ7QZ1TpjW7B GBrZ/cOX59dv8YiTxkwM5nIxbR3UwuYC211MYyJErIcyj7pofaNAnuZjA1mIImZqAqPs PApg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CYftzAS7d7PwCedU9T1W1h069tO+3o3734rFDNbR850=; b=VAxr8QWklrWmb38kdPMcAk4HAAvvea/iHID1UhTEggAI9shx/ym+3pwmzrle1SLhHp iKCcbZF9mi3xzFBytveBTH5KQdjeMIT29gcMmhSbT6jYoAnI9FTV4mV8RimP/rGkImOt to63JdAmYB4dSkwmthJGZ54ryWSR35GAL+y4Bd6VoMY2agFfSWV93HZm1fnXicVyjW27 L7awqp1CwDiJsZ5JYr2oyiX8iKr+GD01SFl/CgT0viObKgaH2HfJqSOYWaK8GC/8TAiR U8Wb+W7kLIaGb64z/IrRdT86GKrsWwr5PkoZz0i4Dz3jmAaEnJQqzJs5Jz0O2ng2cWtz +n7w== X-Gm-Message-State: ACrzQf0yVVqUAwP177pcU5wbVTZiH1c2HnOJuP5Lno5lci3WqiVRpfVp ijqpcmp+yfqeG1wcDElYEi0= X-Received: by 2002:a05:6870:e242:b0:137:2c18:681e with SMTP id d2-20020a056870e24200b001372c18681emr1849845oac.161.1666106916069; Tue, 18 Oct 2022 08:28:36 -0700 (PDT) Received: from macondo.. ([2804:431:e7cc:1855:1146:49fe:83c4:7bb]) by smtp.gmail.com with ESMTPSA id d24-20020a056830045800b006618b23df05sm6057348otc.21.2022.10.18.08.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 08:28:35 -0700 (PDT) From: Rafael Mendonca <rafaelmendsr@gmail.com> To: Eric Auger <eric.auger@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Sinan Kaya <okaya@codeaurora.org> Cc: Rafael Mendonca <rafaelmendsr@gmail.com>, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vfio: platform: Do not pass return buffer to ACPI _RST method Date: Tue, 18 Oct 2022 12:28:25 -0300 Message-Id: <20221018152825.891032-1-rafaelmendsr@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747039786612435736?= X-GMAIL-MSGID: =?utf-8?q?1747039786612435736?= |
Series |
vfio: platform: Do not pass return buffer to ACPI _RST method
|
|
Commit Message
Rafael Mendonca
Oct. 18, 2022, 3:28 p.m. UTC
The ACPI _RST method has no return value, there's no need to pass a return
buffer to acpi_evaluate_object().
Fixes: d30daa33ec1d ("vfio: platform: call _RST method when using ACPI")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
---
drivers/vfio/platform/vfio_platform_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Rafael, On 10/18/22 17:28, Rafael Mendonca wrote: > The ACPI _RST method has no return value, there's no need to pass a return > buffer to acpi_evaluate_object(). > > Fixes: d30daa33ec1d ("vfio: platform: call _RST method when using ACPI") > Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Thanks Eric > --- > drivers/vfio/platform/vfio_platform_common.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c > index 55dc4f43c31e..1a0a238ffa35 100644 > --- a/drivers/vfio/platform/vfio_platform_common.c > +++ b/drivers/vfio/platform/vfio_platform_common.c > @@ -72,12 +72,11 @@ static int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, > const char **extra_dbg) > { > #ifdef CONFIG_ACPI > - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > struct device *dev = vdev->device; > acpi_handle handle = ACPI_HANDLE(dev); > acpi_status acpi_ret; > > - acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, &buffer); > + acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, NULL); > if (ACPI_FAILURE(acpi_ret)) { > if (extra_dbg) > *extra_dbg = acpi_format_exception(acpi_ret);
On Tue, 18 Oct 2022 12:28:25 -0300 Rafael Mendonca <rafaelmendsr@gmail.com> wrote: > The ACPI _RST method has no return value, there's no need to pass a return > buffer to acpi_evaluate_object(). > > Fixes: d30daa33ec1d ("vfio: platform: call _RST method when using ACPI") > Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com> > --- > drivers/vfio/platform/vfio_platform_common.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c > index 55dc4f43c31e..1a0a238ffa35 100644 > --- a/drivers/vfio/platform/vfio_platform_common.c > +++ b/drivers/vfio/platform/vfio_platform_common.c > @@ -72,12 +72,11 @@ static int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, > const char **extra_dbg) > { > #ifdef CONFIG_ACPI > - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > struct device *dev = vdev->device; > acpi_handle handle = ACPI_HANDLE(dev); > acpi_status acpi_ret; > > - acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, &buffer); > + acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, NULL); > if (ACPI_FAILURE(acpi_ret)) { > if (extra_dbg) > *extra_dbg = acpi_format_exception(acpi_ret); Applied to vfio next branch for v6.2. Thanks, Alex
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index 55dc4f43c31e..1a0a238ffa35 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -72,12 +72,11 @@ static int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, const char **extra_dbg) { #ifdef CONFIG_ACPI - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct device *dev = vdev->device; acpi_handle handle = ACPI_HANDLE(dev); acpi_status acpi_ret; - acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, &buffer); + acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, NULL); if (ACPI_FAILURE(acpi_ret)) { if (extra_dbg) *extra_dbg = acpi_format_exception(acpi_ret);