aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-11-01 21:17:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-01 12:31:19 -0700
commit15ea19105bdeef36820ade6754b9b7f1e3511e98 (patch)
tree0b1cc24f910c400f2f7d823192f6b13e735d236f /drivers/misc
parent19838fb85306905a373b6449c1428791d653fc21 (diff)
downloadkernel_goldelico_gta04-15ea19105bdeef36820ade6754b9b7f1e3511e98.zip
kernel_goldelico_gta04-15ea19105bdeef36820ade6754b9b7f1e3511e98.tar.gz
kernel_goldelico_gta04-15ea19105bdeef36820ade6754b9b7f1e3511e98.tar.bz2
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@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/main.c6
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 */