]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: ti: k3-ringacc: Use str_enabled_disabled() helper
authorNishanth Menon <nm@ti.com>
Tue, 12 May 2026 17:06:23 +0000 (12:06 -0500)
committerNishanth Menon <nm@ti.com>
Fri, 22 May 2026 15:55:55 +0000 (10:55 -0500)
Coccinelle (scripts/coccinelle/api/string_choices.cocci) flags an
opportunity to replace the open-coded ternary expression in the probe
dev_info() call:
  k3-ringacc.c:1439:3-32: opportunity for
  str_enabled_disabled(ringacc->dma_ring_reset_quirk)

Replace the ternary with str_enabled_disabled() and add the required
include for <linux/string_choices.h>.

Reviewed-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
Reviewed-by: Hari Prasath Gujulan Elango <gehariprasath@ti.com>
Link: https://patch.msgid.link/20260512170623.3174416-12-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/k3-ringacc.c

index e2ca380812d2985731ae7a4a700703a8c64f0db8..5966db4327b133ad4a180d75115e2fd574614829 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
+#include <linux/string_choices.h>
 #include <linux/sys_soc.h>
 #include <linux/dma/ti-cppi5.h>
 #include <linux/soc/ti/k3-ringacc.h>
@@ -1436,7 +1437,7 @@ static int k3_ringacc_init(struct platform_device *pdev,
                 ringacc->rm_gp_range->desc[0].num,
                 ringacc->tisci_dev_id);
        dev_info(dev, "dma-ring-reset-quirk: %s\n",
-                ringacc->dma_ring_reset_quirk ? "enabled" : "disabled");
+                str_enabled_disabled(ringacc->dma_ring_reset_quirk));
        dev_info(dev, "RA Proxy rev. %08x, num_proxies:%u\n",
                 readl(&ringacc->proxy_gcfg->revision), ringacc->num_proxies);