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/lpt.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/lpt.c')
-rw-r--r-- | fs/ubifs/lpt.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 5d1d97d00966..2054e8171fd4 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c | |||
@@ -2094,8 +2094,8 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
2094 | int i; | 2094 | int i; |
2095 | 2095 | ||
2096 | if (pnode->num != col) { | 2096 | if (pnode->num != col) { |
2097 | dbg_err("pnode num %d expected %d parent num %d iip %d", | 2097 | ubifs_err("pnode num %d expected %d parent num %d iip %d", |
2098 | pnode->num, col, pnode->parent->num, pnode->iip); | 2098 | pnode->num, col, pnode->parent->num, pnode->iip); |
2099 | return -EINVAL; | 2099 | return -EINVAL; |
2100 | } | 2100 | } |
2101 | for (i = 0; i < UBIFS_LPT_FANOUT; i++) { | 2101 | for (i = 0; i < UBIFS_LPT_FANOUT; i++) { |
@@ -2109,14 +2109,14 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
2109 | if (lnum >= c->leb_cnt) | 2109 | if (lnum >= c->leb_cnt) |
2110 | continue; | 2110 | continue; |
2111 | if (lprops->lnum != lnum) { | 2111 | if (lprops->lnum != lnum) { |
2112 | dbg_err("bad LEB number %d expected %d", | 2112 | ubifs_err("bad LEB number %d expected %d", |
2113 | lprops->lnum, lnum); | 2113 | lprops->lnum, lnum); |
2114 | return -EINVAL; | 2114 | return -EINVAL; |
2115 | } | 2115 | } |
2116 | if (lprops->flags & LPROPS_TAKEN) { | 2116 | if (lprops->flags & LPROPS_TAKEN) { |
2117 | if (cat != LPROPS_UNCAT) { | 2117 | if (cat != LPROPS_UNCAT) { |
2118 | dbg_err("LEB %d taken but not uncat %d", | 2118 | ubifs_err("LEB %d taken but not uncat %d", |
2119 | lprops->lnum, cat); | 2119 | lprops->lnum, cat); |
2120 | return -EINVAL; | 2120 | return -EINVAL; |
2121 | } | 2121 | } |
2122 | continue; | 2122 | continue; |
@@ -2128,8 +2128,8 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
2128 | case LPROPS_FRDI_IDX: | 2128 | case LPROPS_FRDI_IDX: |
2129 | break; | 2129 | break; |
2130 | default: | 2130 | default: |
2131 | dbg_err("LEB %d index but cat %d", | 2131 | ubifs_err("LEB %d index but cat %d", |
2132 | lprops->lnum, cat); | 2132 | lprops->lnum, cat); |
2133 | return -EINVAL; | 2133 | return -EINVAL; |
2134 | } | 2134 | } |
2135 | } else { | 2135 | } else { |
@@ -2141,8 +2141,8 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
2141 | case LPROPS_FREEABLE: | 2141 | case LPROPS_FREEABLE: |
2142 | break; | 2142 | break; |
2143 | default: | 2143 | default: |
2144 | dbg_err("LEB %d not index but cat %d", | 2144 | ubifs_err("LEB %d not index but cat %d", |
2145 | lprops->lnum, cat); | 2145 | lprops->lnum, cat); |
2146 | return -EINVAL; | 2146 | return -EINVAL; |
2147 | } | 2147 | } |
2148 | } | 2148 | } |
@@ -2182,24 +2182,24 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode, | |||
2182 | break; | 2182 | break; |
2183 | } | 2183 | } |
2184 | if (!found) { | 2184 | if (!found) { |
2185 | dbg_err("LEB %d cat %d not found in cat heap/list", | 2185 | ubifs_err("LEB %d cat %d not found in cat heap/list", |
2186 | lprops->lnum, cat); | 2186 | lprops->lnum, cat); |
2187 | return -EINVAL; | 2187 | return -EINVAL; |
2188 | } | 2188 | } |
2189 | switch (cat) { | 2189 | switch (cat) { |
2190 | case LPROPS_EMPTY: | 2190 | case LPROPS_EMPTY: |
2191 | if (lprops->free != c->leb_size) { | 2191 | if (lprops->free != c->leb_size) { |
2192 | dbg_err("LEB %d cat %d free %d dirty %d", | 2192 | ubifs_err("LEB %d cat %d free %d dirty %d", |
2193 | lprops->lnum, cat, lprops->free, | 2193 | lprops->lnum, cat, lprops->free, |
2194 | lprops->dirty); | 2194 | lprops->dirty); |
2195 | return -EINVAL; | 2195 | return -EINVAL; |
2196 | } | 2196 | } |
2197 | case LPROPS_FREEABLE: | 2197 | case LPROPS_FREEABLE: |
2198 | case LPROPS_FRDI_IDX: | 2198 | case LPROPS_FRDI_IDX: |
2199 | if (lprops->free + lprops->dirty != c->leb_size) { | 2199 | if (lprops->free + lprops->dirty != c->leb_size) { |
2200 | dbg_err("LEB %d cat %d free %d dirty %d", | 2200 | ubifs_err("LEB %d cat %d free %d dirty %d", |
2201 | lprops->lnum, cat, lprops->free, | 2201 | lprops->lnum, cat, lprops->free, |
2202 | lprops->dirty); | 2202 | lprops->dirty); |
2203 | return -EINVAL; | 2203 | return -EINVAL; |
2204 | } | 2204 | } |
2205 | } | 2205 | } |
@@ -2233,9 +2233,10 @@ int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode, | |||
2233 | /* cnode is a nnode */ | 2233 | /* cnode is a nnode */ |
2234 | num = calc_nnode_num(row, col); | 2234 | num = calc_nnode_num(row, col); |
2235 | if (cnode->num != num) { | 2235 | if (cnode->num != num) { |
2236 | dbg_err("nnode num %d expected %d " | 2236 | ubifs_err("nnode num %d expected %d " |
2237 | "parent num %d iip %d", cnode->num, num, | 2237 | "parent num %d iip %d", |
2238 | (nnode ? nnode->num : 0), cnode->iip); | 2238 | cnode->num, num, |
2239 | (nnode ? nnode->num : 0), cnode->iip); | ||
2239 | return -EINVAL; | 2240 | return -EINVAL; |
2240 | } | 2241 | } |
2241 | nn = (struct ubifs_nnode *)cnode; | 2242 | nn = (struct ubifs_nnode *)cnode; |