From 3428785a65dabf05bc899b6c5334984e98286184 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Mon, 4 Apr 2022 16:06:39 -0400 Subject: dlm: use __le types for dlm header This patch changes to use __le types directly in the dlm header 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 Signed-off-by: David Teigland --- fs/dlm/member.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/dlm/member.c') diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 61f906e705db..4b05b0c1e76b 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -20,7 +20,7 @@ int dlm_slots_version(struct dlm_header *h) { - if ((h->h_version & 0x0000FFFF) < DLM_HEADER_SLOTS) + if ((le32_to_cpu(h->h_version) & 0x0000FFFF) < DLM_HEADER_SLOTS) return 0; return 1; } -- cgit v1.2.3