linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerhard Sittig <gsi@denx.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Gary Servin <garyservin@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Jiri Kosina <trivial@kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: mcp23s08: Trivial: Fixed coding style issues
Date: Wed, 12 Mar 2014 21:16:06 +0100	[thread overview]
Message-ID: <20140312201606.GN3327@book.gsilab.sittig.org> (raw)
In-Reply-To: <CACRpkdbjbjeePQipX7nbLXJKnYWFUXhbDLEXPGX5z+EE8R-q3Q@mail.gmail.com>

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

  reply	other threads:[~2014-03-12 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 23:25 [PATCH] gpio: mcp23s08: Trivial: Fixed coding style issues Gary Servin
2014-03-07  2:38 ` Alexandre Courbot
2014-03-12 13:53 ` Linus Walleij
2014-03-12 20:16   ` Gerhard Sittig [this message]
2014-03-14 10:19     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140312201606.GN3327@book.gsilab.sittig.org \
    --to=gsi@denx.de \
    --cc=garyservin@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).