From a5d6fc245ed1e3e0796a82e947f5ce638becd4ef Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Fri, 14 Oct 2011 15:17:19 -0700 Subject: [PATCH] vswitchd: Remove iface_get_carrier(). It has only one caller, and doesn't improve the code's readability. --- vswitchd/bridge.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 4e2833e0..aa9969bb 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -201,7 +201,6 @@ static void iface_configure_cfm(struct iface *); static void iface_refresh_cfm_stats(struct iface *); static void iface_refresh_stats(struct iface *); static void iface_refresh_status(struct iface *); -static bool iface_get_carrier(const struct iface *); static bool iface_is_synthetic(const struct iface *); static void shash_from_ovs_idl_map(char **keys, char **values, size_t n, @@ -1276,7 +1275,9 @@ iface_refresh_status(struct iface *iface) } ovsrec_interface_set_link_state(iface->cfg, - iface_get_carrier(iface) ? "up" : "down"); + (netdev_get_carrier(iface->netdev) + ? "up" + : "down")); error = netdev_get_mtu(iface->netdev, &mtu); if (!error) { @@ -2700,17 +2701,6 @@ iface_configure_cfm(struct iface *iface) ofproto_port_set_cfm(iface->port->bridge->ofproto, iface->ofp_port, &s); } -/* Read carrier or miimon status directly from 'iface''s netdev, according to - * how 'iface''s port is configured. - * - * Returns true if 'iface' is up, false otherwise. */ -static bool -iface_get_carrier(const struct iface *iface) -{ - /* XXX */ - return netdev_get_carrier(iface->netdev); -} - /* Returns true if 'iface' is synthetic, that is, if we constructed it locally * instead of obtaining it from the database. */ static bool -- 2.30.2