]> git.baikalelectronics.ru Git - kernel.git/commitdiff
block/partitions/acorn: Remove redundant assignments
authorMichal Orzel <michalorzel.eng@gmail.com>
Sat, 23 Apr 2022 11:38:09 +0000 (13:38 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 23 Apr 2022 13:15:26 +0000 (07:15 -0600)
Get rid of redundant assignments to a variable slot from function
adfspart_check_ADFS. It is being assigned a value that is never read
as we are breaking out from the switch case and the function ends.

Reported by clang-tidy [deadcode.DeadStores]

Signed-off-by: Michal Orzel <michalorzel.eng@gmail.com>
Link: https://lore.kernel.org/r/20220423113811.13335-3-michalorzel.eng@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/acorn.c

index 2c381c694c574c0b6875f52ee40eef6ab782e389..d2fc122d74262de1e9bd29cbe6d96e57c239fbec 100644 (file)
@@ -282,13 +282,13 @@ int adfspart_check_ADFS(struct parsed_partitions *state)
 #ifdef CONFIG_ACORN_PARTITION_RISCIX
                case PARTITION_RISCIX_SCSI:
                case PARTITION_RISCIX_MFM:
-                       slot = riscix_partition(state, start_sect, slot,
+                       riscix_partition(state, start_sect, slot,
                                                nr_sects);
                        break;
 #endif
 
                case PARTITION_LINUX:
-                       slot = linux_partition(state, start_sect, slot,
+                       linux_partition(state, start_sect, slot,
                                               nr_sects);
                        break;
                }