Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3611402pxb; Wed, 13 Oct 2021 09:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgcbK8dZQ8LHX97xFOmEassAyktsm7pJBS9PHlkNrNwIH3LojFum4pKrMV3Q/Mz9cJQIkM X-Received: by 2002:a65:6854:: with SMTP id q20mr75773pgt.228.1634142064967; Wed, 13 Oct 2021 09:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634142064; cv=none; d=google.com; s=arc-20160816; b=YD6+oCwf6rWeXvWLEw04gv3KthKX86/5484dgt9XVUrpvYoGgmpfQlf/xxXT+8sHjH BgXeXqugtLk/KnMXiy63qeMdBojwbrRicIt4Ju7H+Xk0H7GmUl3rQD/jObjqRkWziTBY uTIRZ2lTJ9jQdJu28nuBlYSvnyfdF50MBj6Kvw3fZJMwF4rIdS/cVoFq7PEyX2Xi6asB b+odz4AStoZ0CDsdY9Karw2LOV5Qk8BgaEZZ3qW+h88QlD1+rtB0b6cz3a21hGC/FYwA aaVvSrl8DAavS7Mxyg30nIY/AvtIOda/eVE05uWVRG8PBBot3PzIeJANXnu6M8TuDkvN KRew== 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=L7/AY9rSs0n7JMnqUiSwWwQ26ns4z+1LSwKKGTUUFsQ=; b=sLd7MecZ7nlppnBsH+9nQ1KDLw/+CpZWYX5V9I6UGkTwuD+vyFIsC9TlM06XuoirLT HGa700RS0vnyCof2pkl5aYvG1VcMMUVzy/uPsQDJ5eCDtAkAiLc7SyQvUN1xemPxsnKh 9cX7fBJMZKfSS/65I1r2fM+77Abe7nqevTV8EGuuN5yi93d7v3gx5RtCVHWkz+FASFYH V1n/JPXLGEOfamT/JZt6sOdpsEsdvLMX2dBOpc0BTRyx8hv3VKsTQjUPN4wYVcDWAHee vDh3rH6B1FcKFM3cPhv9rM7RYgl6sWdqZtHe0QyQFdJS6YJYEG+IwT/JpjYJdvS1tDuX HqCw== 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 e27si21166441pgb.335.2021.10.13.09.20.46; Wed, 13 Oct 2021 09:21:04 -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 S237264AbhJMQSz (ORCPT + 99 others); Wed, 13 Oct 2021 12:18:55 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:47994 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236499AbhJMQSn (ORCPT ); Wed, 13 Oct 2021 12:18:43 -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 f7a05deb65d81dcd; Wed, 13 Oct 2021 18:16:39 +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 77EAD66A871; Wed, 13 Oct 2021 18:16:38 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Ben Skeggs , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH v2 2/7] nouveau: ACPI: Use the ACPI_COMPANION() macro directly Date: Wed, 13 Oct 2021 18:08:06 +0200 Message-ID: <2240749.ElGaqSPkdT@kreacher> In-Reply-To: <21245442.EfDdHjke4D@kreacher> References: <4369779.LvFx2qVVIh@kreacher> <21245442.EfDdHjke4D@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: gggruggvucftvghtrhhoucdtuddrgedvtddrudeljedgkeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvjeelgffhiedukedtleekkedvudfggefhgfegjefgueekjeelvefggfdvledutdenucfkphepvddufedrudefgedrudeiuddrvdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduiedurddvgeegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepsghskhgvghhgshesrhgvughhrghtrdgtohhmpdhrtghpthhtohepughrihdquggvvhgvlheslhhishhtshdrfhhrvggvuggvshhkthhophdrohhrghdprhgtphhtthhopehnohhuvhgv rghusehlihhsthhsrdhfrhgvvgguvghskhhtohhprdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 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 nouveau_acpi_edid() accordingly (no intentional functional impact). Signed-off-by: Rafael J. Wysocki Reviewed-by: Ben Skeggs --- v1 -> v2: * Resend with a different From and S-o-b address and with R-by from Ben. No other changes. --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) Index: linux-pm/drivers/gpu/drm/nouveau/nouveau_acpi.c =================================================================== --- linux-pm.orig/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ linux-pm/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -364,7 +364,6 @@ void * nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { struct acpi_device *acpidev; - acpi_handle handle; int type, ret; void *edid; @@ -377,12 +376,8 @@ nouveau_acpi_edid(struct drm_device *dev return NULL; } - handle = ACPI_HANDLE(dev->dev); - if (!handle) - return NULL; - - ret = acpi_bus_get_device(handle, &acpidev); - if (ret) + acpidev = ACPI_COMPANION(dev->dev); + if (!acpidev) return NULL; ret = acpi_video_get_edid(acpidev, type, -1, &edid);