[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231107080607.190414-4-jiri@resnulli.us>
Date: Tue, 7 Nov 2023 09:06:03 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org,
dsahern@...il.com,
daniel.machon@...rochip.com
Subject: [patch iproute2-next v5 3/7] devlink: do conditional new line print in pr_out_port_handle_end()
From: Jiri Pirko <jiri@...dia.com>
Instead of printing out new line unconditionally, use __pr_out_newline()
to print it only when needed avoiding double prints.
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
v2->v3:
- new patch
---
devlink/devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index b711e92caaba..90f6f8ff90e2 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -2976,7 +2976,7 @@ static void pr_out_port_handle_end(struct dl *dl)
if (dl->json_output)
close_json_object();
else
- pr_out("\n");
+ __pr_out_newline();
}
static void pr_out_region_chunk_start(struct dl *dl, uint64_t addr)
--
2.41.0
Powered by blists - more mailing lists