aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-07-09 11:24:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-11 15:38:27 -0400
commitdb36f792370959ff26458f80942cf98fe8249d95 (patch)
treed6085282d1583877f4ab2caa5f6d025471fc738e /drivers
parent7573cb5b46f878e4b3477f60f86355197e36e04a (diff)
rt2x00: remove unused argument
Data pointer on rt2x00queue_for_each_entry() is never used - remove it. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c10
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h5
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c20
3 files changed, 12 insertions, 23 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 2fd830103415..f7e74a0a7759 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -774,9 +774,7 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
774bool rt2x00queue_for_each_entry(struct data_queue *queue, 774bool rt2x00queue_for_each_entry(struct data_queue *queue,
775 enum queue_index start, 775 enum queue_index start,
776 enum queue_index end, 776 enum queue_index end,
777 void *data, 777 bool (*fn)(struct queue_entry *entry))
778 bool (*fn)(struct queue_entry *entry,
779 void *data))
780{ 778{
781 unsigned long irqflags; 779 unsigned long irqflags;
782 unsigned int index_start; 780 unsigned int index_start;
@@ -807,17 +805,17 @@ bool rt2x00queue_for_each_entry(struct data_queue *queue,
807 */ 805 */
808 if (index_start < index_end) { 806 if (index_start < index_end) {
809 for (i = index_start; i < index_end; i++) { 807 for (i = index_start; i < index_end; i++) {
810 if (fn(&queue->entries[i], data)) 808 if (fn(&queue->entries[i]))
811 return true; 809 return true;
812 } 810 }
813 } else { 811 } else {
814 for (i = index_start; i < queue->limit; i++) { 812 for (i = index_start; i < queue->limit; i++) {
815 if (fn(&queue->entries[i], data)) 813 if (fn(&queue->entries[i]))
816 return true; 814 return true;
817 } 815 }
818 816
819 for (i = 0; i < index_end; i++) { 817 for (i = 0; i < index_end; i++) {
820 if (fn(&queue->entries[i], data)) 818 if (fn(&queue->entries[i]))
821 return true; 819 return true;
822 } 820 }
823 } 821 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 5f1392c72673..9b8c10a86dee 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -584,7 +584,6 @@ struct data_queue_desc {
584 * @queue: Pointer to @data_queue 584 * @queue: Pointer to @data_queue
585 * @start: &enum queue_index Pointer to start index 585 * @start: &enum queue_index Pointer to start index
586 * @end: &enum queue_index Pointer to end index 586 * @end: &enum queue_index Pointer to end index
587 * @data: Data to pass to the callback function
588 * @fn: The function to call for each &struct queue_entry 587 * @fn: The function to call for each &struct queue_entry
589 * 588 *
590 * This will walk through all entries in the queue, in chronological 589 * This will walk through all entries in the queue, in chronological
@@ -597,9 +596,7 @@ struct data_queue_desc {
597bool rt2x00queue_for_each_entry(struct data_queue *queue, 596bool rt2x00queue_for_each_entry(struct data_queue *queue,
598 enum queue_index start, 597 enum queue_index start,
599 enum queue_index end, 598 enum queue_index end,
600 void *data, 599 bool (*fn)(struct queue_entry *entry));
601 bool (*fn)(struct queue_entry *entry,
602 void *data));
603 600
604/** 601/**
605 * rt2x00queue_empty - Check if the queue is empty. 602 * rt2x00queue_empty - Check if the queue is empty.
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 74ecc33fdd90..40ea80725a96 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -285,7 +285,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
285 queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); 285 queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
286} 286}
287 287
288static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void* data) 288static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry)
289{ 289{
290 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 290 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
291 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); 291 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
@@ -390,7 +390,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
390 queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work); 390 queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work);
391} 391}
392 392
393static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void* data) 393static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry)
394{ 394{
395 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 395 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
396 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); 396 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
@@ -427,18 +427,12 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
427 case QID_AC_BE: 427 case QID_AC_BE:
428 case QID_AC_BK: 428 case QID_AC_BK:
429 if (!rt2x00queue_empty(queue)) 429 if (!rt2x00queue_empty(queue))
430 rt2x00queue_for_each_entry(queue, 430 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX,
431 Q_INDEX_DONE,
432 Q_INDEX,
433 NULL,
434 rt2x00usb_kick_tx_entry); 431 rt2x00usb_kick_tx_entry);
435 break; 432 break;
436 case QID_RX: 433 case QID_RX:
437 if (!rt2x00queue_full(queue)) 434 if (!rt2x00queue_full(queue))
438 rt2x00queue_for_each_entry(queue, 435 rt2x00queue_for_each_entry(queue, Q_INDEX, Q_INDEX_DONE,
439 Q_INDEX,
440 Q_INDEX_DONE,
441 NULL,
442 rt2x00usb_kick_rx_entry); 436 rt2x00usb_kick_rx_entry);
443 break; 437 break;
444 default: 438 default:
@@ -447,7 +441,7 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
447} 441}
448EXPORT_SYMBOL_GPL(rt2x00usb_kick_queue); 442EXPORT_SYMBOL_GPL(rt2x00usb_kick_queue);
449 443
450static bool rt2x00usb_flush_entry(struct queue_entry *entry, void* data) 444static bool rt2x00usb_flush_entry(struct queue_entry *entry)
451{ 445{
452 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 446 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
453 struct queue_entry_priv_usb *entry_priv = entry->priv_data; 447 struct queue_entry_priv_usb *entry_priv = entry->priv_data;
@@ -474,7 +468,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue, bool drop)
474 unsigned int i; 468 unsigned int i;
475 469
476 if (drop) 470 if (drop)
477 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL, 471 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX,
478 rt2x00usb_flush_entry); 472 rt2x00usb_flush_entry);
479 473
480 /* 474 /*
@@ -565,7 +559,7 @@ void rt2x00usb_clear_entry(struct queue_entry *entry)
565 entry->flags = 0; 559 entry->flags = 0;
566 560
567 if (entry->queue->qid == QID_RX) 561 if (entry->queue->qid == QID_RX)
568 rt2x00usb_kick_rx_entry(entry, NULL); 562 rt2x00usb_kick_rx_entry(entry);
569} 563}
570EXPORT_SYMBOL_GPL(rt2x00usb_clear_entry); 564EXPORT_SYMBOL_GPL(rt2x00usb_clear_entry);
571 565