[coreboot] [PATCH] Remove warnings for s2892

Stefan Reinauer stepan at coresystems.de
Fri May 1 11:06:13 CEST 2009


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: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list