netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init()
@ 2024-10-20 10:47 Thorsten Blum
  2024-10-21 17:53 ` Vinicius Costa Gomes
  2024-10-28 20:03 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2024-10-20 10:47 UTC (permalink / raw)
  To: Vinicius Costa Gomes, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Thorsten Blum, netdev, linux-kernel

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

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 net/sched/sch_etf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_etf.c b/net/sched/sch_etf.c
index c74d778c32a1..c62730f5df4c 100644
--- a/net/sched/sch_etf.c
+++ b/net/sched/sch_etf.c
@@ -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)
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init()
  2024-10-20 10:47 [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init() Thorsten Blum
@ 2024-10-21 17:53 ` Vinicius Costa Gomes
  2024-10-28 20:03 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Vinicius Costa Gomes @ 2024-10-21 17:53 UTC (permalink / raw)
  To: Thorsten Blum, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Thorsten Blum, netdev, linux-kernel

Thorsten Blum <thorsten.blum@linux.dev> writes:

> Remove hard-coded strings by using the helper function str_on_off().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>


Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init()
  2024-10-20 10:47 [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init() Thorsten Blum
  2024-10-21 17:53 ` Vinicius Costa Gomes
@ 2024-10-28 20:03 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-10-28 20:03 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Vinicius Costa Gomes, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	David S. Miller, Eric Dumazet, Paolo Abeni, netdev, linux-kernel

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.
-- 
pw-bot: reject

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-28 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 10:47 [PATCH net-next] net: sched: etf: Use str_on_off() helper function in etf_init() Thorsten Blum
2024-10-21 17:53 ` Vinicius Costa Gomes
2024-10-28 20:03 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).