From 64d9f7568bf8d3c500a9da5c93a2aa88084b901f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 18 Nov 2018 10:13:32 +0100 Subject: [PATCH] basic/missing: drop _ETHTOOL_LINK_MODE_MAX It was only used in one place, where we don't actually need it, and it is too easy to forget to update it when adding new items to the table. Let's just drop it. --- src/basic/missing.h | 7 ------- src/udev/net/ethtool-util.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/basic/missing.h b/src/basic/missing.h index 85af7acdfe5..45788af9e70 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1577,11 +1577,4 @@ enum ethtool_link_mode_bit_indices { #endif #endif -/* Strictly speaking, this is not a missing field. Just for our convention. */ -#if !HAVE_ETHTOOL_LINK_MODE_FEC_NONE_BIT -#define _ETHTOOL_LINK_MODE_MAX 52 -#else -#define _ETHTOOL_LINK_MODE_MAX (__ETHTOOL_LINK_MODE_LAST + 1) -#endif - #include "missing_syscall.h" diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c index 4cf6f269e32..177b273e486 100644 --- a/src/udev/net/ethtool-util.c +++ b/src/udev/net/ethtool-util.c @@ -56,7 +56,7 @@ static const char* const netdev_feature_table[_NET_DEV_FEAT_MAX] = { [NET_DEV_FEAT_TSO6] = "tx-tcp6-segmentation", }; -static const char* const ethtool_link_mode_bit_table[_ETHTOOL_LINK_MODE_MAX] = { +static const char* const ethtool_link_mode_bit_table[] = { [ETHTOOL_LINK_MODE_10baseT_Half_BIT] = "10baset-half", [ETHTOOL_LINK_MODE_10baseT_Full_BIT] = "10baset-full", [ETHTOOL_LINK_MODE_100baseT_Half_BIT] = "100baset-half", -- 2.47.3