diff options
author | CaiZhiyong <caizhiyong@huawei.com> | 2014-01-21 17:39:25 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2014-01-21 23:18:26 -0500 |
commit | bca266b3886b8bc587db044750c8a00d674b4d09 (patch) | |
tree | f0926b313d9c718450a9817caf4927cbc2a33cb1 /block/cmdline-parser.c | |
parent | 6753471c0cb4562aebb9c70beb74ccd392d49ee8 (diff) |
block: remove unrelated header files and export symbol
Fix up the following items:
- remove unrelated header files.
- export interface function.
- modify function cmdline_parts_parse return value, this will make
it more friendly for the caller.
Signed-off-by: CaiZhiyong <caizhiyong@huawei.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
CC: Brian Norris <computersforpeace@gmail.com>
Cc: "Wanglin (Albert)" <albert.wanglin@hisilicon.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Karel Zak <kzak@redhat.com>
Cc: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/cmdline-parser.c')
-rw-r--r-- | block/cmdline-parser.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/block/cmdline-parser.c b/block/cmdline-parser.c index cc2637f8674e..9dbc67e42a99 100644 --- a/block/cmdline-parser.c +++ b/block/cmdline-parser.c | |||
@@ -4,8 +4,7 @@ | |||
4 | * Written by Cai Zhiyong <caizhiyong@huawei.com> | 4 | * Written by Cai Zhiyong <caizhiyong@huawei.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <linux/buffer_head.h> | 7 | #include <linux/export.h> |
8 | #include <linux/module.h> | ||
9 | #include <linux/cmdline-parser.h> | 8 | #include <linux/cmdline-parser.h> |
10 | 9 | ||
11 | static int parse_subpart(struct cmdline_subpart **subpart, char *partdef) | 10 | static int parse_subpart(struct cmdline_subpart **subpart, char *partdef) |
@@ -159,6 +158,7 @@ void cmdline_parts_free(struct cmdline_parts **parts) | |||
159 | *parts = next_parts; | 158 | *parts = next_parts; |
160 | } | 159 | } |
161 | } | 160 | } |
161 | EXPORT_SYMBOL(cmdline_parts_free); | ||
162 | 162 | ||
163 | int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) | 163 | int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) |
164 | { | 164 | { |
@@ -206,6 +206,7 @@ fail: | |||
206 | cmdline_parts_free(parts); | 206 | cmdline_parts_free(parts); |
207 | goto done; | 207 | goto done; |
208 | } | 208 | } |
209 | EXPORT_SYMBOL(cmdline_parts_parse); | ||
209 | 210 | ||
210 | struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, | 211 | struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, |
211 | const char *bdev) | 212 | const char *bdev) |
@@ -214,17 +215,17 @@ struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, | |||
214 | parts = parts->next_parts; | 215 | parts = parts->next_parts; |
215 | return parts; | 216 | return parts; |
216 | } | 217 | } |
218 | EXPORT_SYMBOL(cmdline_parts_find); | ||
217 | 219 | ||
218 | /* | 220 | /* |
219 | * add_part() | 221 | * add_part() |
220 | * 0 success. | 222 | * 0 success. |
221 | * 1 can not add so many partitions. | 223 | * 1 can not add so many partitions. |
222 | */ | 224 | */ |
223 | void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, | 225 | int cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, |
224 | int slot, | 226 | int slot, |
225 | int (*add_part)(int, struct cmdline_subpart *, void *), | 227 | int (*add_part)(int, struct cmdline_subpart *, void *), |
226 | void *param) | 228 | void *param) |
227 | |||
228 | { | 229 | { |
229 | sector_t from = 0; | 230 | sector_t from = 0; |
230 | struct cmdline_subpart *subpart; | 231 | struct cmdline_subpart *subpart; |
@@ -247,4 +248,7 @@ void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, | |||
247 | if (add_part(slot, subpart, param)) | 248 | if (add_part(slot, subpart, param)) |
248 | break; | 249 | break; |
249 | } | 250 | } |
251 | |||
252 | return slot; | ||
250 | } | 253 | } |
254 | EXPORT_SYMBOL(cmdline_parts_set); | ||