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

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