From: Tomas Winkler <tomas.winkler@intel.com>
To: gregkh@linuxfoundation.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
Alexander Usyskin <alexander.usyskin@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [char-misc-next 7/8 RESEND] mei: drop iamthif_mtu from device structure
Date: Sun, 5 Apr 2015 19:34:53 +0300 [thread overview]
Message-ID: <1428251694-18051-7-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <1428251694-18051-1-git-send-email-tomas.winkler@intel.com>
From: Alexander Usyskin <alexander.usyskin@intel.com>
We can receive mtu with one call now, no need to store it.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/amthif.c | 9 +--------
drivers/misc/mei/mei_dev.h | 2 --
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index a0209f02a31a..fd49c8b0fb8a 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -73,12 +73,6 @@ int mei_amthif_host_init(struct mei_device *dev, struct mei_me_client *me_cl)
mei_cl_init(cl, dev);
- /* Assign iamthif_mtu to the value received from ME */
-
- dev->iamthif_mtu = me_cl->props.max_msg_length;
- dev_dbg(dev->dev, "IAMTHIF_MTU = %d\n", dev->iamthif_mtu);
-
-
ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID);
if (ret < 0) {
dev_err(dev->dev, "amthif: failed cl_link %d\n", ret);
@@ -240,7 +234,6 @@ static int mei_amthif_read_start(struct mei_cl *cl, struct file *file)
{
struct mei_device *dev = cl->dev;
struct mei_cl_cb *cb;
- size_t length = dev->iamthif_mtu;
int rets;
cb = mei_io_cb_init(cl, MEI_FOP_READ, file);
@@ -249,7 +242,7 @@ static int mei_amthif_read_start(struct mei_cl *cl, struct file *file)
goto err;
}
- rets = mei_io_cb_alloc_buf(cb, length);
+ rets = mei_io_cb_alloc_buf(cb, mei_cl_mtu(cl));
if (rets)
goto err;
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 6cbcb11a6974..5184758643fc 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -489,7 +489,6 @@ const char *mei_pg_state_str(enum mei_pg_state state);
* @iamthif_cl : amthif host client
* @iamthif_current_cb : amthif current operation callback
* @iamthif_open_count : number of opened amthif connections
- * @iamthif_mtu : amthif client max message length
* @iamthif_timer : time stamp of current amthif command completion
* @iamthif_stall_timer : timer to detect amthif hang
* @iamthif_state : amthif processor state
@@ -585,7 +584,6 @@ struct mei_device {
struct mei_cl iamthif_cl;
struct mei_cl_cb *iamthif_current_cb;
long iamthif_open_count;
- int iamthif_mtu;
unsigned long iamthif_timer;
u32 iamthif_stall_timer;
enum iamthif_states iamthif_state;
--
1.9.3
next prev parent reply other threads:[~2015-04-05 16:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-05 16:34 [char-misc-next 1/8 RESEND] mei: revamp client disconnection flow Tomas Winkler
2015-04-05 16:34 ` [char-misc-next 2/8 RESEND] mei: revamp client connection Tomas Winkler
2015-04-05 16:34 ` [char-misc-next 3/8 RESEND] mei: add a reference from the host client to the me client Tomas Winkler
2015-04-07 17:41 ` Winkler, Tomas
2015-04-10 12:33 ` gregkh
2015-04-05 16:34 ` [char-misc-next 4/8 RESEND] mei: fix flow control for single buffer clients Tomas Winkler
2015-04-05 16:34 ` [char-misc-next 5/8 RESEND] mei: support for fixed address clients Tomas Winkler
2015-04-05 16:34 ` [char-misc-next 6/8 RESEND] mei: connection to fixed address clients from user-space Tomas Winkler
2015-04-05 16:34 ` Tomas Winkler [this message]
2015-04-05 16:34 ` [char-misc-next 8/8 RESEND] mei: txe: fix incorrect indentation Tomas Winkler
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=1428251694-18051-7-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=arnd@arndb.de \
--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®