diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 13:11:23 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 13:11:23 -0400 |
commit | a6aae4dd0ffad299a33d122f8a339b399bee5381 (patch) | |
tree | 958b015be27d97d079a3c14694576571ca916600 /fs/ubifs/tnc_misc.c | |
parent | f70b7e52aa23c9aea5346b9730b402fb55f9079b (diff) |
UBIFS: get rid of dbg_err
This patch removes the 'dbg_err()' macro and we now use 'ubifs_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 'fs/ubifs/tnc_misc.c')
-rw-r--r-- | fs/ubifs/tnc_misc.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c index 15212d666b15..d38ac7f9654b 100644 --- a/fs/ubifs/tnc_misc.c +++ b/fs/ubifs/tnc_misc.c | |||
@@ -293,10 +293,10 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len, | |||
293 | lnum, offs, znode->level, znode->child_cnt); | 293 | lnum, offs, znode->level, znode->child_cnt); |
294 | 294 | ||
295 | if (znode->child_cnt > c->fanout || znode->level > UBIFS_MAX_LEVELS) { | 295 | if (znode->child_cnt > c->fanout || znode->level > UBIFS_MAX_LEVELS) { |
296 | dbg_err("current fanout %d, branch count %d", | 296 | ubifs_err("current fanout %d, branch count %d", |
297 | c->fanout, znode->child_cnt); | 297 | c->fanout, znode->child_cnt); |
298 | dbg_err("max levels %d, znode level %d", | 298 | ubifs_err("max levels %d, znode level %d", |
299 | UBIFS_MAX_LEVELS, znode->level); | 299 | UBIFS_MAX_LEVELS, znode->level); |
300 | err = 1; | 300 | err = 1; |
301 | goto out_dump; | 301 | goto out_dump; |
302 | } | 302 | } |
@@ -316,7 +316,7 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len, | |||
316 | if (zbr->lnum < c->main_first || | 316 | if (zbr->lnum < c->main_first || |
317 | zbr->lnum >= c->leb_cnt || zbr->offs < 0 || | 317 | zbr->lnum >= c->leb_cnt || zbr->offs < 0 || |
318 | zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { | 318 | zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { |
319 | dbg_err("bad branch %d", i); | 319 | ubifs_err("bad branch %d", i); |
320 | err = 2; | 320 | err = 2; |
321 | goto out_dump; | 321 | goto out_dump; |
322 | } | 322 | } |
@@ -340,19 +340,19 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len, | |||
340 | type = key_type(c, &zbr->key); | 340 | type = key_type(c, &zbr->key); |
341 | if (c->ranges[type].max_len == 0) { | 341 | if (c->ranges[type].max_len == 0) { |
342 | if (zbr->len != c->ranges[type].len) { | 342 | if (zbr->len != c->ranges[type].len) { |
343 | dbg_err("bad target node (type %d) length (%d)", | 343 | ubifs_err("bad target node (type %d) length (%d)", |
344 | type, zbr->len); | 344 | type, zbr->len); |
345 | dbg_err("have to be %d", c->ranges[type].len); | 345 | ubifs_err("have to be %d", c->ranges[type].len); |
346 | err = 4; | 346 | err = 4; |
347 | goto out_dump; | 347 | goto out_dump; |
348 | } | 348 | } |
349 | } else if (zbr->len < c->ranges[type].min_len || | 349 | } else if (zbr->len < c->ranges[type].min_len || |
350 | zbr->len > c->ranges[type].max_len) { | 350 | zbr->len > c->ranges[type].max_len) { |
351 | dbg_err("bad target node (type %d) length (%d)", | 351 | ubifs_err("bad target node (type %d) length (%d)", |
352 | type, zbr->len); | 352 | type, zbr->len); |
353 | dbg_err("have to be in range of %d-%d", | 353 | ubifs_err("have to be in range of %d-%d", |
354 | c->ranges[type].min_len, | 354 | c->ranges[type].min_len, |
355 | c->ranges[type].max_len); | 355 | c->ranges[type].max_len); |
356 | err = 5; | 356 | err = 5; |
357 | goto out_dump; | 357 | goto out_dump; |
358 | } | 358 | } |
@@ -370,13 +370,13 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len, | |||
370 | 370 | ||
371 | cmp = keys_cmp(c, key1, key2); | 371 | cmp = keys_cmp(c, key1, key2); |
372 | if (cmp > 0) { | 372 | if (cmp > 0) { |
373 | dbg_err("bad key order (keys %d and %d)", i, i + 1); | 373 | ubifs_err("bad key order (keys %d and %d)", i, i + 1); |
374 | err = 6; | 374 | err = 6; |
375 | goto out_dump; | 375 | goto out_dump; |
376 | } else if (cmp == 0 && !is_hash_key(c, key1)) { | 376 | } else if (cmp == 0 && !is_hash_key(c, key1)) { |
377 | /* These can only be keys with colliding hash */ | 377 | /* These can only be keys with colliding hash */ |
378 | dbg_err("keys %d and %d are not hashed but equivalent", | 378 | ubifs_err("keys %d and %d are not hashed but equivalent", |
379 | i, i + 1); | 379 | i, i + 1); |
380 | err = 7; | 380 | err = 7; |
381 | goto out_dump; | 381 | goto out_dump; |
382 | } | 382 | } |