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 172A4EB64DA for ; Tue, 18 Jul 2023 05:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjGRFa3 (ORCPT ); Tue, 18 Jul 2023 01:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbjGRFaH (ORCPT ); Tue, 18 Jul 2023 01:30:07 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D733D172A for ; Mon, 17 Jul 2023 22:29:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 6696380AE; Tue, 18 Jul 2023 05:29:21 +0000 (UTC) Date: Tue, 18 Jul 2023 08:29:20 +0300 From: Tony Lindgren To: "guomengqi (A)" Cc: Linus Walleij , haojian.zhuang@linaro.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] pinctrl: single: Fix memleak in pcs_dt_node_to_map Message-ID: <20230718052920.GG5194@atomide.com> References: <20230703081716.15810-1-guomengqi3@huawei.com> <9a490082-bc30-8a7e-2d19-fcd212771a4b@huawei.com> <20230706040755.GB5089@atomide.com> <7b9d0af0-6990-9696-0dc2-acef2543b2a8@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7b9d0af0-6990-9696-0dc2-acef2543b2a8@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi, * guomengqi (A) [230712 10:00]: > 在 2023/7/6 12:07, Tony Lindgren 写道: > > Thanks for looking into it. I wonder if we can rely on naming for > > pinmux_func_name_to_selector() though. Can things change in a way where > > we need to release everything and reparse? Mostly wondering what happens > > with DT overlays? > > Let me confirm, you mean when the pin controller dtsi changed at runtime, > some functions and groups can change silently while the dt-node name remains > same, so the old data needs to be released and reparsed, right? > > I don't know much about DT overlays. I can look deeper into revelant codes, > maybe do some experiments too. > > My guess now is DT overlay will first remove the old parsed nodes, then > create new ones. If so, the modification to pcs_dt_node_to_map() in this > patch is not affected. OK yeah good to check it to confirm. Regards, Tony