lkml.org 
[lkml]   [2012]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] pstore/ram: Add ramoops support for the Flattened Device Tree.
Il 08/09/2012 10:06, Anton Vorontsov ha scritto:
> 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.
>

Yes, I know, but indeed it's only a personal preference as the check
==NULL instead of !pdata. :)

Marco


\
 
 \ /
  Last update: 2012-09-08 11:21    [W:0.050 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site