Skip to content

Commit 41d896f

Browse files
committed
plugins/ocp: Align ocp_smart_extended_log struct.
If the dssd point, minor version are declared as __le16, the alignment is broken. Remove __packed keyword. Reported-by: Steven Seungcheol Lee <[email protected]> Signed-off-by: Minsik Jeon <[email protected]>
1 parent e1426d6 commit 41d896f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/ocp/ocp-smart-extended-log.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct plugin;
5858
* @log_page_version: Log page version
5959
* @log_page_guid: Log page GUID
6060
*/
61-
struct __packed ocp_smart_extended_log {
61+
struct ocp_smart_extended_log {
6262
__u8 physical_media_units_written[16]; /* [15:0] */
6363
__u8 physical_media_units_read[16]; /* [31:16] */
6464
__u8 bad_user_nand_blocks_raw[6]; /* [37:32] */
@@ -77,8 +77,8 @@ struct __packed ocp_smart_extended_log {
7777
__u8 thermal_throttling_event_count; /* [96] */
7878
__u8 thermal_throttling_current_status; /* [97] */
7979
__u8 dssd_errata_version; /* [98] */
80-
__le16 dssd_point_version; /* [100:99] */
81-
__le16 dssd_minor_version; /* [102:101] */
80+
__u8 dssd_point_version[2]; /* [100:99] */
81+
__u8 dssd_minor_version[2]; /* [102:101] */
8282
__u8 dssd_major_version; /* [103] */
8383
__le64 pcie_correctable_err_count; /* [111:104] */
8484
__le32 incomplete_shoutdowns; /* [115:112] */

0 commit comments

Comments
 (0)