diff options
| author | Rebecca Mckeever <[email protected]> | 2022-04-06 03:31:00 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-04-07 19:52:12 +0200 |
| commit | 808d5dbeec7863db7c85217dafee02203a4bec94 (patch) | |
| tree | 65c79ae5d3c3d953f68875c5f0ec4fad22bbdb5e /tools/perf/scripts/python | |
| parent | cb9d73dbe2376600d2cfcc262d972e44cbe0a3c2 (diff) | |
staging: r8188eu: use sizeof(*pvar) for allocating structs
Use sizeof(*pvar) instead of sizeof(struct var) when allocating memory.
This conforms to Linux kernel coding style, improves readability,
and decreases the opportunity for bugs if the pointer variable type is
changed. Issue found by checkpatch messages of the following format:
CHECK: Prefer kzalloc(sizeof(*pvar)...) over kzalloc(sizeof(struct var)...)
Signed-off-by: Rebecca Mckeever <[email protected]>
Link: https://lore.kernel.org/r/5b526d8c178d89328de935ff4ff57651bdd8379b.1649233201.git.remckee0@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions