Skip to content

Commit d9efd00

Browse files
Alexander Aringteigland
authored andcommitted
dlm: use __le types for options header
This patch changes to use __le types directly in the dlm option headers structures which are casted at the right dlm message buffer positions. Currently only midcomms.c using those headers which already was calling endian conversions on-the-fly without using in/out functionality like other endianness handling in dlm. Using __le types now will hopefully get useful warnings in future if we do comparison against host byte order values. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent a8449f2 commit d9efd00

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/dlm/dlm_internal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ struct dlm_rcom {
460460
};
461461

462462
struct dlm_opt_header {
463-
uint16_t t_type;
464-
uint16_t t_length;
465-
uint32_t t_pad;
463+
__le16 t_type;
464+
__le16 t_length;
465+
__le32 t_pad;
466466
/* need to be 8 byte aligned */
467467
char t_value[];
468468
};
@@ -472,8 +472,8 @@ struct dlm_opts {
472472
struct dlm_header o_header;
473473
uint8_t o_nextcmd;
474474
uint8_t o_pad;
475-
uint16_t o_optlen;
476-
uint32_t o_pad2;
475+
__le16 o_optlen;
476+
__le32 o_pad2;
477477
char o_opts[];
478478
};
479479

0 commit comments

Comments
 (0)