Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp794323rwb; Thu, 8 Dec 2022 03:05:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XShkJU40BkiIgydw/UrVXcK8pWIESmH9EC62B83Y2zSIreLkqKVs9qwPmYOJmFiZ8Ot4R X-Received: by 2002:a05:6402:3c9:b0:46a:b56d:92d with SMTP id t9-20020a05640203c900b0046ab56d092dmr6952478edw.336.1670497553544; Thu, 08 Dec 2022 03:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670497553; cv=none; d=google.com; s=arc-20160816; b=wQW8UaSBx5ueGJK6tMbYpBkORNt7uVOwWNmTrng/lP8mpYu971h+tKpapx8oYYdVYQ o9HNIw/jU7tUzJw9t7ZY7wjYT5MLbaKaKMglAOod1l1cbvXHJX5zrcfCH3lk9PmvZA7e uPY0/Ye2Xt2+Loag5EoXr9v3ouIE9YDjAsVb7keySDI2xv90/x35DHXEm3o0Ka+O3vWV n4z2sH09FOl9BSLTRbw+XomZTfoCHtbxa4pqD/RwWroC/u+J1KP2Kn87t8cJpr7d4SZZ tLkup/uCiTrDGjIJz5IQQkOkjLUKmNtkQS6+CXRMuA3roI/buK+W5FSmXPZo3LvcNnyg S5/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=MErnihDfBsn+zYmKG2AUVRpeKysuxlRQCWVssY2xBfA=; b=EVp43yhdaoYrPVREgNEu9zgJ7w6eg8fm1gl05h4jFfc0YhOnuI28iQTQxhAG0Kcc16 UJJE8LCqHIJzpUDYkvnL6gtuTeGy2YmBsMy+CCtUk8BAczA2jCaTcXxnTz0EHBFggb/6 ioJcFs3knByPhw/PGkGwYWo8u7/Zq9tDDpE75nBcm4mPCHaLB+l+u9+1sbhPg6sYaCkn AWnVkpojH9bRkHdXX1Zm++yUJsD6ZLWImc148yf4oXX+jw0xb9qFkHocIACUkGyygGhH Mclrzc/PneWjiZ9HatRMAo1wqOsa/rX7IQdwW2mWoZZtxspsOLvc9kWlaD/28cPutAY0 ug8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EYcs0ciP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr12-20020a170906d54c00b0079198b89adbsi20776270ejc.890.2022.12.08.03.05.35; Thu, 08 Dec 2022 03:05:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EYcs0ciP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbiLHKzj (ORCPT + 72 others); Thu, 8 Dec 2022 05:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbiLHKzH (ORCPT ); Thu, 8 Dec 2022 05:55:07 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D25FF83244; Thu, 8 Dec 2022 02:48:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670496537; x=1702032537; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=6Lc8UH5jmbeum+UYKXkdmWfy6L1eJ0Ew3kz09+x4P4g=; b=EYcs0ciPdPhqzkpi4nKMwDJKMZqLyekX+LLYLJZgA/+LyKK4UEp/LQku 9/k8fH/+uOjNduF+X0NJ1FsfKUXEOmruVUe7ejBXSta00omPXBHFM62gS jeZ1DhS0KFFvy1DjEdyFTQLHCwsoPjK8ISRuPdVJX+O27SVJqa3CYOrIY hqaCnlq8QUQ65j3BMqBuGcuaSH18+McKdo6kvuEvfVZcvgW1cRIvQdMzt m4YIngQQD3uUz672gt6X3f5rRG6AvRl8amI5Z+TDefI58M3nXR0I7R26r fBfsB1UTz14ke2pImObUpgVCWAt+82zEux44VP/5r/msseOZ0tPnrXB/d Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="315856841" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="315856841" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 02:48:57 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="640584949" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="640584949" Received: from pors-mobl3.ger.corp.intel.com ([10.252.39.224]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 02:48:53 -0800 Date: Thu, 8 Dec 2022 12:48:47 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Tony Lindgren cc: Greg Kroah-Hartman , Andy Shevchenko , Jiri Slaby , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-serial , linux-omap@vger.kernel.org, LKML Subject: Re: [RFC PATCH v4 1/1] serial: core: Start managing serial controllers to enable runtime PM In-Reply-To: Message-ID: <3c87186b-336f-6884-a2c-6ee3c9d70@linux.intel.com> References: <20221207124305.49943-1-tony@atomide.com> <7f105ff9-cdc3-f98e-2557-812361faa94@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1480847773-1670496537=:1682" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1480847773-1670496537=:1682 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Thu, 8 Dec 2022, Tony Lindgren wrote: > * Ilpo Järvinen [221208 09:12]: > > On Wed, 7 Dec 2022, Tony Lindgren wrote: > > > + ret = serial_core_add_one_port(drv, port); > > > + if (ret) > > > + return ret; > > > + > > > + mutex_lock(&port_mutex); > > > + > > > + /* Inititalize a serial core controller device if needed */ > > > + ctrl_dev = serial_core_ctrl_find(drv, port->dev, port->ctrl_id); > > > + if (!ctrl_dev) { > > > + ctrl_dev = serial_core_ctrl_device_add(port); > > > + if (!ctrl_dev) > > > + goto err_remove_port; > > > + allocated = true; > > > + } > > > + > > > + /* Initialize a serial core port device */ > > > + ret = serial_core_port_device_add(ctrl_dev, port); > > > > How is ->port_dev supposed to work here? > > > > ->port_dev is not set until in serial_core_port_device_add() but you made > > serial_core_add_one_port() call before that. > > Hmm do you mean you want to call serial_core_add_one_port() later after > serial_core_port_device_add()? > > Or are you seeing some uninitialized use of port->port_dev (and not > port->dev)? With the other patch on top of this, yes, I did see uninitialized port->port_dev already in serial_core_add_one_port()->uart_configure_port(). While that could be solved by removing the pm_runtime_*() calls from there, I think it's a generic problem because after serial_core_add_one_port() the port can have anything happening on it, no? -- i. --8323329-1480847773-1670496537=:1682--