[PATCH 1/1] devfs-code: fix warning
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Thu Jan 12 09:41:14 EST 2012
/opt/work/barebox/fs/devfs-core.c: In function 'partition_ioctl':
/opt/work/barebox/fs/devfs-core.c:109:27: warning: unused variable 'reg'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
fs/devfs-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index e11fea2..3014d0e 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -106,7 +106,6 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
int ret = 0;
size_t offset;
struct mtd_info_user *user = buf;
- struct region_info_user *reg = buf;
switch (request) {
case MEMSETBADBLOCK:
@@ -146,6 +145,8 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
#ifdef CONFIG_PARTITION
case MEMGETREGIONINFO:
if (cdev->mtd) {
+ struct region_info_user *reg = buf;
+
reg->offset = cdev->offset;
reg->erasesize = cdev->mtd->erasesize;
reg->numblocks = cdev->size/reg->erasesize;
--
1.7.7
More information about the barebox
mailing list