Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4071085yba; Sun, 19 May 2019 10:02:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV01MOegDwTydwErPSbpGN4AdlBhaiSYJJrIRln9rcR6rlTHgRfriw1lMRHiL/8BCCJbje X-Received: by 2002:a17:902:9a90:: with SMTP id w16mr15057403plp.113.1558285339583; Sun, 19 May 2019 10:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558285339; cv=none; d=google.com; s=arc-20160816; b=WFQfYmbpxnRDmD0intTp9Wszp2w6CuyqhQ7rdtv4bhjNj5nMok9wZYEE0UM9QJfLzz SROIe5gFvkUt3ZM60lMBd/wwrsqTl4oX7JgfQ77zdXjP8dYBgg7+PIpl1zvL4z8Y8JSx zaVHzYfdAjzDjPJ2I2t/9T5jHhC+7R93sqooswpOn8V1MoD0a7E24p1D03A5C6g8AECS hXkNRNRfMsppXjYsEwKMduesK2FFqxbGhG6bgFl3Fx1g1+6dchtZru6iy1o1w9Zl0GK8 XANW5/DStw5BGCD9qHiHWbUXlWDjmt8GnnRNgm9y5iK2xZHA3KwlrJJXW8tCsG2jyMnx +9Sw== 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=uOHbz+DwgepgwTxMGLbqewLAE0oXzfTmrvtxmoDPPc0=; b=0QEYUjEolwhsfWOmA/4xiKyiaULX36YiJADewvfevvcySpu6phHXo0D9juF1KTP/Xa Mt9e4a1M1c6idSjc6DoYQ2xQlzAuxOq2AlIQupNCOpb4cA5JggoGjgSMZu1TqNaw6JiA L4w5QqfyIcML2W/LEUmRgl+KHinIkVIYPDwvmX10LBpX1JQiAL7pGji1HX2QPSLIzYCZ dpK+rRGawSIf54U/ejNJX3TDSao/v9xXOyOFyViGw1EYDbBJopU2OAHL+ZedPcRR5IvD +UT4ZEMTot1tup8pgJ53d/YZkGlDxwM3yYkpD7HYVjCc2MFawcACtnaLcdKS6CwGvFeV 2fGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nWgXoMfd; 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 204si16966893pfz.86.2019.05.19.10.01.26; Sun, 19 May 2019 10:02: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=nWgXoMfd; 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 S1726165AbfESQ6F (ORCPT + 99 others); Sun, 19 May 2019 12:58:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39852 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfESQ6F (ORCPT ); Sun, 19 May 2019 12:58:05 -0400 Received: by mail-pf1-f195.google.com with SMTP id z26so6036797pfg.6 for ; Sun, 19 May 2019 09:58:04 -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=uOHbz+DwgepgwTxMGLbqewLAE0oXzfTmrvtxmoDPPc0=; b=nWgXoMfdrHftYK6fHFfMSoOKNLOH1lM+ykgVX+u9jyCWR1GGk1yqGG8Cx+dycje2v2 /hUfCupLxLQOYbw/dp+cjSQDHP5bNHKmug3EuniBORbOwGWX51e8Kn2u88DbQZLQINjn nMrLm8+/emUYKMaN/CVozfh+DO7PZoUp8ayAwHJ+9zdWqzqnO18+dL8vWgJxV9TJMW+H g4642uqH2WOCCHUrAPOuxoVAuV2SLneOkZOrxihf2m1ZXhH5dyhibRNyi9aRlcgxqi4N ehhvFWU1lzCmaaoxVTe3QoYDBkN28FKd3BlihkBB5D2kffdZcloMvvs5OZRwAM1S4B73 TVqA== 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=uOHbz+DwgepgwTxMGLbqewLAE0oXzfTmrvtxmoDPPc0=; b=i8A913CsrpkLplJCTfGK4voqwutfdjlIBlnudZfBjqbneaIpQ0PRQkotyCQMunVJBX hemG4fv8JJU6u2Hoz9SSNB/t8K/5xfahrZ9ZljIJdHqclQYWH0o3DoxTazaXmLKI0KdC AFlqvDGBXEZSzVFc1q7D5/RDW3TT5IcKeqs2wZz8CFEMLJuL+akgCUZd0gqlrYVZB7hp CImLXRr64PtgZlD0uYZDF5cNLOcW5lgBQrkREEc2zLOz+Iqxyg32ZykTYHZ8YxmWop4Y d0uK5GTMnmVCvy+n8L9Tbka4l1kU14Q6D3vowZsMUySS4IDYidAnNlHZs4eHWvja2EmZ fP5A== X-Gm-Message-State: APjAAAUqbGYTuaXKmyaSmpcLGNgXguw+V+wrWXjLa1+Mjzwei962lDRD qKnTi2THX5h/69MIwxCzPZoA8Ayz X-Received: by 2002:a63:8449:: with SMTP id k70mr69468888pgd.53.1558285084642; Sun, 19 May 2019 09:58:04 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id b16sm26112273pfd.12.2019.05.19.09.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 09:58:04 -0700 (PDT) Date: Sun, 19 May 2019 22:27:58 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Emanuel Bennici , Jeff Kirsher , Madhumitha Prabakaran , Hans de Goede , Arnd Bergmann , Alexander Duyck , Hariprasad Kelam , Paolo Abeni , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: os_dep: os_intfs: fix warning Unneeded variable: "status". Return "_SUCCESS" Message-ID: <20190519165758.GA6375@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 This patch fixes below warnings reported by coccicheck drivers/staging/rtl8723bs/os_dep/os_intfs.c:228:6-12: Unneeded variable: "status". Return "_SUCCESS" on line 333 drivers/staging/rtl8723bs/os_dep/os_intfs.c:607:4-7: Unneeded variable: "ret". Return "_SUCCESS" on line 669 drivers/staging/rtl8723bs/os_dep/os_intfs.c:713:4-8: Unneeded variable: "ret8". Return "_SUCCESS" on line 743 drivers/staging/rtl8723bs/os_dep/os_intfs.c:1379:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1421 drivers/staging/rtl8723bs/os_dep/os_intfs.c:1429:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1451 drivers/staging/rtl8723bs/os_dep/os_intfs.c:1300:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1368 Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 8a9d838..71dfac5 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -225,7 +225,6 @@ static int netdev_close (struct net_device *pnetdev); static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) { - uint status = _SUCCESS; struct registry_priv *registry_par = &padapter->registrypriv; registry_par->chip_version = (u8)rtw_chip_version; @@ -330,7 +329,7 @@ static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) registry_par->qos_opt_enable = (u8)rtw_qos_opt_enable; registry_par->hiq_filter = (u8)rtw_hiq_filter; - return status; + return _SUCCESS; } static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p) @@ -603,7 +602,6 @@ void rtw_stop_drv_threads (struct adapter *padapter) static u8 rtw_init_default_value(struct adapter *padapter) { - u8 ret = _SUCCESS; struct registry_priv *pregistrypriv = &padapter->registrypriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -665,7 +663,7 @@ static u8 rtw_init_default_value(struct adapter *padapter) padapter->driver_ampdu_spacing = 0xFF; padapter->driver_rx_ampdu_factor = 0xFF; - return ret; + return _SUCCESS; } struct dvobj_priv *devobj_init(void) @@ -709,7 +707,6 @@ void devobj_deinit(struct dvobj_priv *pdvobj) u8 rtw_reset_drv_sw(struct adapter *padapter) { - u8 ret8 = _SUCCESS; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); @@ -739,7 +736,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter) rtw_set_signal_stat_timer(&padapter->recvpriv); - return ret8; + return _SUCCESS; } @@ -1296,7 +1293,6 @@ int rtw_suspend_wow(struct adapter *padapter) struct net_device *pnetdev = padapter->pnetdev; struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct wowlan_ioctl_param poidparam; - int ret = _SUCCESS; DBG_871X("==> " FUNC_ADPT_FMT " entry....\n", FUNC_ADPT_ARG(padapter)); @@ -1364,7 +1360,7 @@ int rtw_suspend_wow(struct adapter *padapter) DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR ### wowlan_mode =%d\n", __func__, pwrpriv->wowlan_mode); } DBG_871X("<== " FUNC_ADPT_FMT " exit....\n", FUNC_ADPT_ARG(padapter)); - return ret; + return _SUCCESS; } #endif /* ifdef CONFIG_WOWLAN */ @@ -1375,7 +1371,6 @@ int rtw_suspend_ap_wow(struct adapter *padapter) struct net_device *pnetdev = padapter->pnetdev; struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct wowlan_ioctl_param poidparam; - int ret = _SUCCESS; DBG_871X("==> " FUNC_ADPT_FMT " entry....\n", FUNC_ADPT_ARG(padapter)); @@ -1417,7 +1412,7 @@ int rtw_suspend_ap_wow(struct adapter *padapter) rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, 0, "AP-WOWLAN"); DBG_871X("<== " FUNC_ADPT_FMT " exit....\n", FUNC_ADPT_ARG(padapter)); - return ret; + return _SUCCESS; } #endif /* ifdef CONFIG_AP_WOWLAN */ @@ -1425,7 +1420,6 @@ int rtw_suspend_ap_wow(struct adapter *padapter) static int rtw_suspend_normal(struct adapter *padapter) { struct net_device *pnetdev = padapter->pnetdev; - int ret = _SUCCESS; DBG_871X("==> " FUNC_ADPT_FMT " entry....\n", FUNC_ADPT_ARG(padapter)); if (pnetdev) { @@ -1447,7 +1441,7 @@ static int rtw_suspend_normal(struct adapter *padapter) padapter->intf_deinit(adapter_to_dvobj(padapter)); DBG_871X("<== " FUNC_ADPT_FMT " exit....\n", FUNC_ADPT_ARG(padapter)); - return ret; + return _SUCCESS; } int rtw_suspend_common(struct adapter *padapter) -- 2.7.4