Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp745512pxb; Mon, 25 Oct 2021 18:00:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza37NZET/E+zGfg1dGbN+FkaqsSSM6c1uduZpf7T55UoLr/yD7wS3/UatMJoJYl4Yya+Zq X-Received: by 2002:a05:6402:2067:: with SMTP id bd7mr31397981edb.352.1635210020884; Mon, 25 Oct 2021 18:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635210020; cv=none; d=google.com; s=arc-20160816; b=y49yMnPeevileJddYqdOxsuZADlaHwNVgLbrN0ivBDKrbC46tdkxVGUAzvOrWV3QO3 OX6NYFyE7e7JaMv+9OkiaMpxMxxJDTdKLvG/Iu1+HORkkct8mAg8T7TvxPHPekGevON6 aw9enD6Ch4YB4Uq835hDNUhrDF/gk/8ZCe1QikFkxCU5MuazGTVorP5djt0JqwPuIsqG r70GMGpU/O8h1g2v18O5lbulgjg1feJB4QmN2O97gjn2EgAZEcxQ1s8HtqRpymwZKEiD xYWpf2KiNbeeI3SRjpejPCNIIVpmMwwFslD9/GC1t9JtwaRCDqS7ZJjD/trTBEmF77jI ESlg== 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:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=XpWOcugTG74fbWN1bpzK+xM/2QXAORc3DyN8mZ3TGcc=; b=KObDfXjvQjuUZATuy+AVbOz4Ak3vr1NCHhOr3fXhYbQZF8stzd3QWZuCNqdop+b44+ GjL56F0hNzN/lOdK+bbnbFUh8vCEEmHdt60xbT0qTpAPTzlaIkTAWWZxHygCdIW1WvLy FAZuQGJEBMNpaHwErSbfIzXQekqB+KiCgCXy2mwWLYFrJu2z/uyK/fj08TkdoK7VqfQL +KqMthjL1P5A+KfdX/QTIo7PMLKkTn8WY6lLdg1CtlNYPkpUQyCDntGVoRu0qH5ne+YA 2w8es/5IZdKveOe+fld9Ec1X/7+iz4tq5jevhr0+ivuelQUAxmdlgy07cKnIMFyoAOkv dVCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cWYlranl; 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 i25si27481499ejd.625.2021.10.25.17.59.57; Mon, 25 Oct 2021 18:00:20 -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=cWYlranl; 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 S233729AbhJYUZj (ORCPT + 99 others); Mon, 25 Oct 2021 16:25:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237437AbhJYUZc (ORCPT ); Mon, 25 Oct 2021 16:25:32 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39267C04A40D for ; Mon, 25 Oct 2021 13:10:02 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id y207so17178860oia.11 for ; Mon, 25 Oct 2021 13:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=XpWOcugTG74fbWN1bpzK+xM/2QXAORc3DyN8mZ3TGcc=; b=cWYlranl+VvYT6cGBkvRituonRCQ8xo287DlQ3TggtEV9MT0Lui36QoBArMMef4wI8 6URDG2bbYFXmfYDDkM92TSLP7m4YETsbeGB9ODSAuYkzqyg9BamcV26fwufYD6NwPm/T GgxP/KhyGvLPGqbR1/eJfIhZjkL20fH1Gq4M4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=XpWOcugTG74fbWN1bpzK+xM/2QXAORc3DyN8mZ3TGcc=; b=bPATbyoDzsSARPYmFWEMEGm8mNyUxGiC4nbU8OOy/I+rgGzvy3BO9UWC9bj98dDfLT aA7L/6HegeBF109QqLbhxSNJb0UxUiFPHsZUoXkZMGfZsyHKck3g1ELIkFWlTczxvyIu H327ZiTy4MA+3fe3eCal9TRIzlXoGFfjrkP4m/2ppUKblp/8MQ6WLBkbKepPCbsjsOHJ NLn+4VCYtMMeFU9po3JkbNNMmawGSzt3XoDDK8sw/ajFvSvPT+uWuzrDohq5EbO1OoRK ZZ/kkncLAR8qX3+uPHNLR8SW3MU3//tMiX+tUBiB/YhYyxqXH/yXqfOhDb+Rw6yuYFoZ B64g== X-Gm-Message-State: AOAM530ZuPiG7eNI8A4tSYf0BBc7VerCkPxcBYf0nsOE6NV6SIO874Rv BSAo+2MdGEP/ELQUbFkscqCz/CBVYByCr3NMmzfRrhIljFs= X-Received: by 2002:a05:6808:1d9:: with SMTP id x25mr12883185oic.64.1635192601567; Mon, 25 Oct 2021 13:10:01 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 25 Oct 2021 13:10:01 -0700 MIME-Version: 1.0 In-Reply-To: <20211021140552.v2.2.I3ed2a84c58d9e81965f497d587f735eea56c1684@changeid> References: <20211021140552.v2.1.I9d81c3b44f350707b5373d00524af77c4aae862b@changeid> <20211021140552.v2.2.I3ed2a84c58d9e81965f497d587f735eea56c1684@changeid> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Mon, 25 Oct 2021 13:10:01 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] drm/bridge: parade-ps8640: Populate devices on aux-bus To: LKML , Philip Chen Cc: 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 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. > + 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