diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-02-13 06:17:38 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-02-20 05:52:58 -0500 |
commit | 9d6c7cbe3073668cc5381978bb800f5e901c178e (patch) | |
tree | 8b7f79060a48ba6bd9e2d349c24672019854926c /drivers/edac | |
parent | ec5a0b38247a228f69d1d12c8ca0d6fe54b42827 (diff) |
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>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i5100_edac.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c index 36a38ee94fa8..6247d186177e 100644 --- a/drivers/edac/i5100_edac.c +++ b/drivers/edac/i5100_edac.c | |||
@@ -869,16 +869,13 @@ static void i5100_init_csrows(struct mem_ctl_info *mci) | |||
869 | chan, rank, 0); | 869 | chan, rank, 0); |
870 | 870 | ||
871 | dimm->nr_pages = npages; | 871 | dimm->nr_pages = npages; |
872 | if (npages) { | 872 | dimm->grain = 32; |
873 | dimm->grain = 32; | 873 | dimm->dtype = (priv->mtr[chan][rank].width == 4) ? |
874 | dimm->dtype = (priv->mtr[chan][rank].width == 4) ? | 874 | DEV_X4 : DEV_X8; |
875 | DEV_X4 : DEV_X8; | 875 | dimm->mtype = MEM_RDDR2; |
876 | dimm->mtype = MEM_RDDR2; | 876 | dimm->edac_mode = EDAC_SECDED; |
877 | dimm->edac_mode = EDAC_SECDED; | 877 | snprintf(dimm->label, sizeof(dimm->label), "DIMM%u", |
878 | snprintf(dimm->label, sizeof(dimm->label), | 878 | i5100_rank_to_slot(mci, chan, rank)); |
879 | "DIMM%u", | ||
880 | i5100_rank_to_slot(mci, chan, rank)); | ||
881 | } | ||
882 | 879 | ||
883 | edac_dbg(2, "dimm channel %d, rank %d, size %ld\n", | 880 | edac_dbg(2, "dimm channel %d, rank %d, size %ld\n", |
884 | chan, rank, (long)PAGES_TO_MiB(npages)); | 881 | chan, rank, (long)PAGES_TO_MiB(npages)); |