Re: [PATCH] scsi: fnic: Use kmalloc instead of vmalloc for a small memory allocation

From: Markus Elfring
Date: Fri Apr 24 2020 - 10:50:33 EST


> '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â?


> 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