Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727292AbgKSN53 (ORCPT ); Thu, 19 Nov 2020 08:57:29 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D493C0613CF for ; Thu, 19 Nov 2020 05:57:29 -0800 (PST) From: Sebastian Andrzej Siewior Subject: [PATCH v2 5/6] s390/ctcm: Use GFP_KERNEL in add_channel(). Date: Thu, 19 Nov 2020 14:57:17 +0100 Message-Id: <20201119135719.983170-6-bigeasy@linutronix.de> In-Reply-To: <20201119135719.983170-1-bigeasy@linutronix.de> References: <20201119135719.983170-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-ID: To: linux-s390@vger.kernel.org Cc: Julian Wiedmann , Karsten Graul , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Sebastian Andrzej Siewior 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. The memory allocation of `ch' a few lines above is using GFP_KERNEL, also an allocation a few lines later is using GFP_KERNEL. Use GFP_KERNEL for the memory allocation. Reviewed-by: Julian Wiedmann Signed-off-by: Sebastian Andrzej Siewior --- drivers/s390/net/ctcm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 0cb130c280031..88efffe81c5ff 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -1322,7 +1322,7 @@ static int add_channel(struct ccw_device *cdev, enum = ctcm_channel_types type, =20 ch->protocol =3D priv->protocol; if (IS_MPC(priv)) { - ch->discontact_th =3D kzalloc(TH_HEADER_LENGTH, gfp_type()); + ch->discontact_th =3D kzalloc(TH_HEADER_LENGTH, GFP_KERNEL); if (ch->discontact_th =3D=3D NULL) goto nomem_return; =20 --=20 2.29.2