From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm/next 2/8] fs: dlm: move version conversion to compile time
Date: Wed, 27 Oct 2021 11:23:16 -0400 [thread overview]
Message-ID: <20211027152322.3236492-3-aahringo@redhat.com> (raw)
In-Reply-To: <20211027152322.3236492-1-aahringo@redhat.com>
This patch moves version conversion to little endian from a runtime
variable to compile time constant.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
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 e3de268898ed..6bcc5eb0f6cc 100644
--- a/fs/dlm/midcomms.c
+++ b/fs/dlm/midcomms.c
@@ -912,11 +912,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
next prev parent reply other threads:[~2021-10-27 15:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 15:23 [Cluster-devel] [PATCH dlm/next 0/8] fs: dlm: new debug feature and fix invalid message Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 1/8] fs: dlm: remove obsolete INBUF define Alexander Aring
2021-10-27 15:23 ` Alexander Aring [this message]
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 3/8] fs: dlm: let handle callback data as void Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 4/8] fs: dlm: add debugfs rawmsg send functionality Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 5/8] fs: dlm: allow create lkb with specific id range Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 6/8] fs: dlm: add lkb debugfs functionality Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 7/8] fs: dlm: add lkb waiters " Alexander Aring
2021-10-27 15:23 ` [Cluster-devel] [PATCH dlm/next 8/8] fs: dlm: filter user dlm messages for kernel locks Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211027152322.3236492-3-aahringo@redhat.com \
--to=aahringo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).