From: Tomas Winkler <tomas.winkler@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [char-misc-next 8/8] mei: amthif: drop mei_clear_lists function
Date: Thu, 16 Jun 2016 17:58:59 +0300 [thread overview]
Message-ID: <1466089139-8078-8-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <1466089139-8078-1-git-send-email-tomas.winkler@intel.com>
From: Alexander Usyskin <alexander.usyskin@intel.com>
Open code mei_clear_lists into its only caller mei_amthif_releas
and drop unused parameter 'dev' form from mei_clear_list function.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/amthif.c | 27 +++++----------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 795eacf3b8b4..e7fdab724c10 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -408,15 +408,14 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
* mei_clear_list - removes all callbacks associated with file
* from mei_cb_list
*
- * @dev: device structure.
* @file: file structure
* @mei_cb_list: callbacks list
*
* mei_clear_list is called to clear resources associated with file
* when application calls close function or Ctrl-C was pressed
*/
-static void mei_clear_list(struct mei_device *dev,
- const struct file *file, struct list_head *mei_cb_list)
+static void mei_clear_list(const struct file *file,
+ struct list_head *mei_cb_list)
{
struct mei_cl_cb *cb, *next;
@@ -426,24 +425,6 @@ static void mei_clear_list(struct mei_device *dev,
}
/**
- * mei_clear_lists - removes all callbacks associated with file
- *
- * @dev: device structure
- * @file: file structure
- *
- * mei_clear_lists is called to clear resources associated with file
- * when application calls close function or Ctrl-C was pressed
- */
-static void mei_clear_lists(struct mei_device *dev, const struct file *file)
-{
- struct mei_cl *cl = &dev->iamthif_cl;
-
- mei_clear_list(dev, file, &dev->amthif_cmd_list.list);
- mei_clear_list(dev, file, &cl->rd_completed);
- mei_clear_list(dev, file, &dev->ctrl_rd_list.list);
-}
-
-/**
* mei_amthif_release - the release function
*
* @dev: device structure
@@ -465,7 +446,9 @@ int mei_amthif_release(struct mei_device *dev, struct file *file)
dev->iamthif_canceled = true;
}
- mei_clear_lists(dev, file);
+ mei_clear_list(file, &dev->amthif_cmd_list.list);
+ mei_clear_list(file, &cl->rd_completed);
+ mei_clear_list(file, &dev->ctrl_rd_list.list);
return 0;
}
--
2.5.5
prev parent reply other threads:[~2016-06-16 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 14:58 [char-misc-next 1/8] mei: recover after errors in runtime pm flow Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 2/8] mei: hbm: add missing argument in the kdoc Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 3/8] mei: drop read complete queue emptiness check Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 4/8] mei: fix return value on disconnection Tomas Winkler
2016-06-22 21:25 ` [char-misc-next v2 " Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 5/8] mei: move read cb to complete queue if not connected Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 6/8] mei: add file pointer to the host client structure Tomas Winkler
2016-06-16 14:58 ` [char-misc-next 7/8] mei: add read callback on demand for fixed_address clients Tomas Winkler
2016-06-16 14:58 ` Tomas Winkler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466089139-8078-8-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®