diff options
author | Yu-Chun Lin <[email protected]> | 2024-12-01 01:02:58 +0800 |
---|---|---|
committer | Keith Busch <[email protected]> | 2024-12-04 09:20:00 -0800 |
commit | 41d826c8a9de37af5d1710a37b55720bd5ad8709 (patch) | |
tree | 83a15be868770b7280b180f2fd951b579ed56ba1 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 88c23a32b851e36adc4ab36f796d9b711f47e2bb (diff) |
nvmet: replace kmalloc + memset with kzalloc for data allocation
cocci warnings: (new ones prefixed by >>)
>> drivers/nvme/target/pr.c:831:8-15: WARNING: kzalloc should be used for data, instead of kmalloc/memset
The pattern of using 'kmalloc' followed by 'memset' is replaced with
'kzalloc', which is functionally equivalent to 'kmalloc' + 'memset',
but more efficient. 'kzalloc' automatically zeroes the allocated
memory, making it a faster and more streamlined solution.
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Reviewed-by: Kuan-Wei Chiu <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Yu-Chun Lin <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions