Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2663974pxb; Tue, 12 Oct 2021 10:54:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvYKAgZo4PslSred0AkHBr2N1xZLBZaamSOYoxoY6L+CUAiGaTJrFQrnnxDOUK4eWbOv8F X-Received: by 2002:a17:907:2bc2:: with SMTP id gv2mr33940154ejc.433.1634061275223; Tue, 12 Oct 2021 10:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634061275; cv=none; d=google.com; s=arc-20160816; b=xoq68Kl9ZLYIWIUcSzOVj/aODTaKu3hpYJ+E9CAOaf4p4a3SCnQmspBI9AwW/zJuD2 vflTdeo9hJ47ec2MpH5MDWLJxvAfuIJhxdDTVeMH54GlvUMaNHznKwRq2D/tIYmgwq6p qkYi/FS3FwttmkGwXvM300o6MIojOPVE55VR5hdZHiDsjA+T3//GHzYD5f8qOnOeciJr 7K26v2MXznRPchmTdMC7NKiImzWfV9n5SPMPNCQLpvk+ZfxsKkwwUeXk4JzHhaUlr3tu VpYfZHosrbPtj4DgkqL3MGB+w3M/HU7j1SGW/EHHFXTd0pb6l/FrdMONphHRbXMsW0vQ 5umw== 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=PHXD/sQCUK8UZIdrSO+NhiRETw6h8YXu4sJf6lCXgDg=; b=1CxOiJgrCSAy7kXfVU5GpzoxkQ03FNu6cmUKWnYls/K02Uyyd5rneqluZZ72CvylF7 GHmhD0VZsjHqFdB4fWQD4NvaFK8xCCPLHpZRFb9T28bRUZ/riFDfJsYECQhnL2zdJ/Cs nR37Yfju7YEHO+gW43mKBezl6QrUG1a7SyehZoFc/wPG3vMKKuZiN/9LE0buez9bzVDE lxZ7aeBN+VLzfzmGLb0YVVvdmA1ENqA4hfIamf5Zo0kDV3PpDCjr4Qp6AgxGDnn2PCwA L279inFfnrd8T6mca7fBRlYNqYe3T/rUt3AkKsTG+gXgTj/FDJZ00+Suuk+1q4coTbB8 jH8Q== 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 gz15si19320219ejc.141.2021.10.12.10.54.11; Tue, 12 Oct 2021 10:54:35 -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 S233435AbhJLRxz (ORCPT + 99 others); Tue, 12 Oct 2021 13:53:55 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:54182 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbhJLRxX (ORCPT ); Tue, 12 Oct 2021 13:53:23 -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 6bc65ade955083a8; Tue, 12 Oct 2021 19:51:18 +0200 Received: from kreacher.localnet (unknown [213.134.187.88]) (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 0739766A819; Tue, 12 Oct 2021 19:51:17 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Ben Skeggs , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH v1 2/7] nouveau: ACPI: Use the ACPI_COMPANION() macro directly Date: Tue, 12 Oct 2021 19:44:21 +0200 Message-ID: <21245442.EfDdHjke4D@kreacher> In-Reply-To: <4369779.LvFx2qVVIh@kreacher> References: <4369779.LvFx2qVVIh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.187.88 X-CLIENT-HOSTNAME: 213.134.187.88 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtkedgudduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppedvudefrddufeegrddukeejrdekkeenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeejrdekkedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegsshhkvghgghhssehrvgguhhgrthdrtghomhdprhgtphhtthhopegurhhiqdguvghvvghlsehlihhsthhsrdhfrhgvvgguvghskhhtohhprdhorhhgpdhrtghpthhtohepnhhouhhvvggr uheslhhishhtshdrfhhrvggvuggvshhkthhophdrohhrgh 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 --- 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);