mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] checkpatch ALLOC_SIZEOF_STRUCT ignoring devm_* functions
@ 2021-06-27 14:52 Armin Wolf
  0 siblings, 0 replies; only message in thread
From: Armin Wolf @ 2021-06-27 14:52 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, linux-kernel

When checking a source file containing something like:

data = devm_kzalloc(&pdev->dev, sizeof(struct dell_smm_data), GFP_KERNEL);

checkpatch is not complaining.
But when doing the same without devres:

data = kzalloc(sizeof(struct dell_smm_data), GFP_KERNEL);

checkpatch complains "Prefer kzalloc(sizeof(*data)...) over
kzalloc(sizeof(struct dell_smm_data)...)".
I think checkpatch ignoring the devm_* function is not intended.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-27 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 14:52 [BUG] checkpatch ALLOC_SIZEOF_STRUCT ignoring devm_* functions Armin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®