Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3609629pxb; Wed, 13 Oct 2021 09:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx44wHnZjCpH+nI7Mb8feJ4zpJ65O7AnO6wtQB6nlS1mU9Ujj6ZAZrAOxA1KEJgO6Ji3TeB X-Received: by 2002:a62:3383:0:b0:438:4b0d:e50e with SMTP id z125-20020a623383000000b004384b0de50emr38703142pfz.9.1634141929719; Wed, 13 Oct 2021 09:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634141929; cv=none; d=google.com; s=arc-20160816; b=inOaAEy5TrRaANhHovJO9IpWG8QPwiOC/5R2pB8OQelpse42+UGqQhCbYBP2UGdrYZ p6kLUTKHm+2sF8s/gexuV91jyx4MJW4peuSnxuXr1G5ITDkGFJOudzxKPc1zz86Azc6i a2xYm8AOLkNNHqAiUeGBVZUNCmng5cKlGZHR348K+I2NyvnvhcoQO2QlfMi3YRgtYfgg l4sGgDZMPOMPDlvdfxswEAUZVB6Up1sRLpguXbksV5SATqzKY2PVFW6+B8Cz/wZdB3bf x5zEykoZppk2dxibYv/eGYDtdSFFwAy/SmxkvtKxY4AbbrkJdeGy0Oh/MoQeuCs23P6J bcIA== 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; bh=73IKRzLLfCBtHEfy8ov5cCQpgkQgxgdsxUO0mevi1o8=; b=lMhV/R81MSmf08JMzRHCl587bbu0XKHMh7jIbfo/VREHHx1kcNVkrSxcWBHSMvpMfO bUmydnHsdNGHO0AWtTOIlugn8sBW5YHIp7aT+7Ib+9EJMVUmPfTeZVSvkbH+uIdY95cG jI+OW6Mvzi5Xbu/+JX1x5oS/Xv2SsBYsSR+KTMBUyrqNArIRxWdF2vV63rfBh+wDEJgu z/KoPCB1qYXQWQmnZ45ihhTtyj/YExVEVVIs8r8GYeMb2Qaw+GwEbr3k787Cj3TdFf5o HhFK7eMzM/uZUqKKANZnmG9xrIsY1TV/xVVN8rv4fFsJTigsExQKCcgT1MqftRcI0ZGn HDiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si7463pjd.41.2021.10.13.09.18.30; Wed, 13 Oct 2021 09:18:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237573AbhJMQSx (ORCPT + 99 others); Wed, 13 Oct 2021 12:18:53 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:45710 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236390AbhJMQSm (ORCPT ); Wed, 13 Oct 2021 12:18:42 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 3.0.0) id e673114f1b2a8378; Wed, 13 Oct 2021 18:16:37 +0200 Received: from kreacher.localnet (unknown [213.134.161.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id E6D8E66A871; Wed, 13 Oct 2021 18:16:36 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Elie Morisse , Nehal Shah , Shyam Sundar S K , linux-i2c@vger.kernel.org Subject: [PATCH v2 3/7] i2c: i2c-amd-mp2-plat: ACPI: Use ACPI_COMPANION() directly Date: Wed, 13 Oct 2021 18:09:39 +0200 Message-ID: <1823250.tdWV9SEqCh@kreacher> In-Reply-To: <3647069.kQq0lBPeGt@kreacher> References: <4369779.LvFx2qVVIh@kreacher> <3647069.kQq0lBPeGt@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.161.244 X-CLIENT-HOSTNAME: 213.134.161.244 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudeljedguddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppedvudefrddufeegrdduiedurddvgeegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiuddrvdeggedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehshihnihhurhhgvgesghhmrghilhdrtghomhdprhgtphhtthhopehnvghhrghlqdgsrghkuhhltghhrghnughrrgdrshhhrghhsegrmhgurdgtohhmpdhrtghpthhtohepshhhhigr mhdqshhunhgurghrrdhsqdhksegrmhgurdgtohhmpdhrtghpthhtoheplhhinhhugidqihdvtgesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION() macro and the ACPI handle produced by the former comes from the ACPI device object produced by the latter, so it is way more straightforward to evaluate the latter directly instead of passing the handle produced by the former to acpi_bus_get_device(). Modify i2c_amd_probe() accordingly (no intentional functional impact). Signed-off-by: Rafael J. Wysocki Acked-by: Shyam Sundar S K --- v1 -> v2: * Resend with a different From and S-o-b address and with maintainer ACK. No other changes. --- drivers/i2c/busses/i2c-amd-mp2-plat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Index: linux-pm/drivers/i2c/busses/i2c-amd-mp2-plat.c =================================================================== --- linux-pm.orig/drivers/i2c/busses/i2c-amd-mp2-plat.c +++ linux-pm/drivers/i2c/busses/i2c-amd-mp2-plat.c @@ -246,12 +246,11 @@ static int i2c_amd_probe(struct platform { int ret; struct amd_i2c_dev *i2c_dev; - acpi_handle handle = ACPI_HANDLE(&pdev->dev); - struct acpi_device *adev; + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct amd_mp2_dev *mp2_dev; const char *uid; - if (acpi_bus_get_device(handle, &adev)) + if (!adev) return -ENODEV; /* The ACPI namespace doesn't contain information about which MP2 PCI