Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2142397lqb; Mon, 27 May 2024 09:08:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVj3l48BuuQweehFh0NJMEKdxHLNoXXLaqoZNbHIIm4KaDGpbmFMAfGQRfngvPbjOyjguRSj0dAIRMDoSE1KcP6XoJtUaLGdDQM/IxWg== X-Google-Smtp-Source: AGHT+IEZP0OUdfNjBa1F+KWe24jkP09a/58EPEuHJjix2pMHjiPm6lvmS5btau4oos+KFrwhXJIS X-Received: by 2002:a17:906:3c8:b0:a52:2486:299f with SMTP id a640c23a62f3a-a62651187bbmr630249266b.71.1716826081321; Mon, 27 May 2024 09:08:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716826081; cv=pass; d=google.com; s=arc-20160816; b=UxpTbIA6b7kLz9g1WWVvyw+ipbsnTdOZdcSwe71vL0fj/yOsN/gXj8VonR6zk+RZFj QgK0GiGE5DEpIz5x45PP9NtzTSnScpsk7LEVMW6+F2fbiTeNbMrw90CrzfuYOjW2Ffx8 bm2rj7SmOKUs985+i7d8wunugYNVHlR65gc37u6uzqAchTybhL/ABInhbPNVkqKN2qvj ivxyCG1MvbtHhHeiO/kqwqv/4W5K4iT87dCAwMNwsYwMS0bN7GAoW6urb7di1porTvZl UYgS9SO4tlpUZXXYAlVas++8CpQcQmc+Wpw+u9wNwA6ibTDSz6XRKz53wHJZnqssJJ+g 76yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=cCQzbMHV0uZw8ARZF6tyJxZsTWRc/buEbEqLjIXSnlw=; fh=y+JZXiwywc6HcgZRez023cikXIHI2uGLQkpHsC7g+bI=; b=jW18SJJCslFym79GzjwJfZZVwNE7RWWi+LnRwzxzDzP5jmp18nuUV1+Zv/ZP7aEn6U gJRN8L0hCr9GTm4TceV4V98MiJnVFichMIkOrhWCuEdJs/dnh/+9/oUmsugw1iyohfbY f4SNw6ShwE7MWqx9jmyNKZpqpR4pj62/2qXk7Ijpw2P9iT2SsL/9Y8Tf5/vyRaapnzV7 MJDs7ze/oRnL4JZz3fG/W+iev3+YfEmLHjhPu8iHIek71EKIF/jbMxL6Fl++/LoWihXM mJcg1GREpEXrmmYPEiiujVC6XEbKfVm1SiYoKSfs3eWbEsEq6jxDlI8Dq/sbk4tO8t7h fUUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=PUTkJtv+; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-191171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd20cdsi405919666b.1018.2024.05.27.09.08.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 09:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=PUTkJtv+; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-191171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E5D651F222C0 for ; Mon, 27 May 2024 16:07:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CFE916F0CD; Mon, 27 May 2024 15:57:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="PUTkJtv+" Received: from mout.web.de (mout.web.de [212.227.17.12]) (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 4FC4E15F403; Mon, 27 May 2024 15:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716825478; cv=none; b=CPZ7Ryc/Lfir5ydAEsgd/+yKs0eeG7+7Mgc0AH/IPQpUg8aIkIb4rQSJ5h5RR8g67a+QAzImhQFft7jZ+IsjDQevCwcFDVW/oIevaTwvnETWpWNTGZW23esEWk5GG49Cs0LSeG32sSLnY+vfTJqsFg4BK2D78k4yz087wjnqMI8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716825478; c=relaxed/simple; bh=LyY89JJGjC8Y+DxaXq1cHlE/nuU3X/RNIGtC1yqhUhI=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=I5fZtjOlAibwg1RSKhXPaAlotrpGEvsSEs6qcNILhQoLk2btVRRYMt0o/XnjjHzWypnteuu/q9vQaq1Irq4d7yhOCZk2NuzsiV05bdJbN+rD4A9Rci5EFvO9PNQ6YwcMyMm/aqCuTjWI6knF3IWjF+OugN7kKY5moK+FbkR8i+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=PUTkJtv+; arc=none smtp.client-ip=212.227.17.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1716825410; x=1717430210; i=markus.elfring@web.de; bh=cCQzbMHV0uZw8ARZF6tyJxZsTWRc/buEbEqLjIXSnlw=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:References: Subject:From:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=PUTkJtv+17tmHPSwdj2hf899Cxz87JZtpAv6Jc/t460ErK6rIZ1XjrMEwjT/IL5e u6asEjjbaWV05EEJOrnLlJNLso+bKJ6JUhoe+vAQmYcyr1mOVJ9CmwVzJFYdsDjWk lhH7BRvhFBzVj6hnFHPSxBLuofy8FnxnuGCzKVh06VXSoykW9+Z5sNppeifyGBhS7 Tbby0eXDkzEd3ur+rXCvlZhYwOhxY2j+kjNeQE+m/gaI7bzpQ3HVkzXeOYg+oIyfZ hv0kSHTDq7XWjQmMF+X+gAfIYHkN5y02reNDf+/pFuI1uzraU+ayvVz08dwXuor0H +gQ8lygtBMIj/W0VNQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N6JxT-1sa0Ai3q9J-016inV; Mon, 27 May 2024 17:56:50 +0200 Message-ID: Date: Mon, 27 May 2024 17:56:43 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Peng Fan , soc@kernel.org, Alexandre Belloni , Alexandre Torgue , Alim Akhtar , Andrew Jeffery , Angelo Gioacchino Del Regno , Baolin Wang , Chester Lin , Chunyan Zhang , Claudiu Beznea , Damien Le Moal , Dan Carpenter , Dong Aisheng , Dvorkin Dmitry , Emil Renner Berthing , Fabio Estevam , Geert Uytterhoeven , Ghennadi Procopciuc , Hal Feng , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Jacky Bai , Jianlong Huang , Joel Stanley , Jonathan Hunter , Krzysztof Kozlowski , Linus Walleij , Ludovic Desroches , Matthias Brugger , Matthias Brugger , Maxime Coquelin , Nicolas Ferre , Orson Zhai , Patrice Chotard , Sascha Hauer , Sean Wang , Shawn Guo , Shiraz Hashim , Stephen Warren , Sylwester Nawrocki , Thierry Reding , Tony Lindgren , Viresh Kumar , Wells Lu Cc: LKML , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, kernel@pengutronix.de, Peng Fan References: <20240504-pinctrl-cleanup-v2-18-26c5f2dc1181@nxp.com> Subject: Re: [PATCH v2 18/20] pinctrl: freescale: mxs: Fix refcount of child Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240504-pinctrl-cleanup-v2-18-26c5f2dc1181@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:fY28vuOzSy7D3myo+NUo+Q8h4MAB+DMYH6x54XY9zacr23bFm3Z XEU1mqywgExmQK1yZjuU6En9jXs1HgcwzsaQZ+4suTC5BPEjIf/Fg4o0HdX3AuRpQZI2yac KrkniKWThKnQbs96+yLl/Dm5E5NsImhOyFs1ksUAetHBWVW2WfIWoOdGSaoQFZRJLEXutYy iCHwBxLqQsK9Mq+39k2DQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TjeN7uyFccs=;bjTTRHq6gIBTOMFXSFUogBWSZuQ ZTwgZq2VnppV1aZlnrDYMmOmytXyq0JrjEzIfy/yH2myRvZFwVxrMpYgtVdN++fuf8ainJk/t uFkTD8huhpK+v/6sd6lXCGtTOMoxBExDvHrzfiIvMwNnj5vJaD78bXrOpQIviBkrbo/dpouOC Ln7QFnEpQNN9tfIRGg8gaddFRITCsPb8eIY2ZjqdGWqcC0mpb+GXVonl0LzMFBCnUIrGNucUB JyF0gcU5WkAg6RJMxI6bQbphTn5At4z7kJpzYsMNnHFABhVCUal+gm0247pr1mpjl/KiGECTR XNTX442NdkykPvhiMNWp17M35HW0J6oLENbsSL8PyhGQHAW5h5EnpFB5SuC+MkmcW7VQwxd36 lCdpZmXrsZsRJ7AbJhptgf/dByjHu/LOLAj4+ethb/xC2SLDH84JLTDzzYCw43EzHk/09K8p9 cDEpfpl8+VPFN35SSlqs/3lTQxU1UurqQF96DxIJCZdCGRE3icPsCoTwZMOJqDYJkYsmztQRH YW541Ftvhar9wZSgE19Bcj1s0L3HXu9Xp3pkz7IcX+lrc7RPJuNoPC+xc48ucMhoGmNSMI5WK RVp1WSoLoJahSt7/mjjyxqyly6XzUtnKE6um1tWMAR0vojK8hQcOOL84UbAmXM7tbS+2QyuCj LkzuEZ/KIlY89jP9+dNMuuSCCwKeQJA7ykttwUV0aQte1rS7POYfJSX2aeTAa8Z7rWLzt7kHc AmtJvjHPIr4iMol58kTZo18kQbOqJQsi9qx7qS9pObTVMxyOiWt4lPdDW0vYOWO4MOmC4QlIy k96VHg44SU3OMjnGBpPp4v6EScAmUEUHJaYg/CdI/NGc8= How do you think about to use the summary phrase =E2=80=9CFix reference co= unting for children in mxs_pinctrl_probe_dt()=E2=80=9D? =E2=80=A6 > of_get_next_child() will increase refcount =E2=80=A6 the reference counter? > Per current implementation, 'child' will be override by overridden? > for_each_child_of_node(np, child), so use of_get_child_count to avoid > refcount leakage. Another wording suggestion: for_each_child_of_node(np, child). Thus use an of_get_child_count() call to avoid reference counting leakage. Regards, Markus