summaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-07-20 23:26:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-01 18:17:14 +0200
commit61742a7cd5b194d2cc52d78de8ec6967634a4cd6 (patch)
tree35fcdafc0c2792e250f4f6425000b739e092e47e /lib/dynamic_debug.c
parent6bb7ea3afd3eaae95eda6ef5589c3087f2cd70d8 (diff)
devres: Slightly optimize alloc_dr()
If the gfp flag used for the memory allocation already has __GFP_ZERO, then there is no need to explicitly clear the "struct devres_node". It is already zeroed. This saves a few cycles when using devm_zalloc() and co. In the case of devres_alloc() (which calls __devres_alloc_node()), the compiler could remove the test and the memset() because it should be able to see that the __GFP_ZERO flag is set. So this would make the code both faster and smaller. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/d255bd871484e63cdd628e819f929e2df59afb02.1658352383.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions