All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Cohen <david.a.cohen@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-sh@vger.kernel.org, linux-gpio@vger.kernel.org,
	Simon Horman <horms@verge.net.au>
Subject: Re: [PATCH] gpio: rcar: Support both edge trigger with DT
Date: Sat, 16 Nov 2013 18:38:49 -0800	[thread overview]
Message-ID: <52882C39.2050505@linux.intel.com> (raw)
In-Reply-To: <1678796.qQvoAN1bBU@avalon>

Hi Laurent,

>> According to ANSI C, you can't initialize struct with empty { }. You
>> would need at least one 0 inside.
>> Despite gcc accepts it, there are some ppl over there trying kernel
>> with different compilers :)
>>
>> (Hope I'm not being too nitpicky)
> 
> You're certainly not worse than me in that regard ;-) However, given that most 
> (if not all, I've stopped looking after 50) drivers seem to use an empty 
> initializer at the end of their of_device_id array, I'm not sure whether we 
> really need to care. I assume LLVM handles the empty initializer fine.

I looked some examples too. Looks like empty { } are more common in
kernel than { 0 }. I guess either we add this warning to checkpatch or
we keep accepting it waiting for ANSI C will to adopt this at some
point :)

Br, David

WARNING: multiple messages have this Message-ID (diff)
From: David Cohen <david.a.cohen@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-sh@vger.kernel.org, linux-gpio@vger.kernel.org,
	Simon Horman <horms@verge.net.au>
Subject: Re: [PATCH] gpio: rcar: Support both edge trigger with DT
Date: Sun, 17 Nov 2013 02:38:49 +0000	[thread overview]
Message-ID: <52882C39.2050505@linux.intel.com> (raw)
In-Reply-To: <1678796.qQvoAN1bBU@avalon>

Hi Laurent,

>> According to ANSI C, you can't initialize struct with empty { }. You
>> would need at least one 0 inside.
>> Despite gcc accepts it, there are some ppl over there trying kernel
>> with different compilers :)
>>
>> (Hope I'm not being too nitpicky)
> 
> You're certainly not worse than me in that regard ;-) However, given that most 
> (if not all, I've stopped looking after 50) drivers seem to use an empty 
> initializer at the end of their of_device_id array, I'm not sure whether we 
> really need to care. I assume LLVM handles the empty initializer fine.

I looked some examples too. Looks like empty { } are more common in
kernel than { 0 }. I guess either we add this warning to checkpatch or
we keep accepting it waiting for ANSI C will to adopt this at some
point :)

Br, David

  reply	other threads:[~2013-11-17  2:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 16:26 [PATCH] gpio: rcar: Support both edge trigger with DT Laurent Pinchart
2013-11-13 16:26 ` Laurent Pinchart
2013-11-14  6:12 ` Magnus Damm
2013-11-14  6:12   ` Magnus Damm
2013-11-28 15:31   ` Laurent Pinchart
2013-11-28 15:31     ` Laurent Pinchart
2013-11-29 12:23     ` Linus Walleij
2013-11-29 12:23       ` Linus Walleij
2013-11-15  4:43 ` David Cohen
2013-11-15  4:43   ` David Cohen
2013-11-17  0:57   ` Laurent Pinchart
2013-11-17  0:57     ` Laurent Pinchart
2013-11-17  2:38     ` David Cohen [this message]
2013-11-17  2:38       ` David Cohen

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=52882C39.2050505@linux.intel.com \
    --to=david.a.cohen@linux.intel.com \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-sh@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.