[U-Boot] [PATCH 3/6] "return" is not a function

Wolfgang Denk wd at denx.de
Sun Aug 31 20:57:28 CEST 2008


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0808311805020.3747 at axis700.grange> you wrote:
> 
> > I don't see any need to change this code. Patch rejected.
> 
> return (0) and similar produce warnings from checkpatch.pl. If I followed 

Ah! Then you should have at least mentioned  in  your  comments  that
this  was the motivation of your changes. As you posted it, it looked
just like a change because you didn't like the style.

> this local style and used parenthesis in all returns I added, all of them 
> would cause checkpatch warnings. If I only added returns without 
> parenthesis the mixed style would look terrible. So, I consider this a 
> coding style clean up, just as well as any space vs. tab, or brace on the 
> same line as if or for or...

Frankly, I don't understand what checkpatch  is  warning  about.  IMO
this  is  really  just  a  matter f style, and I'm still using habits
learned from K&R. If you had learned C from the Unix version  6  code
like  me  you'd most probbaly write "return (value);", too. (Just for
the fun of it I checked if my memory is with me - in the  whole  Unix
v7  code,  kernel  + libraries + commands, I could find just 18 cases
where "return value;" was used.)

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
A day without sunshine is like night.


More information about the U-Boot mailing list