util/spd_tools: Run go fmt on all .go files

This just reformats these files. go fmt should probably be
run on the check-in of every .go file.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I70ced115bad42d123474b18bbff2e4c0a16f3d88
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51019
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Martin Roth
2021-02-22 20:11:18 -07:00
committed by Patrick Georgi
parent db717db5c5
commit f0a7e36527
4 changed files with 330 additions and 333 deletions

View File

@@ -54,6 +54,7 @@ type usedPart struct {
partName string
index int
}
/*
* Read input file CSV that contains list of memory part names used by the variant
* and an optional assigned id.
@@ -178,7 +179,7 @@ func genPartIdInfo(parts []usedPart, partToSPDMap map[string]string, SPDToIndexM
return nil, fmt.Errorf("Invalid part entry")
}
SPDFileName,ok := partToSPDMap[p.partName]
SPDFileName, ok := partToSPDMap[p.partName]
if !ok {
return nil, fmt.Errorf("Failed to find part ", p.partName, " in SPD Manifest. Please add the part to global part list and regenerate SPD Manifest")
}
@@ -214,7 +215,7 @@ func genPartIdInfo(parts []usedPart, partToSPDMap map[string]string, SPDToIndexM
continue
}
SPDFileName,ok := partToSPDMap[p.partName]
SPDFileName, ok := partToSPDMap[p.partName]
if !ok {
return nil, fmt.Errorf("Failed to find part ", p.partName, " in SPD Manifest. Please add the part to global part list and regenerate SPD Manifest")
}

View File

@@ -10,9 +10,9 @@ import (
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"regexp"
)
/*
@@ -33,7 +33,7 @@ const (
PlatformPLK = 2
)
var platformMap = map[string]int {
var platformMap = map[string]int{
"TGL": PlatformTGL,
"PCO": PlatformPCO,
"PLK": PlatformPLK,
@@ -85,7 +85,7 @@ type memAttributes struct {
}
/* This encodes the density in Gb to SPD low nibble value as per JESD 4.1.2.L-5 R29 */
var densityGbToSPDEncoding = map[int]byte {
var densityGbToSPDEncoding = map[int]byte{
2: 0x3,
4: 0x4,
8: 0x5,
@@ -97,7 +97,7 @@ var densityGbToSPDEncoding = map[int]byte {
* Maps density per die to row-column encoding for a device with x8/x16
* physical channel.
*/
var densityGbx8x16DieCapacityToRowColumnEncoding = map[int]byte {
var densityGbx8x16DieCapacityToRowColumnEncoding = map[int]byte{
2: 0x11, /* 14 rows, 10 columns */
4: 0x19, /* 15 rows, 10 columns */
8: 0x21, /* 16 rows, 10 columns */
@@ -111,7 +111,7 @@ var densityGbx8x16DieCapacityToRowColumnEncoding = map[int]byte {
*/
/* maps die density to rcf1 timing in pico seconds */
var tRFC1Encoding = map[int]int {
var tRFC1Encoding = map[int]int{
2: 160000,
4: 260000,
8: 350000,
@@ -119,7 +119,7 @@ var tRFC1Encoding = map[int]int {
}
/* maps die density to rcf2 timing in pico seconds */
var tRFC2Encoding = map[int]int {
var tRFC2Encoding = map[int]int{
2: 110000,
4: 160000,
8: 260000,
@@ -127,7 +127,7 @@ var tRFC2Encoding = map[int]int {
}
/* maps die density to rcf4 timing in pico seconds */
var tRFC4Encoding = map[int]int {
var tRFC4Encoding = map[int]int{
2: 90000,
4: 110000,
8: 160000,
@@ -148,7 +148,7 @@ type speedBinAttributes struct {
TCKMaxPs int
}
var speedBinToSPDEncoding = map[int]speedBinAttributes {
var speedBinToSPDEncoding = map[int]speedBinAttributes{
1600: {
TRASMinPs: 35000,
TCKMaxPs: 1500,
@@ -394,7 +394,7 @@ func encodeTRCMinLsb(memAttribs *memAttributes) byte {
}
/* This takes memAttribs.PackageBusWidth as an index */
var pageSizefromBusWidthEncoding = map[int]int {
var pageSizefromBusWidthEncoding = map[int]int{
8: 1,
16: 2,
}
@@ -498,7 +498,7 @@ func updateTRRDLMin(memAttribs *memAttributes) {
var tRRDLFromTck int
if memAttribs.TRRDLMinPs == 0 {
memAttribs.TRRDLMinPs= getTRRDLMinPs(memAttribs)
memAttribs.TRRDLMinPs = getTRRDLMinPs(memAttribs)
}
tRRDLFromTck = 4 * memAttribs.TCKMinPs
@@ -508,7 +508,7 @@ func updateTRRDLMin(memAttribs *memAttributes) {
}
}
var speedToTRRDSMinPsOneKPageSize = map[int]int {
var speedToTRRDSMinPsOneKPageSize = map[int]int{
1600: 5000,
1866: 4200,
2133: 3700,
@@ -518,7 +518,7 @@ var speedToTRRDSMinPsOneKPageSize = map[int]int {
3200: 2500,
}
var speedToTRRDSMinPsTwoKPageSize = map[int]int {
var speedToTRRDSMinPsTwoKPageSize = map[int]int{
1600: 6000,
1866: 5300,
2133: 5300,
@@ -720,8 +720,8 @@ func encodeTWTRLMinLsb(memAttribs *memAttributes) byte {
return byte(convPsToMtb(memAttribs.TWTRLMinPs) & 0xff)
}
type SPDMemAttribFunc func (*memAttributes) byte
type SPDConvConstFunc func () byte
type SPDMemAttribFunc func(*memAttributes) byte
type SPDConvConstFunc func() byte
type SPDAttribTableEntry struct {
constVal byte
@@ -844,7 +844,6 @@ const (
/* As per JEDEC spec, unused digits of manufacturer part number are left as blank. */
SPDValueManufacturerPartNumberBlank = 0x20
)
const (
@@ -870,55 +869,55 @@ const (
TimingValueTWTRLMinPs = 7500
)
var SPDAttribTable = map[int]SPDAttribTableEntry {
SPDIndexSize: { constVal: SPDValueSize },
SPDIndexRevision: { constVal: SPDValueRevision },
SPDIndexMemoryType: { constVal: SPDValueMemoryType },
SPDIndexModuleType: { constVal: SPDValueModuleType },
SPDIndexDensityBanks: { getVal: encodeDensityBanks },
SPDIndexAddressing: { getVal: encodeSdramAddressing },
SPDIndexPackageType: { getVal: encodePackageType },
SPDIndexOptionalFeatures: { constVal: SPDValueOptionalFeatures },
SPDIndexModuleOrganization: { getVal: encodeModuleOrganization },
SPDIndexBusWidth: { constVal: SPDValueModuleBusWidth },
SPDIndexTimebases: { constVal: SPDValueTimebases },
SPDIndexTCKMin: { getVal: encodeTCKMin },
SPDIndexTCKMinFineOffset: { getVal: encodeTCKMinFineOffset },
SPDIndexTCKMax: { getVal: encodeTCKMax },
SPDIndexTCKMaxFineOffset: { getVal: encodeTCKMaxFineOffset },
SPDIndexCASFirstByte: { getVal: encodeCASFirstByte },
SPDIndexCASSecondByte: { getVal: encodeCASSecondByte },
SPDIndexCASThirdByte: { getVal: encodeCASThirdByte },
SPDIndexCASFourthByte: { getVal: encodeCASFourthByte },
SPDIndexTAAMin: { getVal: encodeTAAMin },
SPDIndexTAAMinFineOffset: { getVal: encodeTAAMinFineOffset },
SPDIndexTRCDMin: { getVal: encodeTRCDMin },
SPDIndexTRCDMinFineOffset: { getVal: encodeTRCDMinFineOffset },
SPDIndexTRPMin: { getVal: encodeTRPMin },
SPDIndexTRPMinFineOffset: { getVal: encodeTRPMinFineOffset },
SPDIndexTRASRCMinMSNs: { getVal: encodeTRASRCMinMSNs },
SPDIndexTRASMinLsb: { getVal: encodeTRASMinLsb },
SPDIndexTRCMinLsb: { getVal: encodeTRCMinLsb },
SPDIndexTRCMinFineOffset: { getVal: encodeTRCMinFineOffset },
SPDIndexTRFC1MinLsb: { getVal: encodeTRFC1MinLsb },
SPDIndexTRFC1MinMsb: { getVal: encodeTRFC1MinMsb },
SPDIndexTRFC2MinLsb: { getVal: encodeTRFC2MinLsb },
SPDIndexTRFC2MinMsb: { getVal: encodeTRFC2MinMsb },
SPDIndexTRFC4MinLsb: { getVal: encodeTRFC4MinLsb },
SPDIndexTRFC4MinMsb: { getVal: encodeTRFC4MinMsb },
SPDIndexTFAWMinMSN: { getVal: encodeTFAWMinMSN },
SPDIndexTFAWMinLsb: { getVal: encodeTFAWMinLsb },
SPDIndexTRRDSMin: { getVal: encodeTRRDSMin },
SPDIndexTRRDSMinFineOffset: { getVal: encodeTRRDSMinFineOffset },
SPDIndexTRRDLMin: { getVal: encodeTRRDLMin },
SPDIndexTRRDLMinFineOffset: { getVal: encodeTRRDLMinFineOffset },
SPDIndexTCCDLMin: { getVal: encodeTCCDLMin },
SPDIndexTCCDLMinFineOffset: { getVal: encodeTCCDLMinFineOffset },
SPDIndexTWRMinMSN: { getVal: encodeTWRMinMSN },
SPDIndexTWRMinLsb: { getVal: encodeTWRMinLsb },
SPDIndexTWTRMinMSNs: { getVal: encodeTWTRMinMSNs },
SPDIndexWTRSMinLsb: { getVal: encodeTWTRSMinLsb },
SPDIndexWTRLMinLsb: { getVal: encodeTWTRLMinLsb },
var SPDAttribTable = map[int]SPDAttribTableEntry{
SPDIndexSize: {constVal: SPDValueSize},
SPDIndexRevision: {constVal: SPDValueRevision},
SPDIndexMemoryType: {constVal: SPDValueMemoryType},
SPDIndexModuleType: {constVal: SPDValueModuleType},
SPDIndexDensityBanks: {getVal: encodeDensityBanks},
SPDIndexAddressing: {getVal: encodeSdramAddressing},
SPDIndexPackageType: {getVal: encodePackageType},
SPDIndexOptionalFeatures: {constVal: SPDValueOptionalFeatures},
SPDIndexModuleOrganization: {getVal: encodeModuleOrganization},
SPDIndexBusWidth: {constVal: SPDValueModuleBusWidth},
SPDIndexTimebases: {constVal: SPDValueTimebases},
SPDIndexTCKMin: {getVal: encodeTCKMin},
SPDIndexTCKMinFineOffset: {getVal: encodeTCKMinFineOffset},
SPDIndexTCKMax: {getVal: encodeTCKMax},
SPDIndexTCKMaxFineOffset: {getVal: encodeTCKMaxFineOffset},
SPDIndexCASFirstByte: {getVal: encodeCASFirstByte},
SPDIndexCASSecondByte: {getVal: encodeCASSecondByte},
SPDIndexCASThirdByte: {getVal: encodeCASThirdByte},
SPDIndexCASFourthByte: {getVal: encodeCASFourthByte},
SPDIndexTAAMin: {getVal: encodeTAAMin},
SPDIndexTAAMinFineOffset: {getVal: encodeTAAMinFineOffset},
SPDIndexTRCDMin: {getVal: encodeTRCDMin},
SPDIndexTRCDMinFineOffset: {getVal: encodeTRCDMinFineOffset},
SPDIndexTRPMin: {getVal: encodeTRPMin},
SPDIndexTRPMinFineOffset: {getVal: encodeTRPMinFineOffset},
SPDIndexTRASRCMinMSNs: {getVal: encodeTRASRCMinMSNs},
SPDIndexTRASMinLsb: {getVal: encodeTRASMinLsb},
SPDIndexTRCMinLsb: {getVal: encodeTRCMinLsb},
SPDIndexTRCMinFineOffset: {getVal: encodeTRCMinFineOffset},
SPDIndexTRFC1MinLsb: {getVal: encodeTRFC1MinLsb},
SPDIndexTRFC1MinMsb: {getVal: encodeTRFC1MinMsb},
SPDIndexTRFC2MinLsb: {getVal: encodeTRFC2MinLsb},
SPDIndexTRFC2MinMsb: {getVal: encodeTRFC2MinMsb},
SPDIndexTRFC4MinLsb: {getVal: encodeTRFC4MinLsb},
SPDIndexTRFC4MinMsb: {getVal: encodeTRFC4MinMsb},
SPDIndexTFAWMinMSN: {getVal: encodeTFAWMinMSN},
SPDIndexTFAWMinLsb: {getVal: encodeTFAWMinLsb},
SPDIndexTRRDSMin: {getVal: encodeTRRDSMin},
SPDIndexTRRDSMinFineOffset: {getVal: encodeTRRDSMinFineOffset},
SPDIndexTRRDLMin: {getVal: encodeTRRDLMin},
SPDIndexTRRDLMinFineOffset: {getVal: encodeTRRDLMinFineOffset},
SPDIndexTCCDLMin: {getVal: encodeTCCDLMin},
SPDIndexTCCDLMinFineOffset: {getVal: encodeTCCDLMinFineOffset},
SPDIndexTWRMinMSN: {getVal: encodeTWRMinMSN},
SPDIndexTWRMinLsb: {getVal: encodeTWRMinLsb},
SPDIndexTWTRMinMSNs: {getVal: encodeTWTRMinMSNs},
SPDIndexWTRSMinLsb: {getVal: encodeTWTRSMinLsb},
SPDIndexWTRLMinLsb: {getVal: encodeTWTRLMinLsb},
}
type memParts struct {
@@ -951,7 +950,6 @@ func isManufacturerPartNumberByte(index int) bool {
return false
}
func getSPDByte(index int, memAttribs *memAttributes) byte {
e, ok := SPDAttribTable[index]
if ok == false {
@@ -977,7 +975,7 @@ func createSPD(memAttribs *memAttributes) string {
b = getSPDByte(i, memAttribs)
}
if (i + 1) % 16 == 0 {
if (i+1)%16 == 0 {
s += fmt.Sprintf("%02X\n", b)
} else {
s += fmt.Sprintf("%02X ", b)
@@ -1059,7 +1057,6 @@ func validateRanksPerPackage(ranks int) error {
return fmt.Errorf("Incorrect package ranks: ", ranks)
}
func validateCASLatency(CL int) error {
if CL >= 10 && CL <= 24 && CL != 23 {
return nil
@@ -1278,7 +1275,7 @@ func updateCAS(memAttribs *memAttributes) error {
latencies := strings.Fields(memAttribs.CASLatencies)
for i := 0; i < len(latencies); i++ {
latency,err := strconv.Atoi(latencies[i])
latency, err := strconv.Atoi(latencies[i])
if err != nil {
return fmt.Errorf("Unable to convert latency ", latencies[i])
}
@@ -1320,7 +1317,6 @@ func updateTRASMin(memAttribs *memAttributes) {
}
}
func updateTRCMin(memAttribs *memAttributes) {
if memAttribs.TRCMinPs == 0 {
memAttribs.TRCMinPs = getTRCMinPs(memAttribs)

View File

@@ -136,7 +136,7 @@ func genPartIdInfo(parts []string, partToSPDMap map[string]string, SPDToIndexMap
continue
}
SPDFileName,ok := partToSPDMap[p]
SPDFileName, ok := partToSPDMap[p]
if !ok {
return nil, fmt.Errorf("Failed to find part ", p, " in SPD Manifest. Please add the part to global part list and regenerate SPD Manifest")
}

View File

@@ -32,7 +32,7 @@ const (
PlatformCZN = 2
)
var platformMap = map[string]int {
var platformMap = map[string]int{
"TGL": PlatformTGLADL,
"JSL": PlatformJSL,
"ADL": PlatformTGLADL,
@@ -73,7 +73,7 @@ type memAttributes struct {
}
/* This encodes the density in Gb to SPD values as per JESD 21-C */
var densityGbToSPDEncoding = map[int]byte {
var densityGbToSPDEncoding = map[int]byte{
4: 0x4,
6: 0xb,
8: 0x5,
@@ -88,7 +88,7 @@ var densityGbToSPDEncoding = map[int]byte {
* Maps density per physical channel to row-column encoding as per JESD 21-C for a device with
* x16 physical channel.
*/
var densityGbx16ChannelToRowColumnEncoding = map[int]byte {
var densityGbx16ChannelToRowColumnEncoding = map[int]byte{
4: 0x19, /* 15 rows, 10 columns */
6: 0x21, /* 16 rows, 10 columns */
8: 0x21, /* 16 rows, 10 columns */
@@ -101,7 +101,7 @@ var densityGbx16ChannelToRowColumnEncoding = map[int]byte {
* Maps density per physical channel to row-column encoding as per JESD 21-C for a device with
* x8 physical channel.
*/
var densityGbx8ChannelToRowColumnEncoding = map[int]byte {
var densityGbx8ChannelToRowColumnEncoding = map[int]byte{
3: 0x21, /* 16 rows, 10 columns */
4: 0x21, /* 16 rows, 10 columns */
6: 0x29, /* 17 rows, 10 columns */
@@ -120,7 +120,7 @@ type refreshTimings struct {
* Maps density per physical channel to refresh timings. This is the same for x8 and x16
* devices.
*/
var densityGbPhysicalChannelToRefreshEncoding = map[int]refreshTimings {
var densityGbPhysicalChannelToRefreshEncoding = map[int]refreshTimings{
3: {
TRFCABNs: 180,
TRFCPBNs: 90,
@@ -181,7 +181,7 @@ const (
TCKMaxPsDefault = 31875
)
var speedMbpsToSPDEncoding = map[int]speedParams {
var speedMbpsToSPDEncoding = map[int]speedParams{
4267: {
TCKMinPs: 468, /* 1/4267 * 2 */
TCKMaxPs: TCKMaxPsDefault,
@@ -202,7 +202,7 @@ var speedMbpsToSPDEncoding = map[int]speedParams {
},
}
var bankEncoding = map[int]byte {
var bankEncoding = map[int]byte{
4: 0 << 4,
8: 1 << 4,
}
@@ -459,7 +459,7 @@ func encodeTRFCPBMinLsb(memAttribs *memAttributes) byte {
return byte(convNsToMtb(memAttribs.TRFCPBNs) & 0xff)
}
type SPDAttribFunc func (*memAttributes) byte
type SPDAttribFunc func(*memAttributes) byte
type SPDAttribTableEntry struct {
constVal byte
@@ -562,39 +562,39 @@ const (
SPDValueManufacturerPartNumberBlank = 0x20
)
var SPDAttribTable = map[int]SPDAttribTableEntry {
SPDIndexSize: { constVal: SPDValueSize },
SPDIndexRevision: { constVal: SPDValueRevision },
SPDIndexMemoryType: { constVal: SPDValueMemoryType },
SPDIndexModuleType: { constVal: SPDValueModuleType },
SPDIndexDensityBanks: { getVal: encodeDensityBanks },
SPDIndexAddressing: { getVal: encodeSdramAddressing },
SPDIndexPackageType: { getVal: encodePackageType },
SPDIndexOptionalFeatures: { constVal: SPDValueOptionalFeatures },
SPDIndexModuleOrganization: { getVal: encodeModuleOrganization },
SPDIndexBusWidth: { getVal: encodeBusWidth },
SPDIndexTimebases: { constVal: SPDValueTimebases },
SPDIndexTCKMin: { getVal: encodeTCKMin },
SPDIndexTCKMax: { getVal: encodeTCKMax },
SPDIndexTCKMaxFineOffset: { getVal: encodeTCKMaxFineOffset },
SPDIndexTCKMinFineOffset: { getVal: encodeTCKMinFineOffset },
SPDIndexCASFirstByte: { getVal: encodeCASFirstByte },
SPDIndexCASSecondByte: { getVal: encodeCASSecondByte },
SPDIndexCASThirdByte: { getVal: encodeCASThirdByte },
SPDIndexCASFourthByte: { constVal: SPDValueCASFourthByte },
SPDIndexTAAMin: { getVal: encodeTAAMin },
SPDIndexTAAMinFineOffset: { getVal: encodeTAAMinFineOffset },
SPDIndexReadWriteLatency: { constVal: SPDValueReadWriteLatency },
SPDIndexTRCDMin: { getVal: encodeTRCDMin },
SPDIndexTRCDMinFineOffset: { getVal: encodeTRCDMinFineOffset },
SPDIndexTRPABMin: { getVal: encodeTRPABMin },
SPDIndexTRPABMinFineOffset: { getVal: encodeTRPABMinFineOffset },
SPDIndexTRPPBMin: { getVal: encodeTRPPBMin },
SPDIndexTRPPBMinFineOffset: { getVal: encodeTRPPBMinFineOffset },
SPDIndexTRFCABMinLSB: { getVal: encodeTRFCABMinLsb },
SPDIndexTRFCABMinMSB: { getVal: encodeTRFCABMinMsb },
SPDIndexTRFCPBMinLSB: { getVal: encodeTRFCPBMinLsb },
SPDIndexTRFCPBMinMSB: { getVal: encodeTRFCPBMinMsb },
var SPDAttribTable = map[int]SPDAttribTableEntry{
SPDIndexSize: {constVal: SPDValueSize},
SPDIndexRevision: {constVal: SPDValueRevision},
SPDIndexMemoryType: {constVal: SPDValueMemoryType},
SPDIndexModuleType: {constVal: SPDValueModuleType},
SPDIndexDensityBanks: {getVal: encodeDensityBanks},
SPDIndexAddressing: {getVal: encodeSdramAddressing},
SPDIndexPackageType: {getVal: encodePackageType},
SPDIndexOptionalFeatures: {constVal: SPDValueOptionalFeatures},
SPDIndexModuleOrganization: {getVal: encodeModuleOrganization},
SPDIndexBusWidth: {getVal: encodeBusWidth},
SPDIndexTimebases: {constVal: SPDValueTimebases},
SPDIndexTCKMin: {getVal: encodeTCKMin},
SPDIndexTCKMax: {getVal: encodeTCKMax},
SPDIndexTCKMaxFineOffset: {getVal: encodeTCKMaxFineOffset},
SPDIndexTCKMinFineOffset: {getVal: encodeTCKMinFineOffset},
SPDIndexCASFirstByte: {getVal: encodeCASFirstByte},
SPDIndexCASSecondByte: {getVal: encodeCASSecondByte},
SPDIndexCASThirdByte: {getVal: encodeCASThirdByte},
SPDIndexCASFourthByte: {constVal: SPDValueCASFourthByte},
SPDIndexTAAMin: {getVal: encodeTAAMin},
SPDIndexTAAMinFineOffset: {getVal: encodeTAAMinFineOffset},
SPDIndexReadWriteLatency: {constVal: SPDValueReadWriteLatency},
SPDIndexTRCDMin: {getVal: encodeTRCDMin},
SPDIndexTRCDMinFineOffset: {getVal: encodeTRCDMinFineOffset},
SPDIndexTRPABMin: {getVal: encodeTRPABMin},
SPDIndexTRPABMinFineOffset: {getVal: encodeTRPABMinFineOffset},
SPDIndexTRPPBMin: {getVal: encodeTRPPBMin},
SPDIndexTRPPBMinFineOffset: {getVal: encodeTRPPBMinFineOffset},
SPDIndexTRFCABMinLSB: {getVal: encodeTRFCABMinLsb},
SPDIndexTRFCABMinMSB: {getVal: encodeTRFCABMinMsb},
SPDIndexTRFCPBMinLSB: {getVal: encodeTRFCPBMinLsb},
SPDIndexTRFCPBMinMSB: {getVal: encodeTRFCPBMinMsb},
}
type memParts struct {
@@ -649,7 +649,7 @@ func createSPD(memAttribs *memAttributes) string {
for i := 0; i < 512; i++ {
b := getSPDByte(i, memAttribs)
if (i + 1) % 16 == 0 {
if (i+1)%16 == 0 {
s += fmt.Sprintf("%02X\n", b)
} else {
s += fmt.Sprintf("%02X ", b)
@@ -827,7 +827,7 @@ func updateCAS(memAttribs *memAttributes) error {
latencies := strings.Fields(memAttribs.CASLatencies)
for i := 0; i < len(latencies); i++ {
latency,err := strconv.Atoi(latencies[i])
latency, err := strconv.Atoi(latencies[i])
if err != nil {
return fmt.Errorf("Unable to convert latency ", latencies[i])
}