Awesome patch!

On 01.05.2009 0:22 Uhr, Myles Watson wrote:
>       if (!eeprom_valid) {
>               unsigned long mac_pos;
>               mac_pos = 0xffffffd0; /* See romstrap.inc and romstrap.lds. */
> -             mac_l = readl(mac_pos) + nic_index;
> -             mac_h = readl(mac_pos + 4);
> +             mac_l = readl((uint8_t*)mac_pos) + nic_index;
> +             mac_h = readl((uint8_t*)mac_pos + 4);
>       }
>   
One could put that slightly simpler as

        if (!eeprom_valid) {
                u8 *mac_pos;
                mac_pos = 0xffffffd0; /* See romstrap.inc and romstrap.lds. */
                mac_l = readl(mac_pos) + nic_index;
                mac_h = readl(mac_pos + 4);
        }

since mac_pos seems never used as unsigned long.

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected]http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to