From 5c58f5e2d5a0088c3a8857a3d8fdea798782e1f9 Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Fri, 4 Sep 2026 18:05:38 +0530 Subject: [PATCH 1/5] firmware: ti_sci: Fix typo "upto" in comments Correct "upto" to "up to", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam Link: https://patch.msgid.link/20260904123541.38602-2-hemanth.selam@gmail.com Signed-off-by: Nishanth Menon --- drivers/firmware/ti_sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index cc747ab0237f..94104edba9a0 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -4050,7 +4050,7 @@ static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { .default_host_id = 2, /* Conservative duration */ .max_rx_timeout_ms = 1000, - /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle upto 128 messages! */ + /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle up to 128 messages! */ .max_msgs = 20, .max_msg_size = 64, }; @@ -4060,7 +4060,7 @@ static const struct ti_sci_desc ti_sci_pmmc_am654_desc = { .default_host_id = 12, /* Conservative duration */ .max_rx_timeout_ms = 10000, - /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle upto 128 messages! */ + /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle up to 128 messages! */ .max_msgs = 20, .max_msg_size = 60, }; From e0d291986738791444dd0426c85f5e7d747fa44f Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Fri, 11 Sep 2026 14:20:55 +0530 Subject: [PATCH 2/5] soc: ti: knav_qmss: Fix typos in comments Correct "specifes" to "specifies" in the knav_queue_open() kernel-doc and "accomodate" to "accommodate" in knav_pool_create(). No code changes. Signed-off-by: Hemanth Selam Acked-by: Udit Kumar Link: https://patch.msgid.link/20260911085055.715191-1-hemanth.selam@gmail.com Signed-off-by: Nishanth Menon --- drivers/soc/ti/knav_qmss_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 3e4041454f69..6186454dff51 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -509,7 +509,7 @@ static int knav_queue_flush(struct knav_queue *qh) /** * knav_queue_open() - open a hardware queue * @name: - name to give the queue handle - * @id: - desired queue number if any or specifes the type + * @id: - desired queue number if any or specifies the type * of queue * @flags: - the following flags are applicable to queues: * KNAV_QUEUE_SHARED - allow the queue to be shared. Queues are @@ -805,7 +805,7 @@ void *knav_pool_create(const char *name, } /* Region maintains a sorted (by region offset) list of pools - * use the first free slot which is large enough to accomodate + * use the first free slot which is large enough to accommodate * the request */ last_offset = 0; From 6ace5611ac85887a593b7eae2b7edec8dfeb2ffa Mon Sep 17 00:00:00 2001 From: Siddharth Karanam Date: Fri, 18 Sep 2026 17:38:39 +0530 Subject: [PATCH 3/5] firmware: ti_sci: replace kcalloc with kzalloc for buffer pointer allocation Previously, the buffer pointer was being allocated via devm_kcalloc that would check for a mul overflow before allocating n * size bytes (size being desc->max_msg_size), but since n is 1 here, we can instead use devm_kzalloc that allocates the size directly. Signed-off-by: Siddharth Karanam Link: https://patch.msgid.link/20260918120839.207459-1-sid9.karanam@gmail.com Signed-off-by: Nishanth Menon --- drivers/firmware/ti_sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 94104edba9a0..8025a4cdd35c 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -4132,7 +4132,7 @@ static int ti_sci_probe(struct platform_device *pdev) /* Pre-initialize the buffer pointer to pre-allocated buffers */ for (i = 0, xfer = minfo->xfer_block; i < desc->max_msgs; i++, xfer++) { - xfer->xfer_buf = devm_kcalloc(dev, 1, desc->max_msg_size, + xfer->xfer_buf = devm_kzalloc(dev, desc->max_msg_size, GFP_KERNEL); if (!xfer->xfer_buf) return -ENOMEM; From 45ea6911ad16859d4ce4f25780b0ebcf5660e43a Mon Sep 17 00:00:00 2001 From: Karl Mehltretter Date: Wed, 23 Sep 2026 08:16:57 +0200 Subject: [PATCH 4/5] soc: ti: k3-ringacc: Correct ring API kernel-doc The ring accelerator header labels k3_ring_cfg as an enum, uses propname instead of property, and gives the DMA reset helper the ordinary reset helper's name. The DMA reset comment also omits occ, including the convention that zero requests a hardware occupancy read. The proxy flag is parsed as a separate parameter, and the pop helpers describe pushing elements. Proxy access is supported in Message mode; the listed Credentials and Queue modes are not implemented. The phandle lookup returns encoded error pointers rather than integer error values. Match the declarations and document these argument and operation roles. Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260923061658.20140-1-kmehltretter@gmail.com Signed-off-by: Nishanth Menon --- include/linux/soc/ti/k3-ringacc.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/include/linux/soc/ti/k3-ringacc.h b/include/linux/soc/ti/k3-ringacc.h index 39b022b92598..2de6031b9424 100644 --- a/include/linux/soc/ti/k3-ringacc.h +++ b/include/linux/soc/ti/k3-ringacc.h @@ -57,13 +57,13 @@ struct k3_ringacc; struct k3_ring; /** - * enum k3_ring_cfg - RA ring configuration structure + * struct k3_ring_cfg - RA ring configuration structure * * @size: Ring size, number of elements * @elm_size: Ring element size * @mode: Ring operational mode * @flags: Ring configuration flags. Possible values: - * @K3_RINGACC_RING_SHARED: when set allows to request the same ring + * %K3_RINGACC_RING_SHARED: when set allows to request the same ring * few times. It's usable when the same ring is used as Free Host PD ring * for different flows, for example. * Note: Locking should be done by consumer if required @@ -88,11 +88,10 @@ struct k3_ring_cfg { /** * of_k3_ringacc_get_by_phandle - find a RA by phandle property * @np: device node - * @propname: property name containing phandle on RA node + * @property: property name containing phandle on RA node * - * Returns pointer on the RA - struct k3_ringacc - * or -ENODEV if not found, - * or -EPROBE_DEFER if not yet registered + * Return: Pointer to the RA, or ERR_PTR(-ENODEV) if the phandle cannot + * be resolved, or ERR_PTR(-EPROBE_DEFER) if the RA is not yet registered. */ struct k3_ringacc *of_k3_ringacc_get_by_phandle(struct device_node *np, const char *property); @@ -103,10 +102,8 @@ struct k3_ringacc *of_k3_ringacc_get_by_phandle(struct device_node *np, * k3_ringacc_request_ring - request ring from ringacc * @ringacc: pointer on ringacc * @id: ring id or K3_RINGACC_RING_ID_ANY for any general purpose ring - * @flags: - * @K3_RINGACC_RING_USE_PROXY: if set - proxy will be allocated and - * used to access ring memory. Sopported only for rings in - * Message/Credentials/Queue mode. + * @flags: Set %K3_RINGACC_RING_USE_PROXY to allocate a proxy for + * accessing ring memory in Message mode. * * Returns pointer on the Ring - struct k3_ring * or NULL in case of failure. @@ -126,8 +123,9 @@ int k3_ringacc_request_rings_pair(struct k3_ringacc *ringacc, */ void k3_ringacc_ring_reset(struct k3_ring *ring); /** - * k3_ringacc_ring_reset - ring reset for DMA rings + * k3_ringacc_ring_reset_dma - ring reset for DMA rings * @ring: pointer on Ring + * @occ: occupancy used by the DMA reset quirk, or zero to read it from hardware * * Resets ring internal state ((hw)occ, (hw)idx). Should be used for rings * which are read by K3 UDMA, like TX or Free Host PD rings. @@ -217,8 +215,8 @@ int k3_ringacc_ring_push(struct k3_ring *ring, void *elem); * @ring: pointer on ring * @elem: pointer on ring element buffer * - * Push one ring element from the ring head. Size of the ring element is - * determined by ring configuration &struct k3_ring_cfg elm_size.. + * Pop one ring element from the ring head. Size of the ring element is + * determined by ring configuration &struct k3_ring_cfg elm_size. * * Returns 0 on success, errno otherwise. */ @@ -242,7 +240,7 @@ int k3_ringacc_ring_push_head(struct k3_ring *ring, void *elem); * @ring: pointer on ring * @elem: pointer on ring element buffer * - * Push one ring element from the ring tail. Size of the ring element is + * Pop one ring element from the ring tail. Size of the ring element is * determined by ring configuration &struct k3_ring_cfg elm_size. * * Returns 0 on success, errno otherwise. From 6c4e6e8f5cf95f7e0d4f04928a9ae70e20c73d4b Mon Sep 17 00:00:00 2001 From: Karl Mehltretter Date: Wed, 23 Sep 2026 08:16:58 +0200 Subject: [PATCH 5/5] soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc The heading for k3_ringacc_init_data repeats struct, so kernel-doc cannot match it to the declaration. Its three fields are also missing descriptions. Use the structure name and describe the firmware handle, device ID, and total number of available rings used during DMA ring initialization. Fixes: d782298c6f6b ("soc: ti: k3-ringacc: add AM64 DMA rings support.") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Udit Kumar Link: https://patch.msgid.link/20260923061658.20140-2-kmehltretter@gmail.com Signed-off-by: Nishanth Menon --- include/linux/soc/ti/k3-ringacc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/soc/ti/k3-ringacc.h b/include/linux/soc/ti/k3-ringacc.h index 2de6031b9424..7b7fc237c08f 100644 --- a/include/linux/soc/ti/k3-ringacc.h +++ b/include/linux/soc/ti/k3-ringacc.h @@ -254,7 +254,10 @@ u32 k3_ringacc_get_tisci_dev_id(struct k3_ring *ring); struct ti_sci_handle; /** - * struct struct k3_ringacc_init_data - Initialization data for DMA rings + * struct k3_ringacc_init_data - Initialization data for DMA rings + * @tisci: TI SCI firmware handle + * @tisci_dev_id: TI SCI device ID of the DMA controller + * @num_rings: Total number of available rings */ struct k3_ringacc_init_data { const struct ti_sci_handle *tisci;