From patchwork Tue May 28 19:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6131BC41513 for ; Tue, 28 May 2024 19:31:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D21E3DF9; Tue, 28 May 2024 21:31:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D21E3DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716924677; bh=Z6OKxgSrUBb60RuBVWuMNXGMh/m2BPwjAQIW4pcCv0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=D3bWezq5xEzdNCdlD2jw2uoxoNkPEmVnYPCcKvRjOAlhJxj4RcfsxWisHWrkK041q HEe51ueGOYYyNU03MxCjCSWBzXFUJdlIKKyRiW4zMyHy+DGQXdlMN28W9ME4JCn6zD CwgyqPbKvOKSZe33O3j26UW4EJhJKRyQUelJ16Gw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 31585F805EF; Tue, 28 May 2024 21:30:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 857B1F805F5; Tue, 28 May 2024 21:30:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E67FBF80149; Tue, 28 May 2024 21:30:10 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3545BF800AC for ; Tue, 28 May 2024 21:29:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3545BF800AC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cKM7mB1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716924601; x=1748460601; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z6OKxgSrUBb60RuBVWuMNXGMh/m2BPwjAQIW4pcCv0w=; b=cKM7mB1Aa00i75oO9nYnsPZPHJesdypqGuObu/2YxRe+SRWiwtK3HEck RaUiLA2jE4QJOLNH+Twpote0uZyB5bD87upfFa8iCY4CnFfw/bI2LJC9S EDBKWYyIJqNmaSS4VY2m/EjBZaQ8ZfCY6JeTFvmq4TaKwCN2mi7MfrEaN h0/9m/I0Ei/wkwBELOm1MtMBwvy22KYgaNaQnYwOZTMbSJ58Gn8fFowZB lwqUvskfdkNdBLhwo9Pw7bU3JI/g0GKeM99mS1xX4hH10BnhKDGKgHG0R jQOpdg/09oGGegNTdx/yYhOafD9sz+q0YG/qlf+l4ytfhMFGsB5dCHTf4 w==; X-CSE-ConnectionGUID: zomiYKyLRYivNi/JLvcejw== X-CSE-MsgGUID: PV1JNpzbRryT5akHVXo9Vw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="24711840" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="24711840" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:53 -0700 X-CSE-ConnectionGUID: inouwosHR8CM4lIsH+BWwQ== X-CSE-MsgGUID: oU18+uUSQoC3Kmgtkw20Tw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="35246717" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.237]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:52 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, rafael@kernel.org, vkoul@kernel.org, andriy.shevchenko@linux.intel.com, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Bard Liao , Len Brown , linux-acpi@vger.kernel.org (open list:ACPI), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/3] ACPI: utils: introduce acpi_get_local_u64_address() Date: Tue, 28 May 2024 14:29:33 -0500 Message-ID: <20240528192936.16180-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> References: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: WCKSNMZWSTL3SV3DTJZ3HBHX5RNDX6N3 X-Message-ID-Hash: WCKSNMZWSTL3SV3DTJZ3HBHX5RNDX6N3 X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The ACPI _ADR is a 64-bit value. We changed the definitions in commit ca6f998cf9a2 ("ACPI: bus: change _ADR representation to 64 bits") but some helpers still assume the value is a 32-bit value. This patch adds a new helper to extract the full 64-bits. The existing 32-bit helper is kept for backwards-compatibility and cases where the _ADR is known to fit in a 32-bit value. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Acked-by: Rafael J. Wysocki --- drivers/acpi/utils.c | 22 ++++++++++++++++------ include/linux/acpi.h | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 202234ba54bd..ae9384282273 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -277,15 +277,25 @@ acpi_evaluate_integer(acpi_handle handle, EXPORT_SYMBOL(acpi_evaluate_integer); +int acpi_get_local_u64_address(acpi_handle handle, u64 *addr) +{ + acpi_status status; + + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, addr); + if (ACPI_FAILURE(status)) + return -ENODATA; + return 0; +} +EXPORT_SYMBOL(acpi_get_local_u64_address); + int acpi_get_local_address(acpi_handle handle, u32 *addr) { - unsigned long long adr; - acpi_status status; - - status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr); - if (ACPI_FAILURE(status)) - return -ENODATA; + u64 adr; + int ret; + ret = acpi_get_local_u64_address(handle, &adr); + if (ret < 0) + return ret; *addr = (u32)adr; return 0; } diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 28c3fb2bef0d..65e7177bcb02 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -761,6 +761,7 @@ static inline u64 acpi_arch_get_root_pointer(void) } #endif +int acpi_get_local_u64_address(acpi_handle handle, u64 *addr); int acpi_get_local_address(acpi_handle handle, u32 *addr); const char *acpi_get_subsystem_id(acpi_handle handle); From patchwork Tue May 28 19:29:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA75EC25B7C for ; Tue, 28 May 2024 19:30:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C8B0EE0D; Tue, 28 May 2024 21:30:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C8B0EE0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716924656; bh=jhpfqMAGii1QKtIKhhNyRYse2i/DMgLOIM+NJMRllAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HEOuMiqglCemOiAGe58731tdgDy6aYsSza2iAcODf2YPhvqLbSkkIWxpF4jqNfGwQ vm3qY+keyIJKYl1Bp9cQngK1498Nd+RLZrM9O1QE98A02QhwXnVaYdi9WC6GTVMaem votuif4GCCq/q68F5tpRX48gdFghD7nRnM3g2Yq8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07721F805C9; Tue, 28 May 2024 21:30:13 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4457BF805BD; Tue, 28 May 2024 21:30:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 992D3F8047C; Tue, 28 May 2024 21:30:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 157BFF800E9 for ; Tue, 28 May 2024 21:30:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 157BFF800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nP1WWx3M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716924602; x=1748460602; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jhpfqMAGii1QKtIKhhNyRYse2i/DMgLOIM+NJMRllAo=; b=nP1WWx3ML/gRHD9qH5SkxlLXUM1k8N+8ezDziv3dm0Nmsngg5Csy4t8E /YhBqN5XKSPJnd+rhCr9EYIq5XG0fLOhlcIX97ocbI1t53aZyhz4NLj92 s/LGc4ytnTLW52de9J0UYzK4NiGveIj9PuXhs51jWY2Tds/dLv5FRNEpi Dm76JBEzDPUgLGgEBYpXmvjJUxMKxeOlSz6T1R3p0UsYjUfkNlBn1gAjK LBefsi7uRrVZQZkT0pKm9QOKOlEHaSzFHK1VRaHUPh2EIFe2FmtG1syfa zD+r+5AE02H2gUPCXRnf/qBSWILiiM3CnzfqYwzhQSraNyagRH3NVXCQK w==; X-CSE-ConnectionGUID: tQBDvYvNSzKxuIWQ/DluQw== X-CSE-MsgGUID: NpMH9Ln+Sd6VJyOVjgmtCA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="24711845" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="24711845" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:54 -0700 X-CSE-ConnectionGUID: IMefETndQcyMYWtPaOeU6g== X-CSE-MsgGUID: Qd0KmJVNRCmMoBqsIxJazA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="35246720" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.237]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:53 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, rafael@kernel.org, vkoul@kernel.org, andriy.shevchenko@linux.intel.com, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Bard Liao , Sanyog Kale , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] soundwire: slave: simplify code with acpi_get_local_u64_address() Date: Tue, 28 May 2024 14:29:34 -0500 Message-ID: <20240528192936.16180-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> References: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: TUAVU43MHEFMAW5H2DEF6GJUU6XO6XR6 X-Message-ID-Hash: TUAVU43MHEFMAW5H2DEF6GJUU6XO6XR6 X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now we have a helper so there's no need to open-code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Acked-by: Vinod Koul --- drivers/soundwire/slave.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 9963b92eb505..f1a4df6cfebd 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -97,18 +97,13 @@ static bool find_slave(struct sdw_bus *bus, struct acpi_device *adev, struct sdw_slave_id *id) { - u64 addr; unsigned int link_id; - acpi_status status; + u64 addr; + int ret; - status = acpi_evaluate_integer(adev->handle, - METHOD_NAME__ADR, NULL, &addr); - - if (ACPI_FAILURE(status)) { - dev_err(bus->dev, "_ADR resolution failed: %x\n", - status); + ret = acpi_get_local_u64_address(adev->handle, &addr); + if (ret < 0) return false; - } if (bus->ops->override_adr) addr = bus->ops->override_adr(bus, addr); From patchwork Tue May 28 19:29:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA478C25B78 for ; Tue, 28 May 2024 19:32:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0FEC4EC1; Tue, 28 May 2024 21:32:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0FEC4EC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716924738; bh=yrLkMNL0vjGtPcpJMxCjfDCJZd9eHDtZHTZMrLNb4lI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uIGJEaTzaNXB6497kH0LdLcW0aolYqOBp9JKNPZNwHk5lDH2zs5vmUHnV7mu6Ve1R taZOtDSRm8elrsJyg+3nl4I57tQyFHOPchy85NEDLKkrDN8IR3cHlUu0cANC8A5yFE wYPD/WcsEBfXSpyolSs0UOyAoa/hQh/u6RpMXsNE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 11D61F805A0; Tue, 28 May 2024 21:31:47 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B094EF80588; Tue, 28 May 2024 21:31:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7693CF800E9; Tue, 28 May 2024 21:31:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4C6EDF8026D for ; Tue, 28 May 2024 21:30:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C6EDF8026D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Qwx2MQrs DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716924603; x=1748460603; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yrLkMNL0vjGtPcpJMxCjfDCJZd9eHDtZHTZMrLNb4lI=; b=Qwx2MQrsQHNs8Zp1wk4KvWTTA28mt4jF2E4yVqqW3a2VekSlpP6BwcSa +tEP+GwLKKl/OT7rM4PjjeS+TZt5gLLDbvBqhwZntHuwtPt4u9SlGIrm6 2L8+7pOx7wruqCNB1FPU1SrsR/Q8S9rqmxcnBYC1lLt14uXildpa4xCt2 YUaeZFhGcWTNtXjQlOAtFLoY1zyKFFfIjImrT2pNqqVqf1WYilLcQ8KF2 oCEwoEJYYL5BN5ZEncZTroUOGQMwSLtWAduPg6OualfjJ/suBcRX/KGf3 IeQY0FbVg+M799mexzbIMJ4Se3ga9Dnp3Z1c+27SVRKRxM6/vcMQ1CW6R A==; X-CSE-ConnectionGUID: +3vTUN2sSQi/iY2RJPC8Fw== X-CSE-MsgGUID: a/sNb5VDT2ih56OXGIfEWA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="24711849" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="24711849" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:56 -0700 X-CSE-ConnectionGUID: oPjQrdN/TZOsComV4T9Q5g== X-CSE-MsgGUID: dw+3EAeBTcyrDD4eXkFDRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="35246723" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.237]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 12:29:55 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, rafael@kernel.org, vkoul@kernel.org, andriy.shevchenko@linux.intel.com, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Bard Liao , Jaroslav Kysela , Takashi Iwai , Rander Wang , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/3] ALSA: hda: intel-sdw-acpi: use acpi_get_local_u64_address() Date: Tue, 28 May 2024 14:29:35 -0500 Message-ID: <20240528192936.16180-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> References: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 2FKNRIXJ3BLENCKI4NIWIRU6ZROGB3CP X-Message-ID-Hash: 2FKNRIXJ3BLENCKI4NIWIRU6ZROGB3CP X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now we have a helper so there's no need to open-code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao --- sound/hda/intel-sdw-acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/intel-sdw-acpi.c index d7417a40392b..f3b2a610df23 100644 --- a/sound/hda/intel-sdw-acpi.c +++ b/sound/hda/intel-sdw-acpi.c @@ -125,11 +125,11 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, void *cdata, void **return_value) { struct sdw_intel_acpi_info *info = cdata; - acpi_status status; u64 adr; + int ret; - status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr); - if (ACPI_FAILURE(status)) + ret = acpi_get_local_u64_address(handle, &adr); + if (ret < 0) return AE_OK; /* keep going */ if (!acpi_fetch_acpi_dev(handle)) {