Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp803323yba; Wed, 15 May 2019 10:11:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz4eZgmCiM7NNWVa3yuLEnn6jb2gdTthIGfgQXq5/3phWFRsiQnCvpi6GnbTkKPFgI9udX X-Received: by 2002:a62:582:: with SMTP id 124mr48562273pff.209.1557940299490; Wed, 15 May 2019 10:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557940299; cv=none; d=google.com; s=arc-20160816; b=BP+wz6SO8O6gETiZRT2e+xR4WAE1v2D2f5Jd5hLbDdfGXnpTo6Gu5lwlsveY2fD2/c HqGWxvlxB0rQDg+fJ55bg593OIm/wf1UtlDmPcIzAqfMgGh0S/I/gTf/XZo4/CuhBezh wgtpHGhhrUEn5TuLFWuPLb8m+hVmBKd9GUDJbNWeNGsRtEIpIkIyAHTiGGoN1LnLi3gN J8c80X50Nzm+hY2jOwTP19eL8pDOv94vfZHrU94X0ShfIuM0gjZGVSx4ENbTVUBoPxu3 GrbCj/SmeATeMR3v4teBupqUAAhJE+Mr8Kt4ZgdMdC5Yy6T9ddNtpPpHN9N5Ggpt0gOv aFaw== 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=23X9deLcPS7M5i4nGyMMmygstk5SEYNCAX+o3AHyfeo=; b=E1NCSx5inL09T2ytsrOMVzqqhIwu35Ww0rSegZCEJ+AN1jMHuCxNvF7Da3SFNXyNlq 0Y/2LxRUWfBjqOXR3Josr51/R8p4QGRFtmz45a8hh7B+AYmo9FOktR5ANKexKZWu5vu4 vqaD7Bfmnkzulxujcp9KpBgv8T+Tb+W7x/MT+dWD7hz/CIPRC0SOdAQs/zcm0+Xf4Pat 6tPPvPG/0/yWSnoHWCRGZLMx5WWXmeN027KXKy6scAO+eApA2E7QnRCsU1bHOOI/TA7a dKZ2/t0L9ushw2pGYStJvMl46ueJywh8jifoGCr15g+3dRQPyXy3aJP4rrobN6z0f37B /dpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fQHkwImB; 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 m2si2353506pgg.420.2019.05.15.10.11.23; Wed, 15 May 2019 10:11:39 -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=fQHkwImB; 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 S1727181AbfEORIx (ORCPT + 99 others); Wed, 15 May 2019 13:08:53 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43877 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbfEORIx (ORCPT ); Wed, 15 May 2019 13:08:53 -0400 Received: by mail-pf1-f194.google.com with SMTP id c6so277317pfa.10 for ; Wed, 15 May 2019 10:08:52 -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=23X9deLcPS7M5i4nGyMMmygstk5SEYNCAX+o3AHyfeo=; b=fQHkwImB8r0QyXlb9e5+h5oXBt5trSiYfkbVVbzlKuBB8URoYIrdk/yKGOurdOlV30 WkTkhKT0kuQ1GqPmF3oHJqhvKpzyLwZA9y8aVmfoYiHE2s73HSvblddBcoGoBNREOfsH P7BNaxeYuIpqHuKWQ3MmfPQZQun2ob/2Gb2ANMHlkL8lIPI0X1Bh/uVurNBdJcBgvB2p vhV2/zq0h+FKEHLWvkllwmR7L/RhBi/oCrI02pdDjf9bU0Vt5Ak7vGIissSbfcxuJKue 7Kq/tGsRGBTIjrBpuGfpGUtlcR8qfJ4iKFDPsJdcue5xVpkX8534WJ1mtki15x6muNVd F5yg== 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=23X9deLcPS7M5i4nGyMMmygstk5SEYNCAX+o3AHyfeo=; b=lvNLbU959KL5Z0ss0QsTgCfLFTu+XOFYC8FuEwxhiZBQJrzDI9SOz+oUODqytkofgr ViNuf+YoE38/sHi/n2+0+2WNIaZhuqPODCUyhySgkv0p4eQ+VFbnKOOpnWghMDJ1hbF5 LZZOn9x6RpH0ur2fWdMFSuJ30qlP1PyD1sQ6p8d7UeyIDMJyWLqNs7+0sfcZwOwakcDS vBX3ESprghd2k+Nn5X7kd+Io3h5aKQdokR/X01EZbX3fgbMRQqFW/CKrzMzlJtJNnku2 24aQwpsUKULb8fZcWiaKtoaitRDU+9xpSPaJNCiq536NBI9Tc1d+1Ad9i/NFSn/ZXMBG 2N5w== X-Gm-Message-State: APjAAAXaTEJBc+ME+YJ2Agc4/zJp8ix6tlbeBI7twzhiO4QAqSwA38l+ gqqPon9R5k7SQu0BD7Vz1h8= X-Received: by 2002:a62:cdc6:: with SMTP id o189mr22255368pfg.74.1557940132528; Wed, 15 May 2019 10:08:52 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id b77sm5398936pfj.99.2019.05.15.10.08.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 10:08:51 -0700 (PDT) Date: Wed, 15 May 2019 22:38:46 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hardik Singh Rathore , Hariprasad Kelam , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: core: rtw_recv: fix warning Unneeded variable ret Message-ID: <20190515170846.GA3817@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 warning reported by coccicheck drivers/staging/rtl8723bs/core/rtw_recv.c:1903:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1972 drivers/staging/rtl8723bs/core/rtw_recv.c:1618:6-9: Unneeded variable: "ret". Return "_SUCCESS" on line 1705 Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_recv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index b543e97..b9f758e 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -1615,7 +1615,6 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) u8 *psnap_type; struct ieee80211_snap_hdr *psnap; __be16 be_tmp; - sint ret = _SUCCESS; struct adapter *adapter = precvframe->u.hdr.adapter; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; u8 *ptr = get_recvframe_data(precvframe) ; /* point to frame_ctrl field */ @@ -1702,7 +1701,7 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) memcpy(ptr+12, &be_tmp, 2); } - return ret; + return _SUCCESS; } /* perform defrag */ @@ -1900,7 +1899,6 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe) _pkt *sub_pkt, *subframes[MAX_SUBFRAME_COUNT]; struct recv_priv *precvpriv = &padapter->recvpriv; struct __queue *pfree_recv_queue = &(precvpriv->free_recv_queue); - int ret = _SUCCESS; nr_subframes = 0; @@ -1969,7 +1967,7 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe) prframe->u.hdr.len = 0; rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */ - return ret; + return _SUCCESS; } int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num); -- 2.7.4