summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hw.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-07-14 23:45:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-23 09:27:10 +0200
commit3c3b7ddef7879abb2c42422e898145826c79e5f0 (patch)
tree42faaed8f1c3b8d50a916427a3b0a066c53c5b41 /drivers/misc/mei/hw.h
parentmei: Replace HTTP links with HTTPS ones (diff)
downloadlinux-3c3b7ddef7879abb2c42422e898145826c79e5f0.tar.xz
linux-3c3b7ddef7879abb2c42422e898145826c79e5f0.zip
mei: Avoid the use of one-element arrays
One-element arrays are being deprecated[1]. Replace the one-element arrays with a simple value type u8 reserved, once this is just a placeholder for alignment. Also, while there, use the preferred form for passing a size of a struct. The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the variable type is changed but the corresponding sizeof that is passed as argument is not. [1] https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200714214516.GA1040@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/misc/mei/hw.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h
index b1a8d5ec88b3..8c0297f0e7f3 100644
--- a/drivers/misc/mei/hw.h
+++ b/drivers/misc/mei/hw.h
@@ -346,13 +346,13 @@ struct hbm_add_client_request {
* @hbm_cmd: bus message command header
* @me_addr: address of the client in ME
* @status: if HBMS_SUCCESS then the client can now accept connections.
- * @reserved: reserved
+ * @reserved: reserved for alignment.
*/
struct hbm_add_client_response {
u8 hbm_cmd;
u8 me_addr;
u8 status;
- u8 reserved[1];
+ u8 reserved;
} __packed;
/**
@@ -461,7 +461,7 @@ struct hbm_notification {
u8 hbm_cmd;
u8 me_addr;
u8 host_addr;
- u8 reserved[1];
+ u8 reserved;
} __packed;
/**