diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2022-03-23 09:58:40 +0100 | 
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2022-03-23 09:58:40 +0100 | 
| commit | b690490d6d466972ade172ee2e7f6ffa49e7e910 (patch) | |
| tree | 50a93da28c9128e19eb7a3038aecf75dab6b36e1 /fs/btrfs/tests/extent-buffer-tests.c | |
| parent | f97ec5d75e9261a5da78dc28a8955b7cc0c4468b (diff) | |
| parent | 0f203948230720e849ad50d158adac1cd32c282f (diff) | |
Merge branch 'for-5.18/amd-sfh' into for-linus
- dead code elimination (Christophe JAILLET)
Diffstat (limited to 'fs/btrfs/tests/extent-buffer-tests.c')
| -rw-r--r-- | fs/btrfs/tests/extent-buffer-tests.c | 17 | 
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/btrfs/tests/extent-buffer-tests.c b/fs/btrfs/tests/extent-buffer-tests.c index 2a95f7224e18..51a8b075c259 100644 --- a/fs/btrfs/tests/extent-buffer-tests.c +++ b/fs/btrfs/tests/extent-buffer-tests.c @@ -15,7 +15,6 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  	struct btrfs_path *path = NULL;  	struct btrfs_root *root = NULL;  	struct extent_buffer *eb; -	struct btrfs_item *item;  	char *value = "mary had a little lamb";  	char *split1 = "mary had a little";  	char *split2 = " lamb"; @@ -61,7 +60,6 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  	key.offset = 0;  	btrfs_setup_item_for_insert(root, path, &key, value_len); -	item = btrfs_item_nr(0);  	write_extent_buffer(eb, value, btrfs_item_ptr_offset(eb, 0),  			    value_len); @@ -90,8 +88,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  		goto out;  	} -	item = btrfs_item_nr(0); -	if (btrfs_item_size(eb, item) != strlen(split1)) { +	if (btrfs_item_size(eb, 0) != strlen(split1)) {  		test_err("invalid len in the first split");  		ret = -EINVAL;  		goto out; @@ -115,8 +112,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  		goto out;  	} -	item = btrfs_item_nr(1); -	if (btrfs_item_size(eb, item) != strlen(split2)) { +	if (btrfs_item_size(eb, 1) != strlen(split2)) {  		test_err("invalid len in the second split");  		ret = -EINVAL;  		goto out; @@ -147,8 +143,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  		goto out;  	} -	item = btrfs_item_nr(0); -	if (btrfs_item_size(eb, item) != strlen(split3)) { +	if (btrfs_item_size(eb, 0) != strlen(split3)) {  		test_err("invalid len in the first split");  		ret = -EINVAL;  		goto out; @@ -171,8 +166,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  		goto out;  	} -	item = btrfs_item_nr(1); -	if (btrfs_item_size(eb, item) != strlen(split4)) { +	if (btrfs_item_size(eb, 1) != strlen(split4)) {  		test_err("invalid len in the second split");  		ret = -EINVAL;  		goto out; @@ -195,8 +189,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)  		goto out;  	} -	item = btrfs_item_nr(2); -	if (btrfs_item_size(eb, item) != strlen(split2)) { +	if (btrfs_item_size(eb, 2) != strlen(split2)) {  		test_err("invalid len in the second split");  		ret = -EINVAL;  		goto out;  | 
