Message ID | 20240501-pinctrl-cleanup-v1-3-797ceca46e5c@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2064.outbound.protection.outlook.com [40.107.6.64]) (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 B685A5337D; Wed, 1 May 2024 12:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567755; cv=fail; b=aClHK9hGL38xU84UPLBYsWxHM35KleI6cViWHHIoCxnj9YJpveAVjD0bxij+sSriymwXQnRO0uGzS+/dlHkwYMF+V2QMv7GN/A+rXwQNOde5h2tOqrcznQwJxOz889QWnPyCaF3wbxRWRp3/7bL03lK++f9NOsuE5sF4syvQZug= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567755; c=relaxed/simple; bh=LSAn+p8fmAs99DQTsjCYGuuV7Smm9Rd2CDUVvdFN+HA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=h+Io9IrlBiBgD0HCgxCayiE//sQADfNfteftHRIfq5crGQXVp2g3cTh2xpXicbURSA/U8DpHXqT5Y1jGxIsE1pU7HpYMX0uPRr97N6PfE8CGnwVgGn+hiOAc7fOup4rdCkvmg0uomM8T2Il172WipGq73HobUZMVk5DF9/jQFkw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=EmmRaZXL; arc=fail smtp.client-ip=40.107.6.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="EmmRaZXL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oeu47Q+dPv1DPnRVGtc6IiNSPWuUWczHuMJIvx/20XaKHr4tGZ7eStixVLJKlt6k9gXBP+1/PR67tQAMiDlnrHAlpuNWxKdDAF6bDS1NzZ8GHl1UN6f5afpgN3LX7jWR7JOMnH90w8dA5VG5BzgZ7d9lSUkmbJ04GoIHryivbP1QDu3EGjRLivniGmriEkbOKZoWfCn3tAUjffx1OT3WstUpQs8VmUWCQSxdnmuFrLNmrmmrmXe6gsHNPwsG68kwa/8wPslY1o8lpxHDaO+gCofqCdwUNhwr1ov6l8sn1NHkf9pkclPfa2sPQ93DOCz8a9mhRyey486T8N+tbok7sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZWbaOnhitppwCU5btaK/2yH59NAaiI69tzBZ/+l5Sls=; b=GRlchT30TLUK57xGbReuKjfzmTSUr9s7OMLTNM7oX8VHditGMqb655tXxxqqGuLO5PZF+kd4uUDc7COHYN/Fk8oLFjkbpZiinCR/rOr2bv8lH6pty5oKDQuQ9v8pIvv5Cn4JBHrvi97mZAf/9d/3xSP7Ts+oJ+6xIuaDRxld72sDAHLRVtTauuMJtY/X57HpiDowhh2Y6D30He09nz2/ShwRJ9/KMhTPKnX1TOBeC03VrO9l/EtbFnb5P+wWOCLa2ClWGa3CcUKgsSnXuz41Cs9e0ERzmkq/AKfmRe/AsLaD65Js+0xvlgf/rzIyvWbx9a1mjSzZtKNg40Iu9vuyAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZWbaOnhitppwCU5btaK/2yH59NAaiI69tzBZ/+l5Sls=; b=EmmRaZXLTcmyZ8/Gzn7BfXWIGm50cFWw1ABS/y4xR5FZ0rFwDj5ScpJilmo29x49sCMfAzTWuXKku97P0fc2ra9ASs/2muNOJzKA7Fev155/6SxjfM8g9LIw9T/5jyiKaZSzT28wJ0+x/A2r7loWZu3KbtlansoFo3F/zca20J8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB9PR04MB9284.eurprd04.prod.outlook.com (2603:10a6:10:36c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Wed, 1 May 2024 12:49:11 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7519.031; Wed, 1 May 2024 12:49:11 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Wed, 01 May 2024 20:56:01 +0800 Subject: [PATCH 03/21] pinctrl: sunplus: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-3-797ceca46e5c@nxp.com> References: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@nxp.com> In-Reply-To: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@nxp.com> To: Linus Walleij <linus.walleij@linaro.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dvorkin Dmitry <dvorkin@tibbo.com>, Wells Lu <wellslutw@gmail.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Emil Renner Berthing <kernel@esmil.dk>, Jianlong Huang <jianlong.huang@starfivetech.com>, Hal Feng <hal.feng@starfivetech.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Viresh Kumar <vireshk@kernel.org>, Shiraz Hashim <shiraz.linux.kernel@gmail.com>, soc@kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Alim Akhtar <alim.akhtar@samsung.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Patrice Chotard <patrice.chotard@foss.st.com>, Heiko Stuebner <heiko@sntech.de>, Damien Le Moal <dlemoal@kernel.org>, Ludovic Desroches <ludovic.desroches@microchip.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Chester Lin <chester62515@gmail.com>, Matthias Brugger <mbrugger@suse.com>, Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>, Sean Wang <sean.wang@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Sascha Hauer <s.hauer@pengutronix.de>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Dan Carpenter <dan.carpenter@linaro.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@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, Peng Fan <peng.fan@nxp.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714568179; l=1303; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=+m9hOUks1zLp1UolZzmwZ7jTtIojf5UqsPjaqQIsEwQ=; b=IZjMe94P6fYw86SmgQeVTPliGzwM5/iZVmO4VECeHSp9Ch0ktEbWrPRvuWTFTkBwPt2Tg4ElP txogWLr0hpKCU4Qnc8bC8XisL27TbpzKeibh6Ju1lkhyT89QOJTe+0p X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0064.apcprd02.prod.outlook.com (2603:1096:4:54::28) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: <linux-samsung-soc.vger.kernel.org> List-Subscribe: <mailto:linux-samsung-soc+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-samsung-soc+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB9PR04MB9284:EE_ X-MS-Office365-Filtering-Correlation-Id: 065f0460-04e2-428c-56a7-08dc69dd1913 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|52116005|7416005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?uh1koQId+oR83QY+20yvjjCJPccsvLB?= =?utf-8?q?XslFDeOS2/VNbrO6EudoWxY2QCMfxJ2PpxkUXgXpD7Mt9ssKkZp79JHmhmk5u6Z8F?= =?utf-8?q?/PlrgiPe/g/mECAWEISqOs7t1mP7h+g54NL3aDhCPTmvprjWbf5BtVnmztpQqbs1j?= =?utf-8?q?LooAhhAEwsBg3zalFtPZG3hSlpiWSbzrCAIOe+SILL1znhuEG3r51eJfWcU7VPTMK?= =?utf-8?q?fqif5oNkLq37eb2i4Dc8AE39DUjw+orEqj7FuIPEpsDfeHGfRR1rwr9Sn6gLvbo1h?= =?utf-8?q?aidl79/Hc3aCY6qNt+wNoGn/KJpXHWKd+jNCNVrhjKqzS1wNEn8xZW21GAKJ52kYO?= =?utf-8?q?XVdze3fnj8L/8UFk6E4GbaJiGiYLP/IR5k55yzWXyoneO3szCDSYKylHt1BwGqsmL?= =?utf-8?q?o9EPTo1DCkuk+4pxKxNHPkjLvXFtweS18vcwEqdg6eBov/msz0/or9Xh7w3MB02OE?= =?utf-8?q?6vx3DjmNhdphz8bnXTWraq4HvfYbz3GcAi4G6kPJo2hpkIzU4gVASxgg/iQhBgoBw?= =?utf-8?q?M52OGOFQv48Bp670rfW5KV5oCcF8tm3peQkA4oITPn7uKNsy2vr95Y5E+EpZVPZdy?= =?utf-8?q?8ZdjWCuqjxZ6eKAJ1XKa9cKwGdsbGyaQtGgpzwdq4kX7ewg5qa8bTcN4WPUDPWA+U?= =?utf-8?q?Mt4k/+Er2fgqAUmaDNmCU6w2Of5ueX71UGmNRhDwT258R0qMISDl3pR+H+gbkEHVD?= =?utf-8?q?tbabYBW89r7vQ2tDYdwf7Cp8s9vmbUy6wBOpMJD61DE7GxiuX+BEHMVJpWSVMzxgh?= =?utf-8?q?SbZMzh15pQ//dnP46kAlbL1PymK0w5QmZfRE0+p71+mHAJTocvs7JhSCVqaWpad8c?= =?utf-8?q?ugUmYE6p99dnuzi+SPkgIdI8CYREMiWRmNzc5OwcIqgnfuYXBxXsFxmvCeOuPC2b4?= =?utf-8?q?dlQ9TWIRNm1QbX+z4w6Rj2Vl2yo4lw9JcmONSW4La0MrtTnY7pypTLFRLY/gFGC/m?= =?utf-8?q?JYw86VqexLH7Uc5Ym6Ja3BjvuZc+2esZlL3dRUudWvl9FhmYCsJoFs9wiNmqqOmNa?= =?utf-8?q?uXwzBBV4Gk3OlINPJXjPAJUOzuP16/cUaCplsUhNUBsdDLW5JkHuy+5XlH0FYb29/?= =?utf-8?q?K7QZ3Bi7hquiv1dX5dVhIDhzkcYt74YNK3c6Wm71H0EB6FVqPy26tkuiji+DoSJLM?= =?utf-8?q?ZveH5UVevKsm4d+FP/fgG1H51SKYgENcKjfPJbTVGbjfdtbW33HBZyrB/Du5dPjih?= =?utf-8?q?ClJx/sqxRqd/61UjiWwoxl2Fzntdtd0YNZS9qkq2w79v49e5i0t2zP3yLRDjoHPsL?= =?utf-8?q?d3WW0OO2BIZAhZQGvtv3UCC1vhaTalv4F3aFfhdRU5kwAIVYGktXVNPU=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(52116005)(7416005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Fw23i56IibsNYGpMknTSwdYwALQb?= =?utf-8?q?bjm6CHgzG46tpVSNB2spp0/doB4FPwZHl1bZreRp2aMrhWbaEH2mHJNJPm1oAiKFX?= =?utf-8?q?GimzZWVNblHf5Z99GxhoT1bSPMwttIeZw8l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O0xgDuCpyVCi2TkQ95?= =?utf-8?q?46s6cch8cG2/KeJC/lWDTIJkamed9vMlpnNzdw8sEL6eZwbls7W06FZVYltTMYHyI?= =?utf-8?q?sUpmeatcpUgiGXRMWvSjvJyWcPnWYYIbbCmRlCcWfzRTVre/LxV41lRvKZ1+TJKik?= =?utf-8?q?a9H1siyIaOTPCr6sZotmz/2tZrSC5rwG1un5T6/EA2HUZoj0IJZdWAtHFdWfuKZUf?= =?utf-8?q?upxGkgai+5cdAXuRAxHiXyNx2gOkEg21xvMfirzgHkUvYRZGetDT8tWAbQnRVqzTX?= =?utf-8?q?Y7Bw1XXSXXTgFXshKTzV1f8YnaCszDV5BD029DstZpmK082YJnuKLJMs+CHwoSWbH?= =?utf-8?q?pVxC5L6OJOuhM2cKR0wSRXHMfD99bgGX5Pk9gASEIuBa+a49uKpQbeRB4UvW90EW9?= =?utf-8?q?m1xP+pqgqdDLLlTjEOYTLAREsrtIVvEBXfjm50Q9nHI3B9qehCiXzZV+9XqD4YXUp?= =?utf-8?q?YO99iQ4lrrsLroL2padmuX4Sz4hR/7fOlzFZEks3QFelQB/KV4o9PpH8nE3WoGiTx?= =?utf-8?q?UR1vvJ9wtWDC?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 065f0460-04e2-428c-56a7-08dc69dd1913 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 12:49:11.0055 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kvq5FEOPiyJ+1kQ64iVQwxsQD3eMnMe+tmTitUmgyqQLUOxYlxzgOM82g+xPwvaQXsBROZvmNsKkMC2YFHNfdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9284 |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
diff --git a/drivers/pinctrl/sunplus/sppctl.c b/drivers/pinctrl/sunplus/sppctl.c index ae156f779a16..604256ec9079 100644 --- a/drivers/pinctrl/sunplus/sppctl.c +++ b/drivers/pinctrl/sunplus/sppctl.c @@ -823,7 +823,7 @@ static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node int nmG = of_property_count_strings(np_config, "groups"); const struct sppctl_func *f = NULL; u8 pin_num, pin_type, pin_func; - struct device_node *parent; + struct device_node *parent __free(device_node) = NULL; unsigned long *configs; struct property *prop; const char *s_f, *s_g; @@ -964,7 +964,6 @@ static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node } } - of_node_put(parent); dev_dbg(pctldev->dev, "%d pins mapped\n", *num_maps); return 0; @@ -973,7 +972,6 @@ static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node if ((*map)[i].type == PIN_MAP_TYPE_CONFIGS_PIN) kfree((*map)[i].data.configs.configs); kfree(*map); - of_node_put(parent); return -ENOMEM; }