diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-03-09 03:31:18 -0500 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-03-09 03:31:18 -0500 |
commit | cc831464f839dc2559f896b96d13eaa0366282b0 (patch) | |
tree | 0516c4c59ef70f2218024e84b1d9a9b59bb28a9c | |
parent | 0ca39d74de8b269fb61eac11b75bd6c3fc887c28 (diff) |
UBI: rename MOVE_CANCEL_BITFLIPS to MOVE_TARGET_BITFLIPS
While looking at a problem reported by UBI around the PEB moving area I
noticed that the 'MOVE_CANCEL_BITFLIPS' is a bit inconsistent name and
'MOVE_TARGET_BITFLIPS' better - let's rename it.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | drivers/mtd/ubi/eba.c | 6 | ||||
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 63edee02b57b..2455d620d96b 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c | |||
@@ -979,7 +979,7 @@ static int is_error_sane(int err) | |||
979 | * physical eraseblock @to. The @vid_hdr buffer may be changed by this | 979 | * physical eraseblock @to. The @vid_hdr buffer may be changed by this |
980 | * function. Returns: | 980 | * function. Returns: |
981 | * o %0 in case of success; | 981 | * o %0 in case of success; |
982 | * o %MOVE_CANCEL_RACE, %MOVE_TARGET_WR_ERR, %MOVE_CANCEL_BITFLIPS, etc; | 982 | * o %MOVE_CANCEL_RACE, %MOVE_TARGET_WR_ERR, %MOVE_TARGET_BITFLIPS, etc; |
983 | * o a negative error code in case of failure. | 983 | * o a negative error code in case of failure. |
984 | */ | 984 | */ |
985 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | 985 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, |
@@ -1116,7 +1116,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | |||
1116 | if (is_error_sane(err)) | 1116 | if (is_error_sane(err)) |
1117 | err = MOVE_TARGET_RD_ERR; | 1117 | err = MOVE_TARGET_RD_ERR; |
1118 | } else | 1118 | } else |
1119 | err = MOVE_CANCEL_BITFLIPS; | 1119 | err = MOVE_TARGET_BITFLIPS; |
1120 | goto out_unlock_buf; | 1120 | goto out_unlock_buf; |
1121 | } | 1121 | } |
1122 | 1122 | ||
@@ -1143,7 +1143,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | |||
1143 | if (is_error_sane(err)) | 1143 | if (is_error_sane(err)) |
1144 | err = MOVE_TARGET_RD_ERR; | 1144 | err = MOVE_TARGET_RD_ERR; |
1145 | } else | 1145 | } else |
1146 | err = MOVE_CANCEL_BITFLIPS; | 1146 | err = MOVE_TARGET_BITFLIPS; |
1147 | goto out_unlock_buf; | 1147 | goto out_unlock_buf; |
1148 | } | 1148 | } |
1149 | 1149 | ||
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index bd6120c62c55..b162790790a9 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -118,7 +118,7 @@ enum { | |||
118 | * PEB | 118 | * PEB |
119 | * MOVE_TARGET_WR_ERR: canceled because there was a write error to the target | 119 | * MOVE_TARGET_WR_ERR: canceled because there was a write error to the target |
120 | * PEB | 120 | * PEB |
121 | * MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the | 121 | * MOVE_TARGET_BITFLIPS: canceled because a bit-flip was detected in the |
122 | * target PEB | 122 | * target PEB |
123 | * MOVE_RETRY: retry scrubbing the PEB | 123 | * MOVE_RETRY: retry scrubbing the PEB |
124 | */ | 124 | */ |
@@ -127,7 +127,7 @@ enum { | |||
127 | MOVE_SOURCE_RD_ERR, | 127 | MOVE_SOURCE_RD_ERR, |
128 | MOVE_TARGET_RD_ERR, | 128 | MOVE_TARGET_RD_ERR, |
129 | MOVE_TARGET_WR_ERR, | 129 | MOVE_TARGET_WR_ERR, |
130 | MOVE_CANCEL_BITFLIPS, | 130 | MOVE_TARGET_BITFLIPS, |
131 | MOVE_RETRY, | 131 | MOVE_RETRY, |
132 | }; | 132 | }; |
133 | 133 | ||
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 512eab07c606..7c1a9bf8ac86 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -798,7 +798,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, | |||
798 | scrubbing = 1; | 798 | scrubbing = 1; |
799 | goto out_not_moved; | 799 | goto out_not_moved; |
800 | } | 800 | } |
801 | if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR || | 801 | if (err == MOVE_TARGET_BITFLIPS || err == MOVE_TARGET_WR_ERR || |
802 | err == MOVE_TARGET_RD_ERR) { | 802 | err == MOVE_TARGET_RD_ERR) { |
803 | /* | 803 | /* |
804 | * Target PEB had bit-flips or write error - torture it. | 804 | * Target PEB had bit-flips or write error - torture it. |