diff options
| author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-04 02:40:14 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-11 09:47:25 -0400 |
| commit | 175428b2b3eeacf90dcc171d5915d6b4dc86e917 (patch) | |
| tree | 66b043a9e7db0c310e5742d584c02586272a248a | |
| parent | 5f6928378b165c4b0d57a711e1c1eb925ad33846 (diff) | |
[MTD] mtdchar.c remove shadowed variable warnings
Use einfo, oinfo for the inner erase_info and otp_info structs used in
individual case statements.
drivers/mtd/mtdchar.c:582:26: warning: symbol 'info' shadows an earlier one
drivers/mtd/mtdchar.c:380:23: originally declared here
drivers/mtd/mtdchar.c:596:26: warning: symbol 'info' shadows an earlier one
drivers/mtd/mtdchar.c:380:23: originally declared here
drivers/mtd/mtdchar.c:704:19: warning: symbol 'info' shadows an earlier one
drivers/mtd/mtdchar.c:380:23: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/mtdchar.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 5fc2c4216c03..f5061fe72e4c 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
| @@ -577,29 +577,29 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
| 577 | 577 | ||
| 578 | case MEMLOCK: | 578 | case MEMLOCK: |
| 579 | { | 579 | { |
| 580 | struct erase_info_user info; | 580 | struct erase_info_user einfo; |
| 581 | 581 | ||
| 582 | if (copy_from_user(&info, argp, sizeof(info))) | 582 | if (copy_from_user(&einfo, argp, sizeof(einfo))) |
| 583 | return -EFAULT; | 583 | return -EFAULT; |
| 584 | 584 | ||
| 585 | if (!mtd->lock) | 585 | if (!mtd->lock) |
| 586 | ret = -EOPNOTSUPP; | 586 | ret = -EOPNOTSUPP; |
| 587 | else | 587 | else |
| 588 | ret = mtd->lock(mtd, info.start, info.length); | 588 | ret = mtd->lock(mtd, einfo.start, einfo.length); |
| 589 | break; | 589 | break; |
| 590 | } | 590 | } |
| 591 | 591 | ||
| 592 | case MEMUNLOCK: | 592 | case MEMUNLOCK: |
| 593 | { | 593 | { |
| 594 | struct erase_info_user info; | 594 | struct erase_info_user einfo; |
| 595 | 595 | ||
| 596 | if (copy_from_user(&info, argp, sizeof(info))) | 596 | if (copy_from_user(&einfo, argp, sizeof(einfo))) |
| 597 | return -EFAULT; | 597 | return -EFAULT; |
| 598 | 598 | ||
| 599 | if (!mtd->unlock) | 599 | if (!mtd->unlock) |
| 600 | ret = -EOPNOTSUPP; | 600 | ret = -EOPNOTSUPP; |
| 601 | else | 601 | else |
| 602 | ret = mtd->unlock(mtd, info.start, info.length); | 602 | ret = mtd->unlock(mtd, einfo.start, einfo.length); |
| 603 | break; | 603 | break; |
| 604 | } | 604 | } |
| 605 | 605 | ||
| @@ -699,15 +699,15 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
| 699 | 699 | ||
| 700 | case OTPLOCK: | 700 | case OTPLOCK: |
| 701 | { | 701 | { |
| 702 | struct otp_info info; | 702 | struct otp_info oinfo; |
| 703 | 703 | ||
| 704 | if (mfi->mode != MTD_MODE_OTP_USER) | 704 | if (mfi->mode != MTD_MODE_OTP_USER) |
| 705 | return -EINVAL; | 705 | return -EINVAL; |
| 706 | if (copy_from_user(&info, argp, sizeof(info))) | 706 | if (copy_from_user(&oinfo, argp, sizeof(oinfo))) |
| 707 | return -EFAULT; | 707 | return -EFAULT; |
| 708 | if (!mtd->lock_user_prot_reg) | 708 | if (!mtd->lock_user_prot_reg) |
| 709 | return -EOPNOTSUPP; | 709 | return -EOPNOTSUPP; |
| 710 | ret = mtd->lock_user_prot_reg(mtd, info.start, info.length); | 710 | ret = mtd->lock_user_prot_reg(mtd, oinfo.start, oinfo.length); |
| 711 | break; | 711 | break; |
| 712 | } | 712 | } |
| 713 | #endif | 713 | #endif |
