summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-11-02 15:17:11 -0400
committerDavid Teigland <teigland@redhat.com>2021-11-02 14:39:20 -0500
commit658bd576f95ed597e519cdadf1c86ac87c17aea5 (patch)
tree27efb8347f627beab32c01807eeec95faa97efc6 /fs/dlm
parentfe93367541bcedaba1dd5cb9cf138eec0267ea56 (diff)
downloadlinux-658bd576f95ed597e519cdadf1c86ac87c17aea5.tar.gz
linux-658bd576f95ed597e519cdadf1c86ac87c17aea5.tar.bz2
linux-658bd576f95ed597e519cdadf1c86ac87c17aea5.zip
fs: dlm: move version conversion to compile time
This patch moves version conversion to little endian from a runtime variable to compile time constant. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/midcomms.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
index 008078f06813..76bdc3a9dc61 100644
--- a/fs/dlm/midcomms.c
+++ b/fs/dlm/midcomms.c
@@ -909,11 +909,11 @@ int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len)
if (msglen > len)
break;
- switch (le32_to_cpu(hd->h_version)) {
- case DLM_VERSION_3_1:
+ switch (hd->h_version) {
+ case cpu_to_le32(DLM_VERSION_3_1):
dlm_midcomms_receive_buffer_3_1((union dlm_packet *)ptr, nodeid);
break;
- case DLM_VERSION_3_2:
+ case cpu_to_le32(DLM_VERSION_3_2):
dlm_midcomms_receive_buffer_3_2((union dlm_packet *)ptr, nodeid);
break;
default: