summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorRebecca Mckeever <remckee0@gmail.com>2022-04-06 03:31:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-07 19:52:12 +0200
commit808d5dbeec7863db7c85217dafee02203a4bec94 (patch)
tree65c79ae5d3c3d953f68875c5f0ec4fad22bbdb5e /scripts/patch-kernel
parentcb9d73dbe2376600d2cfcc262d972e44cbe0a3c2 (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 <remckee0@gmail.com> Link: https://lore.kernel.org/r/5b526d8c178d89328de935ff4ff57651bdd8379b.1649233201.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions