Re: [PATCH v2] staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic context

From: Joe Perches
Date: Mon Nov 01 2021 - 12:42:52 EST


On Mon, 2021-11-01 at 17:30 +0100, Fabio M. De Francesco wrote:
> On Monday, November 1, 2021 4:11:26 PM CET Larry Finger wrote:
> > Incidentally, I disagree with checkpatch in that I think that
> > sizeof(struct foo) is more descriptive than sizeof(*bar).
> I agree with you in full

It's not checkpatch in particular, it's from coding-style

The preferred form for passing a size of a struct is the following:

.. code-block:: c

p = kmalloc(sizeof(*p), ...);