In these three cases the pointer returned by IEEE80211_DEV_TO_SUB_IF() is never used. Signed-off-by: David Kimdon Index: wireless-dev/net/d80211/ieee80211.c =================================================================== --- wireless-dev.orig/net/d80211/ieee80211.c +++ wireless-dev/net/d80211/ieee80211.c @@ -1362,11 +1362,9 @@ static int ieee80211_master_start_xmit(s struct ieee80211_tx_control control; struct ieee80211_tx_packet_data *pkt_data; struct net_device *odev = NULL; - struct ieee80211_sub_if_data *sdata, *osdata; + struct ieee80211_sub_if_data *osdata; int ret; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - /* * copy control out of the skb so other people can use skb->cb */ Index: wireless-dev/net/d80211/ieee80211_ioctl.c =================================================================== --- wireless-dev.orig/net/d80211/ieee80211_ioctl.c +++ wireless-dev/net/d80211/ieee80211_ioctl.c @@ -407,10 +407,8 @@ static int ieee80211_ioctl_get_info_sta( if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { - struct ieee80211_sub_if_data *sdata; struct net_device_stats *stats; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); stats = ieee80211_dev_stats(local->mdev); param->u.get_info_sta.rx_bytes = stats->rx_bytes; param->u.get_info_sta.tx_bytes = stats->tx_bytes; Index: wireless-dev/net/d80211/ieee80211_iface.c =================================================================== --- wireless-dev.orig/net/d80211/ieee80211_iface.c +++ wireless-dev/net/d80211/ieee80211_iface.c @@ -42,7 +42,7 @@ int ieee80211_if_add(struct net_device * { struct net_device *ndev, *tmp_dev; struct ieee80211_local *local = dev->ieee80211_ptr; - struct ieee80211_sub_if_data *sdata = NULL, *sdata_parent; + struct ieee80211_sub_if_data *sdata = NULL; int ret; int i; @@ -83,7 +83,6 @@ int ieee80211_if_add(struct net_device * sdata->type = IEEE80211_IF_TYPE_AP; sdata->dev = ndev; sdata->local = local; - sdata_parent = IEEE80211_DEV_TO_SUB_IF(dev); ieee80211_if_sdata_init(sdata); ret = register_netdevice(ndev); -- - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html