From: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Marco Stornelli
<marco.stornelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Bryan Freed <bfreed-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH v6] pstore/ram: Add ramoops support for the Flattened Device Tree.
Date: Sat, 8 Sep 2012 01:06:09 -0700 [thread overview]
Message-ID: <20120908080607.GA22071@lizard> (raw)
In-Reply-To: <504AF27C.9090601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Sat, Sep 08, 2012 at 09:23:40AM +0200, Marco Stornelli wrote: [...]
> >>+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> >>+ if (pdata == NULL)
> >
> >I wonder why people prefer to not write !pdata, which is more natural
> >when reading the code.. :-)
>
> I think it's the same for sizeof, it's much more readable
> sizeof(struct ramoops_platform_data).
Well, sizeof(struct...) is against Linux coding style. And there are
good reasons for this rule, it's all in the CodingStyle file. Thus,
it's not about personal preferences. But speaking of personal
preferences, I don't find sizeof(struct...) more readable. :-)
Thanks!
Anton.
WARNING: multiple messages have this Message-ID (diff)
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Bryan Freed <bfreed@chromium.org>,
John Stultz <john.stultz@linaro.org>,
linux-kernel@vger.kernel.org, keescook@chromium.org,
sboyd@codeaurora.org, gregkh@linuxfoundation.org,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v6] pstore/ram: Add ramoops support for the Flattened Device Tree.
Date: Sat, 8 Sep 2012 01:06:09 -0700 [thread overview]
Message-ID: <20120908080607.GA22071@lizard> (raw)
In-Reply-To: <504AF27C.9090601@gmail.com>
On Sat, Sep 08, 2012 at 09:23:40AM +0200, Marco Stornelli wrote: [...]
> >>+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> >>+ if (pdata == NULL)
> >
> >I wonder why people prefer to not write !pdata, which is more natural
> >when reading the code.. :-)
>
> I think it's the same for sizeof, it's much more readable
> sizeof(struct ramoops_platform_data).
Well, sizeof(struct...) is against Linux coding style. And there are
good reasons for this rule, it's all in the CodingStyle file. Thus,
it's not about personal preferences. But speaking of personal
preferences, I don't find sizeof(struct...) more readable. :-)
Thanks!
Anton.
next prev parent reply other threads:[~2012-09-08 8:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 18:29 [PATCH v6] pstore/ram: Add ramoops support for the Flattened Device Tree Bryan Freed
[not found] ` <1347042576-17675-1-git-send-email-bfreed-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-09-08 5:29 ` Anton Vorontsov
2012-09-08 5:29 ` Anton Vorontsov
2012-09-08 7:23 ` Marco Stornelli
[not found] ` <504AF27C.9090601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-08 8:06 ` Anton Vorontsov [this message]
2012-09-08 8:06 ` Anton Vorontsov
2012-09-08 8:27 ` Marco Stornelli
2012-09-17 6:23 ` Anton Vorontsov
2012-09-17 6:23 ` Anton Vorontsov
2013-04-05 2:03 ` Rob Herring
2013-04-07 17:43 ` Anton Vorontsov
2013-04-08 19:54 ` Bryan Freed
2013-04-08 22:43 ` Rob Herring
2013-04-14 14:24 ` Anton Vorontsov
2016-01-06 1:04 ` Kees Cook
[not found] ` <CAGXu5jJVmz+tZWEAqEezPDEA7i4Tcp7OfZtux9rs0bpQCCxDfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06 1:06 ` Kees Cook
2016-01-06 1:06 ` Kees Cook
[not found] ` <CAGXu5jKpfN5VycKgGJhxC1DuRkC8D1D2putTGz4MaB9MLpaiNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06 1:42 ` Rob Herring
2016-01-06 1:42 ` Rob Herring
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=20120908080607.GA22071@lizard \
--to=cbouatmailru-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=bfreed-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marco.stornelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.