mirror of
https://github.com/torvalds/linux.git
synced 2024-11-20 11:01:38 +00:00
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>
This commit is contained in:
parent
7573cb5b46
commit
db36f79237
@ -774,9 +774,7 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
|
|||||||
bool rt2x00queue_for_each_entry(struct data_queue *queue,
|
bool rt2x00queue_for_each_entry(struct data_queue *queue,
|
||||||
enum queue_index start,
|
enum queue_index start,
|
||||||
enum queue_index end,
|
enum queue_index end,
|
||||||
void *data,
|
bool (*fn)(struct queue_entry *entry))
|
||||||
bool (*fn)(struct queue_entry *entry,
|
|
||||||
void *data))
|
|
||||||
{
|
{
|
||||||
unsigned long irqflags;
|
unsigned long irqflags;
|
||||||
unsigned int index_start;
|
unsigned int index_start;
|
||||||
@ -807,17 +805,17 @@ bool rt2x00queue_for_each_entry(struct data_queue *queue,
|
|||||||
*/
|
*/
|
||||||
if (index_start < index_end) {
|
if (index_start < index_end) {
|
||||||
for (i = index_start; i < index_end; i++) {
|
for (i = index_start; i < index_end; i++) {
|
||||||
if (fn(&queue->entries[i], data))
|
if (fn(&queue->entries[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (i = index_start; i < queue->limit; i++) {
|
for (i = index_start; i < queue->limit; i++) {
|
||||||
if (fn(&queue->entries[i], data))
|
if (fn(&queue->entries[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < index_end; i++) {
|
for (i = 0; i < index_end; i++) {
|
||||||
if (fn(&queue->entries[i], data))
|
if (fn(&queue->entries[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -584,7 +584,6 @@ struct data_queue_desc {
|
|||||||
* @queue: Pointer to @data_queue
|
* @queue: Pointer to @data_queue
|
||||||
* @start: &enum queue_index Pointer to start index
|
* @start: &enum queue_index Pointer to start index
|
||||||
* @end: &enum queue_index Pointer to end index
|
* @end: &enum queue_index Pointer to end index
|
||||||
* @data: Data to pass to the callback function
|
|
||||||
* @fn: The function to call for each &struct queue_entry
|
* @fn: The function to call for each &struct queue_entry
|
||||||
*
|
*
|
||||||
* This will walk through all entries in the queue, in chronological
|
* This will walk through all entries in the queue, in chronological
|
||||||
@ -597,9 +596,7 @@ struct data_queue_desc {
|
|||||||
bool rt2x00queue_for_each_entry(struct data_queue *queue,
|
bool rt2x00queue_for_each_entry(struct data_queue *queue,
|
||||||
enum queue_index start,
|
enum queue_index start,
|
||||||
enum queue_index end,
|
enum queue_index end,
|
||||||
void *data,
|
bool (*fn)(struct queue_entry *entry));
|
||||||
bool (*fn)(struct queue_entry *entry,
|
|
||||||
void *data));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* rt2x00queue_empty - Check if the queue is empty.
|
* rt2x00queue_empty - Check if the queue is empty.
|
||||||
|
@ -285,7 +285,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
|
|||||||
queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
|
queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void* data)
|
static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry)
|
||||||
{
|
{
|
||||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||||
struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
|
struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
|
||||||
@ -390,7 +390,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
|
|||||||
queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work);
|
queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void* data)
|
static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry)
|
||||||
{
|
{
|
||||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||||
struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
|
struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
|
||||||
@ -427,18 +427,12 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
|
|||||||
case QID_AC_BE:
|
case QID_AC_BE:
|
||||||
case QID_AC_BK:
|
case QID_AC_BK:
|
||||||
if (!rt2x00queue_empty(queue))
|
if (!rt2x00queue_empty(queue))
|
||||||
rt2x00queue_for_each_entry(queue,
|
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX,
|
||||||
Q_INDEX_DONE,
|
|
||||||
Q_INDEX,
|
|
||||||
NULL,
|
|
||||||
rt2x00usb_kick_tx_entry);
|
rt2x00usb_kick_tx_entry);
|
||||||
break;
|
break;
|
||||||
case QID_RX:
|
case QID_RX:
|
||||||
if (!rt2x00queue_full(queue))
|
if (!rt2x00queue_full(queue))
|
||||||
rt2x00queue_for_each_entry(queue,
|
rt2x00queue_for_each_entry(queue, Q_INDEX, Q_INDEX_DONE,
|
||||||
Q_INDEX,
|
|
||||||
Q_INDEX_DONE,
|
|
||||||
NULL,
|
|
||||||
rt2x00usb_kick_rx_entry);
|
rt2x00usb_kick_rx_entry);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -447,7 +441,7 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00usb_kick_queue);
|
EXPORT_SYMBOL_GPL(rt2x00usb_kick_queue);
|
||||||
|
|
||||||
static bool rt2x00usb_flush_entry(struct queue_entry *entry, void* data)
|
static bool rt2x00usb_flush_entry(struct queue_entry *entry)
|
||||||
{
|
{
|
||||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||||
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
|
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
|
||||||
@ -474,7 +468,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue, bool drop)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (drop)
|
if (drop)
|
||||||
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL,
|
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX,
|
||||||
rt2x00usb_flush_entry);
|
rt2x00usb_flush_entry);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -565,7 +559,7 @@ void rt2x00usb_clear_entry(struct queue_entry *entry)
|
|||||||
entry->flags = 0;
|
entry->flags = 0;
|
||||||
|
|
||||||
if (entry->queue->qid == QID_RX)
|
if (entry->queue->qid == QID_RX)
|
||||||
rt2x00usb_kick_rx_entry(entry, NULL);
|
rt2x00usb_kick_rx_entry(entry);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00usb_clear_entry);
|
EXPORT_SYMBOL_GPL(rt2x00usb_clear_entry);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user