Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448572
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [char-misc-next 04/12] mei: amthif: drop mei_clear_lists function |
| Date | 2016-07-22 15:00 +0200 |
| Message-ID | <rXIdA-5YC-17@gated-at.bofh.it> (permalink) |
| References | <rXIdz-5YC-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 e346af17d9f4..26568c5beb25 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.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[char-misc-next 00/12] mei: rx enhancements Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 02/12] mei: add file pointer to the host client structure Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 09/12] mei: add wrapper for queuing control commands. Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 04/12] mei: amthif: drop mei_clear_lists function Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 05/12] mei: drop redundant krealloc and checks in irq read Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 11/12] mei: amthif: drop mei_amthif_read Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 01/12] mei: move read cb to complete queue if not connected Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 08/12] mei: use consistent naming for TX control flow credits Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 07/12] mei: rx flow control counter Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 12/12] mei: drop unused file transaction states Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 10/12] mei: enqueue consecutive reads Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
[char-misc-next 06/12] mei: prepare read cb for fixed address clients on the receive path only. Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:10 +0200
RE: [char-misc-next 00/12] mei: rx enhancements "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-07-25 01:00 +0200
Re: [char-misc-next 00/12] mei: rx enhancements Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-25 01:30 +0200
csiph-web