[U-Boot] [PATCH] [v2] tsec: fix the return value for tsec_eth_init() and tsec_standard_init()

Wolfgang Denk wd at denx.de
Tue Jun 8 09:14:50 CEST 2010


Dear Timur Tabi,

In message <4C0D78D6.2010707 at freescale.com> you wrote:
>
> > i dont think this is a good idea.  either the init funcs should all be 
> > converted to unsigned int, or they should stay int.  doing it piecemeal leads 
> > to confusion with zero upside.
> 
> I don't want to change all of the functions.  For most devices, there's no
> way I can test them.
> 
> Just because pci_eth_int() is incorrect, that doesn't mean that I can't make
> tsec_eth_init() correct.
> 
> > your fixes no way require these to be unsigned int funcs.
> 
> What's the point of making the return value a signed integer if it can never
> be a negative number?  The reason I changed the type to unsigned int is to
> make it very clear that it will never return an error code.

Mike is right. If you change it here, _all_ similar places should be
changed as well in the same commit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You Earth people glorified organized violence  for  forty  centuries.
But you imprison those who employ it privately.
	-- Spock, "Dagger of the Mind", stardate 2715.1


More information about the U-Boot mailing list