Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4480240f700587c15507b7815e75989b16825b2 Commit: f4480240f700587c15507b7815e75989b16825b2 Parent: c6d4d63489f2e3ce38c80e7073952f0c58d4c2bc Author: Akinobu Mita <[EMAIL PROTECTED]> AuthorDate: Tue Jul 17 04:03:47 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Jul 17 10:23:03 2007 -0700
unregister_blkdev(): return void Put WARN_ON and fixed all callers of unregister_blkdev(). Now we can make unregister_blkdev return void. Cc: Jens Axboe <[EMAIL PROTECTED]> Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- block/genhd.c | 7 +------ include/linux/fs.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 7f71b2c..3af1e7a 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -108,13 +108,11 @@ out: EXPORT_SYMBOL(register_blkdev); -/* todo: make void - error printk here */ -int unregister_blkdev(unsigned int major, const char *name) +void unregister_blkdev(unsigned int major, const char *name) { struct blk_major_name **n; struct blk_major_name *p = NULL; int index = major_to_index(major); - int ret = 0; mutex_lock(&block_subsys_lock); for (n = &major_names[index]; *n; n = &(*n)->next) @@ -122,15 +120,12 @@ int unregister_blkdev(unsigned int major, const char *name) break; if (!*n || strcmp((*n)->name, name)) { WARN_ON(1); - ret = -EINVAL; } else { p = *n; *n = p->next; } mutex_unlock(&block_subsys_lock); kfree(p); - - return ret; } EXPORT_SYMBOL(unregister_blkdev); diff --git a/include/linux/fs.h b/include/linux/fs.h index b3a9f0d..aa74f7d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1527,7 +1527,7 @@ extern void putname(const char *name); #ifdef CONFIG_BLOCK extern int register_blkdev(unsigned int, const char *); -extern int unregister_blkdev(unsigned int, const char *); +extern void unregister_blkdev(unsigned int, const char *); extern struct block_device *bdget(dev_t); extern void bd_set_size(struct block_device *, loff_t size); extern void bd_forget(struct inode *inode); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html