Skip to contentSkip to conversation

net: sched: etf: Use str_on_off() helper function in etf_init()

PATCH In review Thorsten Blum 3 participants 3 messages Oct 20, 2024 – Oct 28, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: sched: etf: Use str_on_off() helper function in etf_init()

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

---
 net/sched/sch_etf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sched/sch_etf.c +2 -2
index c74d778c32a1..c62730f5df4c 100644
@@ -369,8 +369,8 @@ static int etf_init(struct Qdisc *sch, struct nlattr *opt,
 
 	pr_debug("delta %d clockid %d offload %s deadline %s\n",
 		 qopt->delta, qopt->clockid,
-		 OFFLOAD_IS_ON(qopt) ? "on" : "off",
-		 DEADLINE_MODE_IS_ON(qopt) ? "on" : "off");
+		 str_on_off(OFFLOAD_IS_ON(qopt)),
+		 str_on_off(DEADLINE_MODE_IS_ON(qopt)));
 
 	err = validate_input_params(qopt, extack);
 	if (err < 0)
Signature · 1 line
2.47.0
maintainer
#2 lore raw
In reply to Thorsten Blum
Quoted 1 line · On Sun, 20 Oct 2024 12:47:59 +0200 Thorsten Blum wrote:

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

Use of the common string helpers is a bit subjective. Let's leave this code be.

Signature · 1 line
pw-bot: reject