Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1318051ybm; Tue, 21 May 2019 12:03:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYSSqIaR7RiDSIaUJn/B6d+GCLjUqGD5+hflcSruiFbYt6Ik2RsHpp1oDcY588yvc02rai X-Received: by 2002:a62:5306:: with SMTP id h6mr31942704pfb.29.1558465432087; Tue, 21 May 2019 12:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558465432; cv=none; d=google.com; s=arc-20160816; b=Q54WlJvRco5uHgtooftuap0AjIu1zR8GTfmF3RtRnQyI/aEQwdDCQwLYzNO1RuHgDd gLekiA2JFonc1KObuiOio69zyzni5R0c2nD5iG0kje+DOBWJrZjtUWsydSJiAqOBxGgb Up+2SF6aoArAIaaq/YUC5DBS+ZRFwzFYZruj22aI3g3a+b4j+RPoTBB8HvTkoWxIDPyM LK3/AuDfZ5Qg7iJsd4hWLPUnsI3/rDtRhXffavq1vjRtmrUVsjRl1TUET2EEnvEeB5oN 2QegoIwjE/QTlrZ5ayWdW9HVcysngVeFKjQFxUzuhr7bOkEaq1B/Sf6yeV6Du4Mh11Cw iLJg== 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=4MZBxNvGtwJNQOCKRNJ0W32Q6ImcL8iXyB/wI559tJU=; b=HPdkXZFPYNmfFE8/ctcbd0WpryDH8bhvKZyvr4RB8mKLO1aOC27daId04qniIbAKfM SRHSbPsv5PE16++Q/hvdpC5m3Hd1p33vJ5edG0zMrSL3PrV0fvzgxaYgCgWXVATK1X4+ aVjAAfZAikuR8grCP0ViQB3sd8kSE4ThTOCU1Zw0G2LAjFZYrCzA4YxDaAbSI6ohexmg 9LbL2JcZ/n/jZ+Aye0pff+A1XYOb8dJgZRsbirhxabyumwmRqjMokwLUa2ghpuHxd8Ow hPmxqyrqVG+DQ7UYyd9xxcroGcVk6puRMpiuC5v9MvceBA9aQ0WynCrbV6WO7qCeVvnc 4i/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N4K9HkYL; 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 u6si16161109pgp.286.2019.05.21.12.03.11; Tue, 21 May 2019 12:03:52 -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=N4K9HkYL; 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 S1729221AbfEUTAm (ORCPT + 99 others); Tue, 21 May 2019 15:00:42 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33180 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728318AbfEUTAm (ORCPT ); Tue, 21 May 2019 15:00:42 -0400 Received: by mail-pl1-f196.google.com with SMTP id g21so798188plq.0 for ; Tue, 21 May 2019 12:00:41 -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=4MZBxNvGtwJNQOCKRNJ0W32Q6ImcL8iXyB/wI559tJU=; b=N4K9HkYLbKdsXyle6lkIRWYTwlr3UJMJNZmUHyr/t5ozq2C24VjOg70kUPeGVOeI82 hvGLDCyr+0vKoN7kPePARsl74cBjgBquoo7tunT9PVFk+2ff2zIGxhp+tZ1wsIrK5Ern oafZZBSKRi/L4ow9yXcZhRxS+zYhmvoaD4H6xhFT7uOmfilpNj86A9OjNQDTF7tTjk5k 0hMJ+KDSoOUSOJ5zPC+hDuKrILgHT2Y7ul4mVIk1RJAFpMRSwRiIBecn7EXhngB8K5Gl ZF7jVkyVcAwC3KRrlFAM3YHifxUzyUKmGNl0/cN9X8qJD9KZEkXeBkdQOhet8uok/LRl yfaQ== 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=4MZBxNvGtwJNQOCKRNJ0W32Q6ImcL8iXyB/wI559tJU=; b=HvISX3ztDY3XTU/pMCXGhxhCNIwfHMW2IrXGi0N2VeQGVS59L3+sn1ekFm4Cc4r2Js 0SjhF32GWX+0WObLLzPwxlNTtl1sZ9rsd3+dhfc5bY/zuJf3CpMlrw3WOdOgIBi/s/yK wzyBlgrM05cWY0zoD+cdFejqdBQ6vMI7jRVdOYPI4PXL6aXzGKxQqdXTPcqxxTrDEMbY jKRcxXwWtuUjT3VYLtgVWpJcgdK/XauRlT5ddix90R38DGTer4cyUsOhUAxY/V9jpgIv sNVAgfEUSp/pDQ92/ImFWI3B0xfTmgEKWcHCrdwWX3/8B74pPC7JLRBS/1l3sJvDu+V0 Asyw== X-Gm-Message-State: APjAAAXvm+H7SvZ0+JA3NPD8rdo/pAF1n0+fZ6Ndl0bzFHfYDFvKZA16 aDqsK4ltBhk6VbCmSz7HzCE= X-Received: by 2002:a17:902:20e2:: with SMTP id v31mr85167668plg.138.1558465241341; Tue, 21 May 2019 12:00:41 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id 129sm25481818pff.140.2019.05.21.12.00.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 12:00:40 -0700 (PDT) Date: Wed, 22 May 2019 00:30:33 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Anirudh Rayabharam , Kimberly Brown , Nishka Dasgupta , Murray McAllister , Mamta Shukla , Hardik Singh Rathore , Hariprasad Kelam , Larry Finger , Arnd Bergmann , Quytelda Kahja , Omer Efrat , Michael Straube , Emanuel Bennici , Andy Shevchenko , Jia-Ju Bai , Payal Kshirsagar , Wen Yang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [Patch v2] staging: rtl8723bs: core: rtw_ap: fix Unneeded variable: "ret". Return "0 Message-ID: <20190521190032.GA7486@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 Function "rtw_sta_flush" always returns 0 value. So change return type of rtw_sta_flush from int to void. Same thing applies for rtw_hostapd_sta_flush Signed-off-by: Hariprasad Kelam ------ Changes v2 - change return type of rtw_sta_flush ----- drivers/staging/rtl8723bs/core/rtw_ap.c | 7 ++----- drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 ++-- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 7 +++---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index bc02306..19418ea 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -2189,10 +2189,9 @@ u8 ap_free_sta( return beacon_updated; } -int rtw_sta_flush(struct adapter *padapter) +void rtw_sta_flush(struct adapter *padapter) { struct list_head *phead, *plist; - int ret = 0; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -2202,7 +2201,7 @@ int rtw_sta_flush(struct adapter *padapter) DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev)); if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) - return ret; + return ; spin_lock_bh(&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list; @@ -2226,8 +2225,6 @@ int rtw_sta_flush(struct adapter *padapter) issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING); associated_clients_update(padapter, true); - - return ret; } /* called > TSR LEVEL for USB or SDIO Interface*/ diff --git a/drivers/staging/rtl8723bs/include/rtw_ap.h b/drivers/staging/rtl8723bs/include/rtw_ap.h index fd56c9db..d6f3a3a 100644 --- a/drivers/staging/rtl8723bs/include/rtw_ap.h +++ b/drivers/staging/rtl8723bs/include/rtw_ap.h @@ -31,7 +31,7 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta); void sta_info_update(struct adapter *padapter, struct sta_info *psta); void ap_sta_info_defer_update(struct adapter *padapter, struct sta_info *psta); u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16 reason); -int rtw_sta_flush(struct adapter *padapter); +void rtw_sta_flush(struct adapter *padapter); void start_ap_mode(struct adapter *padapter); void stop_ap_mode(struct adapter *padapter); diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index db553f2..ce57e0e 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -2896,9 +2896,9 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev flush_all_cam_entry(padapter); /* clear CAM */ - ret = rtw_sta_flush(padapter); + rtw_sta_flush(padapter); - return ret; + return 0; } diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c index e3d3569..a4d05f2 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c @@ -3754,7 +3754,7 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int } -static int rtw_hostapd_sta_flush(struct net_device *dev) +static void rtw_hostapd_sta_flush(struct net_device *dev) { /* _irqL irqL; */ /* struct list_head *phead, *plist; */ @@ -3766,8 +3766,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev) flush_all_cam_entry(padapter); /* clear CAM */ - return rtw_sta_flush(padapter); - + rtw_sta_flush(padapter); } static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) @@ -4254,7 +4253,7 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) switch (param->cmd) { case RTL871X_HOSTAPD_FLUSH: - ret = rtw_hostapd_sta_flush(dev); + rtw_hostapd_sta_flush(dev); break; -- 2.7.4