Return-path: Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h20sp-0008IE-Gc for ath10k@lists.infradead.org; Thu, 07 Mar 2019 21:48:57 +0000 Date: Thu, 7 Mar 2019 22:48:53 +0100 (CET) From: Julia Lawall Subject: [PATCH] ath11k: fix bugon.cocci warnings Message-ID: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Venkateswara Naralasetty Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, kbuild-all@01.org, Kalle Valo 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; _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k