All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] EDAC: remove an unneeded condition in i5100_init_csrows()
@ 2014-02-13 11:17 Dan Carpenter
  2014-02-20 10:56 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-02-13 11:17 UTC (permalink / raw)
  To: kernel-janitors

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>

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)
 			       chan, rank, 0);
 
 		dimm->nr_pages = npages;
-		if (npages) {
-			dimm->grain = 32;
-			dimm->dtype = (priv->mtr[chan][rank].width = 4) ?
-					DEV_X4 : DEV_X8;
-			dimm->mtype = MEM_RDDR2;
-			dimm->edac_mode = EDAC_SECDED;
-			snprintf(dimm->label, sizeof(dimm->label),
-				"DIMM%u",
-				i5100_rank_to_slot(mci, chan, rank));
-		}
+		dimm->grain = 32;
+		dimm->dtype = (priv->mtr[chan][rank].width = 4) ?
+				DEV_X4 : DEV_X8;
+		dimm->mtype = MEM_RDDR2;
+		dimm->edac_mode = EDAC_SECDED;
+		snprintf(dimm->label, sizeof(dimm->label), "DIMM%u",
+			 i5100_rank_to_slot(mci, chan, rank));
 
 		edac_dbg(2, "dimm channel %d, rank %d, size %ld\n",
 			 chan, rank, (long)PAGES_TO_MiB(npages));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] EDAC: remove an unneeded condition in i5100_init_csrows()
  2014-02-13 11:17 [patch] EDAC: remove an unneeded condition in i5100_init_csrows() Dan Carpenter
@ 2014-02-20 10:56 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2014-02-20 10:56 UTC (permalink / raw)
  To: kernel-janitors

On Thu, Feb 13, 2014 at 02:17:38PM +0300, Dan Carpenter wrote:
> 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>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-20 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 11:17 [patch] EDAC: remove an unneeded condition in i5100_init_csrows() Dan Carpenter
2014-02-20 10:56 ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.