Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6787895ybi; Mon, 22 Jul 2019 01:38:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsjKT0bsRDtnB+ghHXZ95ZMJ+I2LGqeOT4Yobq1ETaP2o46oL2MpcQXWwVrUlvi21+YYQi X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr75118752pjo.133.1563784726295; Mon, 22 Jul 2019 01:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563784726; cv=none; d=google.com; s=arc-20160816; b=nnajoMPIf/fYPJaKQa2Hq5xqG82yZqtyu20lCkzfhSI2L4ZficTfs89uc/pzi8feNM jBm1z9p8ZS/EnNubnO/Yxl+5n5sAiuUQe48ObS/eKZTazH3Ls7zWpmgW9E0ILI5xWpx5 WiAfx76O71e7YtPxM1aouuuIZLvV9QJajR0Emt3vh0n0pB4cNweUqYMaN46qyJEjEzD0 93j3R2mrcnowuKn0BgrG45ZS36M0Lf84iIm8ymm6iT19e/rFmOb54Xi7GLb4ElNRleDk /YevhRd8i0a6ZKMLDlulckagn9jd5LcTatt4Pv/b95oLlNq7YFhvHJwYc3k6GqBYK8tC wfhA== 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=qH9X5iNUAvdfUeKpd2p6uIpK5xHWBxmzhoraupHL3oQ=; b=SlEDDDguTXXfoD+Yu7YbHBMVI0mfOdB4lyFo+Ho3EhJRrFgDF6XYGMmBHMaCUoeacE Yjc23jzj4QWYG8S2rxx4fZ54DU+4Sa/rEvXmo6HZK5OxOk6AYXxRRHxzs0X+zBBitXux la/pfgh46ACLF9liXq6NuskJBrfusdqFtcBnNshqqpHNjcNLR5W7FioZQDFmQzn8c0Xu YrQwZ/I4Y6/KwSw9ItTkhSoq5nWBJBKklInnNozBvy4nxcy94TkEUyMbqDK9LOk9A78J 0GgCV6QnLfyeOPe9Xk7syLgf2m6owQmxzYrgSNemwXXk+Ila7U4p92ryV7rkNN8q8iQ9 mtzA== 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 n19si8151701pgh.219.2019.07.22.01.38.30; Mon, 22 Jul 2019 01:38:46 -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 S1728446AbfGVIbY (ORCPT + 99 others); Mon, 22 Jul 2019 04:31:24 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:35256 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727304AbfGVIbY (ORCPT ); Mon, 22 Jul 2019 04:31:24 -0400 Received: by mail-ot1-f68.google.com with SMTP id j19so906159otq.2; Mon, 22 Jul 2019 01:31:23 -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=qH9X5iNUAvdfUeKpd2p6uIpK5xHWBxmzhoraupHL3oQ=; b=sMenGcp3OTQN/G7+T0j7duv8w8jRGa3Tzbw72xbmVz5KMxSYNxv5IMVATO0rP+7F1C bK9IQwtWZeaGOcXyReF3FSpk7ZLVQuGK1ffQzMX92dYAVpEH6MHwcWwN5NhRu3QJLKkS wrQIOxrlJ2E7bNC2sL8/aEF5HHt223MZqS6oLG4zxSF3eR+wrwJrXFQcWErB6eWzeX5l qY6PWhuPw+Oiqrrdfgrk+7XLmbnpmljzAGg/hKFk0BvkvLyqKwLXFHHI8FzrysK3G3dW l9+zaDndADHJXSlFbJcjsrhOzEmxiAhqTc2ZZSiADLeTIsVlKZHKEn8qNg/+KgRucgXs MRFw== X-Gm-Message-State: APjAAAXpq/wQmLtl2WjomEAXZS5kglXRed+pooCtnnaxU7X26WUGK4mI 0mltvOaDgTFjvgzLZNeFzd7g1HDWpebeWF5QLwI= X-Received: by 2002:a05:6830:8a:: with SMTP id a10mr21838380oto.167.1563784283215; Mon, 22 Jul 2019 01:31:23 -0700 (PDT) MIME-Version: 1.0 References: <20190722023530.67676-1-skunberg.kelsey@gmail.com> <20190722023530.67676-2-skunberg.kelsey@gmail.com> In-Reply-To: <20190722023530.67676-2-skunberg.kelsey@gmail.com> From: "Rafael J. Wysocki" Date: Mon, 22 Jul 2019 10:31:11 +0200 Message-ID: Subject: Re: [PATCH 1/3] ACPI: Remove acpi_has_method() call from acpi_adxl.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_check_dsm() will already return an error if the DSM method does not > exist. Checking if the DSM method exists before the acpi_check_dsm() call > is not needed. Remove acpi_has_method() call to avoid additional work. > > Signed-off-by: Kelsey Skunberg > --- > drivers/acpi/acpi_adxl.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/acpi/acpi_adxl.c b/drivers/acpi/acpi_adxl.c > index 13c8f7b50c46..89aac15663fd 100644 > --- a/drivers/acpi/acpi_adxl.c > +++ b/drivers/acpi/acpi_adxl.c > @@ -148,11 +148,6 @@ static int __init adxl_init(void) > return -ENODEV; > } > > - if (!acpi_has_method(handle, "_DSM")) { > - pr_info("No DSM method\n"); And why is printing the message not useful? > - return -ENODEV; > - } > - > if (!acpi_check_dsm(handle, &adxl_guid, ADXL_REVISION, > ADXL_IDX_GET_ADDR_PARAMS | > ADXL_IDX_FORWARD_TRANSLATE)) { > -- > 2.20.1 >