Re: [PATCH v6] pstore/ram: Add ramoops support for the FlattenedDevice Tree.

From: Anton Vorontsov
Date: Sat Sep 08 2012 - 04:09:06 EST

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. :-)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at