| Message ID | 20261103100520.1309743-1-vulab@iscas.ac.cn (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27104-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id BCEF01C2D6D for <noreply@patchwork.local>; Tue, 3 Nov 2026 11:14:31 +0100 (CET) Authentication-Results: mxe881; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-27104-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-27104-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id C7E0D60D8F8 for <noreply@patchwork.local>; Tue, 3 Nov 2026 10:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1793700315; b=vqiw2pA4V528Bebql0Bzu0LRx1ONGh0jOsh3Gr+X+vew3buPFJXkUeN3/tKc2suIIkSy rkbqY0j8v8++ZDkVOGTfaTP3ZzFLBWLldyRc7gIB77hdivNFV9r3UtQ6KUzpj1utWdgHn ojKUoeenyK1ZlTTAKxyynYrGJkRr0HAYlOaEfB0it+bBHkr5rSyDI+S6Ig8c8EhjLOok+ re5btESKCbAWh1tnTuvpFFFcCrjKOjlIFTNFuO1hYrlE1WMhJIh+X0ShsMkb3D7LrMmQz /rT0ZnI90lCmizcFGHM9krEFJMYZChXK8Vr7lPEc1e2tcPBRH0hS1y7Nw8bkY0ySMsw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793700315; h=X-Original-To:Received:DMARC-Filter:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=ZYeZZrG9ZKN5BZOL0KcRfGjiqSQEn+PAKI/JApuA7Lo=; b=hQIHtcTOVTTJqfZbD1fIVCHDgOzns8/whqx8cFfbQ0BANpoC6V8XqCKGpTOt7mtjMF0f t8MvcWLRLMVm5yCFdWLWkHXBknDx438gKlvbFcz7ha/coHDn6fNswLauOnzknSiDOr5el 75T6fvoa6S5s14ht2yt02V2zihsD3jbTp1wi8I8A7RgvMhPzI0tR7rPm5CSMK9JAxEkvA oJUJm8FexbBh82VamwiBPTmEvQd0540PeI7Yv0QtVQj63mtBf77Nq13ktQlv968s4RzQY +/R+5+5HJTHk7KkHh5lLnYSkkbA6F18mMSfQUwxIQpDyZzJZ2CWNVSuXQoZu5DVp6gQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=fail smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09BA8606A32C; Tue, 3 Nov 2026 10:05:15 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=159.226.251.81 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793700314; b=oTE29XMjjsr7brboa2iaGgdimGhmS+L2fWNf+cjQQPZm4FmxT73sPg9JXhfxe/A8tHpr R37+F20rXa5j2iqH2r84lEyIRAKEerEti+21PIZIeE+OjwlCr63N4gkFofC5YIHbPk91u mR0LaNvH2Gg6VgL2PC8eJH6hUEzdJzMXutEAbo99VWDzvr9dmA2hCAVAFdgHIKSKGuER8 aAWREd1G5mDdYwBnH/vNrHy5Wthq6y9eGoX+YDIpm45a/Dfwf5LTb+HeSUCDxqWU8OAWs QblqVu70seiR2B8R/Ak2P4sC32V4yv57aOQgS9glEpg6DuFq4r2BcFDReLw/1zYr8kA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793700314; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: MIME-Version:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-Originating-IP:X-CM-SenderInfo; bh=ZYeZZrG9ZKN5BZOL0KcRfGjiqSQEn+PAKI/JApuA7Lo=; b=AeMh+l1RUJgM+L8pcBoawC2UWtdMLJUYaKcu9u19QJAJcYgq1UfrvYuHeRGi45tD0Sv6 rDoICSqlwzUnu3AWtSl3e+7yfPWb5zvmAA1eaLOrFOGVSDakaP2kp+7icUo03YI6d8llK IuC/PXv/3lWUYkUWpQr7a+f/2hDdDluXbT8wN2iibz7vX7Z5Dh8V5DvVZ+eS2+weH+S4v wY8GxgkmP8PiqXxhGeQG7iJeVAcjNptxfYctGDMO/tgVwtGraK8SZZUYtItLGEhilLGsz 7V5x6XS4YPLU17SRLomg3z/KPAJI19clTouFiJbgECxacvvk/G1X8SdSvZfr/SMjEEA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.remote-ip=159.226.251.81 Received: from cstnet.cn (smtp81.cstnet.cn [159.226.251.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4874606A327 for <linux-sunxi@lists.linux.dev>; Tue, 3 Nov 2026 10:05:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C4874606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from dfae2b116770.home.arpa (unknown [36.110.52.2]) by APP-03 (Coremail) with SMTP id rQCowADH0JHXselqA3s7AA--.6276S2; Tue, 03 Nov 2026 18:05:11 +0800 (CST) From: Wentao Liang <vulab@iscas.ac.cn> To: Marc Kleine-Budde <mkl@pengutronix.de>, Vincent Mailhol <mailhol@kernel.org>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org> Cc: linux-can@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Wentao Liang <vulab@iscas.ac.cn>, stable@vger.kernel.org Subject: [PATCH] can: sun4i_can: Use devm_clk_get() for the CAN clock Date: Tue, 3 Nov 2026 10:05:20 +0000 Message-Id: <20261103100520.1309743-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.34.1 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Post: <mailto:linux-sunxi@lists.linux.dev> List-Help: <mailto:linux-sunxi+help@lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev> Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowADH0JHXselqA3s7AA--.6276S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Kr4UGw18KF4Duw47Zr1UKFg_yoW8Gr48pF sYgFWrCrZrGF4Ygw4UJF4kZF1Yvw4Ika4xKr9Yka1Sv3Z3Ar18GFy5tFWUZFW8ZFWkGa1U ur4UtF18tFs8Z37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9F14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r126r1DMcIj6I8E87Iv67AKxVWxJr0_GcWlOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7x kEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E 67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1x MIIF0xvEx4A2jsIE14v26F4j6r4UJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcS sGvfC2KfnxnUUI43ZEXa7VU8nNVPUUUUU== X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiBgAAA2rpnIRixAAAs4 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [0.31 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.232.135.74:from]; SUSPICIOUS_RECIPS(1.50)[]; ARC_REJECT(1.00)[cv is fail on i=2]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sto.lore.kernel.org:helo,sto.lore.kernel.org:rdns,iscas.ac.cn:email]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; DMARC_NA(0.00)[iscas.ac.cn]; FORGED_SENDER_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[159.226.251.81:received,36.110.52.2:received,100.77.114.92:received]; FROM_NEQ_ENVFROM(0.00)[vulab@iscas.ac.cn,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.232.128.0/19, country:SG]; RCPT_COUNT_SEVEN(0.00)[11]; FREEMAIL_TO(0.00)[pengutronix.de,kernel.org,gmail.com,sholland.org]; R_SPF_ALLOW(0.00)[+ip4:172.232.135.74]; TO_DN_SOME(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-27104-noreply=patchwork.local]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.232.135.74:from] X-Rspamd-Queue-Id: BCEF01C2D6D X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX |
| Series |
can: sun4i_can: Use devm_clk_get() for the CAN clock
|
|
Commit Message
Wentao Liang
Nov. 3, 2026, 10:05 a.m. UTC
sun4ican_probe() obtains the CAN clock with of_clk_get(), but neither
the probe error paths nor sun4ican_remove() ever call clk_put(), so the
clock reference is leaked both when probing fails and when the driver is
unbound.
Use devm_clk_get() so that the reference is released with the device.
Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module")
Cc: stable@vger.kernel.org
Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/net/can/sun4i_can.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Tue, 03 Nov 2026 10:05:20 +0000, Wentao Liang wrote: > sun4ican_probe() obtains the CAN clock with of_clk_get(), but neither > the probe error paths nor sun4ican_remove() ever call clk_put(), so the > clock reference is leaked both when probing fails and when the driver is > unbound. > > Use devm_clk_get() so that the reference is released with the device. > > Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module") > Cc: stable@vger.kernel.org > Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex > Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> > --- > drivers/net/can/sun4i_can.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Multiple things here: 1. Your team ignored completely previous feedback. Multiple times. 2. You use multiple identities with this email address, thus I doubt that we speak with an actual person. 3. Your bot does not even bother running checkpatch, right? 4. Nothing of this was reproduced nor tested. 5. Finally, the same feedback: You sent multiple independent patches, to multiple independent subsystems. The amount of these patches clearly suggest this was AI generated and most likely not tested. More importantly, you sent all this work without properly organizing relevant patches into patchsets. This makes reviewing difficult and might cause multiple reviewers to address the same issue. Replying to the entire set is impossible and requires handling each patch independently, instead of applying or discarding the set. Maintainers also won't see the bigger picture of your work. Quite worrying. This is on the verge of hostile patch: bomb us with so many contributions, we won't be able to handle them in efficient manner, like responding ONCE to ask you to slow down. Considering all this is untested and LLM generated, I have even more doubts whether this should be considered for review. Please read kernel documentation BEFORE posting more work. It will explain you how to identify subsystems, how to organize your work per subsystem (so a patchset grouping multiple patches with a short cover letter), how to document the issue discovery method and what was or was not tested. Best regards, Krzysztof
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index af52285d5a4e..9f5d31063b13 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -819,7 +819,6 @@ static void sun4ican_remove(struct platform_device *pdev) static int sun4ican_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; struct clk *clk; struct reset_control *reset = NULL; void __iomem *addr; @@ -844,7 +843,7 @@ static int sun4ican_probe(struct platform_device *pdev) } } - clk = of_clk_get(np, 0); + clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "unable to request clock\n"); err = -ENODEV;