Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5359422imb; Thu, 7 Mar 2019 13:49:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwfYj2dsy/XFM5r4NhTAIzWGj4ER+3WP96DgUkoKUKWtq1CCLSbT63+q6sc7vYt6+HDV3Yc X-Received: by 2002:a17:902:822:: with SMTP id 31mr15139499plk.290.1551995373673; Thu, 07 Mar 2019 13:49:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551995373; cv=none; d=google.com; s=arc-20160816; b=C83eK3J8w6ELSSnOUrmR6UGfVf1Gb7vXPgYOtpMItwxPQ4/u7XGW3oawYl9yeQA/Mc q8g0y5SH3Xtfg/ZIhjHg2R1u4vmm0fZJ0n+IkT+6FtsEWmwAERyRnV4wj2II8ecQqoMo /goXcZ6TFuf1qpcsGCK0aMFqJ/i4atWp8/5821L30JzQh6NbZtGeDlBbEHlzf9nCx9NE 12VhiQ7mKIikVZw2gbaMKOMnjaH/A9mUBHYBfDw1FPCGOpz6Qb4/ZcpR7oqvfBxPjmnf msjh9DN59AQvdYF3MA9BwsJ/dcc8XEgOy/97BahT2fyvkG852jLgb5xoZdwzy42xrEVa wHYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=6NjdqjiguMwxHu5dBxCoj3ggwy8ZoEyDxslXppQI0Qc=; b=KyTjn5Gu31JS9AM4lP/su0wIwi4+0mTvuDlVopeypHhR9Dw+RBX5NDtvBslnXPbL0v SYkfN8rBqUVE9gF0ZpiZqIBWs4lu62W8fkkxrxcijdeilTFdVlLR8mA9QnWVn5lSbnXZ AoJCMVqCW3TnyZL2QmAmITtUHOZ6L2JEhJ12edQSW88upyarEeQ7BGXOBRW7BVzsYaCi Z/9Hu0aNS/S8FaMa1vruGxVcXKMb+TS96vQByPKHEArqjDAuEtBXg6xdwx/M8U90z6xu MPVC4er270vfzzsQZ8Qjzf/m2S9idBAceXSeUTJrMNnfq87VL0/guAlHEH5VNsUFrOap qBFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si4955810pff.162.2019.03.07.13.49.17; Thu, 07 Mar 2019 13:49:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbfCGVs4 (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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;