Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4771541pxy; Tue, 27 Apr 2021 12:12:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJKep2MO/ibn+cIz1FgTw8yrPzuc8z0rSioicnvGUSXykhT+VfjDhWAyulY6hdfpWebuYO X-Received: by 2002:a17:90b:374e:: with SMTP id ne14mr458014pjb.28.1619550779721; Tue, 27 Apr 2021 12:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619550779; cv=none; d=google.com; s=arc-20160816; b=X+RDlQgra1gpI4MyezyCO7lxb8jBGc1FIeyUAFC5q1a82TF50AorZr4Hxsw/1Nu7K1 vB9LHgzUlznFD6O2MdQimN5Q7fmMUNWOBFecGexAEDTMHCYFTYfv/pWWaGlcUxOehyef cIR/aUIlJWFoO58EWiwY221sQe4vBzKnj5USIUylp5DLrkl4gZf7sSadv4jpR6i6Ipr4 UR8VmKL6J+pOzE9NSDzcmJoz3jecT6bC074BMnKdhEOQ27NNzT9wliljFPXNLJaQKFE+ 1Cr4eOcgXatAUAnG1TShVOgaQrY0XXhZR7YxldVOJMv1+jDcgbVp+qdB1wWplH/c1pb/ 8xkw== 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=+SROfjuDf0LvnCgRM16+n6964r7e8cgU3/0ENTxesNQ=; b=QlNbJ/xCM6VtIvOeh6mhuxIRG64m5tPjfRstsbU3D4/81ga59+j35XdzJGNE0uGMKq pBeMA7sEpD8x2FzWKCFAoyaZCyannXDoc0pNIGSYSmU53Dxd/vFtc+YkmVEOrbzKVyCN 7z5BIG0sSeFX3tge9u5yPA4ZLsGHgZkgp7N99iKRnr+Ti5XUV66XbId7zjosrEgaTaWE D+tk9xg1gKo5/rnzLIeemPWKuZHg3ekWUA1oGflIwHhJRJd51oqmXhLQWqHLtN50beE0 E7sPsbvwNemAFig4E6EpezmKxmNyMlQ00DoxX7K6ljUfxs8rLINpOsVTMy94gySbMCz9 hLPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lTEqBuj+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si751350pgt.408.2021.04.27.12.12.46; Tue, 27 Apr 2021 12:12:59 -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=@gmail.com header.s=20161025 header.b=lTEqBuj+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235974AbhD0TMu (ORCPT + 99 others); Tue, 27 Apr 2021 15:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbhD0TMs (ORCPT ); Tue, 27 Apr 2021 15:12:48 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 581AEC061574 for ; Tue, 27 Apr 2021 12:12:05 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id p17so5527445plf.12 for ; Tue, 27 Apr 2021 12:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+SROfjuDf0LvnCgRM16+n6964r7e8cgU3/0ENTxesNQ=; b=lTEqBuj+nVbGPVu8/uF08bM5OB0fBAGKcFrX5ZyGjgnBpDwkl7BzvdT+RwRhGZzPfe RxU3qoJcWVbz4h1nM0Rnwqk3VOxuy1/DbkqCzudiATVfPiUxk6AdKXC23gW1aXwBT//D TGnQsjInr0CNB9kWpQs9CwVmyJniMH7SZpDa8lUKBJAgpSmt3+BVL/3ZMJh3eYrg+V2y AiggLKzxpiBb0GqiCzHcypwtg4GncxIppvkn1R3WFEHbdk6WxBJtKgyKFinuK73K67eE QS8jYYmG/+rhTqeKkuKF2EIqAjwHyd4IMOxAJ05kp+BzEJZbRX+RubssHw4bpVq3azjS eTog== 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+SROfjuDf0LvnCgRM16+n6964r7e8cgU3/0ENTxesNQ=; b=ghq0baglmIo+LIKGoFN6XctARIhi6Mf6hQSiTq6lEvsG3E0NMpszUBOLWQSF0aqSU9 BxYMhMzIjkTvhgPHky6kUt1zmMOcP4wODvrJSCdz/GrLh7+h5r6uvPXQEJGxGSr4ag0n KyBw0TQ3B9tQOQgS6A+Um9KT77/pYw0ZNBOWUrl/EDZq8c0mDxmwEgZfaH+TnGW6/dEX Q+YBSQmSGmbgQoEQuqiXMs8LvHan3waJVjKLlJ/+awnzOqo+dUuWzXDdoJ+uXuuc+Z2P /KzeJ+iDBGku/w12fqDiK/2QfdMffPtccLCeY/D6IDl/DihDFJG2/4poLZEmmZXJWPlt d2rw== X-Gm-Message-State: AOAM533+ZgVUlVxCZbIAdf3jQEuTPkeAAOTPBOET1bkE8MAMVjMLgX1G iv8pWfIp89mlP695dqxS5G2zRPFh9fnuNg== X-Received: by 2002:a17:903:2288:b029:eb:6ca4:6493 with SMTP id b8-20020a1709032288b02900eb6ca46493mr26053305plh.85.1619550724769; Tue, 27 Apr 2021 12:12:04 -0700 (PDT) Received: from user ([2001:4490:4409:fe15:9fd0:fa2c:4efc:28b5]) by smtp.gmail.com with ESMTPSA id d1sm2790990pjs.12.2021.04.27.12.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 12:12:04 -0700 (PDT) Date: Wed, 28 Apr 2021 00:41:56 +0530 From: SAURAV GIREPUNJE To: Greg KH 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: <20210427191156.GA11046@user> References: <20210418164813.GA57451@user> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 10:41:07AM +0200, Greg KH wrote: > 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 Yes,this function always return 0. Function return type could be change to void. I will send another patch.