From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA99CAD4A for ; Fri, 13 Jan 2023 17:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673631636; x=1705167636; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aOFHIYXUBrqr9+If/r9gCmOL5KeU2zlnO6suhhT47oc=; b=DpbO396DdHI5HlgDvDqfPK2KI6a0g1pjjkwQmY2vZtu1xtGrY3XNw2mY FtGXbtZ7FmFbZBB+wFWIeQ4JcNxNifrnGDRamfF9GO3pVLlgmWhoCL5Ar jvRDb6ngIYznciZGW47OXDjovlX5GfCOzMuTbSUjMoO8ebag6VR/6MQ1j bFkW/c9YZ1sfRcRuplcMZb7hba4iJUY+OmySx+sMUFarIZKLG+Kw+GYWk 4Wa1Q7u4bdiOx31Auw2rcPFtFl33EAAkDuOafvv1ZQIbxDVZJ6Z3Sv2af hPcivWUJE78Br7WLo/J5oKodHVELbMaonoi5BlqRIIvAtG5/7UWDso69f w==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="386396071" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="386396071" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 09:40:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="658287535" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="658287535" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002.jf.intel.com with ESMTP; 13 Jan 2023 09:40:26 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pGO2R-008jqV-0f; Fri, 13 Jan 2023 19:40:23 +0200 Date: Fri, 13 Jan 2023 19:40:22 +0200 From: Andy Shevchenko To: Prashant Malani Cc: Sakari Ailus , Pin-yen Lin , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Daniel Scally , Heikki Krogerus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Benson Leung , Guenter Roeck , Stephen Boyd , =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Marek Vasut , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Lyude Paul , chrome-platform@lists.linux.dev, Xin Ji , Thomas Zimmermann , linux-kernel@vger.kernel.org, Allen Chen , linux-acpi@vger.kernel.org, Hsin-Yi Wang , Chen-Yu Tsai Subject: Re: [PATCH v10 1/9] device property: Add remote endpoint to devcon matcher Message-ID: References: <20230112042104.4107253-1-treapking@chromium.org> <20230112042104.4107253-2-treapking@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Jan 12, 2023 at 02:31:45PM -0800, Prashant Malani wrote: > On Thu, Jan 12, 2023 at 5:32 AM Sakari Ailus > wrote: > > On Thu, Jan 12, 2023 at 12:20:56PM +0800, Pin-yen Lin wrote: > > > From: Prashant Malani ... > > > + /* > > > + * Some drivers may register devices for endpoints. Check > > > + * the remote-endpoints for matches in addition to the remote > > > + * port parent. > > > + */ > > > + node = fwnode_graph_get_remote_endpoint(ep); > > > + if (fwnode_device_is_available(node)) { > > > + ret = match(node, con_id, data); > > > + if (ret) { > > > + if (matches) > > > + matches[count] = ret; > > > + count++; > > > + } > > > + } > > > > Aren't you missing fwnode_handle-put(node) here?? > > It shouldn't be necessary. We aren't break-ing/continue-ing here, > and fwnode_handle_put(node) is called latter in the loop [1][2] > > BR, > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/property.c#n1256 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/property.c#n1261 I'm really puzzled what do you mean by all this. Sakari is right, btw. -- With Best Regards, Andy Shevchenko