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: 10843895 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 4746C17E4 for ; Thu, 7 Mar 2019 21:49:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 299DD2F276 for ; Thu, 7 Mar 2019 21:49:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BC3A2F437; Thu, 7 Mar 2019 21:49:00 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B65102F276 for ; Thu, 7 Mar 2019 21:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=89xijshKI7cXCRONcBjN2fWLNZylivhQSiObT+6up9Y=; b=MzrAJzJqU1b4b2 9vLxhPVun8sBn0ejomXiAlhhKA69ahFXIyuAcFxk1TuqyqSeb0v9ypiYmECbSG2EQl7tRzvE0Q6QO Z6nhigtiZqXQ3TC24WIgIMbaJY8eB6g20g8vqp3KdNDCjiwWR3eqFlFuzge9JQDwKIX7DflbtvVt3 dQAS/KqWuVJFSFXnoEIGuRC1HV+pAXoykYnFfUJ3Ag/6Tknw9+0b+/hp9U96vGlxyqvBW4/KIEeWz 1Nu2b1Hh2uTDhEC1dJoM+ZQNivq8JFKlxFICAp5IR6p5GyUnw/wGixgqVnD6i89UtefNF+uYGAAbq U4Ae3ErJEBxDGrLu26Rg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h20ss-0008J6-UM; Thu, 07 Mar 2019 21:48:58 +0000 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 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 Subject: [PATCH] ath11k: fix bugon.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_134855_828789_A42E2024 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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;