From patchwork Sun Oct 4 07:09:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 7323191 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F24E9F32B for ; Sun, 4 Oct 2015 07:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E52220592 for ; Sun, 4 Oct 2015 07:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A92D02055C for ; Sun, 4 Oct 2015 07:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751265AbbJDHJu (ORCPT ); Sun, 4 Oct 2015 03:09:50 -0400 Received: from m50-132.163.com ([123.125.50.132]:51078 "EHLO m50-132.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbbJDHJt (ORCPT ); Sun, 4 Oct 2015 03:09:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=ebfuJjn+4DkPRcTLYg 9riUIQg7DRADhilRsotGtXyYg=; b=EwasfIZHbTzkghBziFelwApHVfsUUV7SeB ImoPPZDo+22u0i4xkRypnSv3rT0dG2xgyudcApgG6bE0LBD/zRblRZCB7I5rdyev v1xyztFhtBAtRWP7vRpVngapJkI1K6nxkAZKOYDhr5gVN/JF16TvmOGZFA8kJEYx /kSJZKLxo= Received: from localhost (unknown [116.77.141.25]) by smtp2 (Coremail) with SMTP id DNGowEC56EO00BBWelE_BA--.37279S3; Sun, 04 Oct 2015 15:09:40 +0800 (CST) From: Geliang Tang To: Kalle Valo Cc: Geliang Tang , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cfg80211: drop unlikely behind WARN_ON() Date: Sun, 4 Oct 2015 15:09:27 +0800 Message-Id: <88184946efc981b4cba84cf21418954423ca11a4.1443942486.git.geliangtang@163.com> X-Mailer: git-send-email 2.5.0 X-CM-TRANSID: DNGowEC56EO00BBWelE_BA--.37279S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7JrWxZr1kuF13Xr1kGr43GFg_yoWDZrc_GF WS93y8JF4Durn5CFW8Cw42qry0k3W8WFZ7WwnaqFWSyw1IyrW8A3s5Z347Ar4ku34IyFsI 9FsFgr1jq390yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbnYwUUUUUU== X-Originating-IP: [116.77.141.25] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiJRWJmVUL7SV7mgAAsX Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP WARN_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index a511ef3..fe38fc4 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2217,7 +2217,7 @@ static int ath6kl_wow_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow) /* enter / leave wow suspend on first vif always */ first_vif = ath6kl_vif_first(ar); - if (WARN_ON(unlikely(!first_vif)) || + if (WARN_ON(!first_vif) || !ath6kl_cfg80211_ready(first_vif)) return -EIO; @@ -2297,7 +2297,7 @@ static int ath6kl_wow_resume(struct ath6kl *ar) int ret; vif = ath6kl_vif_first(ar); - if (WARN_ON(unlikely(!vif)) || + if (WARN_ON(!vif) || !ath6kl_cfg80211_ready(vif)) return -EIO;