Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6788116ybi; Mon, 22 Jul 2019 01:39:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU0FA0Zo2GuyKhSA8GZ092jLipdg+BXOPghUfhKLOF1il/DzBwOow4qbTH0DSx0Kx0SmiT X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr75120014pjo.133.1563784744660; Mon, 22 Jul 2019 01:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563784744; cv=none; d=google.com; s=arc-20160816; b=cKw3lP6oIDDo38rmnHyVCSG2FGThG1TbK7ry+1O4GcEK4/9se7+PY6BhbOlS6VbDfn IrXi0nRkPYn8MjlLOMgsWeW+f4W7CkLx3efz/Pkbygf3PTM0or5WC+i0H9udyeVPk5Cl P/6fA5U2FLXczCTfqfi7rJyLMDAZRELK/qE/SS2FprXBk4H2qfFMvmXmPZUUgkyiBmEa A39ubb4mPYYg2ZLefPJUqbKE+XwIcJnYSrtVokCy0chOdPC7BfqpETGLW5UYuGYGtjcG 9V/SfCdMPsK39Satwc/WP06mkKnp/MykOOBFjHbdKUnUy0pxw0SnUX3wbRZcQfqjx2WF Lmpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=T4N0HhwGuXC3mqxfYtAKATut5jBkdVM9gFj5yRqL8TI=; b=CerUNIXW1SzRtskeZVBiiZdBlGqU4T8ctPHuBQFrDoNcgn0HHVAJDMpBMr6uikvzb1 LS8rtSkCeO+GeVQxS85YR7eri60LGMuPPEfcz3H5bJt9wzkw6dv5tF79pXLXU8/YKm1l AAt9jSGYqMK54ZkaXAtticH0oAhA2MgZIalR5B5GKVm8oRb1P3x4bM34nf15XxFHfKHD Fl34E1U7X7OykaL3zLK03wD+9jhzyADKqElCLnSJeZDUmTc9h4VyWSAN/FnT/u+54ACL CHs3o8zYVua9m0e9mp4gSrKtqyCd4Hb+4cL3wOP1IUXFBsUg9BeztArZGbX0PiCaFZ3T gZ4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si8640127pfh.276.2019.07.22.01.38.48; Mon, 22 Jul 2019 01:39:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728423AbfGVIaJ (ORCPT + 99 others); Mon, 22 Jul 2019 04:30:09 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:45652 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727304AbfGVIaJ (ORCPT ); Mon, 22 Jul 2019 04:30:09 -0400 Received: by mail-oi1-f196.google.com with SMTP id m206so28966986oib.12; Mon, 22 Jul 2019 01:30:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T4N0HhwGuXC3mqxfYtAKATut5jBkdVM9gFj5yRqL8TI=; b=PpOKQKjnDe7l8YzAv73SytoJ1KOpZRtzA5V7Hzu62N6+vzIzyo6aryjpPHgG+sna4v 5fleGwCHkFHogZkF/FbD6qrBUqxJnWq/Zhs+Psso3Lmqct0jOPmaix7BEzENlHH57Fn5 Sic1dyiuKI3zJR3DBJmvbaYoBSpgvWQJfR+THZ1abPGX70NPMKzjzSVmeNa0/tReZohW fsGP2lAg+tq/1Jnhoy+X+1+J5XoANDshFcW6WOu0/jG0bjA2lTnvX8kcBTu4/DxO8yju a6QoxqzccdhOoIds6I2ApTKnKS8DIUo4KnQwAGfQudLz/z+mZeH3HNYEpOmv7/DV+W8G ErmQ== X-Gm-Message-State: APjAAAUrhBc+AfwDtHcekcH/z/bzrmCR+2KLW7Ojl2fNbvoMVDn4hUXh +yGSSuESe/q+aOOSmf9x65XIUPnNOx/NMD02wfM= X-Received: by 2002:aca:cdd3:: with SMTP id d202mr30210012oig.115.1563784207998; Mon, 22 Jul 2019 01:30:07 -0700 (PDT) MIME-Version: 1.0 References: <20190722023530.67676-1-skunberg.kelsey@gmail.com> <20190722023530.67676-3-skunberg.kelsey@gmail.com> In-Reply-To: <20190722023530.67676-3-skunberg.kelsey@gmail.com> From: "Rafael J. Wysocki" Date: Mon, 22 Jul 2019 10:29:55 +0200 Message-ID: Subject: Re: [PATCH 2/3] ACPI: Remove acpi_has_method() call from scan.c To: Kelsey Skunberg Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List , skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, bjorn@helgaas.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 4:36 AM Kelsey Skunberg wrote: > > acpi_evaluate_reference() will return an error if the DEP method > does not exist. Checking if the DEP method exists before the > acpi_evaluate_reference() call is not needed. Remove acpi_has_method() > call to avoid additional work. > > Signed-off-by: Kelsey Skunberg > --- > drivers/acpi/scan.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index 0e28270b0fd8..4f2b0b481cee 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -1803,9 +1803,6 @@ static void acpi_device_dep_initialize(struct acpi_device *adev) > > adev->dep_unmet = 0; > > - if (!acpi_has_method(adev->handle, "_DEP")) > - return; > - As you can see, this just returns. > status = acpi_evaluate_reference(adev->handle, "_DEP", NULL, > &dep_devices); > if (ACPI_FAILURE(status)) { Where this does something more on fallure. Therefore the code after the change is not equivalent to the code before it, so the changes is questionable.