forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: Ezequiel Garcia <[email protected]> CC: Brian Norris <[email protected]> Cc: "Wanglin (Albert)" <[email protected]> Cc: Artem Bityutskiy <[email protected]> Cc: Karel Zak <[email protected]> Cc: Shmulik Ladkani <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ | |
* Written by Cai Zhiyong <[email protected]> | ||
* | ||
*/ | ||
#include <linux/buffer_head.h> | ||
#include <linux/module.h> | ||
#include <linux/export.h> | ||
#include <linux/cmdline-parser.h> | ||
|
||
static int parse_subpart(struct cmdline_subpart **subpart, char *partdef) | ||
|
@@ -159,6 +158,7 @@ void cmdline_parts_free(struct cmdline_parts **parts) | |
*parts = next_parts; | ||
} | ||
} | ||
EXPORT_SYMBOL(cmdline_parts_free); | ||
|
||
int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) | ||
{ | ||
|
@@ -206,6 +206,7 @@ int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) | |
cmdline_parts_free(parts); | ||
goto done; | ||
} | ||
EXPORT_SYMBOL(cmdline_parts_parse); | ||
|
||
struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, | ||
const char *bdev) | ||
|
@@ -214,17 +215,17 @@ struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, | |
parts = parts->next_parts; | ||
return parts; | ||
} | ||
EXPORT_SYMBOL(cmdline_parts_find); | ||
|
||
/* | ||
* add_part() | ||
* 0 success. | ||
* 1 can not add so many partitions. | ||
*/ | ||
void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, | ||
int slot, | ||
int (*add_part)(int, struct cmdline_subpart *, void *), | ||
void *param) | ||
|
||
int cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, | ||
int slot, | ||
int (*add_part)(int, struct cmdline_subpart *, void *), | ||
void *param) | ||
{ | ||
sector_t from = 0; | ||
struct cmdline_subpart *subpart; | ||
|
@@ -247,4 +248,7 @@ void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, | |
if (add_part(slot, subpart, param)) | ||
break; | ||
} | ||
|
||
return slot; | ||
} | ||
EXPORT_SYMBOL(cmdline_parts_set); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters