func: static void virtnet_set_rx_mode(struct net_device *dev) struct virtnet_info * vi = netdev_priv ( dev ) ; struct virtio_net_ctrl_mac * mac_data ; struct netdev_hw_addr * ha ; int uc_count ; int mc_count ; void * buf ; int i ; if ( ! virtio_has_feature ( vi -> vdev , VIRTIO_NET_F_CTRL_RX ) )  uc_count = netdev_uc_count ( dev ); mc_count = netdev_mc_count ( dev ); buf = kzalloc ( ( ( uc_count + mc_count ) * ETH_ALEN ) + ( 2 * sizeof ( mac_data -> entries ) ) , GFP_ATOMIC ); mac_data = buf; if ( ! buf )  mac_data -> entries = cpu_to_virtio32 ( vi -> vdev , uc_count ); i = 0; memcpy ( & mac_data -> macs [ i ++ ] [ 0 ] , ha -> addr , ETH_ALEN ); mac_data = ( void * ) & mac_data -> macs [ uc_count ] [ 0 ]; mac_data -> entries = cpu_to_virtio32 ( vi -> vdev , mc_count ); i = 0; memcpy ( & mac_data -> macs [ i ++ ] [ 0 ] , ha -> addr , ETH_ALEN ); 