From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 B9077C4727E for ; Sun, 27 Sep 2020 23:02:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D56123998 for ; Sun, 27 Sep 2020 23:02:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbgI0XB4 (ORCPT ); Sun, 27 Sep 2020 19:01:56 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:58492 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgI0XB4 (ORCPT ); Sun, 27 Sep 2020 19:01:56 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kMff2-00GSDf-Dy; Mon, 28 Sep 2020 01:00:52 +0200 Date: Mon, 28 Sep 2020 01:00:52 +0200 From: Andrew Lunn To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Linus Torvalds , Paul McKenney , Matthew Wilcox , Sebastian Andrzej Siewior , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Christian Benvenuti , Govindarajulu Varadarajan <_govind@gmx.com>, Jonathan Corbet , Mauro Carvalho Chehab , linux-doc@vger.kernel.org, Luc Van Oostenryck , Jay Cliburn , Chris Snook , Vishal Kulkarni , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, Shannon Nelson , Pensando Drivers , Thomas Bogendoerfer , Solarflare linux maintainers , Edward Cree , Martin Habets , Jon Mason , Daniel Drake , Ulrich Kunitz , Kalle Valo , linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Stanislav Yakovlev , Stanislaw Gruszka , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Jouni Malinen , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , libertas-dev@lists.infradead.org, Pascal Terjan , Ping-Ke Shih Subject: Re: [patch 13/35] net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) Message-ID: <20200927230052.GG3889809@lunn.ch> References: <20200927194846.045411263@linutronix.de> <20200927194921.137019811@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200927194921.137019811@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Sun, Sep 27, 2020 at 09:48:59PM +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > in_interrupt() is ill defined and does not provide what the name > suggests. The usage especially in driver code is deprecated and a tree wide > effort to clean up and consolidate the (ab)usage of in_interrupt() and > related checks is happening. > > In this case the check covers only parts of the contexts in which these > functions cannot be called. It fails to detect preemption or interrupt > disabled invocations. > > As the functions which contain these warnings invoke mutex_lock() which > contains a broad variety of checks (always enabled or debug option > dependent) and therefore covers all invalid conditions already, there is no > point in having inconsistent warnings in those drivers. The conditional > return is not really valuable in practice either. > > Just remove them. > > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn Andrew