mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
fs/reiserfs/do_balan.c: remove set but not used variables
fs/reiserfs/do_balan.c: In function balance_leaf_when_delete: fs/reiserfs/do_balan.c:245:20: warning: variable ih set but not used [-Wunused-but-set-variable] fs/reiserfs/do_balan.c: In function balance_leaf_insert_left: fs/reiserfs/do_balan.c:301:7: warning: variable version set but not used [-Wunused-but-set-variable] fs/reiserfs/do_balan.c: In function balance_leaf_insert_right: fs/reiserfs/do_balan.c:649:7: warning: variable version set but not used [-Wunused-but-set-variable] fs/reiserfs/do_balan.c: In function balance_leaf_new_nodes_insert: fs/reiserfs/do_balan.c:953:7: warning: variable version set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/1566379929-118398-8-git-send-email-zhengbin13@huawei.com Signed-off-by: zhengbin <zhengbin13@huawei.com> Reported-by: Hulk Robot <hulkci@huawei.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4fadcd1c14
commit
da5184c2ab
@ -239,10 +239,8 @@ static int balance_leaf_when_delete_left(struct tree_balance *tb)
|
|||||||
static int balance_leaf_when_delete(struct tree_balance *tb, int flag)
|
static int balance_leaf_when_delete(struct tree_balance *tb, int flag)
|
||||||
{
|
{
|
||||||
struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
|
struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
|
||||||
int item_pos = PATH_LAST_POSITION(tb->tb_path);
|
|
||||||
struct buffer_info bi;
|
struct buffer_info bi;
|
||||||
int n;
|
int n;
|
||||||
struct item_head *ih;
|
|
||||||
|
|
||||||
RFALSE(tb->FR[0] && B_LEVEL(tb->FR[0]) != DISK_LEAF_NODE_LEVEL + 1,
|
RFALSE(tb->FR[0] && B_LEVEL(tb->FR[0]) != DISK_LEAF_NODE_LEVEL + 1,
|
||||||
"vs- 12000: level: wrong FR %z", tb->FR[0]);
|
"vs- 12000: level: wrong FR %z", tb->FR[0]);
|
||||||
@ -251,7 +249,6 @@ static int balance_leaf_when_delete(struct tree_balance *tb, int flag)
|
|||||||
RFALSE(!tb->blknum[0] && !PATH_H_PPARENT(tb->tb_path, 0),
|
RFALSE(!tb->blknum[0] && !PATH_H_PPARENT(tb->tb_path, 0),
|
||||||
"PAP-12010: tree can not be empty");
|
"PAP-12010: tree can not be empty");
|
||||||
|
|
||||||
ih = item_head(tbS0, item_pos);
|
|
||||||
buffer_info_init_tbS0(tb, &bi);
|
buffer_info_init_tbS0(tb, &bi);
|
||||||
|
|
||||||
/* Delete or truncate the item */
|
/* Delete or truncate the item */
|
||||||
@ -298,7 +295,6 @@ static unsigned int balance_leaf_insert_left(struct tree_balance *tb,
|
|||||||
if (tb->item_pos == tb->lnum[0] - 1 && tb->lbytes != -1) {
|
if (tb->item_pos == tb->lnum[0] - 1 && tb->lbytes != -1) {
|
||||||
/* part of new item falls into L[0] */
|
/* part of new item falls into L[0] */
|
||||||
int new_item_len, shift;
|
int new_item_len, shift;
|
||||||
int version;
|
|
||||||
|
|
||||||
ret = leaf_shift_left(tb, tb->lnum[0] - 1, -1);
|
ret = leaf_shift_left(tb, tb->lnum[0] - 1, -1);
|
||||||
|
|
||||||
@ -317,8 +313,6 @@ static unsigned int balance_leaf_insert_left(struct tree_balance *tb,
|
|||||||
leaf_insert_into_buf(&bi, n + tb->item_pos - ret, ih, body,
|
leaf_insert_into_buf(&bi, n + tb->item_pos - ret, ih, body,
|
||||||
min_t(int, tb->zeroes_num, ih_item_len(ih)));
|
min_t(int, tb->zeroes_num, ih_item_len(ih)));
|
||||||
|
|
||||||
version = ih_version(ih);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate key component, item length and body to
|
* Calculate key component, item length and body to
|
||||||
* insert into S[0]
|
* insert into S[0]
|
||||||
@ -646,13 +640,11 @@ static void balance_leaf_insert_right(struct tree_balance *tb,
|
|||||||
if (tb->item_pos == n - tb->rnum[0] + 1 && tb->rbytes != -1) {
|
if (tb->item_pos == n - tb->rnum[0] + 1 && tb->rbytes != -1) {
|
||||||
loff_t old_key_comp, old_len, r_zeroes_number;
|
loff_t old_key_comp, old_len, r_zeroes_number;
|
||||||
const char *r_body;
|
const char *r_body;
|
||||||
int version, shift;
|
int shift;
|
||||||
loff_t offset;
|
loff_t offset;
|
||||||
|
|
||||||
leaf_shift_right(tb, tb->rnum[0] - 1, -1);
|
leaf_shift_right(tb, tb->rnum[0] - 1, -1);
|
||||||
|
|
||||||
version = ih_version(ih);
|
|
||||||
|
|
||||||
/* Remember key component and item length */
|
/* Remember key component and item length */
|
||||||
old_key_comp = le_ih_k_offset(ih);
|
old_key_comp = le_ih_k_offset(ih);
|
||||||
old_len = ih_item_len(ih);
|
old_len = ih_item_len(ih);
|
||||||
@ -950,14 +942,12 @@ static void balance_leaf_new_nodes_insert(struct tree_balance *tb,
|
|||||||
if (tb->item_pos == n - tb->snum[i] + 1 && tb->sbytes[i] != -1) {
|
if (tb->item_pos == n - tb->snum[i] + 1 && tb->sbytes[i] != -1) {
|
||||||
int old_key_comp, old_len, r_zeroes_number;
|
int old_key_comp, old_len, r_zeroes_number;
|
||||||
const char *r_body;
|
const char *r_body;
|
||||||
int version;
|
|
||||||
|
|
||||||
/* Move snum[i]-1 items from S[0] to S_new[i] */
|
/* Move snum[i]-1 items from S[0] to S_new[i] */
|
||||||
leaf_move_items(LEAF_FROM_S_TO_SNEW, tb, tb->snum[i] - 1, -1,
|
leaf_move_items(LEAF_FROM_S_TO_SNEW, tb, tb->snum[i] - 1, -1,
|
||||||
tb->S_new[i]);
|
tb->S_new[i]);
|
||||||
|
|
||||||
/* Remember key component and item length */
|
/* Remember key component and item length */
|
||||||
version = ih_version(ih);
|
|
||||||
old_key_comp = le_ih_k_offset(ih);
|
old_key_comp = le_ih_k_offset(ih);
|
||||||
old_len = ih_item_len(ih);
|
old_len = ih_item_len(ih);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user