lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 08 Sep 2012 10:27:15 +0200
From:	Marco Stornelli <marco.stornelli@...il.com>
To:	Anton Vorontsov <cbouatmailru@...il.com>
CC:	Bryan Freed <bfreed@...omium.org>,
	John Stultz <john.stultz@...aro.org>,
	linux-kernel@...r.kernel.org, keescook@...omium.org,
	sboyd@...eaurora.org, gregkh@...uxfoundation.org,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	devicetree-discuss@...ts.ozlabs.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