diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2020-11-30 13:09:50 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-02 03:56:02 +0300 |
commit | 8f4b6e35e270b3dca8943cf1a2de8d40b6074272 (patch) | |
tree | b9de2478fe97dab6134039e2d22b6baf7688058d /drivers/s390/net/ctcm_main.h | |
parent | 04e4e469f99ae117080135d5069767f3c2455191 (diff) | |
download | linux-8f4b6e35e270b3dca8943cf1a2de8d40b6074272.tar.xz |
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>
Diffstat (limited to 'drivers/s390/net/ctcm_main.h')
-rw-r--r-- | drivers/s390/net/ctcm_main.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/s390/net/ctcm_main.h b/drivers/s390/net/ctcm_main.h index 16bdf23ee02b..90bd7b3f80c3 100644 --- a/drivers/s390/net/ctcm_main.h +++ b/drivers/s390/net/ctcm_main.h @@ -298,11 +298,6 @@ struct mpc_group *ctcmpc_init_mpc_group(struct ctcm_priv *priv); /* test if struct ctcm_priv of struct net_device has MPC protocol setting */ #define IS_MPCDEV(dev) IS_MPC((struct ctcm_priv *)dev->ml_priv) -static inline gfp_t gfp_type(void) -{ - return in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; -} - /* * Definition of our link level header. */ |