diff options
author | David Teigland <teigland@redhat.com> | 2008-01-29 15:52:10 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-01-30 12:04:43 -0500 |
commit | dbcfc34733d1ae37e7a78c9e4e5325451223a5eb (patch) | |
tree | e7087494c66d414f0af5068f8ad715f71ea1a3b8 /fs/dlm/util.c | |
parent | 2a79289e87f3b6487b5fd23c8569f32097057fb4 (diff) |
dlm: clean ups
A couple small clean-ups. Remove unnecessary wrapper-functions in
rcom.c, and remove unnecessary casting and an unnecessary ASSERT in
util.c.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r-- | fs/dlm/util.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c index 11c6a456309f..4d9c1f4e1bd1 100644 --- a/fs/dlm/util.c +++ b/fs/dlm/util.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) 2005 Red Hat, Inc. All rights reserved. | 4 | ** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This copyrighted material is made available to anyone wishing to use, | 6 | ** This copyrighted material is made available to anyone wishing to use, |
7 | ** modify, copy, or redistribute it subject to the terms and conditions | 7 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -85,9 +85,7 @@ static int from_dlm_errno(int err) | |||
85 | 85 | ||
86 | void dlm_message_out(struct dlm_message *ms) | 86 | void dlm_message_out(struct dlm_message *ms) |
87 | { | 87 | { |
88 | struct dlm_header *hd = (struct dlm_header *) ms; | 88 | header_out(&ms->m_header); |
89 | |||
90 | header_out(hd); | ||
91 | 89 | ||
92 | ms->m_type = cpu_to_le32(ms->m_type); | 90 | ms->m_type = cpu_to_le32(ms->m_type); |
93 | ms->m_nodeid = cpu_to_le32(ms->m_nodeid); | 91 | ms->m_nodeid = cpu_to_le32(ms->m_nodeid); |
@@ -111,9 +109,7 @@ void dlm_message_out(struct dlm_message *ms) | |||
111 | 109 | ||
112 | void dlm_message_in(struct dlm_message *ms) | 110 | void dlm_message_in(struct dlm_message *ms) |
113 | { | 111 | { |
114 | struct dlm_header *hd = (struct dlm_header *) ms; | 112 | header_in(&ms->m_header); |
115 | |||
116 | header_in(hd); | ||
117 | 113 | ||
118 | ms->m_type = le32_to_cpu(ms->m_type); | 114 | ms->m_type = le32_to_cpu(ms->m_type); |
119 | ms->m_nodeid = le32_to_cpu(ms->m_nodeid); | 115 | ms->m_nodeid = le32_to_cpu(ms->m_nodeid); |
@@ -179,10 +175,9 @@ static void rcom_config_in(struct rcom_config *rf) | |||
179 | 175 | ||
180 | void dlm_rcom_out(struct dlm_rcom *rc) | 176 | void dlm_rcom_out(struct dlm_rcom *rc) |
181 | { | 177 | { |
182 | struct dlm_header *hd = (struct dlm_header *) rc; | ||
183 | int type = rc->rc_type; | 178 | int type = rc->rc_type; |
184 | 179 | ||
185 | header_out(hd); | 180 | header_out(&rc->rc_header); |
186 | 181 | ||
187 | rc->rc_type = cpu_to_le32(rc->rc_type); | 182 | rc->rc_type = cpu_to_le32(rc->rc_type); |
188 | rc->rc_result = cpu_to_le32(rc->rc_result); | 183 | rc->rc_result = cpu_to_le32(rc->rc_result); |
@@ -199,10 +194,9 @@ void dlm_rcom_out(struct dlm_rcom *rc) | |||
199 | 194 | ||
200 | void dlm_rcom_in(struct dlm_rcom *rc) | 195 | void dlm_rcom_in(struct dlm_rcom *rc) |
201 | { | 196 | { |
202 | struct dlm_header *hd = (struct dlm_header *) rc; | ||
203 | int type; | 197 | int type; |
204 | 198 | ||
205 | header_in(hd); | 199 | header_in(&rc->rc_header); |
206 | 200 | ||
207 | rc->rc_type = le32_to_cpu(rc->rc_type); | 201 | rc->rc_type = le32_to_cpu(rc->rc_type); |
208 | rc->rc_result = le32_to_cpu(rc->rc_result); | 202 | rc->rc_result = le32_to_cpu(rc->rc_result); |