From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 92F96606A680 for ; Sun, 29 Nov 2026 01:47:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WO/sEMY8; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=T6zk12cL DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=X6k9q34rQTpKQhvBThO6fbLo21/CsQT62lUKkwyn2as=; b=WO/sEMY8CtliL0CmwryCVNNFNU oyiScom7SwkFtVvuOi0YA+FZzWuUUK80lNYx50E5SWG1aBkzNst+nLHetTzA7v7jy6itEiyS0xG7Z Y7nZjPZnTGms+tV2FnicSvmB603h+8pA9LHh3cHehTAdnd7HjfCQd1vYKxDxny+zfehZq9D3IDwhI vrFlStOrV2uevmDMmOU7D5o7p5UT/0CYmb8F5rOeJsNlcIpaHo1DmBO2u3k97r0yKVGlBupVNhMyT ZTeLsDxTRX/wNXflyIKgnklhm7Q3X4YasqICg5N9BqJZstu4sy0qBKhMGA8CR1QIkph59T+dlAcnf wBEVQ2sQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXU11-00000001PfX-3oUC; Sun, 29 Nov 2026 01:47:43 +0000 Received: from mail-dy1-x132e.google.com ([2607:f8b0:4864:20::132e]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXU0y-00000001PeA-340U for linux-arm-kernel@lists.infradead.org; Sun, 29 Nov 2026 01:47:42 +0000 Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-38431138772so12311128eec.1 for ; Sat, 28 Nov 2026 17:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795916859; x=1796521659; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=X6k9q34rQTpKQhvBThO6fbLo21/CsQT62lUKkwyn2as=; b=T6zk12cL1UWpyIEpGhYBYgIr9O9DVzJMREAXpjn/z2qLz3bzXI3x+5l8/nklS/821B GdqLmHFYBoZCYBP4SUeclM6xMCJ0EUzHPuF1NQHBuwSpJBopXn3VO02xO26Fsc3fMjbL mAEEedKmc12yw9Re7CKV361SE8i0eXtge5uS3YQki5L98FLj3Jw1GL6EQaeLKHs1wVvN yHR2os4204MkxSvtVE50s+cSd2I80y6d38eyaBPpcfPt35LYo3BzCHoMeZi7H3DBYbG0 VvHDI1aTepY/wlw6kg9krFq1JRZTFZMe8HDI/16cEVyUGPamEmnRuoY/aCcV4/kdtP6k bkeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795916859; x=1796521659; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=X6k9q34rQTpKQhvBThO6fbLo21/CsQT62lUKkwyn2as=; b=X0BEIToIYBBcLnBFw0UrMU9P040slajf6ow2C27Y4KbFi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cI+x 7XbAY5vGFz+GrWiSBMFt8V77WNsMGszWMpG8faShuPkSNAMrPWFOzpxuX5duZxmFgQ3wYhIgzab 7yRNbd26gI6ZUDdrzWS+arZkz7VIJZjgPOLjHSRh3w== X-Received: by 2002:a05:7301:fc18:b0:36f:2e77:93e2 with SMTP id 5a478bee46e88-38570f27031mr27906814eec.28.1795916859150; Sat, 28 Nov 2026 17:47:39 -0800 (PST) Received: from buffalo-ssd.taila54753.ts.net ([2a09:bac1:3b40:a18::2ff:66]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566cd46c5sm107620417eec.11.2026.11.28.17.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 17:47:38 -0800 (PST) From: Akari Tsuyukusa To: AngeloGioacchino Del Regno , Stephen Boyd , Brian Masney , Jerome Brunet , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Akari Tsuyukusa , Chen-Yu Tsai , Miles Chen , linux-clk@vger.kernel.org (open list:MEDIATEK CLOCK DRIVERS), linux-mediatek@lists.infradead.org (moderated list:MEDIATEK CLOCK DRIVERS), linux-kernel@vger.kernel.org (open list:ARM/Mediatek SoC support), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH linux-next 00/33] clk: mediatek: Fix regressions and pre-existing bugs Date: Sun, 29 Nov 2026 10:47:12 +0900 Message-ID: <20261129014745.3375923-1-akkun11.open@gmail.com> X-Mailer: git-send-email 2.56.0 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261128_174740_769210_AC7E1315 X-CRM114-Status: GOOD ( 14.14 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Thank you for merging my previous series migrating MediaTek clock drivers to the common probe/remove helpers [1]. When converting from _NR macros to ARRAY_SIZE(), my oversight caused clock ID mismatches (similar to [2]) and premature descriptor frees in several drivers. In addition, sashiko-bot reported pre-existing bugs in the common helpers and SoC drivers. This series fixes both. This series splits the work into bug fixes (PATCH 1-14) and cleanup of now-unused _NR definitions (PATCH 15-33): PATCH 1,4: Fix my mistakes in common helpers PATCH 2,3,5: Fix pre-existing bugs in common helpers PATCH 6-14: Fix clock ID and descriptor lifetime bugs in SoC drivers PATCH 15-33: Drop unused _NR macros from dt-bindings PATCH 9 and PATCH 10 are separated to ease backporting: PATCH 9 fixes pre-existing missing MT2701 audsys clock IDs, and PATCH 10 fixes the new regressions introduced by the migration. Based on linux-next 20261127. Part of this series was assisted by LLM. PS: The unmerged pllfh support in common helpers and per-SoC migration from [1] will be improved and sent in a separated series, including fixes for several bugs found in the drivers. [1] [PATCH v2 00/35] clk: mediatek: Migrate to common probe/remove helpers and fix memory leaks https://lore.kernel.org/all/20261013151734.3177690-1-akkun11.open@gmail.com/T/ [2] [PATCH 0/6] clk: mediatek: Fix descriptor clock ID allocation https://lore.kernel.org/all/20260921102522.1640072-1-akkun11.open@gmail.com/T/ Akari Tsuyukusa (33): clk: mediatek: Skip common MMIO mapping for PLL-only controllers clk: mediatek: Fix NULL pointer dereference in pdev remove clk: mediatek: Drop unused shared_io flag clk: mediatek: Pass node to of_platform_populate() in common probe clk: mediatek: Fix MFG mux notifier use-after-free clk: mediatek: mt2701: Keep CPU mux descriptors alive clk: mediatek: mt8167: Keep muxes descriptors alive clk: mediatek: mt8516: Keep clock descriptors alive clk: mediatek: Reserve missing MT2701 audsys clock IDs clk: mediatek: Fix MT2701 onecell IDs after common probe migration clk: mediatek: Fix MT6779 onecell IDs after common probe migration clk: mediatek: Fix MT6797 onecell IDs after common probe migration clk: mediatek: Fix MT8135 onecell IDs after common probe migration clk: mediatek: Fix MT8173 onecell IDs after common probe migration dt-bindings: clock: mt2701: Drop unused _NR macros dt-bindings: clock: mt2712: Drop unused _NR macros dt-bindings: clock: mt6765: Drop unused _NR macros dt-bindings: clock: mt6779: Drop unused _NR macros dt-bindings: clock: mt6795: Drop unused _NR macros dt-bindings: clock: mt6797: Drop unused _NR macros dt-bindings: clock: mt7622: Drop unused _NR macros dt-bindings: clock: mt7629: Drop unused _NR macros dt-bindings: clock: mt7988: Drop unused _NR macros dt-bindings: clock: mt8135: Drop unused _NR macros dt-bindings: clock: mt8167: Drop unused _NR macros dt-bindings: clock: mt8173: Drop unused _NR macros dt-bindings: clock: mt8183: Drop unused _NR macros dt-bindings: clock: mt8186: Drop unused _NR macros dt-bindings: clock: mt8188: Drop unused _NR macros dt-bindings: clock: mt8192: Drop unused _NR macros dt-bindings: clock: mt8195: Drop unused _NR macros dt-bindings: clock: mt8365: Drop unused _NR macros dt-bindings: clock: mt8516: Drop unused _NR macros drivers/clk/mediatek/clk-mt2701-aud.c | 2 + drivers/clk/mediatek/clk-mt2701.c | 11 ++- drivers/clk/mediatek/clk-mt6779.c | 10 +++ drivers/clk/mediatek/clk-mt6797.c | 14 ++++ drivers/clk/mediatek/clk-mt8135-apmixedsys.c | 7 ++ drivers/clk/mediatek/clk-mt8167.c | 2 +- drivers/clk/mediatek/clk-mt8173-infracfg.c | 1 + drivers/clk/mediatek/clk-mt8516.c | 8 +- drivers/clk/mediatek/clk-mtk.c | 76 +++++++++++-------- drivers/clk/mediatek/clk-mtk.h | 1 - .../dt-bindings/clock/mediatek,mt6795-clk.h | 7 -- .../dt-bindings/clock/mediatek,mt7988-clk.h | 4 - .../dt-bindings/clock/mediatek,mt8188-clk.h | 29 ------- .../dt-bindings/clock/mediatek,mt8365-clk.h | 18 ----- include/dt-bindings/clock/mt2701-clk.h | 13 ---- include/dt-bindings/clock/mt2712-clk.h | 12 --- include/dt-bindings/clock/mt6765-clk.h | 6 -- include/dt-bindings/clock/mt6779-clk.h | 11 --- include/dt-bindings/clock/mt6797-clk.h | 7 -- include/dt-bindings/clock/mt7622-clk.h | 8 -- include/dt-bindings/clock/mt7629-clk.h | 2 - include/dt-bindings/clock/mt8135-clk.h | 4 - include/dt-bindings/clock/mt8167-clk.h | 6 -- include/dt-bindings/clock/mt8173-clk.h | 8 -- include/dt-bindings/clock/mt8183-clk.h | 16 ---- include/dt-bindings/clock/mt8186-clk.h | 16 ---- include/dt-bindings/clock/mt8192-clk.h | 26 ------- include/dt-bindings/clock/mt8195-clk.h | 30 -------- include/dt-bindings/clock/mt8516-clk.h | 2 - 29 files changed, 94 insertions(+), 263 deletions(-) -- 2.56.0