From: Alexander Aring Date: Tue, 2 Nov 2021 15:17:11 -0400 Subject: [Cluster-devel] [PATCH RESEND v5.15-rc7 05/18] fs: dlm: move version conversion to compile time In-Reply-To: <20211102191724.210095-1-aahringo@redhat.com> References: <20211102191724.210095-1-aahringo@redhat.com> Message-ID: <20211102191724.210095-6-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch moves version conversion to little endian from a runtime variable to compile time constant. Signed-off-by: Alexander Aring --- fs/dlm/midcomms.c | 6 +++--- 1 file 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: -- 2.27.0