diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2010-09-17 03:23:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-17 16:12:58 -0700 |
commit | b71c7aaa1e2a9858f0c469026098fbd6e046d7bb (patch) | |
tree | 39c7454d1e2230f9176e1a3c47b92e3f76a9f256 /drivers/net/stmmac/enh_desc.c | |
parent | c629882ac73cab2cd41d9948caeed633fc570fc0 (diff) |
stmmac: use one memset() to reset TDES01
Use one memset() to reset all TDES01 fields instead
of one by one to reduce number of instructions.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/enh_desc.c')
-rw-r--r-- | drivers/net/stmmac/enh_desc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/stmmac/enh_desc.c b/drivers/net/stmmac/enh_desc.c index 77ff88c3958..5d1471d8f8f 100644 --- a/drivers/net/stmmac/enh_desc.c +++ b/drivers/net/stmmac/enh_desc.c @@ -284,7 +284,7 @@ static void enh_desc_release_tx_desc(struct dma_desc *p) { int ter = p->des01.etx.end_ring; - memset(p, 0, sizeof(struct dma_desc)); + memset(p, 0, offsetof(struct dma_desc, des2)); p->des01.etx.end_ring = ter; } |