mei: don't of list_for_each_entry_safe when not deleting

We can use simply list_for_each_entry if there is no
entry removal

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
このコミットが含まれているのは:
Tomas Winkler
2014-02-17 15:13:25 +02:00
committed by Greg Kroah-Hartman
コミット 31f88f5739
5個のファイルの変更28行の追加33行の削除

ファイルの表示

@@ -133,14 +133,12 @@ int mei_amthif_host_init(struct mei_device *dev)
struct mei_cl_cb *mei_amthif_find_read_list_entry(struct mei_device *dev,
struct file *file)
{
struct mei_cl_cb *pos = NULL;
struct mei_cl_cb *next = NULL;
struct mei_cl_cb *cb;
list_for_each_entry_safe(pos, next,
&dev->amthif_rd_complete_list.list, list) {
if (pos->cl && pos->cl == &dev->iamthif_cl &&
pos->file_object == file)
return pos;
list_for_each_entry(cb, &dev->amthif_rd_complete_list.list, list) {
if (cb->cl && cb->cl == &dev->iamthif_cl &&
cb->file_object == file)
return cb;
}
return NULL;
}