[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1351797438-26345-4-git-send-email-tomas.winkler@intel.com>
Date: Thu, 1 Nov 2012 21:17:16 +0200
From: Tomas Winkler <tomas.winkler@...el.com>
To: gregkh@...uxfoundation.org
Cc: arnd@...db.de, alan@...ux.intel.com, linux-kernel@...r.kernel.org,
Tomas Winkler <tomas.winkler@...el.com>
Subject: [char-misc-next 4/6] 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: Tomas Winkler <tomas.winkler@...el.com>
---
drivers/misc/mei/main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index f69e085..d8221a5 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -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 */
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists