From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: [PATCH v6] pstore/ram: Add ramoops support for the Flattened Device Tree. Date: Sat, 8 Sep 2012 01:06:09 -0700 Message-ID: <20120908080607.GA22071@lizard> References: <1347042576-17675-1-git-send-email-bfreed@chromium.org> <20120908052907.GA4724@lizard> <504AF27C.9090601@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <504AF27C.9090601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Marco Stornelli Cc: Tony Luck , 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 , John Stultz , Colin Cross List-Id: devicetree@vger.kernel.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.