Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1250133ybi; Fri, 12 Jul 2019 12:16:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBUMalsXYFo0D9ZL6xUbWsPaaKL9CcohxwWJfQtZjw3XodILAJvApuAIa5ks7M2Zw7+S1n X-Received: by 2002:a63:2cc7:: with SMTP id s190mr1309139pgs.236.1562958979767; Fri, 12 Jul 2019 12:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562958979; cv=none; d=google.com; s=arc-20160816; b=oOP0SinOxWnU1iSS1P0sHtKFffB7+oEaju9S4rN2kKLdeH8T53XAC3YZfXlMInLRD3 jhuBQOu5dA2bNt/ELIXdU8ag4EgyL6oNeoab+t5FrbVbNR+yEQHHBQkF6kXpyCBI5mX2 MJ9QdYzWlRBzyM5JhQ1AEKhM5iWe1xlQHoA4N+IVj2NDABT4eA48Klu09sTkqGXGKWbM syv4eOdGLyAd1RMu4XErcyhoUPXQpKntiNOQoQiBUoEE1nPP218l6O4C5zZ/EnI/lT6J i0ksu8qO9lFoZFTVfh+3nholU/YcIWGsrfmKxvZcf7/zRcGa8HSRYni0JEa9HyCePJ+o oWCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=oXYsDtz7/0DubJTDGGvFVnh+Lg24n8uWzauVA7FWOTQ=; b=bpLuZY2pWYgUvvQXxEW9yGTdoZ7Fwn49fwALJKQpSDVg+eqyAS5fZqfwHQOtfzM7cy n1uuw8wwAw+Usz7sE/Thd1UM9wXIrer6bGQqsV5DdTrFKzCk1FIbzmrl4embIzUJJdd0 WpicK26yA1FLhc6LDkDVvM0fkOUZS7P5UyxCtMDFetoWZ4Uzo21V0J7oKNOY+8aUnmmx ogZY75sMv4Cjg+u/QQdvE/yI/c665mlgTKspimvMrOOBFSTH5DmUZojR3vBg/R0VLXBl uzXmjlFCmfrIJI+ezrqQf4IfEaIkiMW29gclTDdIEXBbF6Dqe2kZj/tYLMfLH7FQeR1v 09NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nr7am8Sx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q31si9210544pjc.33.2019.07.12.12.16.03; Fri, 12 Jul 2019 12:16:19 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nr7am8Sx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727459AbfGLTPo (ORCPT + 99 others); Fri, 12 Jul 2019 15:15:44 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40825 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727141AbfGLTPo (ORCPT ); Fri, 12 Jul 2019 15:15:44 -0400 Received: by mail-pf1-f196.google.com with SMTP id p184so4706310pfp.7; Fri, 12 Jul 2019 12:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=oXYsDtz7/0DubJTDGGvFVnh+Lg24n8uWzauVA7FWOTQ=; b=Nr7am8SxXXYpG5t0e+1t+Av/Yh6G80yJqo/ksdWDOvMe3qqHa6cJoGyVzD5kTgSzFK EbacLSDUPdziFExsgVl7789UjRU3jmdIMp+rfJnmcfDPWBrubbVcGbpcumtJYSa3L5gh HkOt41cRAFHWciYXEPDgg5QiW17ByJrq2OFQjWfMNwNz6M75CMQ4nm4u1cKp8DRvDgbf MI7dFcmeLuE3pOARp57eWs93iYXlX+KupflRTesY6DS+yrPMWwMByAVm5sMftSxl89Fv d6z1LVc+EZHjNr9+FHaIt36QV65OzSF298ZySScn3iDUN4bVvaCfH60TeeRzjun8vFMB eJIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=oXYsDtz7/0DubJTDGGvFVnh+Lg24n8uWzauVA7FWOTQ=; b=t6VMgTZPBpYEuceAgG02Ag1H2Ks6hrQEeJa/vmz3aM428CUSlDx4xVN3wgHtHGSeee vGPeJNFBr0uaeWjZVtyUrIp41alkh8wEALaEdKmAvNEZIz3CY/wArR+rjBuu6H+8ImAv k7N5T5ufG5C37oR9WFPa5PK0UQ0WkY8itArmBoC6zK+NBNSm+6GVXGNV66L6bvojGtNv LIGmRhgMw54ZNaeOYkVkotf7zfKDuFf4e8CmoV09y5/YHN3YyFbPNNfaP2KQonRxL3+f JQ9VrgyEX5QpugVs96iPHgUlLs92siqbaVR59EmzS4jt0+0NnhXyxsnHWYGZg74yovyM 3cjA== X-Gm-Message-State: APjAAAU6dGts91Uv07BsyuNrxw0/NipDP64STsAxWGkmbSXafpJOuyiQ oJc1a4OR0hRb4OXV9gCStGg= X-Received: by 2002:a17:90a:23a4:: with SMTP id g33mr14339109pje.115.1562958943763; Fri, 12 Jul 2019 12:15:43 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.86.126]) by smtp.gmail.com with ESMTPSA id l44sm8835523pje.29.2019.07.12.12.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2019 12:15:42 -0700 (PDT) Date: Sat, 13 Jul 2019 00:45:35 +0530 From: Hariprasad Kelam To: Ping-Ke Shih , Kalle Valo , "David S. Miller" , YueHaibing , Hariprasad Kelam , Larry Finger , Nathan Chancellor , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtlwifi: btcoex: fix issue possible condition with no effect (if == else) Message-ID: <20190712191535.GA4215@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below issue reported by coccicheck drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:514:1-3: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index 152242a..191dafd0 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -509,13 +509,7 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist *btcoexist) static s32 halbtc_get_wifi_rssi(struct rtl_priv *rtlpriv) { - int undec_sm_pwdb = 0; - - if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) - undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb; - else /* associated entry pwdb */ - undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb; - return undec_sm_pwdb; + return rtlpriv->dm.undec_sm_pwdb; } static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf) -- 2.7.4