Blame SOURCES/0010-ioctl-convert-cmdline_info-arrays-to-named-initializ.patch

c96cf6
From 35fb9ff49c579d6e6819d71ab4c614cb3d2c0dae Mon Sep 17 00:00:00 2001
c96cf6
From: Michal Kubecek <mkubecek@suse.cz>
c96cf6
Date: Sun, 23 Aug 2020 21:40:39 +0200
c96cf6
Subject: [PATCH 10/17] ioctl: convert cmdline_info arrays to named
c96cf6
 initializers
c96cf6
c96cf6
To get rid of remaining "missing field initializer" compiler warnings,
c96cf6
convert arrays of struct cmdline_info used for command line parser to
c96cf6
named initializers. This also makes the initializers easier to read.
c96cf6
c96cf6
This commit should have no effect on resulting code (checked with gcc-11
c96cf6
and -O2).
c96cf6
c96cf6
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
c96cf6
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
c96cf6
(cherry picked from commit 0c43dec5cf64aee41bbd4195c96671032ea6556d)
c96cf6
---
c96cf6
 ethtool.c | 378 ++++++++++++++++++++++++++++++++++++++++++------------
c96cf6
 1 file changed, 296 insertions(+), 82 deletions(-)
c96cf6
c96cf6
diff --git a/ethtool.c b/ethtool.c
c96cf6
index 3c30824016d5..e32a93b41088 100644
c96cf6
--- a/ethtool.c
c96cf6
+++ b/ethtool.c
c96cf6
@@ -1825,10 +1825,24 @@ static int do_spause(struct cmd_context *ctx)
c96cf6
 	int pause_rx_wanted = -1;
c96cf6
 	int pause_tx_wanted = -1;
