mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 10:01:41 +00:00
s390/qeth: don't call INIT_LIST_HEAD() on iob's list entry
INIT_LIST_HEAD() only needs to be called on actual list heads. While at it clarify the naming of the field. Suggested-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
af3f4a85d9
commit
04ea30c857
@ -624,7 +624,7 @@ struct qeth_reply {
|
||||
};
|
||||
|
||||
struct qeth_cmd_buffer {
|
||||
struct list_head list;
|
||||
struct list_head list_entry;
|
||||
struct completion done;
|
||||
spinlock_t lock;
|
||||
unsigned int length;
|
||||
|
@ -615,7 +615,7 @@ static void qeth_enqueue_cmd(struct qeth_card *card,
|
||||
struct qeth_cmd_buffer *iob)
|
||||
{
|
||||
spin_lock_irq(&card->lock);
|
||||
list_add_tail(&iob->list, &card->cmd_waiter_list);
|
||||
list_add_tail(&iob->list_entry, &card->cmd_waiter_list);
|
||||
spin_unlock_irq(&card->lock);
|
||||
}
|
||||
|
||||
@ -623,7 +623,7 @@ static void qeth_dequeue_cmd(struct qeth_card *card,
|
||||
struct qeth_cmd_buffer *iob)
|
||||
{
|
||||
spin_lock_irq(&card->lock);
|
||||
list_del(&iob->list);
|
||||
list_del(&iob->list_entry);
|
||||
spin_unlock_irq(&card->lock);
|
||||
}
|
||||
|
||||
@ -977,7 +977,7 @@ static void qeth_clear_ipacmd_list(struct qeth_card *card)
|
||||
QETH_CARD_TEXT(card, 4, "clipalst");
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(iob, &card->cmd_waiter_list, list)
|
||||
list_for_each_entry(iob, &card->cmd_waiter_list, list_entry)
|
||||
qeth_notify_cmd(iob, -ECANCELED);
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
}
|
||||
@ -1047,7 +1047,6 @@ struct qeth_cmd_buffer *qeth_alloc_cmd(struct qeth_channel *channel,
|
||||
|
||||
init_completion(&iob->done);
|
||||
spin_lock_init(&iob->lock);
|
||||
INIT_LIST_HEAD(&iob->list);
|
||||
refcount_set(&iob->ref_count, 1);
|
||||
iob->channel = channel;
|
||||
iob->timeout = timeout;
|
||||
@ -1094,7 +1093,7 @@ static void qeth_issue_next_read_cb(struct qeth_card *card,
|
||||
|
||||
/* match against pending cmd requests */
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(tmp, &card->cmd_waiter_list, list) {
|
||||
list_for_each_entry(tmp, &card->cmd_waiter_list, list_entry) {
|
||||
if (tmp->match && tmp->match(tmp, iob)) {
|
||||
request = tmp;
|
||||
/* take the object outside the lock */
|
||||
|
Loading…
Reference in New Issue
Block a user