Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3215492rdb; Wed, 13 Sep 2023 05:53:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjksVAVLB9JS/S66IiZZNiSwOdSjCkGP35TKZrbjIDTgkoFxRMf1R7tPvAk75CGpc+JcaB X-Received: by 2002:a05:6808:1986:b0:3a4:2941:af49 with SMTP id bj6-20020a056808198600b003a42941af49mr2797376oib.22.1694609601205; Wed, 13 Sep 2023 05:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694609601; cv=none; d=google.com; s=arc-20160816; b=XMLtSOzgNTJMazpg9evdM70UNRZ5KcUOQvby43+JgNhwpm//EbGs7Vwvda6+j4D9xa vs+icCiYlpo5hY/styPvzxGAWCsAkA2EaFtV3fegn7/i/CrHIWrz+gyqV7k9N986M2jq Gfct2TNwBdLcOfCvpMneixUxGHCw7mAXnCe5vOY5E+0VfLKfQhBUiAh5MxMZufzxL0Q8 XvoCfr1RPMJUsqAqDWSZohIsErJVppzRg6euhKNYLxisD+4qhss55zhTX2UwZZId3sVp DsE9FOfcmhkLskbzhIr0kC7hMelqlNKLwCuf88gRLrq854zV70frSRICM6PjnoKJvVWF wZ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=j0+7kYvgEyT51BvaLzi05b2ieew+7isiQ6HKiJC6HbQ=; fh=OGSSdW84VaWohs/SN8oOCs4LAnUZeESTcpTdMxDh6zE=; b=RwJBerrQ4JhlT+nxGGP4ss34ZxCOlJgUqJpDhpcHVOUH3mJ8775RJZRVbE2Ao6M39Q tJ3pJXeVVU1ezhVCq3nmuqzF4H7b74NLkzw9+iK3/gVc+xKN4jVPHs3PaaFDhvmS2Iz5 KLHnwqbHo2aqNJqsddDHj01X65VzYCctbVtJWDjz+Xd+qHg0eKmbTMYrC7ndccNvxQ57 GUlKGr1tparMmPiLZ7WEnsVXh/+3tVILNccAKyeqmoSlYJiy/fB/cRKczE3QHqL14kN4 gRkj6iIzS6e19f6Qni4TLujHgHTR1zxrNk9EqIBXyP+zuhXRlGoQK4RbwIVJ+P/J4i3E KoSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k25-20020a6568d9000000b00569466198c3si9923501pgt.751.2023.09.13.05.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 05:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B56A7828C4BC; Wed, 13 Sep 2023 05:50:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239713AbjIMMun (ORCPT + 99 others); Wed, 13 Sep 2023 08:50:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231620AbjIMMum (ORCPT ); Wed, 13 Sep 2023 08:50:42 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 817CD19B1; Wed, 13 Sep 2023 05:50:38 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id EC6FE8088; Wed, 13 Sep 2023 12:50:37 +0000 (UTC) Date: Wed, 13 Sep 2023 15:50:36 +0300 From: Tony Lindgren To: Tomi Valkeinen Cc: Laurent Pinchart , Sebastian Reichel , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Vetter , David Airlie Subject: Re: [PATCH] drm/omap: dsi: Fix deferred probe warnings Message-ID: <20230913125036.GM5285@atomide.com> References: <20230412073954.20601-1-tony@atomide.com> <9daacd2f-0dbf-dddc-9403-b802447896a2@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9daacd2f-0dbf-dddc-9403-b802447896a2@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 05:50:56 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email * Tomi Valkeinen [230913 11:59]: > On 12/04/2023 10:39, Tony Lindgren wrote: > > We may not have dsi->dsidev initialized during probe, and that can > > lead into various dsi related warnings as omap_dsi_host_detach() gets > > called with dsi->dsidev set to NULL. > > > > The warnings can be "Fixed dependency cycle(s)" followed by a > > WARNING: CPU: 0 PID: 787 at drivers/gpu/drm/omapdrm/dss/dsi.c:4414. > > > > Let's fix the warnings by checking for a valid dsi->dsidev. > > > > Signed-off-by: Tony Lindgren > > --- > > drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c > > --- a/drivers/gpu/drm/omapdrm/dss/dsi.c > > +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c > > @@ -4411,7 +4411,7 @@ static int omap_dsi_host_detach(struct mipi_dsi_host *host, > > { > > struct dsi_data *dsi = host_to_omap(host); > > - if (WARN_ON(dsi->dsidev != client)) > > + if (dsi->dsidev && WARN_ON(dsi->dsidev != client)) > > return -EINVAL; > > cancel_delayed_work_sync(&dsi->dsi_disable_work); > > Shouldn't this rather be > > if (!dsi->dsidev) > return 0; > > before the if (WARN_ON(dsi->dsidev != client)) line? > > If dsi->dsidev is NULL, then attach hasn't been called, and we shouldn't do > anything in the detach callback either. > > With your change we'll end up doing all the work in the detach callback, > without ever doing their counterpart in the attach side. Oops, I'll check that thanks. Tony