From: Andrew Morton Fix these: drivers/net/s2io.c:3134: warning: static declaration for `restore_xmsi_data' follows non-static drivers/net/s2io.c:5883: warning: static declaration for `get_xena_rev_id' follows non-static How on earth did that get through? Also fix this: drivers/built-in.o(.text+0x89469): In function `s2io_get_ethtool_stats': drivers/net/s2io.c:5209: undefined reference to `__udivdi3' Cc: Ravinandan Arakali Cc: Ananda Raju Cc: Adrian Bunk Cc: Jeff Garzik Signed-off-by: Andrew Morton --- drivers/net/s2io.c | 14 ++++++++------ drivers/net/s2io.h | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff -puN drivers/net/s2io.c~git-netdev-all-s2io-fixes drivers/net/s2io.c --- devel/drivers/net/s2io.c~git-netdev-all-s2io-fixes 2006-01-28 17:45:15.000000000 -0800 +++ devel-akpm/drivers/net/s2io.c 2006-01-28 17:52:10.000000000 -0800 @@ -64,6 +64,7 @@ #include #include #include +#include /* local include */ #include "s2io.h" @@ -5110,6 +5111,7 @@ static void s2io_get_ethtool_stats(struc int i = 0; nic_t *sp = dev->priv; StatInfo_t *stat_info = sp->mac_control.stats_info; + u64 tmp; s2io_updt_stats(sp); tmp_stats[i++] = @@ -5205,12 +5207,12 @@ static void s2io_get_ethtool_stats(struc tmp_stats[i++] = stat_info->sw_stat.sending_both; tmp_stats[i++] = stat_info->sw_stat.outof_sequence_pkts; tmp_stats[i++] = stat_info->sw_stat.flush_max_pkts; - if (stat_info->sw_stat.num_aggregations) - tmp_stats[i++] = stat_info->sw_stat.sum_avg_pkts_aggregated / - stat_info->sw_stat.num_aggregations; - else - tmp_stats[i++] = 0; - + tmp = 0; + if (stat_info->sw_stat.num_aggregations) { + tmp = stat_info->sw_stat.sum_avg_pkts_aggregated; + do_div(tmp, stat_info->sw_stat.num_aggregations); + } + tmp_stats[i++] = tmp; } static int s2io_ethtool_get_regs_len(struct net_device *dev) diff -puN drivers/net/s2io.h~git-netdev-all-s2io-fixes drivers/net/s2io.h --- devel/drivers/net/s2io.h~git-netdev-all-s2io-fixes 2006-01-28 17:47:54.000000000 -0800 +++ devel-akpm/drivers/net/s2io.h 2006-01-28 17:48:27.000000000 -0800 @@ -967,8 +967,8 @@ static void s2io_set_link(unsigned long static int s2io_set_swapper(nic_t * sp); static void s2io_card_down(nic_t *nic); static int s2io_card_up(nic_t *nic); -int get_xena_rev_id(struct pci_dev *pdev); -void restore_xmsi_data(nic_t *nic); +static void restore_xmsi_data(nic_t *nic); +static int get_xena_rev_id(struct pci_dev *pdev); static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp); static void clear_lro_session(lro_t *lro); _