diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 11:39:56 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:26:00 -0400 |
commit | e2986827d5d0759788d00f3759bcd46fc28f96c5 (patch) | |
tree | f1272cf940e80a0f3ee3e307341a2df0bbad6dbe /drivers/mtd/ubi/vmt.c | |
parent | 7bf523ae252d654f1fa85c5e8759f221afe1c593 (diff) |
UBI: get rid of dbg_err
This patch removes the 'dbg_err()' macro and we now use 'ubi_err' instead.
The idea of 'dbg_err()' was to compile out some error message to make the
binary a bit smaller - but I think it was a bad idea.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 1bfd4b6ac407..e4b897ab4543 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -223,7 +223,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | if (vol_id == UBI_VOL_NUM_AUTO) { | 225 | if (vol_id == UBI_VOL_NUM_AUTO) { |
226 | dbg_err("out of volume IDs"); | 226 | ubi_err("out of volume IDs"); |
227 | err = -ENFILE; | 227 | err = -ENFILE; |
228 | goto out_unlock; | 228 | goto out_unlock; |
229 | } | 229 | } |
@@ -237,7 +237,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
237 | /* Ensure that this volume does not exist */ | 237 | /* Ensure that this volume does not exist */ |
238 | err = -EEXIST; | 238 | err = -EEXIST; |
239 | if (ubi->volumes[vol_id]) { | 239 | if (ubi->volumes[vol_id]) { |
240 | dbg_err("volume %d already exists", vol_id); | 240 | ubi_err("volume %d already exists", vol_id); |
241 | goto out_unlock; | 241 | goto out_unlock; |
242 | } | 242 | } |
243 | 243 | ||
@@ -246,7 +246,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
246 | if (ubi->volumes[i] && | 246 | if (ubi->volumes[i] && |
247 | ubi->volumes[i]->name_len == req->name_len && | 247 | ubi->volumes[i]->name_len == req->name_len && |
248 | !strcmp(ubi->volumes[i]->name, req->name)) { | 248 | !strcmp(ubi->volumes[i]->name, req->name)) { |
249 | dbg_err("volume \"%s\" exists (ID %d)", req->name, i); | 249 | ubi_err("volume \"%s\" exists (ID %d)", req->name, i); |
250 | goto out_unlock; | 250 | goto out_unlock; |
251 | } | 251 | } |
252 | 252 | ||
@@ -257,9 +257,9 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
257 | 257 | ||
258 | /* Reserve physical eraseblocks */ | 258 | /* Reserve physical eraseblocks */ |
259 | if (vol->reserved_pebs > ubi->avail_pebs) { | 259 | if (vol->reserved_pebs > ubi->avail_pebs) { |
260 | dbg_err("not enough PEBs, only %d available", ubi->avail_pebs); | 260 | ubi_err("not enough PEBs, only %d available", ubi->avail_pebs); |
261 | if (ubi->corr_peb_count) | 261 | if (ubi->corr_peb_count) |
262 | dbg_err("%d PEBs are corrupted and not used", | 262 | ubi_err("%d PEBs are corrupted and not used", |
263 | ubi->corr_peb_count); | 263 | ubi->corr_peb_count); |
264 | err = -ENOSPC; | 264 | err = -ENOSPC; |
265 | goto out_unlock; | 265 | goto out_unlock; |
@@ -495,7 +495,7 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) | |||
495 | 495 | ||
496 | if (vol->vol_type == UBI_STATIC_VOLUME && | 496 | if (vol->vol_type == UBI_STATIC_VOLUME && |
497 | reserved_pebs < vol->used_ebs) { | 497 | reserved_pebs < vol->used_ebs) { |
498 | dbg_err("too small size %d, %d LEBs contain data", | 498 | ubi_err("too small size %d, %d LEBs contain data", |
499 | reserved_pebs, vol->used_ebs); | 499 | reserved_pebs, vol->used_ebs); |
500 | return -EINVAL; | 500 | return -EINVAL; |
501 | } | 501 | } |
@@ -524,10 +524,10 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) | |||
524 | if (pebs > 0) { | 524 | if (pebs > 0) { |
525 | spin_lock(&ubi->volumes_lock); | 525 | spin_lock(&ubi->volumes_lock); |
526 | if (pebs > ubi->avail_pebs) { | 526 | if (pebs > ubi->avail_pebs) { |
527 | dbg_err("not enough PEBs: requested %d, available %d", | 527 | ubi_err("not enough PEBs: requested %d, available %d", |
528 | pebs, ubi->avail_pebs); | 528 | pebs, ubi->avail_pebs); |
529 | if (ubi->corr_peb_count) | 529 | if (ubi->corr_peb_count) |
530 | dbg_err("%d PEBs are corrupted and not used", | 530 | ubi_err("%d PEBs are corrupted and not used", |
531 | ubi->corr_peb_count); | 531 | ubi->corr_peb_count); |
532 | spin_unlock(&ubi->volumes_lock); | 532 | spin_unlock(&ubi->volumes_lock); |
533 | err = -ENOSPC; | 533 | err = -ENOSPC; |
@@ -762,7 +762,7 @@ static int self_check_volume(struct ubi_device *ubi, int vol_id) | |||
762 | } | 762 | } |
763 | 763 | ||
764 | if (vol->upd_marker && vol->corrupted) { | 764 | if (vol->upd_marker && vol->corrupted) { |
765 | dbg_err("update marker and corrupted simultaneously"); | 765 | ubi_err("update marker and corrupted simultaneously"); |
766 | goto fail; | 766 | goto fail; |
767 | } | 767 | } |
768 | 768 | ||