From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 731CBC433F5 for ; Fri, 20 May 2022 20:29:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F91C10F9DD; Fri, 20 May 2022 20:29:00 +0000 (UTC) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by gabe.freedesktop.org (Postfix) with ESMTPS id A3C4210F7E8 for ; Fri, 20 May 2022 20:28:58 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id gh17so4565483ejc.6 for ; Fri, 20 May 2022 13:28: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=PUvHmCiaUykxHI8OvIFLVAwT2TJ4ujC+7HAZA4KLm9o=; b=E7VekmNmqzzPvnMy92tHR6mFRFrwHRPFMUmM3juUv3W7Caij6EZHqbPF7ji6Ppk5ak cLMD4QdxKzTo9OL54y8cUEo8NCYpKVhEHKEn+bt4ImwfTax8nV5J7UHC/HtAlpSHRNly +trvejQGwU/eryTVgCTqDvA6Vvw0FwAohxVZg= 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=PUvHmCiaUykxHI8OvIFLVAwT2TJ4ujC+7HAZA4KLm9o=; b=kyIQdqHykVPzHKbjr6yiYTMAEhZp7y2MDkVC3Oc7nkwLA20Bzfc/fgL7tdlrMx971L HcL+hoqQfLBn1F4DLh6PLOaExI+bfH+/zQOCQMshnbBn6dPc8JoIUCtdgnw9O+Bqvy8c c3/huodWkV1rylvVjTigQLnipeGCoJ25NAKxz/4dVDwhth1Qb1CzGRby3rSCja4PEzRp 39qMqyfl3XXvxEOEiEc9tIP0GqdlN2xzSifnaWaNqHJewngWk9+znTL8qFopCukfKDbt qKyRFihlGb4ITeVK1gMlb21OVVfLm7w6ld+zbFs+SwdGUEtK4jngh4PVw3BWoTHJbAG6 lJSg== X-Gm-Message-State: AOAM532lHHwATAPa4cPM816YzYPa6H5cWJEnQ/XrtQppg4JZFaz6js8z NaNS8iH43pIUBNLKGb5QY+58AddsNmbUTvMJozs= X-Google-Smtp-Source: ABdhPJzAOzLELFw5do7zZKEfLcvCeX84nqargOKmyeNbLWgizSACwS5dlWk/l2OFiqPvrXTKMUYPhw== X-Received: by 2002:a17:907:d0a:b0:6f4:98fb:f407 with SMTP id gn10-20020a1709070d0a00b006f498fbf407mr7363620ejc.219.1653078536788; Fri, 20 May 2022 13:28:56 -0700 (PDT) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com. [209.85.128.41]) by smtp.gmail.com with ESMTPSA id rh16-20020a17090720f000b006f3ef214dc2sm3478305ejb.40.2022.05.20.13.28.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 13:28:52 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id h205-20020a1c21d6000000b003972dda143eso1579544wmh.3 for ; Fri, 20 May 2022 13:28:50 -0700 (PDT) X-Received: by 2002:a05:600c:4f13:b0:394:8978:7707 with SMTP id l19-20020a05600c4f1300b0039489787707mr10309201wmq.34.1653078530208; Fri, 20 May 2022 13:28:50 -0700 (PDT) MIME-Version: 1.0 References: <20220510192944.2408515-1-dianders@chromium.org> <20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid> In-Reply-To: From: Doug Anderson Date: Fri, 20 May 2022 13:28:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/4] drm/bridge: Add devm_drm_bridge_add() To: Dmitry Baryshkov Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sankeerth Billakanti , Philip Chen , Thomas Zimmermann , David Airlie , linux-arm-msm , Abhinav Kumar , Robert Foss , Stephen Boyd , dri-devel , Hsin-Yi Wang , freedreno , LKML Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On Tue, May 10, 2022 at 5:22 PM Dmitry Baryshkov wrote: > > On Tue, 10 May 2022 at 22:30, Douglas Anderson wrote: > > > > This adds a devm managed version of drm_bridge_add(). Like other > > "devm" function listed in drm_bridge.h, this function takes an > > explicit "dev" to use for the lifetime management. A few notes: > > * In general we have a "struct device" for bridges that makes a good > > candidate for where the lifetime matches exactly what we want. > > * The "bridge->dev->dev" device appears to be the encoder > > device. That's not the right device to use for lifetime management. > > > > Suggested-by: Dmitry Baryshkov > > Signed-off-by: Douglas Anderson > > Reviewed-by: Dmitry Baryshkov Thanks for the review! For now I'll hold off on landing this until sometime has time to review the other patches in the series. While not technically required, it seems weird to add the devm function without any callers. -Doug From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD98BC433F5 for ; Fri, 20 May 2022 20:35:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353012AbiETUfe (ORCPT ); Fri, 20 May 2022 16:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353488AbiETUfe (ORCPT ); Fri, 20 May 2022 16:35:34 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A36519FF53 for ; Fri, 20 May 2022 13:35:32 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id n13so15735154ejv.1 for ; Fri, 20 May 2022 13:35:32 -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=PUvHmCiaUykxHI8OvIFLVAwT2TJ4ujC+7HAZA4KLm9o=; b=E7VekmNmqzzPvnMy92tHR6mFRFrwHRPFMUmM3juUv3W7Caij6EZHqbPF7ji6Ppk5ak cLMD4QdxKzTo9OL54y8cUEo8NCYpKVhEHKEn+bt4ImwfTax8nV5J7UHC/HtAlpSHRNly +trvejQGwU/eryTVgCTqDvA6Vvw0FwAohxVZg= 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=PUvHmCiaUykxHI8OvIFLVAwT2TJ4ujC+7HAZA4KLm9o=; b=wLYFKB+Z51d7TIPwxsEo0LO6w2zVD2oRa0wx/TbbRyWEPtaA3EA9U4FceA+cTzZ7Jp lqSGGONbzpzku75Tn0doknOny3i030Fn+wq31rFDukadqqGnVVZSdH/P1xcn5MZCjy1E PB385c2w+2R6J5YNVK2ASIRThYwj4mUWlk8eTFnS49fBAoBnezczmeytGZvE1pxt1W1B U+X22a1akd5qLKkYT79tZ7pQBUEKPwiBUMZL4akQlJIwg2J5ZeCVNKru1xgv8gcFOJ1z 845KL8DJbClDGP/tGqgkMoCi3awwvN4Kfcv6W284qMY79mm6Fd6UUYu1SsjVUF7709Xb K0Xg== X-Gm-Message-State: AOAM532WcAhX4pS3vbiMnhZ2XQLZN3HoSUg90b6ZYZ3suM1osKijqd9A EYKA3uISelFKqYYjtL0/eTh6kNA3BPe3te4Jieo= X-Google-Smtp-Source: ABdhPJy5UVCS3i+8mwEdGdfS8808XXGgHjNkmXvUN9Ot2hBY2Oz3CfToxWnHIkCxSAkx5OfiKasyeg== X-Received: by 2002:a17:907:8a21:b0:6f4:d2e5:4d17 with SMTP id sc33-20020a1709078a2100b006f4d2e54d17mr10480288ejc.196.1653078930696; Fri, 20 May 2022 13:35:30 -0700 (PDT) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com. [209.85.128.51]) by smtp.gmail.com with ESMTPSA id l6-20020a1709060e0600b006feb0e12a5esm921184eji.7.2022.05.20.13.35.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 13:35:30 -0700 (PDT) Received: by mail-wm1-f51.google.com with SMTP id v191-20020a1cacc8000000b00397001398c0so7435385wme.5 for ; Fri, 20 May 2022 13:35:29 -0700 (PDT) X-Received: by 2002:a05:600c:4f13:b0:394:8978:7707 with SMTP id l19-20020a05600c4f1300b0039489787707mr10309201wmq.34.1653078530208; Fri, 20 May 2022 13:28:50 -0700 (PDT) MIME-Version: 1.0 References: <20220510192944.2408515-1-dianders@chromium.org> <20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid> In-Reply-To: From: Doug Anderson Date: Fri, 20 May 2022 13:28:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/4] drm/bridge: Add devm_drm_bridge_add() To: Dmitry Baryshkov Cc: dri-devel , Hsin-Yi Wang , Abhinav Kumar , Philip Chen , Sankeerth Billakanti , Robert Foss , freedreno , linux-arm-msm , Stephen Boyd , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, On Tue, May 10, 2022 at 5:22 PM Dmitry Baryshkov wrote: > > On Tue, 10 May 2022 at 22:30, Douglas Anderson wrote: > > > > This adds a devm managed version of drm_bridge_add(). Like other > > "devm" function listed in drm_bridge.h, this function takes an > > explicit "dev" to use for the lifetime management. A few notes: > > * In general we have a "struct device" for bridges that makes a good > > candidate for where the lifetime matches exactly what we want. > > * The "bridge->dev->dev" device appears to be the encoder > > device. That's not the right device to use for lifetime management. > > > > Suggested-by: Dmitry Baryshkov > > Signed-off-by: Douglas Anderson > > Reviewed-by: Dmitry Baryshkov Thanks for the review! For now I'll hold off on landing this until sometime has time to review the other patches in the series. While not technically required, it seems weird to add the devm function without any callers. -Doug