]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.suse/dlm-choose-better-identifiers.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / dlm-choose-better-identifiers.patch
1 From: Andrew Morton <akpm@linux-foundation.org>
2 commit 27eccf46491e1f77f9af9bbe0778122ce6882890
3 Author: Andrew Morton <akpm@linux-foundation.org>
4 Date: Fri Sep 5 08:42:08 2008 -0500
5 Subject: dlm: choose better identifiers
6
7 sparc32:
8
9 fs/dlm/config.c:397: error: expected identifier or '(' before '{' token
10 fs/dlm/config.c: In function 'drop_node':
11 fs/dlm/config.c:589: warning: initialization from incompatible pointer type
12 fs/dlm/config.c:589: warning: initialization from incompatible pointer type
13 fs/dlm/config.c: In function 'release_node':
14 fs/dlm/config.c:601: warning: initialization from incompatible pointer type
15 fs/dlm/config.c:601: warning: initialization from incompatible pointer type
16 fs/dlm/config.c: In function 'show_node':
17 fs/dlm/config.c:717: warning: initialization from incompatible pointer type
18 fs/dlm/config.c:717: warning: initialization from incompatible pointer type
19 fs/dlm/config.c: In function 'store_node':
20 fs/dlm/config.c:726: warning: initialization from incompatible pointer type
21 fs/dlm/config.c:726: warning: initialization from incompatible pointer type
22
23 Cc: Christine Caulfield <ccaulfie@redhat.com>
24 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
25 Signed-off-by: David Teigland <teigland@redhat.com>
26 Signed-off-by: Coly Li <coly.li@suse.de>
27
28 diff --git a/fs/dlm/config.c b/fs/dlm/config.c
29 index 1359be3..fd9859f 100644
30 --- a/fs/dlm/config.c
31 +++ b/fs/dlm/config.c
32 @@ -380,24 +380,24 @@ static struct config_item_type node_type = {
33 .ct_owner = THIS_MODULE,
34 };
35
36 -static struct dlm_cluster *to_cluster(struct config_item *i)
37 +static struct dlm_cluster *config_item_to_cluster(struct config_item *i)
38 {
39 return i ? container_of(to_config_group(i), struct dlm_cluster, group) :
40 NULL;
41 }
42
43 -static struct dlm_space *to_space(struct config_item *i)
44 +static struct dlm_space *config_item_to_space(struct config_item *i)
45 {
46 return i ? container_of(to_config_group(i), struct dlm_space, group) :
47 NULL;
48 }
49
50 -static struct dlm_comm *to_comm(struct config_item *i)
51 +static struct dlm_comm *config_item_to_comm(struct config_item *i)
52 {
53 return i ? container_of(i, struct dlm_comm, item) : NULL;
54 }
55
56 -static struct dlm_node *to_node(struct config_item *i)
57 +static struct dlm_node *config_item_to_node(struct config_item *i)
58 {
59 return i ? container_of(i, struct dlm_node, item) : NULL;
60 }
61 @@ -453,7 +453,7 @@ static struct config_group *make_cluster(struct config_group *g,
62
63 static void drop_cluster(struct config_group *g, struct config_item *i)
64 {
65 - struct dlm_cluster *cl = to_cluster(i);
66 + struct dlm_cluster *cl = config_item_to_cluster(i);
67 struct config_item *tmp;
68 int j;
69
70 @@ -471,7 +471,7 @@ static void drop_cluster(struct config_group *g, struct config_item *i)
71
72 static void release_cluster(struct config_item *i)
73 {
74 - struct dlm_cluster *cl = to_cluster(i);
75 + struct dlm_cluster *cl = config_item_to_cluster(i);
76 kfree(cl->group.default_groups);
77 kfree(cl);
78 }
79 @@ -510,7 +510,7 @@ static struct config_group *make_space(struct config_group *g, const char *name)
80
81 static void drop_space(struct config_group *g, struct config_item *i)
82 {
83 - struct dlm_space *sp = to_space(i);
84 + struct dlm_space *sp = config_item_to_space(i);
85 struct config_item *tmp;
86 int j;
87
88 @@ -527,7 +527,7 @@ static void drop_space(struct config_group *g, struct config_item *i)
89
90 static void release_space(struct config_item *i)
91 {
92 - struct dlm_space *sp = to_space(i);
93 + struct dlm_space *sp = config_item_to_space(i);
94 kfree(sp->group.default_groups);
95 kfree(sp);
96 }
97 @@ -549,7 +549,7 @@ static struct config_item *make_comm(struct config_group *g, const char *name)
98
99 static void drop_comm(struct config_group *g, struct config_item *i)
100 {
101 - struct dlm_comm *cm = to_comm(i);
102 + struct dlm_comm *cm = config_item_to_comm(i);
103 if (local_comm == cm)
104 local_comm = NULL;
105 dlm_lowcomms_close(cm->nodeid);
106 @@ -560,13 +560,13 @@ static void drop_comm(struct config_group *g, struct config_item *i)
107
108 static void release_comm(struct config_item *i)
109 {
110 - struct dlm_comm *cm = to_comm(i);
111 + struct dlm_comm *cm = config_item_to_comm(i);
112 kfree(cm);
113 }
114
115 static struct config_item *make_node(struct config_group *g, const char *name)
116 {
117 - struct dlm_space *sp = to_space(g->cg_item.ci_parent);
118 + struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent);
119 struct dlm_node *nd;
120
121 nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL);
122 @@ -588,8 +588,8 @@ static struct config_item *make_node(struct config_group *g, const char *name)
123
124 static void drop_node(struct config_group *g, struct config_item *i)
125 {
126 - struct dlm_space *sp = to_space(g->cg_item.ci_parent);
127 - struct dlm_node *nd = to_node(i);
128 + struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent);
129 + struct dlm_node *nd = config_item_to_node(i);
130
131 mutex_lock(&sp->members_lock);
132 list_del(&nd->list);
133 @@ -601,7 +601,7 @@ static void drop_node(struct config_group *g, struct config_item *i)
134
135 static void release_node(struct config_item *i)
136 {
137 - struct dlm_node *nd = to_node(i);
138 + struct dlm_node *nd = config_item_to_node(i);
139 kfree(nd);
140 }
141
142 @@ -635,7 +635,7 @@ void dlm_config_exit(void)
143 static ssize_t show_cluster(struct config_item *i, struct configfs_attribute *a,
144 char *buf)
145 {
146 - struct dlm_cluster *cl = to_cluster(i);
147 + struct dlm_cluster *cl = config_item_to_cluster(i);
148 struct cluster_attribute *cla =
149 container_of(a, struct cluster_attribute, attr);
150 return cla->show ? cla->show(cl, buf) : 0;
151 @@ -645,7 +645,7 @@ static ssize_t store_cluster(struct config_item *i,
152 struct configfs_attribute *a,
153 const char *buf, size_t len)
154 {
155 - struct dlm_cluster *cl = to_cluster(i);
156 + struct dlm_cluster *cl = config_item_to_cluster(i);
157 struct cluster_attribute *cla =
158 container_of(a, struct cluster_attribute, attr);
159 return cla->store ? cla->store(cl, buf, len) : -EINVAL;
160 @@ -654,7 +654,7 @@ static ssize_t store_cluster(struct config_item *i,
161 static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a,
162 char *buf)
163 {
164 - struct dlm_comm *cm = to_comm(i);
165 + struct dlm_comm *cm = config_item_to_comm(i);
166 struct comm_attribute *cma =
167 container_of(a, struct comm_attribute, attr);
168 return cma->show ? cma->show(cm, buf) : 0;
169 @@ -663,7 +663,7 @@ static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a,
170 static ssize_t store_comm(struct config_item *i, struct configfs_attribute *a,
171 const char *buf, size_t len)
172 {
173 - struct dlm_comm *cm = to_comm(i);
174 + struct dlm_comm *cm = config_item_to_comm(i);
175 struct comm_attribute *cma =
176 container_of(a, struct comm_attribute, attr);
177 return cma->store ? cma->store(cm, buf, len) : -EINVAL;
178 @@ -717,7 +717,7 @@ static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len)
179 static ssize_t show_node(struct config_item *i, struct configfs_attribute *a,
180 char *buf)
181 {
182 - struct dlm_node *nd = to_node(i);
183 + struct dlm_node *nd = config_item_to_node(i);
184 struct node_attribute *nda =
185 container_of(a, struct node_attribute, attr);
186 return nda->show ? nda->show(nd, buf) : 0;
187 @@ -726,7 +726,7 @@ static ssize_t show_node(struct config_item *i, struct configfs_attribute *a,
188 static ssize_t store_node(struct config_item *i, struct configfs_attribute *a,
189 const char *buf, size_t len)
190 {
191 - struct dlm_node *nd = to_node(i);
192 + struct dlm_node *nd = config_item_to_node(i);
193 struct node_attribute *nda =
194 container_of(a, struct node_attribute, attr);
195 return nda->store ? nda->store(nd, buf, len) : -EINVAL;
196 @@ -771,7 +771,7 @@ static struct dlm_space *get_space(char *name)
197 i = config_group_find_item(space_list, name);
198 mutex_unlock(&space_list->cg_subsys->su_mutex);
199
200 - return to_space(i);
201 + return config_item_to_space(i);
202 }
203
204 static void put_space(struct dlm_space *sp)
205 @@ -818,7 +818,7 @@ static struct dlm_comm *get_comm(int nodeid, struct sockaddr_storage *addr)
206 mutex_lock(&clusters_root.subsys.su_mutex);
207
208 list_for_each_entry(i, &comm_list->cg_children, ci_entry) {
209 - cm = to_comm(i);
210 + cm = config_item_to_comm(i);
211
212 if (nodeid) {
213 if (cm->nodeid != nodeid)