Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1201137pxb; Sat, 4 Sep 2021 03:10:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU15E3xLRO8Wxy5Y9bAGRAvStO01NQvMzRasLfXFEgbwumfy+OC5yZGohfNSAVRoorJz1A X-Received: by 2002:aa7:d842:: with SMTP id f2mr3582229eds.57.1630750251603; Sat, 04 Sep 2021 03:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630750251; cv=none; d=google.com; s=arc-20160816; b=rWFzYKEQ6EtQn0gepjn60q4BJFtrMJFo/9kt5/oGF7e7apeyELow12se5c9ZMeJMLc 38stcunmH+E2BMkM0/uCa4BF9PytalRQbpObeRCjaAQtRoYw7DEEJauIqGBESjEkggty 9om367FP8BT0TWl9S+QpietNhADQTRaDb/8UBSJl86JlveXIDjEE0wyI/G411lHYD9mY /RAVxS7RwROh4igdjsQxHHdy18F//eRLAZyRZDzEo4eU005dhWRsPI7xZzkNVnuBQqBT yA2mcv2d42Vjin8ieGihxhtpI63oJkIrMjuJ1wVxf9nAQGpu1iBHFW5+U9wIIp7vgcP/ 5ODg== 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 :dkim-signature; bh=ZtKpVg177OTzh0Ohhb3bXC9GfrsWEgSOsLMzs3dNp0E=; b=i612drVhNvwXVjqen3YBBzRehj1pIbSowKWUh/Qe4mzi2Zsp3DURDdMulgcpoB7Xrj blOafLWbYLg+JyIKwjOHn42f/VmUFkdtUCFII0lToEo+9bSCBpjAAxd+nXltXl74nJlC JbVquHuaYoukOR1bh3RQmlT/ftwUWzetb3nz0C/KMSyI+GFgrPs2KJI536bHNf2b5fIx /iiMFk+8C++ppgZiPQ6apH62YLlsm3K20N3Xr3INHqGYMv7cLzksHJJ6QX2zA9qVQEzo aeOEyk/4srKk9k2mdjzYJ5IpdRIDBbvvX7/S3vICmi2FLg/PQDxSTmYzwSYiekep8VmT 0HMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=EXHCOXiv; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=TmiKGB6Y; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk6si1739371ejb.587.2021.09.04.03.10.28; Sat, 04 Sep 2021 03:10:51 -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=@kroah.com header.s=fm1 header.b=EXHCOXiv; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=TmiKGB6Y; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351050AbhIDKH2 (ORCPT + 99 others); Sat, 4 Sep 2021 06:07:28 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:45431 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351016AbhIDKH0 (ORCPT ); Sat, 4 Sep 2021 06:07:26 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 295335804A3; Sat, 4 Sep 2021 06:06:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 04 Sep 2021 06:06:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=ZtKpVg177OTzh0Ohhb3bXC9Gfrs WEgSOsLMzs3dNp0E=; b=EXHCOXivVlVVx7Yblbq4QwmWeaFjiHDbOufzUXQl360 R+/mxC2PPuRFusDB0CZTA9CAI2DDtTMSBUxmhdi3JbNAn93EIuK41NDAaz0BX+1o MdMvNhrupBmQP37cQNA6RQARDN0N4FIjMGY0gzqLwia6/VFMXm0GrA/0bO5FhrC+ p6FIWa/k/aZFwnf1b7cVIoB4wX26ETkjd/kV+68ftrs+upE69ijV8MSD/tcLQXRw Y+K/Z069k0gw+Mc8+6KiXPE9CxY08jC19iBGXnRwFKaTXqJ8K0yw9oZbSRmWVIXx 5B7wf7ajhx52S6NDpW5njZ8qBsDmWy+tkMe8i0t0VhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ZtKpVg 177OTzh0Ohhb3bXC9GfrsWEgSOsLMzs3dNp0E=; b=TmiKGB6YYLXLuZmfr57NqH 6AmQAw0/LpFf4ughNQ+oSEh8M3fkdJEQW1Z0eiaU9A6gCM7BCoDcdZlgEhCD5VP2 4E+Tp54sWtkR6eK7ja4VHvQ9QmfUsfyKWVfPfl6Mfds/g00FWnsm7a6UltFWcsZf ep+c1u60iUMqwvQF3IVNA4LSbi7Bv2Cp01RPPjNtQwIYohPJfMYycn0Qsr0aaRAZ gdVuRP3vnc0syTBsRDgdAujZ1Yxl0QaOtjExZ3vmjYHd8/iUaxApWhlYhBeuo/ia r93eWdx4u+SfQ8WJDqRva5ETcUptsAzay11CJmk4SPsjRHICmonNKe1PRcl76zUA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvledgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Sep 2021 06:06:22 -0400 (EDT) Date: Sat, 4 Sep 2021 12:06:21 +0200 From: Greg KH To: Saurav Girepunje Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] staging: r8188eu: os_dep: simplifiy the rtw_resume function Message-ID: References: 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 Sat, Sep 04, 2021 at 03:09:13PM +0530, Saurav Girepunje wrote: > Remove unused variable ret and pwrpriv. > Remove the condition with no effect (if == else) in usb_intf.c > file. > > Signed-off-by: Saurav Girepunje > --- > drivers/staging/r8188eu/os_dep/usb_intf.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c > index bb85ab77fd26..673cd3001183 100644 > --- a/drivers/staging/r8188eu/os_dep/usb_intf.c > +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c > @@ -493,14 +493,8 @@ static int rtw_resume(struct usb_interface *pusb_intf) > { > struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf); > struct adapter *padapter = dvobj->if1; > - struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; > - int ret = 0; > > - if (pwrpriv->bInternalAutoSuspend) > - ret = rtw_resume_process(padapter); > - else > - ret = rtw_resume_process(padapter); > - return ret; > + return rtw_resume_process(padapter); > } > > int rtw_resume_process(struct adapter *padapter) Why not just delete the rtw_resume_process() declaration line and make the rtw_resume() function be the whole thing, as rtw_resume_process() is never called anywhere else. That would be even more lines of code removed and simplified here. thanks, greg k-h