c96cf6
 	struct cmdline_info cmdline_pause[] = {
c96cf6
-		{ "autoneg", CMDL_BOOL, &pause_autoneg_wanted,
c96cf6
-		  &epause.autoneg },
c96cf6
-		{ "rx", CMDL_BOOL, &pause_rx_wanted, &epause.rx_pause },
c96cf6
-		{ "tx", CMDL_BOOL, &pause_tx_wanted, &epause.tx_pause },
c96cf6
+		{
c96cf6
+			.name		= "autoneg",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &pause_autoneg_wanted,
c96cf6
+			.ioctl_val	= &epause.autoneg,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "rx",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &pause_rx_wanted,
c96cf6
+			.ioctl_val	= &epause.rx_pause,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "tx",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &pause_tx_wanted,
c96cf6
+			.ioctl_val	= &epause.tx_pause,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err, changed = 0;
c96cf6
 
c96cf6
@@ -1868,12 +1882,30 @@ static int do_sring(struct cmd_context *ctx)
c96cf6
 	s32 ring_rx_jumbo_wanted = -1;
c96cf6
 	s32 ring_tx_wanted = -1;
c96cf6
 	struct cmdline_info cmdline_ring[] = {
c96cf6
-		{ "rx", CMDL_S32, &ring_rx_wanted, &ering.rx_pending },
c96cf6
-		{ "rx-mini", CMDL_S32, &ring_rx_mini_wanted,
c96cf6
-		  &ering.rx_mini_pending },
c96cf6
-		{ "rx-jumbo", CMDL_S32, &ring_rx_jumbo_wanted,
c96cf6
-		  &ering.rx_jumbo_pending },
c96cf6
-		{ "tx", CMDL_S32, &ring_tx_wanted, &ering.tx_pending },
c96cf6
+		{
c96cf6
+			.name		= "rx",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &ring_rx_wanted,
c96cf6
+			.ioctl_val	= &ering.rx_pending,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "rx-mini",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &ring_rx_mini_wanted,
c96cf6
+			.ioctl_val	= &ering.rx_mini_pending,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "rx-jumbo",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &ring_rx_jumbo_wanted,
c96cf6
+			.ioctl_val	= &ering.rx_jumbo_pending,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "tx",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &ring_tx_wanted,
c96cf6
+			.ioctl_val	= &ering.tx_pending,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err, changed = 0;
c96cf6
 
c96cf6
@@ -1937,12 +1969,30 @@ static int do_schannels(struct cmd_context *ctx)
c96cf6
 	s32 channels_other_wanted = -1;
c96cf6
 	s32 channels_combined_wanted = -1;
c96cf6
 	struct cmdline_info cmdline_channels[] = {
c96cf6
-		{ "rx", CMDL_S32, &channels_rx_wanted, &echannels.rx_count },
c96cf6
-		{ "tx", CMDL_S32, &channels_tx_wanted, &echannels.tx_count },
c96cf6
-		{ "other", CMDL_S32, &channels_other_wanted,
c96cf6
-		  &echannels.other_count },
c96cf6
-		{ "combined", CMDL_S32, &channels_combined_wanted,
c96cf6
-		  &echannels.combined_count },
c96cf6
+		{
c96cf6
+			.name		= "rx",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &channels_rx_wanted,
c96cf6
+			.ioctl_val	= &echannels.rx_count,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "tx",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &channels_tx_wanted,
c96cf6
+			.ioctl_val	= &echannels.tx_count,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "other",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &channels_other_wanted,
c96cf6
+			.ioctl_val	= &echannels.other_count,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "combined",
c96cf6
+			.type		= CMDL_S32,
c96cf6
+			.wanted_val	= &channels_combined_wanted,
c96cf6
+			.ioctl_val	= &echannels.combined_count,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err, changed = 0;
c96cf6
 
c96cf6
@@ -2052,50 +2102,138 @@ static int do_gcoalesce(struct cmd_context *ctx)
c96cf6
 
c96cf6
 #define COALESCE_CMDLINE_INFO(__ecoal)					\
c96cf6
 {									\
c96cf6
-	{ "adaptive-rx", CMDL_BOOL, &coal_adaptive_rx_wanted,		\
c96cf6
-	  &__ecoal.use_adaptive_rx_coalesce },				\
c96cf6
-	{ "adaptive-tx", CMDL_BOOL, &coal_adaptive_tx_wanted,		\
c96cf6
-	  &__ecoal.use_adaptive_tx_coalesce },				\
c96cf6
-	{ "sample-interval", CMDL_S32, &coal_sample_rate_wanted,	\
c96cf6
-	  &__ecoal.rate_sample_interval },				\
c96cf6
-	{ "stats-block-usecs", CMDL_S32, &coal_stats_wanted,		\
c96cf6
-	  &__ecoal.stats_block_coalesce_usecs },			\
c96cf6
-	{ "pkt-rate-low", CMDL_S32, &coal_pkt_rate_low_wanted,		\
c96cf6
-	  &__ecoal.pkt_rate_low },					\
c96cf6
-	{ "pkt-rate-high", CMDL_S32, &coal_pkt_rate_high_wanted,	\
c96cf6
-	  &__ecoal.pkt_rate_high },					\
c96cf6
-	{ "rx-usecs", CMDL_S32, &coal_rx_usec_wanted,			\
c96cf6
-	  &__ecoal.rx_coalesce_usecs },					\
c96cf6
-	{ "rx-frames", CMDL_S32, &coal_rx_frames_wanted,		\
c96cf6
-	  &__ecoal.rx_max_coalesced_frames },				\
c96cf6
-	{ "rx-usecs-irq", CMDL_S32, &coal_rx_usec_irq_wanted,		\
c96cf6
-	  &__ecoal.rx_coalesce_usecs_irq },				\
c96cf6
-	{ "rx-frames-irq", CMDL_S32, &coal_rx_frames_irq_wanted,	\
c96cf6
-	  &__ecoal.rx_max_coalesced_frames_irq },			\
c96cf6
-	{ "tx-usecs", CMDL_S32, &coal_tx_usec_wanted,			\
c96cf6
-	  &__ecoal.tx_coalesce_usecs },					\
c96cf6
-	{ "tx-frames", CMDL_S32, &coal_tx_frames_wanted,		\
c96cf6
-	  &__ecoal.tx_max_coalesced_frames },				\
c96cf6
-	{ "tx-usecs-irq", CMDL_S32, &coal_tx_usec_irq_wanted,		\
c96cf6
-	  &__ecoal.tx_coalesce_usecs_irq },				\
c96cf6
-	{ "tx-frames-irq", CMDL_S32, &coal_tx_frames_irq_wanted,	\
c96cf6
-	  &__ecoal.tx_max_coalesced_frames_irq },			\
c96cf6
-	{ "rx-usecs-low", CMDL_S32, &coal_rx_usec_low_wanted,		\
c96cf6
-	  &__ecoal.rx_coalesce_usecs_low },				\
c96cf6
-	{ "rx-frames-low", CMDL_S32, &coal_rx_frames_low_wanted,	\
c96cf6
-	  &__ecoal.rx_max_coalesced_frames_low },			\
c96cf6
-	{ "tx-usecs-low", CMDL_S32, &coal_tx_usec_low_wanted,		\
c96cf6
-	  &__ecoal.tx_coalesce_usecs_low },				\
c96cf6
-	{ "tx-frames-low", CMDL_S32, &coal_tx_frames_low_wanted,	\
c96cf6
-	  &__ecoal.tx_max_coalesced_frames_low },			\
c96cf6
-	{ "rx-usecs-high", CMDL_S32, &coal_rx_usec_high_wanted,		\
c96cf6
-	  &__ecoal.rx_coalesce_usecs_high },				\
c96cf6
-	{ "rx-frames-high", CMDL_S32, &coal_rx_frames_high_wanted,	\
c96cf6
-	  &__ecoal.rx_max_coalesced_frames_high },			\
c96cf6
-	{ "tx-usecs-high", CMDL_S32, &coal_tx_usec_high_wanted,		\
c96cf6
-	  &__ecoal.tx_coalesce_usecs_high },				\
c96cf6
-	{ "tx-frames-high", CMDL_S32, &coal_tx_frames_high_wanted,	\
c96cf6
-	  &__ecoal.tx_max_coalesced_frames_high },			\
c96cf6
+	{								\
c96cf6
+		.name		= "adaptive-rx",			\
c96cf6
+		.type		= CMDL_BOOL,				\
c96cf6
+		.wanted_val	= &coal_adaptive_rx_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.use_adaptive_rx_coalesce,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "adaptive-tx",			\
c96cf6
+		.type		= CMDL_BOOL,				\
c96cf6
+		.wanted_val	= &coal_adaptive_tx_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.use_adaptive_tx_coalesce,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "sample-interval",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_sample_rate_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rate_sample_interval,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "stats-block-usecs",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_stats_wanted,			\
c96cf6
+		.ioctl_val	= &__ecoal.stats_block_coalesce_usecs,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "pkt-rate-low",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_pkt_rate_low_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.pkt_rate_low,		\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "pkt-rate-high",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_pkt_rate_high_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.pkt_rate_high,		\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-usecs",				\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_usec_wanted,			\
c96cf6
+		.ioctl_val	= &__ecoal.rx_coalesce_usecs,		\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-frames",				\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_frames_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_max_coalesced_frames,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-usecs-irq",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_usec_irq_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_coalesce_usecs_irq,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-frames-irq",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_frames_irq_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_max_coalesced_frames_irq,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-usecs",				\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_usec_wanted,			\
c96cf6
+		.ioctl_val	= &__ecoal.tx_coalesce_usecs,		\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-frames",				\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_frames_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_max_coalesced_frames,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-usecs-irq",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_usec_irq_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_coalesce_usecs_irq,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-frames-irq",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_frames_irq_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_max_coalesced_frames_irq,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-usecs-low",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_usec_low_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_coalesce_usecs_low,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-frames-low",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_frames_low_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_max_coalesced_frames_low,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-usecs-low",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_usec_low_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_coalesce_usecs_low,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-frames-low",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_frames_low_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_max_coalesced_frames_low,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-usecs-high",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_usec_high_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_coalesce_usecs_high,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "rx-frames-high",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_rx_frames_high_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.rx_max_coalesced_frames_high,\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-usecs-high",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_usec_high_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_coalesce_usecs_high,	\
c96cf6
+	},								\
c96cf6
+	{								\
c96cf6
+		.name		= "tx-frames-high",			\
c96cf6
+		.type		= CMDL_S32,				\
c96cf6
+		.wanted_val	= &coal_tx_frames_high_wanted,		\
c96cf6
+		.ioctl_val	= &__ecoal.tx_max_coalesced_frames_high,\
c96cf6
+	},								\
c96cf6
 }
c96cf6
 
c96cf6
 static int do_scoalesce(struct cmd_context *ctx)
c96cf6
@@ -3090,9 +3228,21 @@ static int do_gregs(struct cmd_context *ctx)
c96cf6
 	int gregs_dump_hex = 0;
c96cf6
 	char *gregs_dump_file = NULL;
c96cf6
 	struct cmdline_info cmdline_gregs[] = {
c96cf6
-		{ "raw", CMDL_BOOL, &gregs_dump_raw, NULL },
c96cf6
-		{ "hex", CMDL_BOOL, &gregs_dump_hex, NULL },
c96cf6
-		{ "file", CMDL_STR, &gregs_dump_file, NULL },
c96cf6
+		{
c96cf6
+			.name		= "raw",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &gregs_dump_raw,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "hex",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &gregs_dump_hex,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "file",
c96cf6
+			.type		= CMDL_STR,
c96cf6
+			.wanted_val	= &gregs_dump_file,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err;
c96cf6
 	struct ethtool_drvinfo drvinfo;
c96cf6
@@ -3189,10 +3339,22 @@ static int do_geeprom(struct cmd_context *ctx)
c96cf6
 	u32 geeprom_length = 0;
c96cf6
 	int geeprom_length_seen = 0;
c96cf6
 	struct cmdline_info cmdline_geeprom[] = {
c96cf6
-		{ "offset", CMDL_U32, &geeprom_offset, NULL },
c96cf6
-		{ "length", CMDL_U32, &geeprom_length, NULL,
c96cf6
-		  0, &geeprom_length_seen },
c96cf6
-		{ "raw", CMDL_BOOL, &geeprom_dump_raw, NULL },
c96cf6
+		{
c96cf6
+			.name		= "offset",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &geeprom_offset,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "length",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &geeprom_length,
c96cf6
+			.seen_val	= &geeprom_length_seen,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "raw",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &geeprom_dump_raw,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err;
c96cf6
 	struct ethtool_drvinfo drvinfo;
c96cf6
@@ -3244,12 +3406,28 @@ static int do_seeprom(struct cmd_context *ctx)
c96cf6
 	int seeprom_length_seen = 0;
c96cf6
 	int seeprom_value_seen = 0;
c96cf6
 	struct cmdline_info cmdline_seeprom[] = {
c96cf6
-		{ "magic", CMDL_U32, &seeprom_magic, NULL },
c96cf6
-		{ "offset", CMDL_U32, &seeprom_offset, NULL },
c96cf6
-		{ "length", CMDL_U32, &seeprom_length, NULL,
c96cf6
-		  0, &seeprom_length_seen },
c96cf6
-		{ "value", CMDL_U8, &seeprom_value, NULL,
c96cf6
-		  0, &seeprom_value_seen },
c96cf6
+		{
c96cf6
+			.name		= "magic",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &seeprom_magic,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "offset",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &seeprom_offset,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "length",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &seeprom_length,
c96cf6
+			.seen_val	= &seeprom_length_seen,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "value",
c96cf6
+			.type		= CMDL_U8,
c96cf6
+			.wanted_val	= &seeprom_value,
c96cf6
+			.seen_val	= &seeprom_value_seen,
c96cf6
+		},
c96cf6
 	};
c96cf6
 	int err;
c96cf6
 	struct ethtool_drvinfo drvinfo;
c96cf6
@@ -4553,11 +4731,27 @@ static int do_getmodule(struct cmd_context *ctx)
c96cf6
 	int err;
c96cf6
 
c96cf6
 	struct cmdline_info cmdline_geeprom[] = {
c96cf6
-		{ "offset", CMDL_U32, &geeprom_offset, NULL },
c96cf6
-		{ "length", CMDL_U32, &geeprom_length, NULL,
c96cf6
-		  0, &geeprom_length_seen },
c96cf6
-		{ "raw", CMDL_BOOL, &geeprom_dump_raw, NULL },
c96cf6
-		{ "hex", CMDL_BOOL, &geeprom_dump_hex, NULL },
c96cf6
+		{
c96cf6
+			.name		= "offset",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &geeprom_offset,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "length",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &geeprom_length,
c96cf6
+			.seen_val	= &geeprom_length_seen,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "raw",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &geeprom_dump_raw,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "hex",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &geeprom_dump_hex,
c96cf6
+		},
c96cf6
 	};
c96cf6
 
c96cf6
 	parse_generic_cmdline(ctx, &geeprom_changed,
c96cf6
@@ -4669,10 +4863,30 @@ static int do_seee(struct cmd_context *ctx)
c96cf6
 	int change = -1, change2 = 0;
c96cf6
 	struct ethtool_eee eeecmd;
c96cf6
 	struct cmdline_info cmdline_eee[] = {
c96cf6
-		{ "advertise",    CMDL_U32,  &adv_c,       &eeecmd.advertised },
c96cf6
-		{ "tx-lpi",       CMDL_BOOL, &lpi_c,   &eeecmd.tx_lpi_enabled },
c96cf6
-		{ "tx-timer",	  CMDL_U32,  &lpi_time_c, &eeecmd.tx_lpi_timer},
c96cf6
-		{ "eee",	  CMDL_BOOL, &eee_c,	   &eeecmd.eee_enabled},
c96cf6
+		{
c96cf6
+			.name		= "advertise",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &adv_c,
c96cf6
+			.ioctl_val	= &eeecmd.advertised,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "tx-lpi",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &lpi_c,
c96cf6
+			.ioctl_val	= &eeecmd.tx_lpi_enabled,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "tx-timer",
c96cf6
+			.type		= CMDL_U32,
c96cf6
+			.wanted_val	= &lpi_time_c,
c96cf6
+			.ioctl_val	= &eeecmd.tx_lpi_timer,
c96cf6
+		},
c96cf6
+		{
c96cf6
+			.name		= "eee",
c96cf6
+			.type		= CMDL_BOOL,
c96cf6
+			.wanted_val	= &eee_c,
c96cf6
+			.ioctl_val	= &eeecmd.eee_enabled,
c96cf6
+		},
c96cf6
 	};
c96cf6
 
c96cf6
 	if (ctx->argc == 0)
c96cf6
-- 
c96cf6
2.26.2
c96cf6