Commit da9e5157 authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: [he] Make code more readable with list_for_each_entry

From Domen Puncer <domen@coderock.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d830cf18
...@@ -1963,7 +1963,7 @@ he_service_tbrq(struct he_dev *he_dev, int group) ...@@ -1963,7 +1963,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
struct he_tpd *tpd; struct he_tpd *tpd;
int slot, updated = 0; int slot, updated = 0;
#ifdef USE_TPD_POOL #ifdef USE_TPD_POOL
struct list_head *p; struct he_tpd *__tpd;
#endif #endif
/* 2.1.6 transmit buffer return queue */ /* 2.1.6 transmit buffer return queue */
...@@ -1978,8 +1978,7 @@ he_service_tbrq(struct he_dev *he_dev, int group) ...@@ -1978,8 +1978,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
TBRQ_MULTIPLE(he_dev->tbrq_head) ? " MULTIPLE" : ""); TBRQ_MULTIPLE(he_dev->tbrq_head) ? " MULTIPLE" : "");
#ifdef USE_TPD_POOL #ifdef USE_TPD_POOL
tpd = NULL; tpd = NULL;
list_for_each(p, &he_dev->outstanding_tpds) { list_for_each_entry(__tpd, &he_dev->outstanding_tpds, entry) {
struct he_tpd *__tpd = list_entry(p, struct he_tpd, entry);
if (TPD_ADDR(__tpd->status) == TBRQ_TPD(he_dev->tbrq_head)) { if (TPD_ADDR(__tpd->status) == TBRQ_TPD(he_dev->tbrq_head)) {
tpd = __tpd; tpd = __tpd;
list_del(&__tpd->entry); list_del(&__tpd->entry);
......
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