Skip to content

Commit 9d6c7cb

Browse files
Dan Carpentersuryasaimadhu
authored andcommitted
i5100_edac: Remove an unneeded condition in i5100_init_csrows()
We checked that "npages" was not zero a couple lines earlier so we can remove this and pull the code in one indent level. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: http://lkml.kernel.org/r/20140213111738.GB15549@elgon.mountain Signed-off-by: Borislav Petkov <bp@suse.de>
1 parent ec5a0b3 commit 9d6c7cb

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

‎drivers/edac/i5100_edac.c‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -869,16 +869,13 @@ static void i5100_init_csrows(struct mem_ctl_info *mci)
869869
chan, rank, 0);
870870

871871
dimm->nr_pages = npages;
872-
if (npages) {
873-
dimm->grain = 32;
874-
dimm->dtype = (priv->mtr[chan][rank].width == 4) ?
875-
DEV_X4 : DEV_X8;
876-
dimm->mtype = MEM_RDDR2;
877-
dimm->edac_mode = EDAC_SECDED;
878-
snprintf(dimm->label, sizeof(dimm->label),
879-
"DIMM%u",
880-
i5100_rank_to_slot(mci, chan, rank));
881-
}
872+
dimm->grain = 32;
873+
dimm->dtype = (priv->mtr[chan][rank].width == 4) ?
874+
DEV_X4 : DEV_X8;
875+
dimm->mtype = MEM_RDDR2;
876+
dimm->edac_mode = EDAC_SECDED;
877+
snprintf(dimm->label, sizeof(dimm->label), "DIMM%u",
878+
i5100_rank_to_slot(mci, chan, rank));
882879

883880
edac_dbg(2, "dimm channel %d, rank %d, size %ld\n",
884881
chan, rank, (long)PAGES_TO_MiB(npages));

0 commit comments

Comments
 (0)