Skip to contentSkip to conversation

scsi: fnic: Use kmalloc instead of vmalloc for a small memory allocation

PATCH Markus Elfring 1 participant 1 message Apr 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

'struct fc_trace_flag_type' is just a few bytes long. There is no need to allocate such a structure with vmalloc. Using kmalloc instead.

Can such an adjustment be relevant for the specification of the tag “Fixes”?

Quoted 1 line

While at it, axe a useless test when freeing the memory.

I find it more appropriate to provide this source code improvement by a separate update step.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=b4f633221f0aeac102e463a4be46a643b2e3b819#n138

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=b4f633221f0aeac102e463a4be46a643b2e3b819#n4

Regards,
Markus