Message ID | 20220922115800.1372740-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | EDAC, pnd2: remove redundant initialization to variable mot_intlv_bit | expand |
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c index a20b299f1202..eba2e6d9bd8f 100644 --- a/drivers/edac/pnd2_edac.c +++ b/drivers/edac/pnd2_edac.c @@ -624,8 +624,7 @@ static int hash_by_mask(u64 addr, u64 mask) static int sys2pmi(const u64 addr, u32 *pmiidx, u64 *pmiaddr, char *msg) { u64 contig_addr, contig_base, contig_offset, contig_base_adj; - int mot_intlv_bit = two_slices ? MOT_CHAN_INTLV_BIT_2SLC_2CH : - MOT_CHAN_INTLV_BIT_1SLC_2CH; + int mot_intlv_bit; int slice_intlv_bit_rm = SELECTOR_DISABLED; int chan_intlv_bit_rm = SELECTOR_DISABLED; /* Determine if address is in the MOT region. */
Variable mot_intlv_bit is being initialized with a value that is never read, it is being reassigned later on with a different value. The initialization is redundant and can be removed. Cleans up clang scan-build warning: drivers/edac/pnd2_edac.c:627:6: warning: Value stored to 'mot_intlv_bit' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> --- drivers/edac/pnd2_edac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)