Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp189249lqb; Tue, 28 May 2024 12:30:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTEZf9vpR1Fyp0Z9Cc6NlId7Lp7c+3hnnINXjigAEyFaA2V+WFg5OBoEqvJE/LSFvKNZxs9CXkT8UGNynHEdpclpQy1wRozPO9tokn1Q== X-Google-Smtp-Source: AGHT+IEy1cCZWWAZxH28D+Z1WVTEHrcB0yMTbZuvQ0KmH0wjYQ8HRO+rHGusn7HJYsafB3C7Cx01 X-Received: by 2002:a9d:5d04:0:b0:6f0:6361:2d86 with SMTP id 46e09a7af769-6f8d0939523mr16273605a34.0.1716924601498; Tue, 28 May 2024 12:30:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716924601; cv=pass; d=google.com; s=arc-20160816; b=Ot3Su9BsnLqAu9bbDIUBEiPjgrA1dPPwfl8OP9OIAB86Oi4v4gscUv9nEqGVt4jbC/ +kyT8CHNe20qyuHug2WmFTQactk+wC7XxShnf4UvvctDy/XsF2XdaB6F9UES2QvXoKzQ sKCK8ZgaLb0KoFkhSzTlf1TX70pANnTJjF9z3w3XnTRJxeRKk9KHkvfnO8ME4HKmDcGV I4iprOqC6u8Je7DcEAGN8yYlCZCQolWEgu1ZQgsG9vxYMb+yibdraO/O7rpOAXa/feQX FGmpHHtgXdwLmOeVQVMgXQ5IGSs2R99ExI36Tpo7k94ZtZ2fG8yBaEYRKTJDZjBCyrot 2hOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7cHjVkZ15hgmaBtbjBoSOKh2z7O1i0y2FMBuB11Xn6A=; fh=GGXWDQosMI4R3Ipg6mtv1nJbw6bJWLhei8APiIfSPSY=; b=JX/I5a1A54uHwH2uvZlqVwTjLAfjcHfsEzvffXYeinUo3uxQEr0ZMkgcjtCgDRN+Qm yyNJeZ88wM1Lcsqc14oDWfMVv6qz5x7a1FzcYnepQU7EAohEO2Hu2e5QGAdq9A2oUAER JUPy1BcmiDunMrm5BBJ843ZfWEcRGqndX9ZQ378kmNaCTwOQrXXYDFc3bbitkZH0TELy vIoR739MZFXRqspD0SIVOHNDSFmQyhJQzNSlamLwyul7g5B53d5dFE+2LjKGTGwnFWyD 4aoM0OcHd7gE6/wh745xmy6X0FykiVRVXtnVwbSpd2JOIsOFWDDZQxYMl6cpO3YIaAnj oTvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dJ8PfbFB; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-192939-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18c5b67si122443921cf.606.2024.05.28.12.30.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 12:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192939-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dJ8PfbFB; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-192939-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 38ECC1C25039 for ; Tue, 28 May 2024 19:30:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FC50174EC2; Tue, 28 May 2024 19:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dJ8PfbFB" 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F98C171E65; Tue, 28 May 2024 19:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716924596; cv=none; b=ZuvZs1dfb9D7qDjs2AznGu6EUusmz+l9a0aibRqUYZUGik+c3MwBSgJwBBdOgoqBTofh3oC+loukfF3OMX0jchLlIZXlfK+q1UaNiiH+cmCJX9jeIWbjplnEn1wu7/piI1URgAxj1SVGECT8e0+rxHbsIRxyALhVBuuqcdR0N4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716924596; c=relaxed/simple; bh=jhpfqMAGii1QKtIKhhNyRYse2i/DMgLOIM+NJMRllAo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ozXt3B6wKvzn90FMgC4WCafdTuNI8HQX2CDTiZjvV2McyaYZBqpDeHX6GZ2Qjw1hkJkZ9BKlF2PTA1gj4IgmtkpJm3UcVnd3+kz0eS0hID47QK32Pv+TltbDj/1qxaY2UXx2cwdQk7XjqM2n9S55ZwDzQsF2Xa68n7ePtYq0dlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dJ8PfbFB; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716924595; x=1748460595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jhpfqMAGii1QKtIKhhNyRYse2i/DMgLOIM+NJMRllAo=; b=dJ8PfbFBnYQkyNDiarxPY3QCZOHip6+a+a8yWx5Vr89RNQmMQLot44kk 2RIuEcQxG5zJ2Bn7Ngi2MPTGHQuAjO4t7BanMfrME99sZjDlwrch+Msky pQwTrdPzu5dg9MfojvRrOYq0aZdEkOUfPJL9jU/SmVopKbrF2muPAmW9T wX+fBvJmXHaxT2J6VCL31we5sQQ4nhLjCQ+2dkYYhIYvPGoi5ZKfu+GCJ g9eo6LsjQJni0yZoM40D4Vt2akXFZKkYT4YIYP9+vlQ9F0ZFTst+PE7CC ilBJ/ddzmK5Sr2F3pJoWbJeh+2geosgbE9A+BiQPiLneqPgGsM1kBYskB A==; X-CSE-ConnectionGUID: VufqV2NoTU2/HBWAxFZoCw== X-CSE-MsgGUID: J0ZErrkUTLqJk/iD5FWGcg== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="24711843" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="24711843" 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=C3=A9ter=20Ujfalusi?= , 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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); -- 2.43.0