> -----Original Message-----
> From: Stefan Reinauer [mailto:[email protected]]
> Sent: Friday, May 01, 2009 3:06 AM
> To: Myles Watson
> Cc: coreboot
> Subject: Re: [coreboot] [PATCH] Remove warnings for s2892
> 
> Awesome patch!

Thanks.

> 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.
*/
I think you still need a cast, but it is nicer than two casts.
                mac_pos = (u8*) 0xffffffd0; /* See romstrap.inc and
romstrap.lds. */

>               mac_l = readl(mac_pos) + nic_index;
>               mac_h = readl(mac_pos + 4);
>       }

I wasn't sure if we wanted to convert types from uint8_t to u8 in old files,
so I didn't do any of that.

Acked-by: Myles Watson <[email protected]>

Thanks,
Myles


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

Reply via email to