下面这个函数被声明返回一个int类型 static int hns_nic_net_stop(struct net_device *ndev) { hns_nic_net_down(ndev); return 0; } 如果在调用的时候不关心这个返回值的话,可以在函数的调用前家void,这样可以避免编译警告. if (if_running) { (void)hns_nic_net_stop(ndev); msleep(100); }