Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp170886pxb; Wed, 27 Oct 2021 00:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy280+E4y9amN77ALtWPffHKhOiDb4OtVa5vkKT2KkF//l9R0jC6wluNsOO2WXhQWY+2QMO X-Received: by 2002:a17:90b:3846:: with SMTP id nl6mr4068443pjb.53.1635319236300; Wed, 27 Oct 2021 00:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635319236; cv=none; d=google.com; s=arc-20160816; b=zssKEwlNmEW4zpwgnkh9rCj32j7peNi8hnX0kPXkewysehS0ch+BKZ4YgK+sBrtL4e l0XhfTRdiV+xewDZYJKgRdw9FKS5WTEPktjmaRto6vTNuxocwcOedr9WCQQGbRQ/xcjr KeEtkYr+cUiJG8IbOWZlQBqPOzZniwuC9ezpMpk9L0MToBUKzaOuNtU5sj9mCGQuup9W KVPBB5u6cXbWv5jg17g6Akd13WTzDlKQ71VH1Y6+rjtDkM0x0hjoleuI9SjgHMTJ/uZX j2brX/0w9DIrcHhMsuIF0xd4f4boa9FTMYGZBi8FIh8WxWfG+Krj+qPTtO22QtCQ3PX3 togQ== 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=5L3NweT3WPaAhbnyD6WsMkziixFdgFckJuSxCTQJug8=; b=agllmPu4TD1cxBkhoS0KsMlSss0N+4QovL7d6+3bNJkyisRdn1gcQLKcRnnBpE6LGr 1VwovldN+nqsMdkToG4JDjBcL+PH7kB6AuHhjGK+VusJ4QraOrtTUl7nNxw+adbhEtOi zP86ZaAR7XvpUkFLJvIKy8Gx7R1pPlBlu6SQUWyt29ei55reePQqIf1vjNlIhtuOhrQV WkCIpxNpTyqlRakf2b9mPQiV8m9oKSETarCY0h7tu5iN8hCqE6vQtjjMh1nvaXgBY09a xJ9wNu4P6B0/Cf235nK1PDfE/rgJCEPfLAMUe905qzh3YxYD9Fi2CX3i1lvgBHXDqlpS 85lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=l0QpRlsu; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si18442552pgq.71.2021.10.27.00.20.00; Wed, 27 Oct 2021 00:20:36 -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=@chromium.org header.s=google header.b=l0QpRlsu; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236885AbhJZTF0 (ORCPT + 99 others); Tue, 26 Oct 2021 15:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236947AbhJZTFW (ORCPT ); Tue, 26 Oct 2021 15:05:22 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BB8C061745 for ; Tue, 26 Oct 2021 12:02:58 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id b9so127937ybc.5 for ; Tue, 26 Oct 2021 12:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5L3NweT3WPaAhbnyD6WsMkziixFdgFckJuSxCTQJug8=; b=l0QpRlsuyjAiD2JKUtg4qYGjk/EHm4JDHoWsRaQ6YYdxRC2jJ+SB5MOUuC/fhQBdXR iwpP3kdXxKiLLSkXR6os09z73mhZ7ayH+dXNYDCxKexWzUHCnCS2pBgGQCZKYW+GtoUF kbRE9ZsqoRNQGY8U+okXUtMSxUo40rG3nKl+c= 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=5L3NweT3WPaAhbnyD6WsMkziixFdgFckJuSxCTQJug8=; b=16GfyZdKYD/rf61anXai5HzZBmclRPv137xSUJfL2oiYAWyCHWhYK29+xLhBCeagNb V+H8CWMspX0oHs1xqkIwR++QvoONNQK69sqaDP01jvQlO5vWne8yU0Pyxfjuqwl7Grnt 1bNB12H/h8LSsa0m9QbrYwzpoXf3egVVyLAgqfo4ZWEixcAssE3favlEAPZzpgAY67Xq iLD6bJ+51yz9nCDgDWqFScptvbLlyNFG95Q6LSpcYVblbXfl/WezgdHBaTPie+ebdMX5 4KK80LdYzXWAOsQGqxokwqL61wG3P8JQI5YGCT0BcVeqYGCACKu7WE4l1ooxDAhD67ah 6y2Q== X-Gm-Message-State: AOAM531opD2riosE6rUWhOhpf0ZcB9YRQ4d4/AR9Xtx37mcXEHevC0O2 MPV55ksIRVLIisdUZxfWMba79k752EOtwA7TkXaGYA== X-Received: by 2002:a25:cf07:: with SMTP id f7mr25652281ybg.100.1635274977398; Tue, 26 Oct 2021 12:02:57 -0700 (PDT) MIME-Version: 1.0 References: <20211021140552.v2.1.I9d81c3b44f350707b5373d00524af77c4aae862b@changeid> <20211021140552.v2.2.I3ed2a84c58d9e81965f497d587f735eea56c1684@changeid> In-Reply-To: From: Philip Chen Date: Tue, 26 Oct 2021 12:02:46 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] drm/bridge: parade-ps8640: Populate devices on aux-bus To: Stephen Boyd Cc: LKML , dianders@chromium.org, Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , Robert Foss , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Oct 25, 2021 at 1:10 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-10-21 14:06:00) > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c > > index 220ca3b03d24..f99a2e0808b7 100644 > > --- a/drivers/gpu/drm/bridge/parade-ps8640.c > > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c > > @@ -149,6 +150,23 @@ static inline struct ps8640 *aux_to_ps8640(struct drm_dp_aux *aux) > > return container_of(aux, struct ps8640, aux); > > } > > > > +static bool ps8640_of_panel_on_aux_bus(struct device *dev) > > +{ > > + struct device_node *bus, *panel; > > + > > + bus = of_get_child_by_name(dev->of_node, "aux-bus"); > > + if (!bus) > > + return false; > > + of_node_put(bus); > > This should come after the next line... > > > + > > + panel = of_get_child_by_name(bus, "panel"); > > here, so that 'bus' can't go away before getting children nodes. It > doesn't actually matter in this case because 'device' holds the aux-bus, > but we shouldn't add anti-patterns to the code lest someone copies it > where it actually matters. Thanks for pointing it out. I will fix it in v3. > > > + if (!panel) > > + return false; > > + of_node_put(panel); > > + > > + return true; > > +} > > + > > static void ps8640_ensure_hpd(struct ps8640 *ps_bridge) > > { > > struct regmap *map = ps_bridge->regmap[PAGE2_TOP_CNTL]; > > Otherwise > > Reviewed-by: Stephen Boyd