mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wangyufei <wangyufei@vivo.com>
To: Abylay Ospan <aospan@amazon.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, wangyufei <wangyufei@vivo.com>
Subject: [PATCH v1] media: dvb-frontends: ascot2e: Use str_read_write() helper
Date: Tue, 17 Jun 2025 19:04:44 +0800	[thread overview]
Message-ID: <20250617110444.42904-1-wangyufei@vivo.com> (raw)

Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: wangyufei <wangyufei@vivo.com>
---
 drivers/media/dvb-frontends/ascot2e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/ascot2e.c b/drivers/media/dvb-frontends/ascot2e.c
index cf8e5f1bd..4254f5867 100644
--- a/drivers/media/dvb-frontends/ascot2e.c
+++ b/drivers/media/dvb-frontends/ascot2e.c
@@ -16,6 +16,7 @@
 #include <linux/types.h>
 #include "ascot2e.h"
 #include <media/dvb_frontend.h>
+#include <linux/string_choices.h>
 
 #define MAX_WRITE_REGSIZE 10
 
@@ -104,7 +105,7 @@ static void ascot2e_i2c_debug(struct ascot2e_priv *priv,
 			      u8 reg, u8 write, const u8 *data, u32 len)
 {
 	dev_dbg(&priv->i2c->dev, "ascot2e: I2C %s reg 0x%02x size %d\n",
-		(write == 0 ? "read" : "write"), reg, len);
+		str_read_write(write == 0), reg, len);
 	print_hex_dump_bytes("ascot2e: I2C data: ",
 		DUMP_PREFIX_OFFSET, data, len);
 }
-- 
2.39.0


                 reply	other threads:[~2025-06-17 11:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250617110444.42904-1-wangyufei@vivo.com \
    --to=wangyufei@vivo.com \
    --cc=aospan@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=opensource.kernel@vivo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®