From patchwork Mon Nov 16 16:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 1401023 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=yMsU7Mtj; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=mIao/k0l; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CZZ8T2qw1z9sSn for ; Tue, 17 Nov 2020 03:21:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731943AbgKPQVY (ORCPT ); Mon, 16 Nov 2020 11:21:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731938AbgKPQVY (ORCPT ); Mon, 16 Nov 2020 11:21:24 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13740C0613CF for ; Mon, 16 Nov 2020 08:21:24 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1605543682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jtvi8V/LQ5Rz6+0ztSY/Wqp0Vo+6J9KTqf1s3xDgcTo=; b=yMsU7MtjRiWYE/hV3aSXuElkOrLBBaBHa6p6FnbBdqqeeeEQWQw39NYOVGk9Ufvdl6YLJ1 bsIGLHFo5EQ9JCHslkNw83dLATvFZM6nr7F7pPrjkKZrQG3WIhpqTQssaVH5KAXC9OHrIR 0Thvt4teukV2zWRZAOEkG8bptsH5G+y7gTh54FUZbmxl53zaIH9IoWRkHpBk99+3mf89vn r7U8SHcOFXn0wAehQCG8I/za6Br7t98DOBsk7C2NITGTpAjhKZkfsYNZG/aGbDHYYubyvs IcLKWF+Iq3QuTthm6xct584zQwsP+iH1gu0tRtiIih26SYt2MgnnQ53fv/WMJw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1605543682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jtvi8V/LQ5Rz6+0ztSY/Wqp0Vo+6J9KTqf1s3xDgcTo=; b=mIao/k0l+YKGI6MGB/D+EmLXVbSEol2bfW+xcs228wXAp5uCbpWzBuT/oNMm2AJnVR5oAZ cXusfG4J4XMKG6Cw== To: linux-atm-general@lists.sourceforge.net Cc: Chas Williams <3chas3@gmail.com>, netdev@vger.kernel.org, Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH 3/3] atm: lanai: Remove in_interrupt() usage Date: Mon, 16 Nov 2020 17:21:16 +0100 Message-Id: <20201116162117.387191-4-bigeasy@linutronix.de> In-Reply-To: <20201116162117.387191-1-bigeasy@linutronix.de> References: <20201116162117.387191-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org lanai_shutdown_tx_vci() uses in_interrupt() to issue a warning message if the function was used in context in which it is not safe to sleep. The usage of in_interrupt() in driver code is deprecated as it can not always detect all states where it is not allowed to sleep. msleep() has debug code which will trigger a warning if used in bad context. Remove in_interrupt(). Cc: Chas Williams <3chas3@gmail.com> Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/atm/lanai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index ac811cfa68431..d7277c26e4232 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c @@ -765,8 +765,7 @@ static void lanai_shutdown_tx_vci(struct lanai_dev *lanai, struct sk_buff *skb; unsigned long flags, timeout; int read, write, lastread = -1; - APRINTK(!in_interrupt(), - "lanai_shutdown_tx_vci called w/o process context!\n"); + if (lvcc->vbase == NULL) /* We were never bound to a VCI */ return; /* 15.2.1 - wait for queue to drain */