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>
This commit is contained in:
parent
fe93367541
commit
658bd576f9
@ -909,11 +909,11 @@ int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len)
|
|||||||
if (msglen > len)
|
if (msglen > len)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (le32_to_cpu(hd->h_version)) {
|
switch (hd->h_version) {
|
||||||
case DLM_VERSION_3_1:
|
case cpu_to_le32(DLM_VERSION_3_1):
|
||||||
dlm_midcomms_receive_buffer_3_1((union dlm_packet *)ptr, nodeid);
|
dlm_midcomms_receive_buffer_3_1((union dlm_packet *)ptr, nodeid);
|
||||||
break;
|
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);
|
dlm_midcomms_receive_buffer_3_2((union dlm_packet *)ptr, nodeid);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user