]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx().
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 30 Nov 2020 10:09:50 +0000 (11:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Dec 2020 00:56:02 +0000 (16:56 -0800)
commit8a8f3141cb253c51ba81055b17568230cc238e95
treeb9de2478fe97dab6134039e2d22b6baf7688058d
parent5e70ac956ae113bfa68b072dfb835aa044b0268d
s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx().

gfp_type() uses in_interrupt() to figure out the correct GFP mask.

The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be separated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

ctcmpc_tx() is used as net_device_ops::ndo_start_xmit. This callback is
invoked with disabled bottom halves.

Use GFP_ATOMIC for memory allocation in ctcmpc_tx().
Remove gfp_type() since the last user is gone.

Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/s390/net/ctcm_main.c
drivers/s390/net/ctcm_main.h