| To: | netdev@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] [ATM]: [he] make code more readable with list_for_each_entry (from Domen Puncer <domen@coderock.org>) |
| From: | "chas williams (contractor)" <chas@xxxxxxxxxxxxxxxx> |
| Date: | Tue, 21 Sep 2004 16:30:23 -0400 |
| Cc: | davem@xxxxxxxxxx, Domen Puncer <domen@xxxxxxxxxxxx> |
| Reply-to: | chas3@xxxxxxxxxxxxxxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
dave,
please apply to 2.6.
thanks!
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/17 21:09:56-04:00 chas@xxxxxxxxxxxxxxxxxxxxxx
# [ATM]: [he] make code more readable with list_for_each_entry (from Domen
Puncer <domen@xxxxxxxxxxxx>)
#
# drivers/atm/he.c
# 2004/09/17 21:08:45-04:00 chas@xxxxxxxxxxxxxxxxxxxxxx +2 -3
#
diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c
--- a/drivers/atm/he.c 2004-09-21 13:48:06 -04:00
+++ b/drivers/atm/he.c 2004-09-21 13:48:06 -04:00
@@ -1963,7 +1963,7 @@
struct he_tpd *tpd;
int slot, updated = 0;
#ifdef USE_TPD_POOL
- struct list_head *p;
+ struct he_tpd *__tpd;
#endif
/* 2.1.6 transmit buffer return queue */
@@ -1978,8 +1978,7 @@
TBRQ_MULTIPLE(he_dev->tbrq_head) ? " MULTIPLE" : "");
#ifdef USE_TPD_POOL
tpd = NULL;
- list_for_each(p, &he_dev->outstanding_tpds) {
- struct he_tpd *__tpd = list_entry(p, struct he_tpd,
entry);
+ list_for_each_entry(__tpd, &he_dev->outstanding_tpds, entry) {
if (TPD_ADDR(__tpd->status) ==
TBRQ_TPD(he_dev->tbrq_head)) {
tpd = __tpd;
list_del(&__tpd->entry);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>), chas williams (contractor) |
|---|---|
| Next by Date: | Re: [PATCH + RFC] neighbour/ARP cache scalability, Harald Welte |
| Previous by Thread: | [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>), chas williams (contractor) |
| Next by Thread: | Re: [PATCH] [ATM]: [he] make code more readable with list_for_each_entry (from Domen Puncer <domen@coderock.org>), David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |