提交 c38db30b 编写于 作者: A Ahmed S. Darwish 提交者: Jeff Garzik

e1000: Use ARRAY_SIZE macro when appropriate

A patch to use ARRAY_SIZE macro already defined in kernel.h.
Signed-off-by: NAhmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 024a0a3c
......@@ -742,7 +742,7 @@ e1000_set_ringparam(struct net_device *netdev,
uint32_t pat, value; \
uint32_t test[] = \
{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; \
for (pat = 0; pat < sizeof(test)/sizeof(test[0]); pat++) { \
for (pat = 0; pat < ARRAY_SIZE(test); pat++) { \
E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W)); \
value = E1000_READ_REG(&adapter->hw, R); \
if (value != (test[pat] & W & M)) { \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册