All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] edac: Remove fixmes in e7xxx_edac.c
@ 2014-07-22  4:53 Nicholas Krause
  2014-07-22 14:04 ` Bjørn Mork
  0 siblings, 1 reply; 16+ messages in thread
From: Nicholas Krause @ 2014-07-22  4:53 UTC (permalink / raw)
  To: dougthompson; +Cc: bp, m.chehab, linux-edac, linux-kernel

This removes two Page shift fixs me in this file and not checking
if row is -1 in process_ce as it cannot be this value or be must
exit this function by returning.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 drivers/edac/e7xxx_edac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 3cda79b..563983f 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -211,12 +211,13 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
 	edac_dbg(3, "\n");
 	/* read the error address */
 	error_1b = info->dram_celog_add;
-	/* FIXME - should use PAGE_SHIFT */
-	page = error_1b >> 6;	/* convert the address to 4k page */
+	page = error_1b >> PAGE_SHIFT;	/* convert the address to 4k page */
 	/* read the syndrome */
 	syndrome = info->dram_celog_syndrome;
-	/* FIXME - check for -1 */
 	row = edac_mc_find_csrow_by_page(mci, page);
+	if (row == -1)
+		return;
 	/* convert syndrome to channel */
 	channel = e7xxx_find_channel(syndrome);
 	edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, page, 0, syndrome,
@@ -238,8 +239,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
 	edac_dbg(3, "\n");
 	/* read the error address */
 	error_2b = info->dram_uelog_add;
-	/* FIXME - should use PAGE_SHIFT */
-	block_page = error_2b >> 6;	/* convert to 4k address */
+	block_page = error_2b >> PAGE_SHIFT;	/* convert to 4k address */
 	row = edac_mc_find_csrow_by_page(mci, block_page);
 
 	edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, block_page, 0, 0,
-- 
1.9.1


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

end of thread, other threads:[~2014-07-23 16:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22  4:53 [PATCH] edac: Remove fixmes in e7xxx_edac.c Nicholas Krause
2014-07-22 14:04 ` Bjørn Mork
2014-07-22 17:25   ` Tony Luck
2014-07-22 17:40     ` Nick Krause
2014-07-22 17:46       ` Borislav Petkov
2014-07-22 18:03         ` Nick Krause
2014-07-22 18:08           ` Borislav Petkov
2014-07-22 18:14       ` Levente Kurusa
2014-07-22 18:25         ` Nick Krause
2014-07-22 19:17           ` Randy Dunlap
2014-07-22 19:33           ` Steven Rostedt
2014-07-22 20:56             ` Nick Krause
2014-07-23 14:37               ` Steven Rostedt
2014-07-23 15:35                 ` Nick Krause
2014-07-23 16:07                   ` Steven Rostedt
2014-07-23 16:19                     ` Nick Krause

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.