lkml.org 
[lkml]   [2014]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpio: mcp23s08: Trivial: Fixed coding style issues
On Wed, Mar 12, 2014 at 14:53 +0100, Linus Walleij wrote:
>
> On Fri, Mar 7, 2014 at 12:25 AM, Gary Servin <garyservin@gmail.com> wrote:
>
> > This coding style issue was detected using the checkpatch.pl script
> >
> > Signed-off-by: Gary Servin <garyservin@gmail.com>
>
> Sometimes the compiler is just too forgiving :-/
> Thanks a lot for fixing this, patch applied.

I think the code had no syntax or language issue before. The
cleanup really was about style exclusively (which still is a good
thing). 'sizeof' is an operator, very much like a unary minus or
unary ampersand which neither require parentheses. So either of
"sizeof(x)" as well as "sizeof x" are legal with regard to the C
language. It's just that the community prefers "sizeof(x)" for
the improved readability.


virtually yours
Gerhard Sittig
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de


\
 
 \ /
  Last update: 2014-03-12 22:01    [W:0.094 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site