Changeset 5153

Show
Ignore:
Timestamp:
03/21/08 19:13:45 (8 months ago)
Author:
khali
Message:

Strip trailing whitespace.
Coding-style fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • i2c-tools/trunk/eeprom/decode-dimms.pl

    r5152 r5153  
    3333#  -h, --help              display this usage summary 
    3434# 
    35 # References:  
    36 # PC SDRAM Serial Presence  
    37 # Detect (SPD) Specification, Intel,  
     35# References: 
     36# PC SDRAM Serial Presence 
     37# Detect (SPD) Specification, Intel, 
    3838# 1997,1999, Rev 1.2B 
    3939# 
     
    232232 "Enuclia Semiconductor, Inc.", "Virtium Technology Inc.", "Solid State System Co., Ltd.", "Kian Tech LLC", 
    233233 "Artimi", "Power Quotient International", "Avago Technologies", "ADTechnology", "Sigma Designs", 
    234  "SiCortex, Inc.", "Ventura Technology Group", "eASIC", "M.H.S. SAS", "Micro Star International",  
    235  "Rapport Inc.", "Makway International", "Broad Reach Engineering Co.",  
    236  "Semiconductor Mfg Intl Corp", "SiConnect", "FCI USA Inc.", "Validity Sensors",  
     234 "SiCortex, Inc.", "Ventura Technology Group", "eASIC", "M.H.S. SAS", "Micro Star International", 
     235 "Rapport Inc.", "Makway International", "Broad Reach Engineering Co.", 
     236 "Semiconductor Mfg Intl Corp", "SiConnect", "FCI USA Inc.", "Validity Sensors", 
    237237 "Coney Technology Co. Ltd.", "Spans Logic", "Neterion Inc.", "Qimonda", 
    238238 "New Japan Radio Co. Ltd.", "Velogix", "Montalvo Systems", "iVivity Inc.", "Walton Chaintech", 
     
    263263        my $all_00 = 1; 
    264264        my $all_ff = 1; 
    265          
     265 
    266266        foreach my $b (@_) { 
    267267                $all_00 = 0 unless $b == 0x00; 
     
    293293 
    294294        return ("Undefined", []) unless spd_written(@bytes); 
    295          
     295 
    296296        while (defined($first = shift(@bytes)) && $first == 0x7F) { 
    297297                $ai++; 
     
    427427        my $k=0; 
    428428        my $ii=0; 
    429          
     429 
    430430        $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 
    431431        if (($bytes->[5] <= 8) && ($bytes->[17] <= 8)) { 
    432432                 $k = $bytes->[5] * $bytes->[17]; 
    433433        } 
    434          
    435         if($ii > 0 && $ii <= 12 && $k > 0) { 
    436                 printl "Size", ((1 << $ii) * $k) . " MB"; } 
    437         else {  
     434 
     435        if ($ii > 0 && $ii <= 12 && $k > 0) { 
     436                printl "Size", ((1 << $ii) * $k) . " MB"; 
     437        } else { 
    438438                printl "INVALID SIZE", $bytes->[3] . "," . $bytes->[4] . "," . 
    439439                                       $bytes->[5] . "," . $bytes->[17]; 
     
    723723        my $k=0; 
    724724        my $ii=0; 
    725          
     725 
    726726        $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 
    727727        if (($bytes->[5] <= 8) && ($bytes->[17] <= 8)) { 
    728728                 $k = $bytes->[5] * $bytes->[17]; 
    729729        } 
    730          
    731         if($ii > 0 && $ii <= 12 && $k > 0) { 
    732                 printl "Size", ((1 << $ii) * $k) . " MB"; } 
    733         else {  
     730 
     731        if ($ii > 0 && $ii <= 12 && $k > 0) { 
     732                printl "Size", ((1 << $ii) * $k) . " MB"; 
     733        } else { 
    734734                printl "INVALID SIZE", $bytes->[3] . ", " . $bytes->[4] . ", " . 
    735735                                       $bytes->[5] . ", " . $bytes->[17]; 
     
    819819        my $byte = shift; 
    820820        my $ctime; 
    821          
     821 
    822822        $ctime = $byte >> 4; 
    823823        if (($byte & 0xf) <= 9) { $ctime += ($byte & 0xf) * 0.1; } 
     
    834834        my $byte = shift; 
    835835        my $atime; 
    836          
     836 
    837837        $atime = ($byte >> 4) * 0.1 + ($byte & 0xf) * 0.01; 
    838838 
     
    908908        $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 
    909909        $k = (($bytes->[5] & 0x7) + 1) * $bytes->[17]; 
    910          
     910 
    911911        if($ii > 0 && $ii <= 12 && $k > 0) { 
    912                 printl "Size", ((1 << $ii) * $k) . " MB";  
     912                printl "Size", ((1 << $ii) * $k) . " MB"; 
    913913        } else { 
    914914                printl "INVALID SIZE", $bytes->[3] . "," . $bytes->[4] . "," . 
     
    954954        my $trp; 
    955955        my $tras; 
    956          
     956 
    957957        $trcd =($bytes->[29] >> 2)+(($bytes->[29] & 3)*0.25); 
    958958        $trp =($bytes->[27] >> 2)+(($bytes->[27] & 3)*0.25); 
     
    10331033 
    10341034        $ii = ($bytes->[4] & 0x0f) + ($bytes->[4] >> 4) + ($bytes->[5] & 0x07) - 13; 
    1035          
     1035 
    10361036        if ($ii > 0 && $ii < 16) { 
    10371037                printl "Size", (1 << $ii) . " MB"; 
     
    10511051 
    10521052        my $ii; 
    1053          
     1053 
    10541054        $ii = ($bytes->[3] & 0x0f) + ($bytes->[3] >> 4) + ($bytes->[5] & 0x07) - 13; 
    1055          
     1055 
    10561056        if ($ii > 0 && $ii < 16) { 
    10571057                printl "Size", (1 << $ii) . " MB"; 
     
    12181218                        printl $l, 2**$bytes[1]; 
    12191219                } elsif ($bytes[1] == 0) { 
    1220                         printl $l, "RFU";  
     1220                        printl $l, "RFU"; 
    12211221                } else { printl $l, "ERROR!"; } 
    12221222 
     
    12461246 
    12471247                @bytes = readspd64(64, $dimm_list[$i]); 
    1248                  
     1248 
    12491249                $l = "Manufacturer"; 
    12501250                # $extra is a reference to an array containing up to 
     
    12561256                $temp = manufacturer_data(@{$extra}); 
    12571257                printl $l, $temp if defined $temp; 
    1258                  
     1258 
    12591259                if (spd_written($bytes[8])) { 
    12601260                        # Try the location code as ASCII first, as earlier specifications 
     
    12661266                        printl $l, $temp; 
    12671267                } 
    1268                  
     1268 
    12691269                $l = "Part Number"; 
    12701270                $temp = part_number(@bytes[9..26]); 
    12711271                printl $l, $temp; 
    1272                  
     1272 
    12731273                if (spd_written(@bytes[27..28])) { 
    12741274                        $l = "Revision Code"; 
     
    12761276                        printl $l, $temp; 
    12771277                } 
    1278                  
     1278 
    12791279                if (spd_written(@bytes[29..30])) { 
    12801280                        $l = "Manufacturing Date"; 
     
    12951295                        printl $l, $temp; 
    12961296                } 
    1297                  
     1297 
    12981298                if (spd_written(@bytes[31..34])) { 
    12991299                        $l = "Assembly Serial Number"; 
     
    13091309                        decode_intel_spec_freq(\@bytes); 
    13101310                } 
    1311                  
     1311 
    13121312                print "</table>\n" if $opt_html; 
    13131313        }