Article View: linux.kernel.netdev
Article #18982Re: [PATCH] net: dsa: mt7530: fix regulator leak in mt7530_setup()
From: Xiangwu Lai
Date: Thu, 19 Nov 2026 06:05
Date: Thu, 19 Nov 2026 06:05
44 lines
10031 bytes
10031 bytes
Hi Andrew,
thanks for the review. For the record, this replies to "[PATCH] net:
dsa: mt7530: fix regulator leak in mt7530_setup()":
https://lore.kernel.org/all/20261118014114.1855-1-laixiangwu@cmss.chinamobile.com/
On Thu, Nov 19, 2026 at 12:36:27AM +0100, Andrew Lunn wrote:
> > Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
>
> Does this bother anybody?
>
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
The quoted subject is the exact title the commit has in mainline: the
"net-next: " prefix is part of the commit subject itself, Sean Wang's
2017 patch went in with the list prefix kept in the subject, and
"git log --format=%s b8f126a8d543" prints it that way. I kept the
tag verbatim so that it matches the tree, which is what the stable
rules ask for. There is nothing to change on my side here unless the
stable maintainers say otherwise.
> It is unusual to have two different goto labels with return. Normally
> cleanup is structured similar to the code which went wrong.
>
> So something like:
>
> > +err_powers:
> > + if (priv->id == ID_MT7530)
> > + regulator_disable(priv->io_pwr);
> > +err_disable_core_pwr:
> > + if (priv->id == ID_MT7530)
> > + regulator_disable(priv->core_pwr);
> > + return ret;
Agreed, that is the better structure. v2 follows as a new thread
with exactly this fall-through cleanup and a Suggested-by: tag for
you:
https://lore.kernel.org/all/20261119060424.1476-1-laixiangwu@cmss.chinamobile.com/
Best regards,
Xiangwu Lai
Technical Details
Message-ID:
<20261119060559.658-1-laixiangwu@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366760-linux-kernel-netdev=dewy.ruReferences:
<7c6bcbbe-bcca-4294-a54c-320b26a9d3da@lunn.ch>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366760-linux-kernel-netdev=dewy.ru From: laixiangwu@cmss.chinamobile.com (Xiangwu Lai) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net: dsa: mt7530: fix regulator leak in mt7530_setup() Date: Thu, 19 Nov 2026 14:05:58 +0800 Organization: Usenet Network Message-ID: <20261119060559.658-1-laixiangwu@cmss.chinamobile.com> References: <7c6bcbbe-bcca-4294-a54c-320b26a9d3da@lunn.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2802937"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:duhilSJHbgmendQZl1aOOSLvirg= sha256:xY2mDK9XUkbhHwyicVfnjGTvYKh+QiBCRxl7+vcBB2k= sha1:NqSCkECP93Wx48ZM/KJgcQnavxQ= sha256:JzwcAtxHwnFKKXjTawUV5wgrU7SbmyKPx8zgnEFyEFE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id B14F211550E; Thu, 19 Nov 2026 09:06:25 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.75 X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4EUA2PJCaQ8f; Thu, 19 Nov 2026 09:06:17 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366760-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B0EDD1154F4; Thu, 19 Nov 2026 09:06:08 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 5BF6E3031FA; Thu, 19 Nov 2026 06:06:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795068364; b=HkwwCPPDldyLtlgXVCAHzciz8wX50X1rInyyyJ5BQ/7JzATnSbYw3zdy8ny9fvpcZEm/ EmrEV4IGSak33I7uhasftgf9f2XfXS931nLfXHCWcnh/wGlnfcOdygEdsNiDnupvhBxjF HlwhAtuQWV3w6u1QP2+DvyN5lcskha+hmYLL1HkhjtgrRVOp1GC8tncuKKEy2odJJ6CCO 9mG3POTzWrMP4rAr5hg3YT/v1x3sT7lxmMzBgpDMyKcvQZnnkJ8qbkHVAspCPguIAisAR BL2eTIY8mw1S38gKk8fwMN/kS/odXb6iRUczT4TFtL/edNtnjwgzhzQHUlSRQYWvw3Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795068364; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=/5rIHAfqRqd8MBoUEzsiuW3HhhEoDxIjxePKjQSRiAI=; b=AcxeZsgFkk/+hHN5QR4JTd43iBNK4XowOMXLX0NpAs84Y6BJ205u5B37ewW3favAwD66 Gj5Pone7/cXiDe5aMxiXkt2YMAp/0SUp8luxLbbJdHWjoPafdyYiKv1ShdxZGBcg5onJm BdZa49EgUVhe2rCok1c3Z+vMijcV5mb6SQM1B3iGBkw89R/UL/65C8iIR9pRAXPNhtYHi Uo+dWwI1+L/BLVsEdhRk7N6CCEtuTVTb34l6Ngk8GGB87CMRfxLBNdioLRF99BlfXvLqP LrlSxClGlRLl1iTqeCed4Ik+dysStjYHLUbc+18qjrkSlynDG4KDb3RojjQK3RVMZYw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=Qkwx0+12; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FC21606A333; Thu, 19 Nov 2026 06:06:04 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=Qkwx0+12 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795068363; b=tMG5crCN40uStwWpE9rPusCbfll2VwFHZfa0kVfjaLwAt8rGid9lRU+wDh5MiPmVUYbS rfWqi6WMq9ChKlEdiVTROeLtjtgaixslogbU9IXw0i8jdXHqurE+iYNJXCTtuY5rdiAoz 0BOUkcSAONLBNj6aYad1Cm7MsrAp5bChAboqlhwbhVi9u9Q+EGy+YBDal7qTWPCZfncfM DggMKDBhHdxGgLmOaYXobgm9vf8f34B1dwme+CG3GmP29JsUwpmDrH1ZIp1W7BJguNVJ9 +X0TvjdgecUnuTlKNXPsZD9A+K+WzRYYj2MQJMG0irSi1zseDijh21X0mXIEtFkp5aA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795068363; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=/5rIHAfqRqd8MBoUEzsiuW3HhhEoDxIjxePKjQSRiAI=; b=pKfOiLdTdJCmauhAQonNtQLfsTkLaFKH9EXbO4d9st0aqP3QNOkzqSavoMSp2u3YBPtt 3MZOOnhPRVrrIRY5eI3RYl72li5xWbBg2jhQuAygc91V99+/SURm3eF1U7tgVShR36mK6 jRZDp8w9NJCOqByhNb1DkNKHNPyo17n0xlZU8vXp4ANQe7fuRam6xsp+ta58vsggiYiTL 2bjEjQCqqDqmSbhcE4kHFakQOa72VT1AIKSpXjW/YIjKZilMR3sCnCRpcziHqZwyp//2N fep6VF89Kltui6vEsdKVzepgzz2eneBEIm1t4siwSdNuL6DqoW1O4HH7BkyT/z7UGFA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=Qkwx0+12; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A350606A320; Thu, 19 Nov 2026 06:06:01 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3A350606A320 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=Qkwx0+12pC61tyHlcsA9ASNEWJjUEADOCqxYfSbMcLKZeTE/4nsTrE9QFCmwAJw//VgI7U3Gr7S9/ 2FNEnXKO72B/eD88BjfG2MkI3V771vcLyXMjDOG6FimFMcLocU//trzR7Ko83mXeT6E8qI/9aTpoYq 1bJxlHy7jrrcrGLU= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee96afe91c70c0-1fa31; Thu, 19 Nov 2026 14:06:00 +0800 (CST) X-RM-TRANSID: 2ee96afe91c70c0-1fa31 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from DESKTOP-3K8GUTQ (unknown[223.108.79.97]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee76afe91c6ea1-f1aaf; Thu, 19 Nov 2026 14:06:00 +0800 (CST) X-RM-TRANSID: 2ee76afe91c6ea1-f1aaf X-Cc: Xiangwu Lai <laixiangwu@cmss.chinamobile.com>, chester.a.unal@arinc9.com, daniel@makrotopia.org, olteanv@gmail.com, sean.wang@mediatek.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.50.1.windows.1 X-In-Reply-To: <7c6bcbbe-bcca-4294-a54c-320b26a9d3da@lunn.ch> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list