Skip to content

Commit 00e99cc

Browse files
Alexander Aringteigland
authored andcommitted
dlm: use __le types for dlm messages
This patch changes to use __le types directly in the dlm message structure which is casted at the right dlm message buffer positions. The main goal what is reached here is to remove sparse warnings regarding to host to little byte order conversion or vice versa. Leaving those sparse issues ignored and always do it in out/in functionality tends to leave it unknown in which byte order the variable is being handled. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 2f9dbed commit 00e99cc

File tree

5 files changed

+174
-205
lines changed

5 files changed

+174
-205
lines changed

fs/dlm/dlm_internal.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -409,24 +409,24 @@ struct dlm_header {
409409

410410
struct dlm_message {
411411
struct dlm_header m_header;
412-
uint32_t m_type; /* DLM_MSG_ */
413-
uint32_t m_nodeid;
414-
uint32_t m_pid;
415-
uint32_t m_lkid; /* lkid on sender */
416-
uint32_t m_remid; /* lkid on receiver */
417-
uint32_t m_parent_lkid;
418-
uint32_t m_parent_remid;
419-
uint32_t m_exflags;
420-
uint32_t m_sbflags;
421-
uint32_t m_flags;
422-
uint32_t m_lvbseq;
423-
uint32_t m_hash;
424-
int m_status;
425-
int m_grmode;
426-
int m_rqmode;
427-
int m_bastmode;
428-
int m_asts;
429-
int m_result; /* 0 or -EXXX */
412+
__le32 m_type; /* DLM_MSG_ */
413+
__le32 m_nodeid;
414+
__le32 m_pid;
415+
__le32 m_lkid; /* lkid on sender */
416+
__le32 m_remid; /* lkid on receiver */
417+
__le32 m_parent_lkid;
418+
__le32 m_parent_remid;
419+
__le32 m_exflags;
420+
__le32 m_sbflags;
421+
__le32 m_flags;
422+
__le32 m_lvbseq;
423+
__le32 m_hash;
424+
__le32 m_status;
425+
__le32 m_grmode;
426+
__le32 m_rqmode;
427+
__le32 m_bastmode;
428+
__le32 m_asts;
429+
__le32 m_result; /* 0 or -EXXX */
430430
char m_extra[]; /* name or lvb */
431431
};
432432

0 commit comments

Comments
 (0)