Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp417332ybm; Wed, 22 May 2019 05:33:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3stxTz0fhgYrepPOD66atEe8IfUTmsUm8FNPQOz0qMSzOJ51BBjdl86tO5z/oSWk5Idy0 X-Received: by 2002:aa7:9577:: with SMTP id x23mr95095595pfq.164.1558528412478; Wed, 22 May 2019 05:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558528412; cv=none; d=google.com; s=arc-20160816; b=BMb/BQJWrgY4ESmb6PdwNCppKK8M+u3bSbQKURI4PxAS1/jVC6Nwu5deopSJEBw33n z/7kIkG6QEgmqdtIeo8G8txYNTWyYQysq/1jVB1hcaQwxJgIF7hKrWEWkg4zhjtWGDaf +LZsm6sZBGtJ9aZPiN7Z1EKezZ+F/Va904q2kz8FjqUBoCy87EvtcoFzdmJvRteoXlxp HbFuaQQkDs0TopYyNRirMXblZIKT3yZp9gMnVt1/pwRH2/IGyLij42zxdM1yoTCweIhC 1awWj46TXd2dEYqM521YlRugLWxW6+Yw+U/DapyYusAJ5ihWaCK+LM0lEP4tWS9Rntjv RGEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rcovFv2rnfBz+CzyAv4f7D66Ej7sj//gQQIfss3h3NM=; b=q4a0GXp5IZPdDXhHyVyASXFc6B4OMYZfFCP1ShuFhwdioEE+zbrfpQxzl57sTpkIpR tL5wJqSy9XFtLHr+vEEqhfKav7wb9rqH8tyPtFKhooAgUDfVlsGzsWVaKHdXavyCvlDS Q5tHcCTLsSdXcCJJrJR7i2IXnKSnZRVVnHGjWiAgHDGlEUfS9t4d5UlMITDWM5Y4G91s 3vX222srwJ9573nLHqFq0cP6CztaZ/2ouEFQD2b8FSIkSGH4MhHjizDVcfM0D5V3S3LG gffytxLXEGUpCp8rhzhijo+12ncJlzpAbWQvg9gRaVoJp+n/tojqM637/ER6ys5Po/oM 1c+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yn8lkUyo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si24908787pga.238.2019.05.22.05.33.16; Wed, 22 May 2019 05:33:32 -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=@kernel.org header.s=default header.b=yn8lkUyo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729071AbfEVMcK (ORCPT + 99 others); Wed, 22 May 2019 08:32:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:34326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbfEVMcK (ORCPT ); Wed, 22 May 2019 08:32:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D26672173C; Wed, 22 May 2019 12:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558528329; bh=qd38iVDFktSHe0ZEFWncQyLWuOgOl9SFrCwsnoUuL9A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yn8lkUyommXoXyfuvI0H1VxrsWa7yrWlXqpiF8Li1aFlFXE4hkdsqMl5sUqUuY2WH Fo/Hb1J+JYAZuAKJBrP1ZLCSHxOPJxuAt3D2m7F3DM9uEF1ohULK+vunO2s/5CcVG4 g1WsEzh4rb3w/75peEXk/zDnQ6z7kQdtQMaV7LPY= Date: Wed, 22 May 2019 14:32:07 +0200 From: Greg Kroah-Hartman To: Hariprasad Kelam Cc: Anirudh Rayabharam , Kimberly Brown , Nishka Dasgupta , Murray McAllister , Mamta Shukla , Hardik Singh Rathore , 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: Re: [Patch v2] staging: rtl8723bs: core: rtw_ap: fix Unneeded variable: "ret". Return "0 Message-ID: <20190522123206.GB24298@kroah.com> References: <20190521190032.GA7486@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190521190032.GA7486@hari-Inspiron-1545> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2019 at 12:30:33AM +0530, Hariprasad Kelam wrote: > 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 ; Odd use of a ' ' character here :(