Commit e24ca925 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "mei: Avoid the use of one-element arrays"

This reverts commit 3c3b7dde, as it
turns out Tomas made a better series of patches for this same issue.

Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20f7151d
...@@ -408,14 +408,14 @@ static int mei_hbm_add_cl_resp(struct mei_device *dev, u8 addr, u8 status) ...@@ -408,14 +408,14 @@ static int mei_hbm_add_cl_resp(struct mei_device *dev, u8 addr, u8 status)
{ {
struct mei_msg_hdr mei_hdr; struct mei_msg_hdr mei_hdr;
struct hbm_add_client_response resp; struct hbm_add_client_response resp;
const size_t len = sizeof(resp); const size_t len = sizeof(struct hbm_add_client_response);
int ret; int ret;
dev_dbg(dev->dev, "adding client response\n"); dev_dbg(dev->dev, "adding client response\n");
mei_hbm_hdr(&mei_hdr, len); mei_hbm_hdr(&mei_hdr, len);
memset(&resp, 0, len); memset(&resp, 0, sizeof(struct hbm_add_client_response));
resp.hbm_cmd = MEI_HBM_ADD_CLIENT_RES_CMD; resp.hbm_cmd = MEI_HBM_ADD_CLIENT_RES_CMD;
resp.me_addr = addr; resp.me_addr = addr;
resp.status = status; resp.status = status;
......
...@@ -346,13 +346,13 @@ struct hbm_add_client_request { ...@@ -346,13 +346,13 @@ struct hbm_add_client_request {
* @hbm_cmd: bus message command header * @hbm_cmd: bus message command header
* @me_addr: address of the client in ME * @me_addr: address of the client in ME
* @status: if HBMS_SUCCESS then the client can now accept connections. * @status: if HBMS_SUCCESS then the client can now accept connections.
* @reserved: reserved for alignment. * @reserved: reserved
*/ */
struct hbm_add_client_response { struct hbm_add_client_response {
u8 hbm_cmd; u8 hbm_cmd;
u8 me_addr; u8 me_addr;
u8 status; u8 status;
u8 reserved; u8 reserved[1];
} __packed; } __packed;
/** /**
...@@ -461,7 +461,7 @@ struct hbm_notification { ...@@ -461,7 +461,7 @@ struct hbm_notification {
u8 hbm_cmd; u8 hbm_cmd;
u8 me_addr; u8 me_addr;
u8 host_addr; u8 host_addr;
u8 reserved; u8 reserved[1];
} __packed; } __packed;
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment