From patchwork Tue Jun 28 13:59:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Habets X-Patchwork-Id: 12898354 X-Patchwork-Delegate: kuba@kernel.org 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 7AACEC433EF for ; Tue, 28 Jun 2022 13:59:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347116AbiF1N7n (ORCPT ); Tue, 28 Jun 2022 09:59:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347089AbiF1N7f (ORCPT ); Tue, 28 Jun 2022 09:59:35 -0400 Received: from mint-fitpc2.mph.net (unknown [81.168.73.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C68B83617A for ; Tue, 28 Jun 2022 06:59:34 -0700 (PDT) Received: from palantir17.mph.net (unknown [192.168.0.4]) by mint-fitpc2.mph.net (Postfix) with ESMTP id 12CF7320102; Tue, 28 Jun 2022 14:59:34 +0100 (BST) Received: from localhost ([::1] helo=palantir17.mph.net) by palantir17.mph.net with esmtp (Exim 4.95) (envelope-from ) id 1o6Bka-0008HV-Ud; Tue, 28 Jun 2022 14:59:32 +0100 Subject: [PATCH net-next v2 04/10] sfc: Change BUG_ON to WARN_ON and recovery code. From: Martin Habets To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, jonathan.s.cooper@amd.com Cc: netdev@vger.kernel.org, ecree.xilinx@gmail.com Date: Tue, 28 Jun 2022 14:59:32 +0100 Message-ID: <165642477283.31669.14698542396209546371.stgit@palantir17.mph.net> In-Reply-To: <165642465886.31669.17429834766693417246.stgit@palantir17.mph.net> References: <165642465886.31669.17429834766693417246.stgit@palantir17.mph.net> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jonathan Cooper Pre-emptively fix a checkpatch warning in a subsequent patch. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets --- drivers/net/ethernet/sfc/efx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 955271ff06bb..dead69025bf5 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -774,7 +774,8 @@ static void efx_unregister_netdev(struct efx_nic *efx) if (!efx->net_dev) return; - BUG_ON(netdev_priv(efx->net_dev) != efx); + if (WARN_ON(netdev_priv(efx->net_dev) != efx)) + return; if (efx_dev_registered(efx)) { strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name));