Skip to content

Commit dd0c642

Browse files
ColinIanKingstellarhopper
authored andcommitted
fsdax: remove redundant variable 'error'
The variable 'error' is being assigned a value that is never read, the assignment and the variable and redundant and can be removed. Cleans up clang scan build warning: fs/dax.c:1880:10: warning: Although the value stored to 'error' is used in the enclosing expression, the value is never actually read from 'error' [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20230621130256.2676126-1-colin.i.king@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
1 parent 2532f41 commit dd0c642

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/dax.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,6 @@ static vm_fault_t dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
18301830
vm_fault_t ret = VM_FAULT_FALLBACK;
18311831
pgoff_t max_pgoff;
18321832
void *entry;
1833-
int error;
18341833

18351834
if (vmf->flags & FAULT_FLAG_WRITE)
18361835
iter.flags |= IOMAP_WRITE;
@@ -1877,7 +1876,7 @@ static vm_fault_t dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
18771876
}
18781877

18791878
iter.pos = (loff_t)xas.xa_index << PAGE_SHIFT;
1880-
while ((error = iomap_iter(&iter, ops)) > 0) {
1879+
while (iomap_iter(&iter, ops) > 0) {
18811880
if (iomap_length(&iter) < PMD_SIZE)
18821881
continue; /* actually breaks out of the loop */
18831882

0 commit comments

Comments
 (0)