]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ctcm: Avoid temporary allocation of struct qllc.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 30 Nov 2020 10:09:46 +0000 (11:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Dec 2020 00:56:01 +0000 (16:56 -0800)
commit348159974dec9f32fbc3a8331c13fbd82c3aedd8
treecacf0e9bf58a39303e40d9a7adc3d1a62399066c
parent8d10df34979af2ba20b2248fbf5b675b865ae609
s390/ctcm: Avoid temporary allocation of struct qllc.

The size of struct qllc is 2 byte. The memory for is allocated,
initialized, used and deallocated a few lines later.

It is more efficient to avoid the allocation/free dance and assign the
values directly to skb's data part instead of using memcpy() for it.

Avoid an allocation of struct qllc and use the resulting skb pointer
instead.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[jwi: remove a newline, reflow the commit msg]
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/s390/net/ctcm_mpc.c