On Tue, Apr 17, 2012 at 09:12:42AM +0200, Antonio Quartulli wrote:
On Tue, Apr 17, 2012 at 01:24:55 +0200, Martin Hundebøll wrote:
+static void bat_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data)
+{
- struct bat_priv *bat_priv = netdev_priv(dev);
- data[0] = bat_priv->bat_stats.forward;
- data[1] = bat_priv->bat_stats.mgmt_tx;
- data[2] = bat_priv->bat_stats.mgmt_rx;
- data[3] = bat_priv->bat_stats.tt_request_tx;
- data[4] = bat_priv->bat_stats.tt_request_rx;
- data[5] = bat_priv->bat_stats.tt_response_tx;
- data[6] = bat_priv->bat_stats.tt_response_rx;
- data[7] = bat_priv->bat_stats.tt_roam_adv_tx;
- data[8] = bat_priv->bat_stats.tt_roam_adv_rx;
- data[9] = bat_priv->bat_stats.dat_request_tx;
- data[10] = bat_priv->bat_stats.dat_request_rx;
- data[11] = bat_priv->bat_stats.dat_reply_tx;
- data[12] = bat_priv->bat_stats.dat_reply_rx;
+}
(guess mode ON) why using u64? what if the arch is 32bit? are the values correctly assigned anyway? what about longer addresses (do they exist?)? As Sven suggested on IRC, you probably want to use uintptr_t instead.
Sorry drop this part. I need to sleep more. Damn.