diff mbox series

[iproute2/net-next,7/8] devlink: remove "dev" object sub help messages

Message ID 20200404161621.3452-8-jiri@resnulli.us
State New
Headers show
Series devlink: spring cleanup | expand

Commit Message

Jiri Pirko April 4, 2020, 4:16 p.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

Remove duplicate sub help messages for "dev" object and have them all
show help message for "dev".

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 devlink/devlink.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)
diff mbox series

Patch

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 14ea91726892..efc5591d5ebf 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -2740,18 +2740,13 @@  static int cmd_dev_show(struct dl *dl)
 	return err;
 }
 
-static void cmd_dev_reload_help(void)
-{
-	pr_err("Usage: devlink dev reload DEV [ netns { PID | NAME | ID } ]\n");
-}
-
 static int cmd_dev_reload(struct dl *dl)
 {
 	struct nlmsghdr *nlh;
 	int err;
 
 	if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {
-		cmd_dev_reload_help();
+		cmd_dev_help();
 		return 0;
 	}
 
@@ -2873,11 +2868,6 @@  static int cmd_versions_show_cb(const struct nlmsghdr *nlh, void *data)
 	return MNL_CB_OK;
 }
 
-static void cmd_dev_info_help(void)
-{
-	pr_err("Usage: devlink dev info [ DEV ]\n");
-}
-
 static int cmd_dev_info(struct dl *dl)
 {
 	struct nlmsghdr *nlh;
@@ -2885,7 +2875,7 @@  static int cmd_dev_info(struct dl *dl)
 	int err;
 
 	if (dl_argv_match(dl, "help")) {
-		cmd_dev_info_help();
+		cmd_dev_help();
 		return 0;
 	}
 
@@ -2906,12 +2896,6 @@  static int cmd_dev_info(struct dl *dl)
 	return err;
 }
 
-static void cmd_dev_flash_help(void)
-{
-	pr_err("Usage: devlink dev flash DEV file PATH [ component NAME ]\n");
-}
-
-
 struct cmd_dev_flash_status_ctx {
 	struct dl *dl;
 	char *last_msg;
@@ -3059,7 +3043,7 @@  static int cmd_dev_flash(struct dl *dl)
 	int err;
 
 	if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {
-		cmd_dev_flash_help();
+		cmd_dev_help();
 		return 0;
 	}