diff --git a/drivers/staging/hisysevent/hisysevent_builder.h b/drivers/staging/hisysevent/hisysevent_builder.h index 7f90db1fb19ff344925af8ec8b0d4213d5a08c61..6570b849984729789515b32dbd8c82f04d762bec 100644 --- a/drivers/staging/hisysevent/hisysevent_builder.h +++ b/drivers/staging/hisysevent/hisysevent_builder.h @@ -17,6 +17,8 @@ #define MAX_DOMAIN_LENGTH 16 #define MAX_EVENT_NAME_LENGTH 32 +#pragma pack(1) + struct hisysevent_header { /* event domain */ char domain[MAX_DOMAIN_LENGTH + 1]; @@ -49,6 +51,8 @@ struct hisysevent_header { u8 is_open_trace: 1; }; +#pragma pack() + struct hisysevent_params { /* total count of parameters */ s32 total_cnt; diff --git a/drivers/staging/hisysevent/hisysevent_raw_data_encoder.c b/drivers/staging/hisysevent/hisysevent_raw_data_encoder.c index 9ccc928962e6678fb957c78060a0cabdd9cedcc3..a206950aa162ccbd67535fc9a1296477ba20b42a 100644 --- a/drivers/staging/hisysevent/hisysevent_raw_data_encoder.c +++ b/drivers/staging/hisysevent/hisysevent_raw_data_encoder.c @@ -32,6 +32,8 @@ enum hisysevent_encode_type { LENGTH_DELIMITED = 1, }; +#pragma pack(1) + struct param_value_type { /* array flag */ u8 is_array: 1; @@ -43,6 +45,8 @@ struct param_value_type { u8 value_byte_cnt: 3; }; +#pragma pack() + static u8 encode_tag(u8 type) { return type << (TAG_BYTE_OFFSET + 1);