From patchwork Thu Mar 7 21:48:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10843897 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 863ED17E4 for ; Thu, 7 Mar 2019 21:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C70E2F276 for ; Thu, 7 Mar 2019 21:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D9912F437; Thu, 7 Mar 2019 21:49:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEE6F2F276 for ; Thu, 7 Mar 2019 21:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbfCGVs4 (ORCPT ); Thu, 7 Mar 2019 16:48:56 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:58534 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbfCGVs4 (ORCPT ); Thu, 7 Mar 2019 16:48:56 -0500 X-IronPort-AV: E=Sophos;i="5.58,453,1544482800"; d="scan'208";a="372414944" Received: from abo-58-107-68.mrs.modulonet.fr (HELO hadrien) ([85.68.107.58]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 22:48:53 +0100 Date: Thu, 7 Mar 2019 22:48:53 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Venkateswara Naralasetty cc: Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, kbuild-all@01.org Subject: [PATCH] ath11k: fix bugon.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot Use BUG_ON instead of if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Fixes: c105b7abf400 ("ath11k: collect DDR dump after fw crash") CC: Venkateswara Naralasetty Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-bringup head: e7daa3ec639f390e383dae0db9e6b143bcc7b5bc commit: c105b7abf400972ee661efe18b4ca11adfd137cd [28/42] ath11k: collect DDR dump after fw crash :::::: branch date: 5 hours ago :::::: commit date: 5 hours ago Please take the patch only if it's a positive warning. Thanks! ahb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -954,8 +954,7 @@ static int ath11k_subsys_notifier_cb(str sc->target_restarted = 0; break; case SUBSYS_BEFORE_POWERUP: - if (sc->target_restarted) - BUG(); + BUG_ON(sc->target_restarted); break; default: return NOTIFY_OK;