]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.suse/dlm-trivial-annotation-of-be16-value.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / dlm-trivial-annotation-of-be16-value.patch
1 From: Harvey Harrison <harvey.harrison@gmail.com>
2 commit cd8e4679bdcf9b54564f2cda2389bd0f0457e12d
3 Author: Harvey Harrison <harvey.harrison@gmail.com>
4 Date: Wed Nov 12 16:28:43 2008 -0600
5 Subject: dlm: trivial annotation of be16 value
6
7 fs/dlm/dir.c:419:14: warning: incorrect type in assignment (different base types)
8 fs/dlm/dir.c:419:14: expected unsigned short [unsigned] [addressable] [assigned] [usertype] be_namelen
9 fs/dlm/dir.c:419:14: got restricted __be16 [usertype] <noident>
10
11 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
12 Signed-off-by: David Teigland <teigland@redhat.com>
13 Signed-off-by: Coly Li <coly.li@suse.de>
14
15 diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
16 index 85defeb..92969f8 100644
17 --- a/fs/dlm/dir.c
18 +++ b/fs/dlm/dir.c
19 @@ -374,7 +374,7 @@ void dlm_copy_master_names(struct dlm_ls *ls, char *inbuf, int inlen,
20 struct list_head *list;
21 struct dlm_rsb *r;
22 int offset = 0, dir_nodeid;
23 - uint16_t be_namelen;
24 + __be16 be_namelen;
25
26 down_read(&ls->ls_root_sem);
27
28 @@ -410,15 +410,15 @@ void dlm_copy_master_names(struct dlm_ls *ls, char *inbuf, int inlen,
29
30 if (offset + sizeof(uint16_t)*2 + r->res_length > outlen) {
31 /* Write end-of-block record */
32 - be_namelen = 0;
33 - memcpy(outbuf + offset, &be_namelen, sizeof(uint16_t));
34 - offset += sizeof(uint16_t);
35 + be_namelen = cpu_to_be16(0);
36 + memcpy(outbuf + offset, &be_namelen, sizeof(__be16));
37 + offset += sizeof(__be16);
38 goto out;
39 }
40
41 be_namelen = cpu_to_be16(r->res_length);
42 - memcpy(outbuf + offset, &be_namelen, sizeof(uint16_t));
43 - offset += sizeof(uint16_t);
44 + memcpy(outbuf + offset, &be_namelen, sizeof(__be16));
45 + offset += sizeof(__be16);
46 memcpy(outbuf + offset, r->res_name, r->res_length);
47 offset += r->res_length;
48 }
49 @@ -430,9 +430,9 @@ void dlm_copy_master_names(struct dlm_ls *ls, char *inbuf, int inlen,
50
51 if ((list == &ls->ls_root_list) &&
52 (offset + sizeof(uint16_t) <= outlen)) {
53 - be_namelen = 0xFFFF;
54 - memcpy(outbuf + offset, &be_namelen, sizeof(uint16_t));
55 - offset += sizeof(uint16_t);
56 + be_namelen = cpu_to_be16(0xFFFF);
57 + memcpy(outbuf + offset, &be_namelen, sizeof(__be16));
58 + offset += sizeof(__be16);
59 }
60
61 out: