Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2856700pxb; Tue, 12 Oct 2021 15:07:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/D2xgEsiajISXAkoSwgUwfl/AilOWv6pld8Vda3pgmzh7oFZK5SGsQe3AcR1LaYtumBZV X-Received: by 2002:a17:906:c1da:: with SMTP id bw26mr37251504ejb.253.1634076421806; Tue, 12 Oct 2021 15:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634076421; cv=none; d=google.com; s=arc-20160816; b=Rl3BobsNLymwHfmRV6hnqrtY4378hgJukva4n+4K5gZfeUdN7/RuqGrZns6CXb9EUf /lLffdir+B1SBpo0IU9ATOQ8pjxNLUBiIXC5usZDReftLbMJrSzEixJad8m5PqG8IrTc Fn+fZ3i/+fR9BWufdbVZFnr8OiNdLCGICbUkAQmWL1D3LC5blLKFjMdvfkf7cm7hT+db TGkO5sJWhzKEerT/XLIKJ0b8XaY91ljFJCc3dt7T4IB9o8iAYn5w8kCSOmvXmMRQhQn5 9maNWhzGhSJ2XM2olifkiM4RsunTCfFg5jfqNLrsqdC8tnRomEtO8D0dwm99HEp8uuR+ /I+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=auG+UMx9zytYp9lINzhPZO9u/TFK5cE+R08OejH5B0w=; b=U0onzymeO7ESSmXNuMZwLbbJK77Q1xQA4h4SMlxG6pNuqMUJpQGq2JjV2SUuZgqpfp 1+G9u6kLwSx0ky/OjtdPDFc+TJ0VhBSAifqrCamFt9yLbZDIMpJe6O3bfprGv+7SZpPe b0IkJAlOnylpPJ8C4tvY/zAb3mIFD7LJihddn47hdAbXmIx2uJewlkztts6yuLoQYa95 GR0CEN9NwoRWzGDuF3l7rwRNHftsgLSjGDzl5iLQDbCVy45iFN3Y68tRAXpY9BQCDHDU zUluujebMbtFb9JJppd/qL6VjyFbkrtcQ9YzU4skULF/3gNcMQWXRd6MMMGxVaOHXbl4 r7Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ne7652o0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si27860356eda.344.2021.10.12.15.06.37; Tue, 12 Oct 2021 15:07:01 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ne7652o0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235718AbhJLWGV (ORCPT + 99 others); Tue, 12 Oct 2021 18:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232260AbhJLWGT (ORCPT ); Tue, 12 Oct 2021 18:06:19 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5788AC061570; Tue, 12 Oct 2021 15:04:17 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id g6so1747427ybb.3; Tue, 12 Oct 2021 15:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=auG+UMx9zytYp9lINzhPZO9u/TFK5cE+R08OejH5B0w=; b=ne7652o0LqsXxa1F1cgXnxgCK2bxwNWHDrsyhUBtlAmcbIV/AtPK8pJIgvmbUIbEaD h92TyPmec2iTl0SXhH/vi63WZzRK7W9caxUYKHcMVdC227jK67QU7owKiG83zjMU3MBb bb61mGP/yDMpyVAZSY0IJkRZEr5mk50g0hAEHr7RL+q8EBT1w+cNjzMVs2cIG0y5xbic 0W86qaLtxTeBPyMXA9tztIq7/maRwyqxexf/TqB2kPSdB0xbM9RVHUrOajFjEvlJyYQ0 dktD5Gp41bhoYKK2kIZbhi3WP5OQSlqIMuFHUEaAawTV36hlLtIqFepSObHS1+HC79YP Ogiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=auG+UMx9zytYp9lINzhPZO9u/TFK5cE+R08OejH5B0w=; b=TgVVpCFeeQ/vQKCJOJ4iQ8J/rUKOflS5NOQ4+8PWCVLXWt5a8KXQjIE/5V5V89Wsnn J7GckFl/P5kaxqpxoNsoGT645gB5zGXaX8gFpQqWQGhF7UiVQB6qw6G/Ln3vHyYSFC4I cI1HKbLrGc3SVSlctH50+Y8QO/S6xE5GkMmF2T/QPZ/6DMsclhLXWaAyzMq3XAC/jcpd BSnvKuZGF4QDLU88pfrDLNCjRh2+ecuDgexjMBavV6kN0mnE8Cj8nnqEwgihFI0YQ7SF OmDAEUMM/35yLYPgaJmU7EIlzFpu3I1BEFnlVgNAuDpSoF1XsHjvtAz0y3an2NnWenwW 7SOg== X-Gm-Message-State: AOAM531zKIk+pDt4q7UKMdtOOIzAnkeKv9nRlj8MyJ1LC/TIc2YbDjTG 4f7kJMH0fUpMHRX9x3/QZd1fIooEkC+yIRiKW8k= X-Received: by 2002:a25:9a81:: with SMTP id s1mr32001654ybo.230.1634076256610; Tue, 12 Oct 2021 15:04:16 -0700 (PDT) MIME-Version: 1.0 References: <4369779.LvFx2qVVIh@kreacher> <21245442.EfDdHjke4D@kreacher> In-Reply-To: <21245442.EfDdHjke4D@kreacher> From: Ben Skeggs Date: Wed, 13 Oct 2021 08:04:05 +1000 Message-ID: Subject: Re: [PATCH v1 2/7] nouveau: ACPI: Use the ACPI_COMPANION() macro directly To: "Rafael J. Wysocki" Cc: Linux ACPI , LKML , Ben Skeggs , ML dri-devel , ML nouveau Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Oct 2021 at 03:58, Rafael J. Wysocki wrote: > > 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 > --- > 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); > > >