From fdce161afe29b40e84853ec821cbd7bbd727bf58 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 27 Nov 2025 21:57:31 -0800 Subject: [PATCH 1/9] firmware: ti_sci.h: fix all kernel-doc warnings Modify kernel-doc comments in ti_sci.h to eliminate all kernel-doc warnings: * use correct/matching struct names in kdoc comments * use correct struct member names in kdoc comments * add a ':' after struct member names where needed * change a blank kdoc line to " *" * convert 3 structs to kernel-doc comments: struct ti_sci_msg_rm_udmap_tx_ch_cfg_req struct ti_sci_msg_rm_udmap_rx_ch_cfg_req struct ti_sci_msg_rm_udmap_flow_cfg_req Fixes 13 kernel-doc warnings: Warning: drivers/firmware/ti_sci.h:609 expecting prototype for struct tisci_msg_req_prepare_sleep. Prototype was for struct ti_sci_msg_req_prepare_sleep instead Warning: drivers/firmware/ti_sci.h:609 struct member 'hdr' not described in 'ti_sci_msg_req_prepare_sleep' Warning: drivers/firmware/ti_sci.h:609 struct member 'mode' not described in 'ti_sci_msg_req_prepare_sleep' Warning: drivers/firmware/ti_sci.h:609 struct member 'ctx_lo' not described in 'ti_sci_msg_req_prepare_sleep' Warning: drivers/firmware/ti_sci.h:609 struct member 'ctx_hi' not described in 'ti_sci_msg_req_prepare_sleep' Warning: drivers/firmware/ti_sci.h:609 struct member 'debug_flags' not described in 'ti_sci_msg_req_prepare_sleep' Warning: drivers/firmware/ti_sci.h:623 expecting prototype for struct tisci_msg_set_io_isolation_req. Prototype was for struct ti_sci_msg_req_set_io_isolation instead Warning: drivers/firmware/ti_sci.h:696 struct member 'latency' not described in 'ti_sci_msg_req_lpm_set_latency_constraint' Warning: drivers/firmware/ti_sci.h:857 bad line: Warning: drivers/firmware/ti_sci.h:1002 This comment starts with '/**', but isn't a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst * Configures a Navigator Subsystem UDMAP transmit channel Warning: drivers/firmware/ti_sci.h:1130 This comment starts with '/**', but isn't a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst * Configures a Navigator Subsystem UDMAP receive channel Warning: drivers/firmware/ti_sci.h:1249 This comment starts with '/**', but isn't a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst * Configures a Navigator Subsystem UDMAP receive flow Warning: drivers/firmware/ti_sci.h:1421 struct member 'valid_params' not described in 'ti_sci_msg_rm_udmap_flow_cfg_req' Signed-off-by: Randy Dunlap Link: https://patch.msgid.link/20251128055731.812460-1-rdunlap@infradead.org Signed-off-by: Nishanth Menon --- drivers/firmware/ti_sci.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index 91f234550c43..4616127e33ff 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -580,13 +580,13 @@ struct ti_sci_msg_resp_get_clock_freq { } __packed; /** - * struct tisci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP. + * struct ti_sci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP. * - * @hdr TISCI header to provide ACK/NAK flags to the host. - * @mode Low power mode to enter. - * @ctx_lo Low 32-bits of physical pointer to address to use for context save. - * @ctx_hi High 32-bits of physical pointer to address to use for context save. - * @debug_flags Flags that can be set to halt the sequence during suspend or + * @hdr: TISCI header to provide ACK/NAK flags to the host. + * @mode: Low power mode to enter. + * @ctx_lo: Low 32-bits of physical pointer to address to use for context save. + * @ctx_hi: High 32-bits of physical pointer to address to use for context save. + * @debug_flags: Flags that can be set to halt the sequence during suspend or * resume to allow JTAG connection and debug. * * This message is used as the first step of entering a low power mode. It @@ -610,7 +610,7 @@ struct ti_sci_msg_req_prepare_sleep { } __packed; /** - * struct tisci_msg_set_io_isolation_req - Request for TI_SCI_MSG_SET_IO_ISOLATION. + * struct ti_sci_msg_req_set_io_isolation - Request for TI_SCI_MSG_SET_IO_ISOLATION. * * @hdr: Generic header * @state: The deseared state of the IO isolation. @@ -676,7 +676,7 @@ struct ti_sci_msg_req_lpm_set_device_constraint { * TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT. * * @hdr: TISCI header to provide ACK/NAK flags to the host. - * @wkup_latency: The maximum acceptable latency to wake up from low power mode + * @latency: The maximum acceptable latency to wake up from low power mode * in milliseconds. The deeper the state, the higher the latency. * @state: The desired state of wakeup latency constraint: set or clear. * @rsvd: Reserved for future use. @@ -855,7 +855,7 @@ struct ti_sci_msg_rm_ring_cfg_req { * UDMAP transmit channels mapped to source threads will have their * TCHAN_THRD_ID register programmed with the destination thread if the pairing * is successful. - + * * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map. * PSI-L destination threads start at index 0x8000. The request is NACK'd if * the destination thread is not greater than or equal to 0x8000. @@ -1000,7 +1000,8 @@ struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg { } __packed; /** - * Configures a Navigator Subsystem UDMAP transmit channel + * struct ti_sci_msg_rm_udmap_tx_ch_cfg_req - Configures a + * Navigator Subsystem UDMAP transmit channel * * Configures the non-real-time registers of a Navigator Subsystem UDMAP * transmit channel. The channel index must be assigned to the host defined @@ -1128,7 +1129,8 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req { } __packed; /** - * Configures a Navigator Subsystem UDMAP receive channel + * struct ti_sci_msg_rm_udmap_rx_ch_cfg_req - Configures a + * Navigator Subsystem UDMAP receive channel * * Configures the non-real-time registers of a Navigator Subsystem UDMAP * receive channel. The channel index must be assigned to the host defined @@ -1247,7 +1249,8 @@ struct ti_sci_msg_rm_udmap_rx_ch_cfg_req { } __packed; /** - * Configures a Navigator Subsystem UDMAP receive flow + * struct ti_sci_msg_rm_udmap_flow_cfg_req - Configures a + * Navigator Subsystem UDMAP receive flow * * Configures a Navigator Subsystem UDMAP receive flow's registers. * Configuration does not include the flow registers which handle size-based @@ -1258,7 +1261,7 @@ struct ti_sci_msg_rm_udmap_rx_ch_cfg_req { * * @hdr: Standard TISCI header * - * @valid_params + * @valid_params: * Bitfield defining validity of rx flow configuration parameters. The * rx flow configuration fields are not valid, and will not be used for flow * configuration, if their corresponding valid bit is zero. Valid bit usage: From 168d2fb7805510aba3b0871414ec93c2364f9e23 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 2 Jan 2026 13:47:30 +0100 Subject: [PATCH 2/9] soc: ti: knav_qmss: Remove ENOMEM printks Printing messages on ENOMEM errors is redundant and discouraged, because core already prints detailed report. Simplify the code by dropping such dev_err(). Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260102124729.63964-6-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_qmss_queue.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 6e56e7609ccd..ff097a1531a9 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1091,7 +1091,6 @@ static int knav_queue_setup_regions(struct knav_device *kdev, region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL); if (!region) { of_node_put(child); - dev_err(dev, "out of memory allocating region\n"); return -ENOMEM; } @@ -1409,7 +1408,6 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev, qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL); if (!qmgr) { of_node_put(child); - dev_err(dev, "out of memory allocating qmgr\n"); return -ENOMEM; } @@ -1509,7 +1507,6 @@ static int knav_queue_init_pdsps(struct knav_device *kdev, pdsp = devm_kzalloc(dev, sizeof(*pdsp), GFP_KERNEL); if (!pdsp) { of_node_put(child); - dev_err(dev, "out of memory allocating pdsp\n"); return -ENOMEM; } pdsp->name = knav_queue_find_name(child); From c076d74383f1ce2c8db4c83c40c714c8751d5d01 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 2 Jan 2026 13:47:31 +0100 Subject: [PATCH 3/9] soc: ti: knav_dma: Remove ENOMEM printks Printing messages on ENOMEM errors is redundant and discouraged, because core already prints detailed report. Simplify the code by dropping such dev_err(). Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260102124729.63964-7-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c index 553ae7ee20f1..93365bac2631 100644 --- a/drivers/soc/ti/knav_dma.c +++ b/drivers/soc/ti/knav_dma.c @@ -716,10 +716,8 @@ static int knav_dma_probe(struct platform_device *pdev) kdev = devm_kzalloc(dev, sizeof(struct knav_dma_pool_device), GFP_KERNEL); - if (!kdev) { - dev_err(dev, "could not allocate driver mem\n"); + if (!kdev) return -ENOMEM; - } kdev->dev = dev; INIT_LIST_HEAD(&kdev->list); From 9a97b2154ef51dd079bbaf247289e6d82210c03b Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 2 Jan 2026 13:47:32 +0100 Subject: [PATCH 4/9] soc: ti: knav_dma: Simplify error messages in probe Simplify the code by using dev_err_probe() and local 'dev' variable. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260102124729.63964-8-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_dma.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c index 93365bac2631..7adf1664da60 100644 --- a/drivers/soc/ti/knav_dma.c +++ b/drivers/soc/ti/knav_dma.c @@ -709,10 +709,8 @@ static int knav_dma_probe(struct platform_device *pdev) struct device_node *child; int ret = 0; - if (!node) { - dev_err(&pdev->dev, "could not find device info\n"); - return -EINVAL; - } + if (!node) + return dev_err_probe(dev, -EINVAL, "could not find device info\n"); kdev = devm_kzalloc(dev, sizeof(struct knav_dma_pool_device), GFP_KERNEL); @@ -725,7 +723,7 @@ static int knav_dma_probe(struct platform_device *pdev) pm_runtime_enable(kdev->dev); ret = pm_runtime_resume_and_get(kdev->dev); if (ret < 0) { - dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret); + dev_err(dev, "unable to enable pktdma, err %d\n", ret); goto err_pm_disable; } @@ -734,14 +732,13 @@ static int knav_dma_probe(struct platform_device *pdev) ret = dma_init(node, child); if (ret) { of_node_put(child); - dev_err(&pdev->dev, "init failed with %d\n", ret); + dev_err(dev, "init failed with %d\n", ret); break; } } if (list_empty(&kdev->list)) { - dev_err(dev, "no valid dma instance\n"); - ret = -ENODEV; + ret = dev_err_probe(dev, -ENODEV, "no valid dma instance\n"); goto err_put_sync; } From 6b222f28999c481a6531c7b5fbbf95f877875d23 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 2 Jan 2026 13:47:33 +0100 Subject: [PATCH 5/9] soc: ti: knav: Simplify with scoped for each OF child loop Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260102124729.63964-9-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_qmss_queue.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index ff097a1531a9..86d7a9c9ae01 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1079,7 +1079,6 @@ static int knav_queue_setup_regions(struct knav_device *kdev, struct device_node *regions __free(device_node) = of_get_child_by_name(node, "descriptor-regions"); struct knav_region *region; - struct device_node *child; u32 temp[2]; int ret; @@ -1087,12 +1086,10 @@ static int knav_queue_setup_regions(struct knav_device *kdev, return dev_err_probe(dev, -ENODEV, "descriptor-regions not specified\n"); - for_each_child_of_node(regions, child) { + for_each_child_of_node_scoped(regions, child) { region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL); - if (!region) { - of_node_put(child); + if (!region) return -ENOMEM; - } region->name = knav_queue_find_name(child); of_property_read_u32(child, "id", ®ion->id); @@ -1396,7 +1393,6 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev, struct device_node *qmgrs __free(device_node) = of_get_child_by_name(node, "qmgrs"); struct knav_qmgr_info *qmgr; - struct device_node *child; u32 temp[2]; int ret; @@ -1404,12 +1400,10 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev, return dev_err_probe(dev, -ENODEV, "queue manager info not specified\n"); - for_each_child_of_node(qmgrs, child) { + for_each_child_of_node_scoped(qmgrs, child) { qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL); - if (!qmgr) { - of_node_put(child); + if (!qmgr) return -ENOMEM; - } ret = of_property_read_u32_array(child, "managed-queues", temp, 2); @@ -1501,14 +1495,12 @@ static int knav_queue_init_pdsps(struct knav_device *kdev, { struct device *dev = kdev->dev; struct knav_pdsp_info *pdsp; - struct device_node *child; - for_each_child_of_node(pdsps, child) { + for_each_child_of_node_scoped(pdsps, child) { pdsp = devm_kzalloc(dev, sizeof(*pdsp), GFP_KERNEL); - if (!pdsp) { - of_node_put(child); + if (!pdsp) return -ENOMEM; - } + pdsp->name = knav_queue_find_name(child); pdsp->iram = knav_queue_map_reg(kdev, child, From 126f61528d34658d80ec827f981c540c1230fdc4 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 2 Jan 2026 13:47:34 +0100 Subject: [PATCH 6/9] soc: ti: knav_dma: Simplify with scoped for each OF child loop Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260102124729.63964-10-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c index 7adf1664da60..e5f5e3142fc4 100644 --- a/drivers/soc/ti/knav_dma.c +++ b/drivers/soc/ti/knav_dma.c @@ -706,7 +706,6 @@ static int knav_dma_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = pdev->dev.of_node; - struct device_node *child; int ret = 0; if (!node) @@ -728,10 +727,9 @@ static int knav_dma_probe(struct platform_device *pdev) } /* Initialise all packet dmas */ - for_each_child_of_node(node, child) { + for_each_child_of_node_scoped(node, child) { ret = dma_init(node, child); if (ret) { - of_node_put(child); dev_err(dev, "init failed with %d\n", ret); break; } From 3fec51b89d603f2d8ebf50f815b5e159efc381da Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 27 Nov 2025 14:54:54 +0100 Subject: [PATCH 7/9] soc: ti: k3-socinfo: Fix compile testing There seems to be nothing preventing this driver from being compile tested so enable that by adding the missing input prompt. Fixes: 907a2b7e2fc7 ("soc: ti: add k3 platforms chipid module driver") Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20251127135455.2497-1-johan@kernel.org Signed-off-by: Nishanth Menon --- drivers/soc/ti/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig index 1a93001c9e36..163aadd589d3 100644 --- a/drivers/soc/ti/Kconfig +++ b/drivers/soc/ti/Kconfig @@ -62,7 +62,7 @@ config TI_K3_RINGACC If unsure, say N. config TI_K3_SOCINFO - bool + bool "K3 SoC Information driver" if COMPILE_TEST depends on ARCH_K3 || COMPILE_TEST select SOC_BUS select MFD_SYSCON From c933138d45176780fabbbe7da263e04d5b3e525d Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 27 Nov 2025 14:49:42 +0100 Subject: [PATCH 8/9] soc: ti: k3-socinfo: Fix regmap leak on probe failure The mmio regmap allocated during probe is never freed. Switch to using the device managed allocator so that the regmap is released on probe failures (e.g. probe deferral) and on driver unbind. Fixes: a5caf03188e4 ("soc: ti: k3-socinfo: Do not use syscon helper to build regmap") Cc: stable@vger.kernel.org # 6.15 Cc: Andrew Davis Signed-off-by: Johan Hovold Acked-by: Andrew Davis Link: https://patch.msgid.link/20251127134942.2121-1-johan@kernel.org Signed-off-by: Nishanth Menon --- drivers/soc/ti/k3-socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c index 50c170a995f9..42275cb5ba1c 100644 --- a/drivers/soc/ti/k3-socinfo.c +++ b/drivers/soc/ti/k3-socinfo.c @@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev) if (IS_ERR(base)) return PTR_ERR(base); - regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg); + regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg); if (IS_ERR(regmap)) return PTR_ERR(regmap); From 80db65d4acfb9ff12d00172aed39ea8b98261aad Mon Sep 17 00:00:00 2001 From: Wentao Liang Date: Tue, 13 Jan 2026 01:47:16 +0000 Subject: [PATCH 9/9] soc: ti: pruss: Fix double free in pruss_clk_mux_setup() In the pruss_clk_mux_setup(), the devm_add_action_or_reset() indirectly calls pruss_of_free_clk_provider(), which calls of_node_put(clk_mux_np) on the error path. However, after the devm_add_action_or_reset() returns, the of_node_put(clk_mux_np) is called again, causing a double free. Fix by returning directly, to avoid the duplicate of_node_put(). Fixes: ba59c9b43c86 ("soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260113014716.2464741-1-vulab@iscas.ac.cn Signed-off-by: Nishanth Menon --- drivers/soc/ti/pruss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c index 038576805bfa..0fd59c73f585 100644 --- a/drivers/soc/ti/pruss.c +++ b/drivers/soc/ti/pruss.c @@ -366,12 +366,10 @@ static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux, ret = devm_add_action_or_reset(dev, pruss_of_free_clk_provider, clk_mux_np); - if (ret) { + if (ret) dev_err(dev, "failed to add clkmux free action %d", ret); - goto put_clk_mux_np; - } - return 0; + return ret; put_clk_mux_np: of_node_put(clk_mux_np);