[U-Boot] [PATCH 31/51] fpga: altera: Make altera_validate return normal values

Marek Vasut marex at denx.de
Mon Sep 22 11:36:08 CEST 2014


On Monday, September 22, 2014 at 11:16:04 AM, Pavel Machek wrote:
> On Sun 2014-09-21 15:12:12, Marek Vasut wrote:
> > Make the function return either 0 or -EINVAL, that is, normal
> > expected error codes and success codes instead of true/false
> > nonsense.
> > 
> > Signed-off-by: Marek Vasut <marex at denx.de>
> > Cc: Chin Liang See <clsee at altera.com>
> > Cc: Dinh Nguyen <dinguyen at altera.com>
> > Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> > Cc: Tom Rini <trini at ti.com>
> > Cc: Wolfgang Denk <wd at denx.de>
> 
> Acked-by: Pavel Machek <pavel at denx.de>
> 
> > @@ -133,7 +133,7 @@ int altera_info(Altera_desc *desc)
> > 
> >  {
> >  
> >  	int ret_val = FPGA_FAIL;
> > 
> > -	if (!altera_validate (desc, (char *)__func__)) {
> > +	if (altera_validate (desc, (char *)__func__)) {
> 
> +       if (altera_validate(desc, (char *)__func__)) {
> 
> You have extra space there, checkpatch would be angry.

I'm sure it will, but this was resolved somewhere down the patch stack. The 
final result doesn't have this warning.

Best regards,
Marek Vasut


More information about the U-Boot mailing list