Commit 3e3d96c1 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: slicoss: remove UPDATE_STATS_GB macro and inline code

This patch removes UPDATE_STATS_GB macro in slic.h header file
and just inline code. This improve readability.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4dc0e983
...@@ -548,11 +548,6 @@ static inline void slic_flush_write(struct adapter *adapter) ...@@ -548,11 +548,6 @@ static inline void slic_flush_write(struct adapter *adapter)
ioread32(adapter->regs + SLIC_REG_HOSTID); ioread32(adapter->regs + SLIC_REG_HOSTID);
} }
#define UPDATE_STATS_GB(largestat, newstat, oldstat) \
{ \
(largestat) += ((newstat) - (oldstat)); \
}
#if BITS_PER_LONG == 64 #if BITS_PER_LONG == 64
#define SLIC_GET_ADDR_LOW(_addr) (u32)((u64)(_addr) & \ #define SLIC_GET_ADDR_LOW(_addr) (u32)((u64)(_addr) & \
0x00000000FFFFFFFF) 0x00000000FFFFFFFF)
......
...@@ -1014,45 +1014,43 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr) ...@@ -1014,45 +1014,43 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
break; break;
} }
UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs, stats->xmit_tcp_segs, stst->tcp.xmit_tcp_segs +=
old->xmit_tcp_segs); stats->xmit_tcp_segs - old->xmit_tcp_segs;
UPDATE_STATS_GB(stst->tcp.xmit_tcp_bytes, stats->xmit_tcp_bytes, stst->tcp.xmit_tcp_bytes +=
old->xmit_tcp_bytes); stats->xmit_tcp_bytes - old->xmit_tcp_bytes;
UPDATE_STATS_GB(stst->tcp.rcv_tcp_segs, stats->rcv_tcp_segs, stst->tcp.rcv_tcp_segs +=
old->rcv_tcp_segs); stats->rcv_tcp_segs - old->rcv_tcp_segs;
UPDATE_STATS_GB(stst->tcp.rcv_tcp_bytes, stats->rcv_tcp_bytes, stst->tcp.rcv_tcp_bytes +=
old->rcv_tcp_bytes); stats->rcv_tcp_bytes - old->rcv_tcp_bytes;
UPDATE_STATS_GB(stst->iface.xmt_bytes, stats->xmit_bytes, stst->iface.xmt_bytes +=
old->xmit_bytes); stats->xmit_bytes - old->xmit_bytes;
UPDATE_STATS_GB(stst->iface.xmt_ucast, stats->xmit_unicasts, stst->iface.xmt_ucast +=
old->xmit_unicasts); stats->xmit_unicasts - old->xmit_unicasts;
UPDATE_STATS_GB(stst->iface.rcv_bytes, stats->rcv_bytes, stst->iface.rcv_bytes +=
old->rcv_bytes); stats->rcv_bytes - old->rcv_bytes;
UPDATE_STATS_GB(stst->iface.rcv_ucast, stats->rcv_unicasts, stst->iface.rcv_ucast +=
old->rcv_unicasts); stats->rcv_unicasts - old->rcv_unicasts;
UPDATE_STATS_GB(stst->iface.xmt_errors, stats->xmit_collisions, stst->iface.xmt_errors +=
old->xmit_collisions); stats->xmit_collisions - old->xmit_collisions;
UPDATE_STATS_GB(stst->iface.xmt_errors, stst->iface.xmt_errors += stats->xmit_excess_collisions -
stats->xmit_excess_collisions, old->xmit_excess_collisions;
old->xmit_excess_collisions);
UPDATE_STATS_GB(stst->iface.xmt_errors, stats->xmit_other_error, stst->iface.xmt_errors +=
old->xmit_other_error); stats->xmit_other_error - old->xmit_other_error;
UPDATE_STATS_GB(stst->iface.rcv_errors, stats->rcv_other_error, stst->iface.rcv_errors +=
old->rcv_other_error); stats->rcv_other_error - old->rcv_other_error;
UPDATE_STATS_GB(stst->iface.rcv_discards, stats->rcv_drops, stst->iface.rcv_discards += stats->rcv_drops - old->rcv_drops;
old->rcv_drops);
if (stats->rcv_drops > old->rcv_drops) if (stats->rcv_drops > old->rcv_drops)
adapter->rcv_drops += (stats->rcv_drops - adapter->rcv_drops += (stats->rcv_drops -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment