mei: revamp mei extension header structure layout.
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 21 Jun 2021 19:37:56 +0000 (22:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jun 2021 10:40:31 +0000 (12:40 +0200)
commit40292383640a2a4f73632e08a553681d0d88c80a
treefb8c692e77e0d39ffc183ebbc79544f594aedc8b
parent09f8c33a4cad3623874766033544abf34e3e365d
mei: revamp mei extension header structure layout.

The mei extension header was build as array of flexible structures
which will not work if actually more headers are added.
(Currently only vtag header was used).
Sparse reports:

drivers/misc/mei/hw.h:253:32: warning: array of flexible structures

Use basic type u8 for the variable sized extension.
Define explicitly mei_ext_hdr_vtag structure.
And also fix mei_ext_next() function to point correctly to the
end of the header.

Note: the headers are part of firmware interface and need to be __packed.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20210621193756.134027-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.c
drivers/misc/mei/hw.h
drivers/misc/mei/interrupt.c