From patchwork Tue Oct 27 22:54:49 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: 11862231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6B67C4363A for ; Tue, 27 Oct 2020 23:00:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AA6020790 for ; Tue, 27 Oct 2020 23:00:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dsC1bGnF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IrVDFjU5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1hcOJSQq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AA6020790 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WkDN9bK+lK2921H15KFXu93ENYafRhiI2v6BZ+pb2EQ=; b=dsC1bGnFdQNPsIlCXtzAhvQ70 40/PxKK83OiLy2FCvhycsfdj90LwTOW3zIbDTkeqAa4ij+PWB3ir2H3VqOfk5B4kbaUuo3w4ZK3EE cehMlYnpWj4e4J5j9cwzPMAJ12qfc5mStSCx1MTmy1DubQ6+YxEY6Bk9m+5elHPNojbFphnVplKfr TcSU+Y66lL5C7luSsJbQnru2q2g8yWivILxK/PHlDd3Mae7gA+F/3JD0rV7aWM7Rv/XP99q/MvmPy 3F9UBDiAThQcFj4gng2xSPDm5BlVgUq+AvWndGwwQYbBem9XQU8RYqLDI9ItP4tR0QIIJoefhO+Ns 4CbnMUFsQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXXuU-00068m-9R; Tue, 27 Oct 2020 22:57:46 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXXsk-0005RM-Mp for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 22:55:59 +0000 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603839357; 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=DjmStdTYpXx0Q5cgHBNYgoGt1xQMDGvpBhIAE5x62bo=; b=IrVDFjU5wiUh3/1b+EWqAdpLz9jEaa0feaxAB0seewu3KP62xQWrIDIDRFVfJR88akb5V8 pixqewfSpPphy6wjIpk84kuwnoRmYibI+WPGXbSjRtkxqKuGHv479c5O+07RtRHzWP9EyO /XS2O6gq02ndIa9jvIju3YeZBwPe7jdNPpcZYA5f5c/yCRKzmmvrHi/lomT6/LJwNTuzDq 79tALLYTDN3HvBlJ21WplNePz/PcB96jD/urLc/mb0VXNxgXdrKoOYIKtApY4oS3NuMRJx udPmRn5otfroi+DJXX7goaPxUdhrmyFNBJYKUfaap+PqN/QIS+Vy6OoaWTLFrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603839357; 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=DjmStdTYpXx0Q5cgHBNYgoGt1xQMDGvpBhIAE5x62bo=; b=1hcOJSQqWKvZ0z3m9yg8HSR6q16whMj9tbVFBVxwm9sIAnvgysjdR0EPOnpijehHN6jTXv eMzOMmrlvWnhypDQ== To: netdev@vger.kernel.org Subject: [PATCH net-next 10/15] net: zd1211rw: Remove in_atomic() usage. Date: Tue, 27 Oct 2020 23:54:49 +0100 Message-Id: <20201027225454.3492351-11-bigeasy@linutronix.de> In-Reply-To: <20201027225454.3492351-1-bigeasy@linutronix.de> References: <20201027225454.3492351-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_185558_986201_894A8890 X-CRM114-Status: GOOD ( 10.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aymen Sghaier , Madalin Bucur , Sebastian Andrzej Siewior , Zhu Yanjun , Samuel Chessman , Ping-Ke Shih , Herbert Xu , =?utf-8?q?Horia_Geant=C4=83?= , linux-rdma@vger.kernel.org, Rain River , Kalle Valo , Ulrich Kunitz , Jouni Malinen , Daniel Drake , Jakub Kicinski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Leon Romanovsky , linuxppc-dev@lists.ozlabs.org, linux-wireless@vger.kernel.org, Li Yang , linux-crypto@vger.kernel.org, Jon Mason , Saeed Mahameed , "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The usage of in_atomic() in driver code is deprecated as it can not always detect all states where it is not allowed to sleep. All callers are in premptible thread context and all functions invoke core functions which have checks for invalid calling contexts already. Signed-off-by: Sebastian Andrzej Siewior Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org --- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c index 66367ab7e4c1e..5c4cd0e1adebb 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c @@ -1711,11 +1711,6 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, count, USB_MAX_IOREAD16_COUNT); return -EINVAL; } - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } if (!usb_int_enabled(usb)) { dev_dbg_f(zd_usb_dev(usb), "error: usb interrupt not enabled\n"); @@ -1882,11 +1877,6 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, count, USB_MAX_IOWRITE16_COUNT); return -EINVAL; } - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } udev = zd_usb_to_usbdev(usb); @@ -1966,11 +1956,6 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits) int i, req_len, actual_req_len; u16 bit_value_template; - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } if (bits < USB_MIN_RFWRITE_BIT_COUNT) { dev_dbg_f(zd_usb_dev(usb), "error: bits %d are smaller than"