diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-19 04:08:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 07:26:39 -0400 |
commit | ff51bf841587c75b58d25ed77263158619784dd3 (patch) | |
tree | 85d415536b84c48afe2aea0243f420ac262e1bbd /net/rds/message.c | |
parent | d0c2b0d265a0f1f92922a99a31def9da582197ac (diff) |
rds: make local functions/variables static
The RDS protocol has lots of functions that should be
declared static. rds_message_get/add_version_extension is
removed since it defined but never used.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/message.c')
-rw-r--r-- | net/rds/message.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/net/rds/message.c b/net/rds/message.c index 84f937f11d47..a84545dae370 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -106,8 +106,8 @@ void rds_message_populate_header(struct rds_header *hdr, __be16 sport, | |||
106 | } | 106 | } |
107 | EXPORT_SYMBOL_GPL(rds_message_populate_header); | 107 | EXPORT_SYMBOL_GPL(rds_message_populate_header); |
108 | 108 | ||
109 | int rds_message_add_extension(struct rds_header *hdr, | 109 | int rds_message_add_extension(struct rds_header *hdr, unsigned int type, |
110 | unsigned int type, const void *data, unsigned int len) | 110 | const void *data, unsigned int len) |
111 | { | 111 | { |
112 | unsigned int ext_len = sizeof(u8) + len; | 112 | unsigned int ext_len = sizeof(u8) + len; |
113 | unsigned char *dst; | 113 | unsigned char *dst; |
@@ -177,26 +177,6 @@ none: | |||
177 | return RDS_EXTHDR_NONE; | 177 | return RDS_EXTHDR_NONE; |
178 | } | 178 | } |
179 | 179 | ||
180 | int rds_message_add_version_extension(struct rds_header *hdr, unsigned int version) | ||
181 | { | ||
182 | struct rds_ext_header_version ext_hdr; | ||
183 | |||
184 | ext_hdr.h_version = cpu_to_be32(version); | ||
185 | return rds_message_add_extension(hdr, RDS_EXTHDR_VERSION, &ext_hdr, sizeof(ext_hdr)); | ||
186 | } | ||
187 | |||
188 | int rds_message_get_version_extension(struct rds_header *hdr, unsigned int *version) | ||
189 | { | ||
190 | struct rds_ext_header_version ext_hdr; | ||
191 | unsigned int pos = 0, len = sizeof(ext_hdr); | ||
192 | |||
193 | /* We assume the version extension is the only one present */ | ||
194 | if (rds_message_next_extension(hdr, &pos, &ext_hdr, &len) != RDS_EXTHDR_VERSION) | ||
195 | return 0; | ||
196 | *version = be32_to_cpu(ext_hdr.h_version); | ||
197 | return 1; | ||
198 | } | ||
199 | |||
200 | int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset) | 180 | int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset) |
201 | { | 181 | { |
202 | struct rds_ext_header_rdma_dest ext_hdr; | 182 | struct rds_ext_header_rdma_dest ext_hdr; |