From: Ethan Jackson Date: Fri, 14 Oct 2011 22:17:19 +0000 (-0700) Subject: vswitchd: Remove iface_get_carrier(). X-Git-Tag: v2.12.3~13231 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a5d6fc245ed1e3e0796a82e947f5ce638becd4ef;p=mirror_ovs.git vswitchd: Remove iface_get_carrier(). It has only one caller, and doesn't improve the code's readability. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 4e2833e0b..aa9969bb6 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