Skip to content

Commit 87d6335

Browse files
ausyskingregkh
authored andcommitted
mei: flush queues by the host client only
During queues flush, the me client in most cases is already unlinked hence the me client id is unavailable. The host client structure pointer is enough for identification. The function mei_cl_cmp_id() is dropped as it has no more usage. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 40a6697 commit 87d6335

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

‎drivers/misc/mei/client.c‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -317,23 +317,6 @@ void mei_me_cl_rm_all(struct mei_device *dev)
317317
up_write(&dev->me_clients_rwsem);
318318
}
319319

320-
/**
321-
* mei_cl_cmp_id - tells if the clients are the same
322-
*
323-
* @cl1: host client 1
324-
* @cl2: host client 2
325-
*
326-
* Return: true - if the clients has same host and me ids
327-
* false - otherwise
328-
*/
329-
static inline bool mei_cl_cmp_id(const struct mei_cl *cl1,
330-
const struct mei_cl *cl2)
331-
{
332-
return cl1 && cl2 &&
333-
(cl1->host_client_id == cl2->host_client_id) &&
334-
(mei_cl_me_id(cl1) == mei_cl_me_id(cl2));
335-
}
336-
337320
/**
338321
* mei_io_cb_free - free mei_cb_private related memory
339322
*
@@ -418,7 +401,7 @@ static void mei_io_list_flush_cl(struct list_head *head,
418401
struct mei_cl_cb *cb, *next;
419402

420403
list_for_each_entry_safe(cb, next, head, list) {
421-
if (mei_cl_cmp_id(cl, cb->cl))
404+
if (cl == cb->cl)
422405
list_del_init(&cb->list);
423406
}
424407
}
@@ -435,7 +418,7 @@ static void mei_io_tx_list_free_cl(struct list_head *head,
435418
struct mei_cl_cb *cb, *next;
436419

437420
list_for_each_entry_safe(cb, next, head, list) {
438-
if (mei_cl_cmp_id(cl, cb->cl))
421+
if (cl == cb->cl)
439422
mei_tx_cb_dequeue(cb);
440423
}
441424
}

0 commit comments

Comments
 (0)