Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp275545pxy; Thu, 22 Apr 2021 01:42:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsM9XIH8SUdrSbbJQ/PiAz8s6Zp/SyQL9rFY1ISpcS0es1aRT29RlpIV7e7ZUUW2gRWlBa X-Received: by 2002:a17:90a:6b84:: with SMTP id w4mr2788377pjj.134.1619080933392; Thu, 22 Apr 2021 01:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619080933; cv=none; d=google.com; s=arc-20160816; b=TDNLChpFOOdahlFSZDRdG4/sBiiPnE1Zusu31ljIp0B5M427IuyuWAlZwJnSC+O0Jo OBotqiYq6fZgmM0GKgCW/I3fkIYB3q8W1MCaNEByndBw4D58zGY0qaR2qHPGHbJXl8pu fBEDsaqCrFjOeCW8WsSrIEt06EcWWxu+Xk74zIZC/0o3e906pB6lWLsNgJqwlJGYA92/ 5v3xX3RuBYeys60Hintokn+m7kq1gqCug2tP3HTKJ6aRcIHBTbYg1ypCxAXOaN2BQVTo Z6ZhCkvPpytH2W3TutVBqOdO0j+yK6PLPbTCxfyAo5+2VxlWccVm2t/7lqIylY8gKgjv fU1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/Vg5JFVczkHG5FFqDWdUkI0nnEBjZWrk0QkMe0O3pJ8=; b=X28bSpBCHem9FHJRBkW9VmCfOPZ6YUaVUIck/7Ymlj4STAqzWJN4rRN93MMFvBTFrW HqvFyqmiFv6728H26hn05lte292bMfqTKSylDwOLSxQtfizbMftQi4tVzAAESsGryE2K haizWLnibIgEr4rvtp3ATBLtkKzbtilr7iVtVoh8zypGk0G4NsUwRU416PpCBIpXKXzU DbdCNYflIH3mIGo7NjJzGDl1kyYGzd+NlG29w9dErrx5vdLLfD8vzXGuPvzvyfB+74rD ukmYWmz7m1GU/Ua0jnzBwAnxfeAB6+uvgWSk/w2+bOlpmWYb0mBlUe5kHIK7Zh/VyUHm mGTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kpRtIyWz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si2412636pfu.111.2021.04.22.01.42.01; Thu, 22 Apr 2021 01:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kpRtIyWz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235370AbhDVIlp (ORCPT + 99 others); Thu, 22 Apr 2021 04:41:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:59406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbhDVIlp (ORCPT ); Thu, 22 Apr 2021 04:41:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05FD06144A; Thu, 22 Apr 2021 08:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619080871; bh=2yGywPrUo03vY3xZ2R6XXxLg61x7f9ucCEmvSGTQvq0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kpRtIyWz2n6iB1jjXRjLpP1DajsQ3Lz8VfrJBWbhqOoMRB9llhX4IlZGOleZV+649 hUUr6WxQ0Xe1jIYobqaK3SfDtPy6Di5vWq0/XhDlLon9Y+JOXaNvQafLI4BAXZaubA 3XuUN8sP5rtLTXjLoWzEIHtQa8VYCTxp1PEBuBcg= Date: Thu, 22 Apr 2021 10:41:07 +0200 From: Greg KH To: Saurav Girepunje Cc: fabioaiuto83@gmail.com, john.oldman@polehill.co.uk, ross.schm.dev@gmail.com, marcocesati@gmail.com, insafonov@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] staging: rtl8723bs: os_dep: remove unneeded variable ret Message-ID: References: <20210418164813.GA57451@user> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210418164813.GA57451@user> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 18, 2021 at 10:18:13PM +0530, Saurav Girepunje wrote: > Fix the following coccicheck warning: > > drivers/staging/rtl8723bs/os_dep/os_intfs.c:1156:5-8: > Unneeded variable: "ret". Return "0" on line 1199 > > Signed-off-by: Saurav Girepunje > --- > drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c > index 1f34cb2e367c..920ec25c9a4f 100644 > --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c > +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c > @@ -1153,7 +1153,6 @@ int rtw_suspend_common(struct adapter *padapter) > struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(psdpriv); > struct mlme_priv *pmlmepriv = &padapter->mlmepriv; > > - int ret = 0; > unsigned long start_time = jiffies; > > DBG_871X_LEVEL(_drv_always_, " suspend start\n"); > @@ -1196,7 +1195,7 @@ int rtw_suspend_common(struct adapter *padapter) > > exit: > > - return ret; > + return 0; > } > > static int rtw_resume_process_normal(struct adapter *padapter) > -- > 2.25.1 > > If this function can only ever return 0, why is it returning anything at all? Please fix it up to not do that. thanks, greg k-h