From patchwork Thu Dec 14 15:39:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 10112575 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8124A6019C for ; Thu, 14 Dec 2017 15:39:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 734DC28210 for ; Thu, 14 Dec 2017 15:39:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 682AB2939B; Thu, 14 Dec 2017 15:39:53 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0A3428210 for ; Thu, 14 Dec 2017 15:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753420AbdLNPjt (ORCPT ); Thu, 14 Dec 2017 10:39:49 -0500 Received: from nbd.name ([46.4.11.11]:45514 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbdLNPjU (ORCPT ); Thu, 14 Dec 2017 10:39:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pFG4TPiBX2ePJUmuUJ9dW0ae4kV0vSp1TnRJ9TwYx34=; b=LVSJkS58R8HI7H0URrhyW5czbp bznE543QK5ilKW6M7Q2VZMVRTDoj7PSxIAbCNyeTGgW3EDrCDcyLAJ9gamxbyT6riN8kLEC/vhdjY CLqOoCr237TRawRCzLpleAUrF6dtgNLOcQ50e1RDL95add2MdCgqQKS0qrwE2MWjubWw=; Received: by maeck.local (Postfix, from userid 501) id DC40394D115; Thu, 14 Dec 2017 16:39:18 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org Subject: [PATCH 02/14] mt76: fix returnvar.cocci warnings Date: Thu, 14 Dec 2017 16:39:06 +0100 Message-Id: <20171214153918.43774-3-nbd@nbd.name> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171214153918.43774-1-nbd@nbd.name> References: <20171214153918.43774-1-nbd@nbd.name> 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 From: Fengguang Wu drivers/net/wireless/mediatek/mt76/mt76x2_main.c:86:5-8: Unneeded variable: "ret". Return "0" on line 112 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Fixes: a5f6039c8f9c ("mt76: add driver code for MT76x2e") CC: Felix Fietkau Signed-off-by: Fengguang Wu --- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c index 33469e32567b..88fe5e0de0b9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c @@ -83,7 +83,6 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct mt76x2_dev *dev = hw->priv; struct mt76x2_vif *mvif = (struct mt76x2_vif *) vif->drv_priv; unsigned int idx = 0; - int ret = 0; if (vif->addr[0] & BIT(1)) idx = 1 + (((dev->mt76.macaddr[0] ^ vif->addr[0]) >> 2) & 7); @@ -109,7 +108,7 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mvif->group_wcid.hw_key_idx = -1; mt76x2_txq_init(dev, vif->txq); - return ret; + return 0; } static void