Show
Ignore:
Timestamp:
12/11/08 17:03:31 (3 years ago)
Author:
khali
Message:

Get rid of $l everywhere else.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/eeprom/decode-dimms

    r5557 r5558  
    710710{ 
    711711        my $bytes = shift; 
    712         my ($l, $temp); 
     712        my $temp; 
    713713 
    714714# SPD revision 
     
    721721        prints("Memory Characteristics"); 
    722722 
    723         $l = "Maximum module speed"; 
    724723        $temp = ($bytes->[9] >> 4) + ($bytes->[9] & 0xf) * 0.1; 
    725724        my $ddrclk = 2 * (1000 / $temp); 
     
    730729        $pcclk = $pcclk - ($pcclk % 100); 
    731730        $ddrclk = int ($ddrclk); 
    732         printl($l, "${ddrclk}MHz (PC${pcclk})"); 
     731        printl("Maximum module speed", "${ddrclk}MHz (PC${pcclk})"); 
    733732 
    734733#size computation 
     
    889888{ 
    890889        my $bytes = shift; 
    891         my ($l, $temp); 
     890        my $temp; 
    892891        my $ctime; 
    893892 
     
    901900        prints("Memory Characteristics"); 
    902901 
    903         $l = "Maximum module speed"; 
    904902        $ctime = ddr2_sdram_ctime($bytes->[9]); 
    905903        my $ddrclk = 2 * (1000 / $ctime); 
     
    910908        $pcclk = $pcclk - ($pcclk % 100); 
    911909        $ddrclk = int ($ddrclk); 
    912         printl($l, "${ddrclk}MHz (PC2-${pcclk})"); 
     910        printl("Maximum module speed", "${ddrclk}MHz (PC2-${pcclk})"); 
    913911 
    914912#size computation 
     
    10341032{ 
    10351033        my $bytes = shift; 
    1036         my $l; 
    10371034        my $temp; 
    10381035        my $ctime; 
     
    10481045        prints("Memory Characteristics"); 
    10491046 
    1050         $l = "Fine time base"; 
    10511047        my $dividend = ($bytes->[9] >> 4) & 15; 
    10521048        my $divisor  = $bytes->[9] & 15; 
    1053         printl($l, sprintf("%.3f", $dividend / $divisor) . " ps"); 
    1054  
    1055         $l = "Medium time base"; 
     1049        printl("Fine time base", sprintf("%.3f", $dividend / $divisor) . " ps"); 
     1050 
    10561051        $dividend = $bytes->[10]; 
    10571052        $divisor  = $bytes->[11]; 
    10581053        my $mtb = $dividend / $divisor; 
    1059         printl($l, tns3($mtb)); 
    1060  
    1061         $l = "Maximum module speed"; 
     1054        printl("Medium time base", tns3($mtb)); 
     1055 
    10621056        $ctime = $bytes->[12] * $mtb; 
    10631057        my $ddrclk = 2 * (1000 / $ctime); 
     
    10651059        my $pcclk = int ($ddrclk * $tbits / 8); 
    10661060        $ddrclk = int ($ddrclk); 
    1067         printl($l, "${ddrclk}MHz (PC3-${pcclk})"); 
     1061        printl("Maximum module speed", "${ddrclk}MHz (PC3-${pcclk})"); 
    10681062 
    10691063# Size computation 
     
    13671361{ 
    13681362        my $bytes = shift; 
    1369         my ($l, $temp); 
     1363        my $temp; 
    13701364 
    13711365        prints("Intel Specification"); 
    13721366 
    1373         $l = "Frequency"; 
    13741367        if ($bytes->[126] == 0x66) { $temp = "66MHz"; } 
    13751368        elsif ($bytes->[126] == 100) { $temp = "100MHz or 133MHz"; } 
    13761369        elsif ($bytes->[126] == 133) { $temp = "133MHz"; } 
    13771370        else { $temp = "Undefined!"; } 
    1378         printl($l, $temp); 
    1379  
    1380         $l = "Details for 100MHz Support"; 
     1371        printl("Frequency", $temp); 
     1372 
    13811373        $temp = ""; 
    13821374        if ($bytes->[127] & 1) { $temp .= "Intel Concurrent Auto-precharge\n"; } 
     
    13911383        if (($bytes->[127] & 192) == 192) { $temp .= "Double-sided DIMM\n"; } 
    13921384        elsif (($bytes->[127] & 192) != 0) { $temp .= "Single-sided DIMM\n"; } 
    1393         printl($l, $temp); 
     1385        printl("Details for 100MHz Support", $temp); 
    13941386} 
    13951387 
     
    16441636                my @bytes = readspd(0, 128, $dimm_list[$i]); 
    16451637                my $is_rambus = $bytes[0] < 4;          # Simple heuristic 
    1646                 my ($l, $chk_valid, $chk_spd, $chk_calc); 
     1638                my ($label, $chk_valid, $chk_spd, $chk_calc); 
    16471639                if ($is_rambus || $bytes[2] < 9) { 
    1648                         ($l, $chk_valid, $chk_spd, $chk_calc) = 
     1640                        ($label, $chk_valid, $chk_spd, $chk_calc) = 
    16491641                                checksum(\@bytes); 
    16501642                } else { 
    1651                         ($l, $chk_valid, $chk_spd, $chk_calc) = 
     1643                        ($label, $chk_valid, $chk_spd, $chk_calc) = 
    16521644                                check_crc(\@bytes); 
    16531645                } 
     
    16741666                prints("SPD EEPROM Information"); 
    16751667 
    1676                 printl($l, ($chk_valid ? 
     1668                printl($label, ($chk_valid ? 
    16771669                        sprintf("OK (%s)", $chk_calc) : 
    16781670                        sprintf("Bad\n(found %s, calculated %s)", 
     
    17001692                } 
    17011693 
    1702                 $l = "Fundamental Memory type"; 
    17031694                my $type = sprintf("Unknown (0x%02x)", $bytes[2]); 
    17041695                if ($is_rambus) { 
     
    17181709                        } 
    17191710                } 
    1720                 printl($l, $type); 
     1711                printl("Fundamental Memory type", $type); 
    17211712 
    17221713# Decode next 61 bytes (3-63, depend on memory type)