All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Justin Stitt <justinstitt@google.com>,
	Bill Wendling <morbo@google.com>,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>
Cc: <afd@ti.com>, Nishanth Menon <nm@ti.com>, <llvm@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH V2 11/11] soc: ti: k3-ringacc: Use str_enabled_disabled() helper
Date: Tue, 12 May 2026 12:06:23 -0500	[thread overview]
Message-ID: <20260512170623.3174416-12-nm@ti.com> (raw)
In-Reply-To: <20260512170623.3174416-1-nm@ti.com>

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>.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
Changes since V1:
- None.

V1: https://lore.kernel.org/all/20260508153211.3688277-12-nm@ti.com/

 drivers/soc/ti/k3-ringacc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
index 7602b8a909b0..ec4207d98dca 100644
--- a/drivers/soc/ti/k3-ringacc.c
+++ b/drivers/soc/ti/k3-ringacc.c
@@ -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);
 
-- 
2.47.0



      parent reply	other threads:[~2026-05-12 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 17:06 [PATCH V2 00/11] soc: ti: keystone/k3 navigator queue/dma/ringacc cleanups Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 01/11] soc: ti: knav_qmss: Remove remaining redundant ENOMEM printks Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 02/11] soc: ti: knav_qmss: Rename global kdev to knav_qdev to fix -Wshadow Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 03/11] soc: ti: knav_qmss: Inline lockdep condition in for_each_handle_rcu Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 04/11] soc: ti: knav_qmss: Fix kernel-doc Return: tags Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 05/11] soc: ti: knav_qmss: Use %pe to print PTR_ERR() Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 06/11] soc: ti: knav_qmss: Fix __iomem annotations and __be32 type Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 07/11] soc: ti: knav_qmss_acc: Fix kernel-doc Return: tag Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 08/11] soc: ti: knav_dma: Remove unused DMA_PRIO_MASK macro Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 09/11] soc: ti: knav_dma: Remove dead check on unsigned args.args[0] Nishanth Menon
2026-05-12 17:06 ` [PATCH V2 10/11] soc: ti: knav_dma: Use IOMEM_ERR_PTR() in pktdma_get_regs() Nishanth Menon
2026-05-12 17:06 ` Nishanth Menon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512170623.3174416-12-nm@ti.com \
    --to=nm@ti.com \
    --cc=afd@ti.com \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=ssantosh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.