lkml.org 
[lkml]   [2021]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[BUG] checkpatch ALLOC_SIZEOF_STRUCT ignoring devm_* functions
Date
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.

\
 
 \ /
  Last update: 2021-06-27 16:53    [W:0.015 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site