mtd_blkdevs.c: quiet a "symbol shadows" sparse warning
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Oct 20 04:59:01 EDT 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6f4e137e9af8745ccaddaf5dcb037a1175089e1c
Commit: 6f4e137e9af8745ccaddaf5dcb037a1175089e1c
Parent: 266dead21675aeb89407b1213788cd924353d5e1
Author: hartleys <hartleys at visionengravers.com>
AuthorDate: Fri Oct 16 12:52:53 2009 +0000
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Oct 20 17:16:21 2009 +0900
mtd_blkdevs.c: quiet a "symbol shadows" sparse warning
In register_mtd_blktrans(), the symbol 'ret' is already declared
as an int at the start of the function. The inner loop declaration
is unnecessary. Quiets the following sparse warning:
warning: symbol 'ret' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/mtd_blkdevs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 0acbf4f..955226d 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -388,7 +388,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
"%sd", tr->name);
if (IS_ERR(tr->blkcore_priv->thread)) {
- int ret = PTR_ERR(tr->blkcore_priv->thread);
+ ret = PTR_ERR(tr->blkcore_priv->thread);
blk_cleanup_queue(tr->blkcore_priv->rq);
unregister_blkdev(tr->major, tr->name);
kfree(tr->blkcore_priv);
More information about the linux-mtd-cvs
mailing list