aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/debugfs.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2010-02-25 01:15:26 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-10 17:09:37 -0500
commit04d1c22761f33ac8f345665e7ef809c875142425 (patch)
tree3fc3676c87e89684819600b800240c2d5c9369fe /drivers/net/wireless/iwmc3200wifi/debugfs.c
parent7d49c6111c27f0e68b0310aeececf7ded53f7f94 (diff)
iwmc3200wifi: remove "_safe" for some list_for_each_entry usage
Use list_for_each_entry instead of list_for_each_entry_safe in places iteration against list entry removal is not required. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/debugfs.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/debugfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/debugfs.c b/drivers/net/wireless/iwmc3200wifi/debugfs.c
index be992ca41cf1..6ac5c8dbe051 100644
--- a/drivers/net/wireless/iwmc3200wifi/debugfs.c
+++ b/drivers/net/wireless/iwmc3200wifi/debugfs.c
@@ -265,7 +265,7 @@ static ssize_t iwm_debugfs_rx_ticket_read(struct file *filp,
265 size_t count, loff_t *ppos) 265 size_t count, loff_t *ppos)
266{ 266{
267 struct iwm_priv *iwm = filp->private_data; 267 struct iwm_priv *iwm = filp->private_data;
268 struct iwm_rx_ticket_node *ticket, *next; 268 struct iwm_rx_ticket_node *ticket;
269 char *buf; 269 char *buf;
270 int buf_len = 4096, i; 270 int buf_len = 4096, i;
271 size_t len = 0; 271 size_t len = 0;
@@ -280,7 +280,7 @@ static ssize_t iwm_debugfs_rx_ticket_read(struct file *filp,
280 if (!buf) 280 if (!buf)
281 return -ENOMEM; 281 return -ENOMEM;
282 282
283 list_for_each_entry_safe(ticket, next, &iwm->rx_tickets, node) { 283 list_for_each_entry(ticket, &iwm->rx_tickets, node) {
284 len += snprintf(buf + len, buf_len - len, "Ticket #%d\n", 284 len += snprintf(buf + len, buf_len - len, "Ticket #%d\n",
285 ticket->ticket->id); 285 ticket->ticket->id);
286 len += snprintf(buf + len, buf_len - len, "\taction: 0x%x\n", 286 len += snprintf(buf + len, buf_len - len, "\taction: 0x%x\n",
@@ -290,12 +290,13 @@ static ssize_t iwm_debugfs_rx_ticket_read(struct file *filp,
290 } 290 }
291 291
292 for (i = 0; i < IWM_RX_ID_HASH; i++) { 292 for (i = 0; i < IWM_RX_ID_HASH; i++) {
293 struct iwm_rx_packet *packet, *nxt; 293 struct iwm_rx_packet *packet;
294 struct list_head *pkt_list = &iwm->rx_packets[i]; 294 struct list_head *pkt_list = &iwm->rx_packets[i];
295
295 if (!list_empty(pkt_list)) { 296 if (!list_empty(pkt_list)) {
296 len += snprintf(buf + len, buf_len - len, 297 len += snprintf(buf + len, buf_len - len,
297 "Packet hash #%d\n", i); 298 "Packet hash #%d\n", i);
298 list_for_each_entry_safe(packet, nxt, pkt_list, node) { 299 list_for_each_entry(packet, pkt_list, node) {
299 len += snprintf(buf + len, buf_len - len, 300 len += snprintf(buf + len, buf_len - len,
300 "\tPacket id: %d\n", 301 "\tPacket id: %d\n",
301 packet->id); 302 packet->id);