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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95BECC46CA0 for ; Sun, 26 Nov 2023 19:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbjKZTjs (ORCPT ); Sun, 26 Nov 2023 14:39:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKZTjq (ORCPT ); Sun, 26 Nov 2023 14:39:46 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A60FA; Sun, 26 Nov 2023 11:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Mk7SDcFSL7B3ppHTk9/onNe9s3kcpJLUTe7gaGAWUj8=; b=EEMCwfkMOXVsQNMyVQn+iEIRN4 5wTzPkhM6eUSSy1fc+z45XYcN/Dar/fF79pPKQf2eV6oiLXy+WsDlhPOIjtGerLXZ7nN3RzC1QVg/ stjhJlcOmQT/EgQa76Xl+avVKtgJwrJ8aeTPpsIM0eBsFIPYtC7F8CrlboyUlfycXz8Y=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r7Kyh-001GiE-1M; Sun, 26 Nov 2023 20:39:39 +0100 Date: Sun, 26 Nov 2023 20:39:39 +0100 From: Andrew Lunn To: Christian Marangi Cc: Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , David Epping , Harini Katakam , "Russell King (Oracle)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH 1/3] net: phy: extend PHY package API to support multiple global address Message-ID: <4759bf58-0e9f-4d06-8b8a-d33df378c003@lunn.ch> References: <20231126003748.9600-1-ansuelsmth@gmail.com> <65638967.5d0a0220.28475.43b3@mx.google.com> <240c0d9a-38d9-44fc-a56d-cdd88d9144a9@lunn.ch> <65638d0a.050a0220.5d4fd.3082@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65638d0a.050a0220.5d4fd.3082@mx.google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Well yes I think we should assume those API to be called only in > config_once context or in package context. But is it Panic ok? I would > at least use something like BUG() to give descriptive warning instead of > NULL pointer exception. What do you think? BUG() is way too strong. It causes an immediate stop of everything, and probably file system data loss and a reboot. WARN_ON() is generally no better. An Opps gives a stack trace, which is what you need to find the bug, and kills the process. Generally, you can do a controlled shutdown, without any losses. Andrew