Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3521917rwb; Tue, 16 Aug 2022 04:43:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4HiMCD10kxPGWzKfrqBwML6UTdQNw/lsWf4DChgHqsgIkFJ+nbmXrafEt+bz1B6oqBChP7 X-Received: by 2002:aa7:da92:0:b0:43c:c5af:d5c9 with SMTP id q18-20020aa7da92000000b0043cc5afd5c9mr18885603eds.10.1660650230023; Tue, 16 Aug 2022 04:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660650230; cv=none; d=google.com; s=arc-20160816; b=Y6hJF2LUM8p6Rse0OxHk8dQeQ4C4tixxlP06Pfrh+GDgIL+cFTFn4Iy0GswvzaA/Yf i8ps+9WUx14+uR4lcDX+fBxXxa1li7mP2lcee3nukz6K/Fr6lDrpoavT+3sY4BdLx2CZ vR/1NExtrL7VJIgggd+36RRYYhS9EOfa5pwjTTLBWR7wt8eyzVIDR6Y8T0qcBCsPsTat lkKmzkZMLPNxvCpoGuMAVlRJ/mKSDJ6BZhkDQK6jB3K+JNgUlsTeomiFNPczqtGceCCj 4/awUPsiUOlBzR7YvnGMQwRfGwLtO2+HLaWeKQ7pqXCssUy6VN8+Pd2s+8eZKJFQOh3c Z8RQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l+SGJPdcYi76JopgGMXgBFsASOeJs2HMHEk5pVFj5n0=; b=Id36iWheIPo9FLGAU5pTgQjgg55iOnRnlvsnOFTU/n4gBCPWAwnEj6k212qgZuceML tA3NfgrJRo5zngVOsuIWV0TibHaZIcHPCp7ToJgLjt4RK5HmjzON/rITdKF+JFauIh8j uK2sFMXjuq66ePoFlkX6m/gx7Hc5scfcFixyanflPasRXmXfK3fGp1b9CmGM1Oqxcn6d rIgRjh87BMFMyrX+3qEay0cVKEckGro0mmwsHe/QkgATIonu6cHs/pjPARWLwgp/6QJu Pgw49egqfKYVV8vUBfHoDIrBxzY2E1Qf3+eMdOd4JZ/hFsFXXVV1PSnAg0XBY3pZlsHv 3grA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="lR/md7d8"; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz1-20020a1709072ce100b0072b33152db1si10625361ejc.858.2022.08.16.04.43.24; Tue, 16 Aug 2022 04:43:50 -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=@intel.com header.s=Intel header.b="lR/md7d8"; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234938AbiHPLDm (ORCPT + 99 others); Tue, 16 Aug 2022 07:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbiHPLDS (ORCPT ); Tue, 16 Aug 2022 07:03:18 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4D4167F0; Tue, 16 Aug 2022 03:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660644993; x=1692180993; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mxszK3Uza1MCMV3HzBQlULox8ga77e1nNvJrjaRmYY4=; b=lR/md7d8cJeq4rKvovu+Y/XN1TmS8NlzIolo/wY6wqduLe7TqhxG6/60 5e631+NOSfnQ2Ljo2vgMAy6P/6JdAXE6P2FI8ktInxEIJZxm0Dqz8S1cl Jq7Ch2uVugr9EZ21oLN3cullSpJhp5j4gs8KBgJq1FvQAdv89ak1DbhmC s5CDa7GIsM5DNXGwamoL08tlMAy+4r3vzUnSN4OXpt5dnljGcY44yr5gj lSp4xOqnC3yIyiV34BRIstCwXuufcJQ7SAbwtw0wgANTXxYXNSQAkr3Wp X4s8t2lLmU7oZsEnZSb35Hjfgn5i8WmP4UY05WAElBmH0MAd7oIIVrokh Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="279141282" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="279141282" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 03:16:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="749260778" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 16 Aug 2022 03:16:26 -0700 From: Heikki Krogerus To: "Rafael J. Wysocki" , Greg Kroah-Hartman Cc: Utkarsh Patel , rajmohan.mani@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 4/6] ACPI: APD: Use the helper acpi_dev_get_memory_resources() Date: Tue, 16 Aug 2022 13:16:27 +0300 Message-Id: <20220816101629.69054-5-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220816101629.69054-1-heikki.krogerus@linux.intel.com> References: <20220816101629.69054-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org It removes the need to check the resource data type separately. Signed-off-by: Heikki Krogerus --- drivers/acpi/acpi_apd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index ad245bbd965ec..3bbe2276cac76 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -60,12 +60,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata) } #ifdef CONFIG_X86_AMD_PLATFORM_DEVICE -static int misc_check_res(struct acpi_resource *ares, void *data) -{ - struct resource res; - - return !acpi_dev_resource_memory(ares, &res); -} static int fch_misc_setup(struct apd_private_data *pdata) { @@ -82,8 +76,7 @@ static int fch_misc_setup(struct apd_private_data *pdata) return -ENOMEM; INIT_LIST_HEAD(&resource_list); - ret = acpi_dev_get_resources(adev, &resource_list, misc_check_res, - NULL); + ret = acpi_dev_get_memory_resources(adev, &resource_list); if (ret < 0) return -ENOENT; -- 2.35.1