amd64_edac: add f10-and-later methods-p2
Quoted 31 lines · Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH 12/21]amd64_edac: add f10-and-later methods-p2
To: "Borislav Petkov" <[email protected]>
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Date: Monday, May 4, 2009, 5:25 PM
Borislav Petkov escreveu:Quoted 4 lines
+/*
+ *f10_lookup_addr_in_dct
+ *
+ * Iterate over the DRAM DCT "base"and "mask" register looking for
Quoted 1 line
+ * a SystemAddr match on the
specified 'ChannelSelect' and 'NodeID'
Quoted 6 lines
+ *
+ * Return:
+ * -1 NOT FOUND
+ * 0..csrow = Chip-Select Row
+ */
+static int f10_lookup_addr_in_dct(u32 InputAddr, u32NodeID, u32 ChannelSelect)
Review
Quoted 10 lines
(quoted diff) +10
-0+{ + struct mem_ctl_info *mci; + struct amd64_pvt *pvt; + u32 CSBase, CSMask; + int CSFound = -1; + int csrow; + + mci = mci_lookup[NodeID]; + if (!mci) + returnCSFound;
Quoted 9 lines
Quoted 1 line
It is better to use a standard error code like
-EINVALinstead of using -1 for error.Cheers,
Mauro.
good point thanks
doug t