diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-12-25 19:05:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-07 10:31:27 -0800 |
commit | 438763f37eb9664b6372bdfee990f8c33acdc63c (patch) | |
tree | 71f2feab0d7b91cfd28c538c2943a8d8fe000c96 /drivers/misc/mei/wd.c | |
parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) | |
download | op-kernel-dev-438763f37eb9664b6372bdfee990f8c33acdc63c.zip op-kernel-dev-438763f37eb9664b6372bdfee990f8c33acdc63c.tar.gz |
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/wd.c')
-rw-r--r-- | drivers/misc/mei/wd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 9299a8c..9d4d4aa 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c @@ -101,22 +101,22 @@ int mei_wd_host_init(struct mei_device *dev) */ int mei_wd_send(struct mei_device *dev) { - struct mei_msg_hdr *mei_hdr; + struct mei_msg_hdr *hdr; - mei_hdr = (struct mei_msg_hdr *) &dev->wr_msg_buf[0]; - mei_hdr->host_addr = dev->wd_cl.host_client_id; - mei_hdr->me_addr = dev->wd_cl.me_client_id; - mei_hdr->msg_complete = 1; - mei_hdr->reserved = 0; + hdr = (struct mei_msg_hdr *) &dev->wr_msg_buf[0]; + hdr->host_addr = dev->wd_cl.host_client_id; + hdr->me_addr = dev->wd_cl.me_client_id; + hdr->msg_complete = 1; + hdr->reserved = 0; if (!memcmp(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE)) - mei_hdr->length = MEI_WD_START_MSG_SIZE; + hdr->length = MEI_WD_START_MSG_SIZE; else if (!memcmp(dev->wd_data, mei_stop_wd_params, MEI_WD_HDR_SIZE)) - mei_hdr->length = MEI_WD_STOP_MSG_SIZE; + hdr->length = MEI_WD_STOP_MSG_SIZE; else return -EINVAL; - return mei_write_message(dev, mei_hdr, dev->wd_data, mei_hdr->length); + return mei_write_message(dev, hdr, dev->wd_data); } /** |