* [PATCH 1/2] mtd: Make deregister_mtd_parser return void
@ 2013-12-01 10:59 Axel Lin
2013-12-01 11:01 ` [PATCH 2/2] mtd: Make register_mtd_parser " Axel Lin
2013-12-09 20:00 ` [PATCH 1/2] mtd: Make deregister_mtd_parser " Brian Norris
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-12-01 10:59 UTC (permalink / raw)
To: David Woodhouse, Brian Norris; +Cc: linux-mtd
deregister_mtd_parser never fails, hence make it return void.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mtd/mtdpart.c | 3 +--
include/linux/mtd/partitions.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 67a89bb..29ee91e 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -682,12 +682,11 @@ int register_mtd_parser(struct mtd_part_parser *p)
}
EXPORT_SYMBOL_GPL(register_mtd_parser);
-int deregister_mtd_parser(struct mtd_part_parser *p)
+void deregister_mtd_parser(struct mtd_part_parser *p)
{
spin_lock(&part_parser_lock);
list_del(&p->list);
spin_unlock(&part_parser_lock);
- return 0;
}
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 335ffca..d513ffb 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -77,7 +77,7 @@ struct mtd_part_parser {
};
extern int register_mtd_parser(struct mtd_part_parser *parser);
-extern int deregister_mtd_parser(struct mtd_part_parser *parser);
+extern void deregister_mtd_parser(struct mtd_part_parser *parser);
int mtd_is_partition(const struct mtd_info *mtd);
int mtd_add_partition(struct mtd_info *master, const char *name,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] mtd: Make register_mtd_parser return void
2013-12-01 10:59 [PATCH 1/2] mtd: Make deregister_mtd_parser return void Axel Lin
@ 2013-12-01 11:01 ` Axel Lin
2013-12-09 20:00 ` [PATCH 1/2] mtd: Make deregister_mtd_parser " Brian Norris
1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2013-12-01 11:01 UTC (permalink / raw)
To: David Woodhouse; +Cc: Brian Norris, linux-mtd
register_mtd_parser never fails, hence make it return void.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mtd/afs.c | 3 ++-
drivers/mtd/ar7part.c | 3 ++-
drivers/mtd/bcm47xxpart.c | 3 ++-
drivers/mtd/bcm63xxpart.c | 3 ++-
drivers/mtd/cmdlinepart.c | 3 ++-
drivers/mtd/mtdpart.c | 4 +---
drivers/mtd/ofpart.c | 15 +++------------
drivers/mtd/redboot.c | 3 ++-
include/linux/mtd/partitions.h | 2 +-
9 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index 5a3942b..96a33e3 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -264,7 +264,8 @@ static struct mtd_part_parser afs_parser = {
static int __init afs_parser_init(void)
{
- return register_mtd_parser(&afs_parser);
+ register_mtd_parser(&afs_parser);
+ return 0;
}
static void __exit afs_parser_exit(void)
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
index ddc0a42..7c9172a 100644
--- a/drivers/mtd/ar7part.c
+++ b/drivers/mtd/ar7part.c
@@ -139,7 +139,8 @@ static struct mtd_part_parser ar7_parser = {
static int __init ar7_parser_init(void)
{
- return register_mtd_parser(&ar7_parser);
+ register_mtd_parser(&ar7_parser);
+ return 0;
}
static void __exit ar7_parser_exit(void)
diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
index 7a6384b..931746d 100644
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -243,7 +243,8 @@ static struct mtd_part_parser bcm47xxpart_mtd_parser = {
static int __init bcm47xxpart_init(void)
{
- return register_mtd_parser(&bcm47xxpart_mtd_parser);
+ register_mtd_parser(&bcm47xxpart_mtd_parser);
+ return 0;
}
static void __exit bcm47xxpart_exit(void)
diff --git a/drivers/mtd/bcm63xxpart.c b/drivers/mtd/bcm63xxpart.c
index 5c81390..b2443f7 100644
--- a/drivers/mtd/bcm63xxpart.c
+++ b/drivers/mtd/bcm63xxpart.c
@@ -221,7 +221,8 @@ static struct mtd_part_parser bcm63xx_cfe_parser = {
static int __init bcm63xx_cfe_parser_init(void)
{
- return register_mtd_parser(&bcm63xx_cfe_parser);
+ register_mtd_parser(&bcm63xx_cfe_parser);
+ return 0;
}
static void __exit bcm63xx_cfe_parser_exit(void)
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 721caeb..3e829b3 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -395,7 +395,8 @@ static int __init cmdline_parser_init(void)
{
if (mtdparts)
mtdpart_setup(mtdparts);
- return register_mtd_parser(&cmdline_parser);
+ register_mtd_parser(&cmdline_parser);
+ return 0;
}
static void __exit cmdline_parser_exit(void)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 29ee91e..3c7d6d7 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -672,13 +672,11 @@ static struct mtd_part_parser *get_partition_parser(const char *name)
#define put_partition_parser(p) do { module_put((p)->owner); } while (0)
-int register_mtd_parser(struct mtd_part_parser *p)
+void register_mtd_parser(struct mtd_part_parser *p)
{
spin_lock(&part_parser_lock);
list_add(&p->list, &part_parsers);
spin_unlock(&part_parser_lock);
-
- return 0;
}
EXPORT_SYMBOL_GPL(register_mtd_parser);
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index f0a708b..aa26c32 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -173,18 +173,9 @@ static struct mtd_part_parser ofoldpart_parser = {
static int __init ofpart_parser_init(void)
{
- int rc;
- rc = register_mtd_parser(&ofpart_parser);
- if (rc)
- goto out;
-
- rc = register_mtd_parser(&ofoldpart_parser);
- if (!rc)
- return 0;
-
- deregister_mtd_parser(&ofoldpart_parser);
-out:
- return rc;
+ register_mtd_parser(&ofpart_parser);
+ register_mtd_parser(&ofoldpart_parser);
+ return 0;
}
static void __exit ofpart_parser_exit(void)
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 580035c..5da911e 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -300,7 +300,8 @@ MODULE_ALIAS("RedBoot");
static int __init redboot_parser_init(void)
{
- return register_mtd_parser(&redboot_parser);
+ register_mtd_parser(&redboot_parser);
+ return 0;
}
static void __exit redboot_parser_exit(void)
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index d513ffb..6a35e6d 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -76,7 +76,7 @@ struct mtd_part_parser {
struct mtd_part_parser_data *);
};
-extern int register_mtd_parser(struct mtd_part_parser *parser);
+extern void register_mtd_parser(struct mtd_part_parser *parser);
extern void deregister_mtd_parser(struct mtd_part_parser *parser);
int mtd_is_partition(const struct mtd_info *mtd);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] mtd: Make deregister_mtd_parser return void
2013-12-01 10:59 [PATCH 1/2] mtd: Make deregister_mtd_parser return void Axel Lin
2013-12-01 11:01 ` [PATCH 2/2] mtd: Make register_mtd_parser " Axel Lin
@ 2013-12-09 20:00 ` Brian Norris
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2013-12-09 20:00 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-mtd, David Woodhouse
On Sun, Dec 01, 2013 at 06:59:15PM +0800, Axel Lin wrote:
> deregister_mtd_parser never fails, hence make it return void.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Pushed both to l2-mtd.git.
Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-09 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-01 10:59 [PATCH 1/2] mtd: Make deregister_mtd_parser return void Axel Lin
2013-12-01 11:01 ` [PATCH 2/2] mtd: Make register_mtd_parser " Axel Lin
2013-12-09 20:00 ` [PATCH 1/2] mtd: Make deregister_mtd_parser " Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).