diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-16 05:15:47 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-25 09:41:24 -0500 |
commit | ae616e1be13599c3b64e544ebe99e69ea851e99c (patch) | |
tree | 02edc84279e332991f75e998255ee563d6579027 /drivers/mtd/ubi/cdev.c | |
parent | b9a06623d9d0c6dff758d525ceb0d9e2bba8f7d6 (diff) |
UBI: fix warnings
drivers/mtd/ubi/cdev.c: In function ‘vol_cdev_read’:
drivers/mtd/ubi/cdev.c:187: warning: unused variable ‘vol_id’
CC [M] drivers/mtd/ubi/kapi.o
drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_erase’:
drivers/mtd/ubi/kapi.c:483: warning: unused variable ‘vol_id’
drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_unmap’:
drivers/mtd/ubi/kapi.c:544: warning: unused variable ‘vol_id’
drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_map’:
drivers/mtd/ubi/kapi.c:582: warning: unused variable ‘vol_id’
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index a60a3a24c2a1..a7aa123afaf6 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -184,13 +184,13 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count, | |||
184 | struct ubi_volume_desc *desc = file->private_data; | 184 | struct ubi_volume_desc *desc = file->private_data; |
185 | struct ubi_volume *vol = desc->vol; | 185 | struct ubi_volume *vol = desc->vol; |
186 | struct ubi_device *ubi = vol->ubi; | 186 | struct ubi_device *ubi = vol->ubi; |
187 | int err, lnum, off, len, vol_id = desc->vol->vol_id, tbuf_size; | 187 | int err, lnum, off, len, tbuf_size; |
188 | size_t count_save = count; | 188 | size_t count_save = count; |
189 | void *tbuf; | 189 | void *tbuf; |
190 | uint64_t tmp; | 190 | uint64_t tmp; |
191 | 191 | ||
192 | dbg_msg("read %zd bytes from offset %lld of volume %d", | 192 | dbg_msg("read %zd bytes from offset %lld of volume %d", |
193 | count, *offp, vol_id); | 193 | count, *offp, vol->vol_id); |
194 | 194 | ||
195 | if (vol->updating) { | 195 | if (vol->updating) { |
196 | dbg_err("updating"); | 196 | dbg_err("updating"); |
@@ -204,7 +204,7 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count, | |||
204 | return 0; | 204 | return 0; |
205 | 205 | ||
206 | if (vol->corrupted) | 206 | if (vol->corrupted) |
207 | dbg_msg("read from corrupted volume %d", vol_id); | 207 | dbg_msg("read from corrupted volume %d", vol->vol_id); |
208 | 208 | ||
209 | if (*offp + count > vol->used_bytes) | 209 | if (*offp + count > vol->used_bytes) |
210 | count_save = count = vol->used_bytes - *offp; | 210 | count_save = count = vol->used_bytes - *offp; |
@@ -268,13 +268,13 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf, | |||
268 | struct ubi_volume_desc *desc = file->private_data; | 268 | struct ubi_volume_desc *desc = file->private_data; |
269 | struct ubi_volume *vol = desc->vol; | 269 | struct ubi_volume *vol = desc->vol; |
270 | struct ubi_device *ubi = vol->ubi; | 270 | struct ubi_device *ubi = vol->ubi; |
271 | int lnum, off, len, tbuf_size, vol_id = vol->vol_id, err = 0; | 271 | int lnum, off, len, tbuf_size, err = 0; |
272 | size_t count_save = count; | 272 | size_t count_save = count; |
273 | char *tbuf; | 273 | char *tbuf; |
274 | uint64_t tmp; | 274 | uint64_t tmp; |
275 | 275 | ||
276 | dbg_msg("requested: write %zd bytes to offset %lld of volume %u", | 276 | dbg_msg("requested: write %zd bytes to offset %lld of volume %u", |
277 | count, *offp, desc->vol->vol_id); | 277 | count, *offp, vol->vol_id); |
278 | 278 | ||
279 | if (vol->vol_type == UBI_STATIC_VOLUME) | 279 | if (vol->vol_type == UBI_STATIC_VOLUME) |
280 | return -EROFS; | 280 | return -EROFS; |