summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/amthif.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-12-25 19:05:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-07 10:31:27 -0800
commit438763f37eb9664b6372bdfee990f8c33acdc63c (patch)
tree71f2feab0d7b91cfd28c538c2943a8d8fe000c96 /drivers/misc/mei/amthif.c
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff)
downloadlinux-438763f37eb9664b6372bdfee990f8c33acdc63c.tar.gz
linux-438763f37eb9664b6372bdfee990f8c33acdc63c.tar.bz2
linux-438763f37eb9664b6372bdfee990f8c33acdc63c.zip
mei: drop redundant length parameter from mei_write_message function
The length is already part of the message header and it is validated before the function call Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/amthif.c')
-rw-r--r--drivers/misc/mei/amthif.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 18794aea6062..8a9313a1ee7b 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -300,8 +300,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
mei_hdr.reserved = 0;
dev->iamthif_msg_buf_index += mei_hdr.length;
if (mei_write_message(dev, &mei_hdr,
- (unsigned char *)(dev->iamthif_msg_buf),
- mei_hdr.length))
+ (unsigned char *)dev->iamthif_msg_buf))
return -ENODEV;
if (mei_hdr.msg_complete) {
@@ -463,8 +462,7 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots,
*slots -= msg_slots;
if (mei_write_message(dev, mei_hdr,
- dev->iamthif_msg_buf + dev->iamthif_msg_buf_index,
- mei_hdr->length)) {
+ dev->iamthif_msg_buf + dev->iamthif_msg_buf_index)) {
dev->iamthif_state = MEI_IAMTHIF_IDLE;
cl->status = -ENODEV;
list_del(&cb->list);