Messages in this thread | | | Subject | Re: [PATCH v2] staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic context | From | Joe Perches <> | Date | Mon, 01 Nov 2021 09:42:46 -0700 |
| |
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), ...);
| |