提交 15ea1910 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

mei: mei_clear_list: kill file_temp

file_temp is used only once, so there is no any benefit of creating
a temporary variable
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 19838fb8
......@@ -103,18 +103,16 @@ static DEFINE_MUTEX(mei_mutex);
* returns true if callback removed from the list, false otherwise
*/
static bool mei_clear_list(struct mei_device *dev,
struct file *file, struct list_head *mei_cb_list)
const struct file *file, struct list_head *mei_cb_list)
{
struct mei_cl_cb *cb_pos = NULL;
struct mei_cl_cb *cb_next = NULL;
struct file *file_temp;
bool removed = false;
/* list all list member */
list_for_each_entry_safe(cb_pos, cb_next, mei_cb_list, list) {
file_temp = (struct file *)cb_pos->file_object;
/* check if list member associated with a file */
if (file_temp == file) {
if (file == cb_pos->file_object) {
/* remove member from the list */
list_del(&cb_pos->list);
/* check if cb equal to current iamthif cb */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册