[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201027225454.3492351-2-bigeasy@linutronix.de>
Date: Tue, 27 Oct 2020 23:54:40 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: netdev@...r.kernel.org
Cc: Aymen Sghaier <aymen.sghaier@....com>,
Daniel Drake <dsd@...too.org>,
"David S. Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
Horia Geantă <horia.geanta@....com>,
Jakub Kicinski <kuba@...nel.org>, Jon Mason <jdmason@...zu.us>,
Jouni Malinen <j@...fi>, Kalle Valo <kvalo@...eaurora.org>,
Leon Romanovsky <leon@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-rdma@...r.kernel.org,
linux-wireless@...r.kernel.org, Li Yang <leoyang.li@....com>,
Madalin Bucur <madalin.bucur@....com>,
Ping-Ke Shih <pkshih@...ltek.com>,
Rain River <rain.1986.08.12@...il.com>,
Saeed Mahameed <saeedm@...dia.com>,
Samuel Chessman <chessman@....org>,
Ulrich Kunitz <kune@...ne-taler.de>,
Zhu Yanjun <zyjzyj2000@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH net-next 01/15] net: orinoco: Remove BUG_ON(in_interrupt/irq())
The usage of in_irq()/in_interrupt() in drivers is phased out and the
BUG_ON()'s based on those are not covering all contexts in which these
functions cannot be called.
Aside of that BUG_ON() should only be used as last resort, which is clearly
not the case here.
A broad variety of checks in the invoked functions (always enabled or debug
option dependent) cover these conditions already, so the BUG_ON()'s do not
really provide additional value.
Just remove them.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Kalle Valo <kvalo@...eaurora.org>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: linux-wireless@...r.kernel.org
Cc: netdev@...r.kernel.org
---
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index b849d27bd741e..046f2453ad5d9 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -859,8 +859,6 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
int retval = 0;
enum ezusb_state state;
- BUG_ON(in_irq());
-
if (!upriv->udev) {
retval = -ENODEV;
goto exit;
@@ -1349,7 +1347,6 @@ static int ezusb_init(struct hermes *hw)
struct ezusb_priv *upriv = hw->priv;
int retval;
- BUG_ON(in_interrupt());
if (!upriv)
return -EINVAL;
@@ -1448,7 +1445,6 @@ static inline void ezusb_delete(struct ezusb_priv *upriv)
struct list_head *tmp_item;
unsigned long flags;
- BUG_ON(in_interrupt());
BUG_ON(!upriv);
mutex_lock(&upriv->mtx);
--
2.28.0
Powered by blists - more mailing lists