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=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS autolearn=unavailable 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 DC673C10F03 for ; Thu, 7 Mar 2019 21:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3EF220851 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 Content-Type: text/plain; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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;