From patchwork Wed Jul 8 14:15:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 6747771 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54BD2C05AC for ; Wed, 8 Jul 2015 14:23:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C638205B1 for ; Wed, 8 Jul 2015 14:23:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C6E7203C4 for ; Wed, 8 Jul 2015 14:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758298AbbGHOXV (ORCPT ); Wed, 8 Jul 2015 10:23:21 -0400 Received: from www.osadl.org ([62.245.132.105]:53019 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758270AbbGHOXS (ORCPT ); Wed, 8 Jul 2015 10:23:18 -0400 Received: from debian.hofr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t68EN3DT016190; Wed, 8 Jul 2015 16:23:04 +0200 From: Nicholas Mc Guire To: Amitkumar Karwar Cc: Avinash Patil , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] mwifiex: drop condition with no effect Date: Wed, 8 Jul 2015 16:15:02 +0200 Message-Id: <1436364902-28943-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP scanning for trivial bug-patters with coccinelle spatches returned: ./drivers/net/wireless/mwifiex/sta_cmdresp.c:895 WARNING: condition with no effect (if branch == else) originally added in 'commit d8d2f19feb16 ("mwifiex: silence TDLS link delete failure for nonexistent link")' with dev_dbg/dev_err (though with the same message) to differentiate severity and then in 'commit acebe8c10a6e ("mwifiex: change dbg print func to mwifiex_dbg")' all dev_dbg,dev_warn and dev_err got converted to mwifiex_dbg which should thus probably drop this if/else as well. Signed-off-by: Nicholas Mc Guire --- If dropping the if/else is not the right thing to do then commit acebe8c10a6e "mwifiex: change dbg print func to mwifiex_dbg" probably needs a review as well. Patch was compile tested with x86_64_defconfig + CONFIG_MWIFIEX=m Patch is against 4.2-rc1 (localversion-next is -next-20150708) drivers/net/wireless/mwifiex/sta_cmdresp.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c index b645884..e58f900 100644 --- a/drivers/net/wireless/mwifiex/sta_cmdresp.c +++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c @@ -892,14 +892,9 @@ static int mwifiex_ret_tdls_oper(struct mwifiex_private *priv, switch (action) { case ACT_TDLS_DELETE: if (reason) { - if (!node || reason == TDLS_ERR_LINK_NONEXISTENT) - mwifiex_dbg(priv->adapter, ERROR, - "TDLS link delete for %pM failed: reason %d\n", - cmd_tdls_oper->peer_mac, reason); - else - mwifiex_dbg(priv->adapter, ERROR, - "TDLS link delete for %pM failed: reason %d\n", - cmd_tdls_oper->peer_mac, reason); + mwifiex_dbg(priv->adapter, ERROR, + "TDLS link delete for %pM failed: reason %d\n", + cmd_tdls_oper->peer_mac, reason); } else { mwifiex_dbg(priv->adapter, MSG, "TDLS link delete for %pM successful\n",