Commit 770aa73d authored by YueHaibing's avatar YueHaibing Committed by Richard Weinberger

ubi: wl: Remove set but not used variable 'prev_e'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/mtd/ubi/wl.c: In function 'find_wl_entry':
drivers/mtd/ubi/wl.c:322:27: warning:
 variable 'prev_e' set but not used [-Wunused-but-set-variable]

It's not used any more now, so remove it.

Fixes: f9c34bb5 ("ubi: Fix producing anchor PEBs")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent ef5aafb6
...@@ -319,7 +319,7 @@ static struct ubi_wl_entry *find_wl_entry(struct ubi_device *ubi, ...@@ -319,7 +319,7 @@ static struct ubi_wl_entry *find_wl_entry(struct ubi_device *ubi,
struct rb_root *root, int diff) struct rb_root *root, int diff)
{ {
struct rb_node *p; struct rb_node *p;
struct ubi_wl_entry *e, *prev_e = NULL; struct ubi_wl_entry *e;
int max; int max;
e = rb_entry(rb_first(root), struct ubi_wl_entry, u.rb); e = rb_entry(rb_first(root), struct ubi_wl_entry, u.rb);
...@@ -334,7 +334,6 @@ static struct ubi_wl_entry *find_wl_entry(struct ubi_device *ubi, ...@@ -334,7 +334,6 @@ static struct ubi_wl_entry *find_wl_entry(struct ubi_device *ubi,
p = p->rb_left; p = p->rb_left;
else { else {
p = p->rb_right; p = p->rb_right;
prev_e = e;
e = e1; e = e1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment