Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1271363pxb; Sat, 4 Sep 2021 05:16:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1xdnwPz1U5aHlYvKO6G7eA2JjczMrwsa/gZZK5ZcCYAjaU/wqInMHBUug4+dD/8PAPGFl X-Received: by 2002:a92:290f:: with SMTP id l15mr2464581ilg.290.1630757798343; Sat, 04 Sep 2021 05:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630757798; cv=none; d=google.com; s=arc-20160816; b=tTyLO4U0x8EKQw0aeShOIyNwWiV99K5tLa90cKWubKpTmskVwF6XRR3RgBFsTNoGWS m8iDeZJJ+/PfkDy6avFkzmu8Mnei+UoG+PCItXx8uPA0OOkwSiBvAZfq6XnRqqFcakqI k4S8BrLVApLRrPwWvL2MJ1k+6rpUrblYlE9NS0Js6m+oQm7soO3vVVlvMYHjiSViQPYR 4cpizttLqGgPE3uRF+UJy82RGBx5MbfGdVieMqL+FflgSer1sfI6xXZ8+5oMOPwUgdd0 Z7S8mS5EY03WqNrunQtgoPg9IrmQ+o40HKsHWYS5zGMDsyB/FT770/L/6+cy6slGEeR4 6yhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:dkim-signature; bh=OwQCsW8BxcYFS8G8wSIAFz/7up4NJG1Qwl4Oqjte5MU=; b=QvfGaZI+GKIIfFK43w0QbhngFYsRpOSdO3y6V7Qho0fhSvgcyKwYHNYyJncq7GhNta vqt0DFTGfQEHx2xyg9q4fy/Wkvi5p3OsWXI2KR4qpoYtErYcvxBGTbqqV3JiY2r0alMi n65Ev8AeM6bHYGK79sJynU94GetWvtestGl0MCg2YhHzqtKReBj0cPpRJQoMCo10u2L+ ogPeOCzciCyDsK1KDGEIxPMO8OyIAn08Gv6gg6ZHDb9v9OhM0sOczUb9D8tx5iCpulOC H7/yiH7SX1KFb2iRRgnk2Do+VICcBKPgQnJqv3KDjqfwHujc+UBSxeQFJK1v6HsI6Yy2 vEaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cgO9QkLq; 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 i11si1816900ilm.28.2021.09.04.05.16.16; Sat, 04 Sep 2021 05:16:38 -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=20210112 header.b=cgO9QkLq; 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 S234848AbhIDMFh (ORCPT + 99 others); Sat, 4 Sep 2021 08:05:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234198AbhIDMFg (ORCPT ); Sat, 4 Sep 2021 08:05:36 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4332C061575 for ; Sat, 4 Sep 2021 05:04:34 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 8so1716903pga.7 for ; Sat, 04 Sep 2021 05:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OwQCsW8BxcYFS8G8wSIAFz/7up4NJG1Qwl4Oqjte5MU=; b=cgO9QkLqzUhfHxDUk2n45clRCI4alkLbbHjOyTDgBuyyrlbiODxfvWRUAoXFlMdxel 91rwaKN+YvaclvV1HGffe4KSURvBdlIfLRn8xviFYQpj8ElmSCY7Alq8/fTYkvxWpz3e rpDUdlOHO04KlL5HMWOKz1KqgkAt8mqWJcfKeZf3IPlJi508AHTAecW0ESmfRO3FwMzm fS9gGlIDN1WEaBcF3lOn5ojtmkm88C85oHTPmox96Fu0CztRYQFMDtXSz9V4xc0PJRmx MgiMNN2xCdV1KATfrPn+ZpKNG4p7lFXdlyTWtVB/LeH6Ih3f7g2qhrlvBwzRA+c8OwQx HmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OwQCsW8BxcYFS8G8wSIAFz/7up4NJG1Qwl4Oqjte5MU=; b=VnKoBcBj2D9JFsvvNWGZaCDhozIUVIrFA5kuxQZK4AHMj/H1BpKs1p61pafxv3odzU /ENHVBFaQNEnUd3KoANsmjApTEI+paV1L0hGbeWkcJycAtKEAyHRwCTP/hY9J8ZwWjed rBsaKP9JPwz9ZDoKDxD3xhB5GM718rb1wG+i20n/jHnyf4ov+HqyuFnsyR7pqsgwi9ZW 6ajSmdzvi0ZMw+6nIAaGbAaYK3eapPUQdihAgz0PoIMOg5G9jEj/a9PoEyM5y0YRWtip wisRCwjH4TrGjvMwCt4fjGeONtKaDKZaW/uPRV0xYcFRxuIeQItciQthoy7TYkNrRjwo RX2A== X-Gm-Message-State: AOAM530nwXLEK1q36SsiGazI60NnZZNYhP2MyHoiKm8IKrI7X3OWeP3b 99puMjCpedVUl1G/JuUmIjLAmbhw+dUS3XHK X-Received: by 2002:a65:6288:: with SMTP id f8mr3361579pgv.81.1630757073949; Sat, 04 Sep 2021 05:04:33 -0700 (PDT) Received: from [192.168.1.6] ([117.98.200.228]) by smtp.gmail.com with ESMTPSA id p3sm2145073pfw.71.2021.09.04.05.04.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 05:04:33 -0700 (PDT) Cc: saurav.girepunje@hotmail.com, 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 Subject: Re: [PATCH] staging: r8188eu: os_dep: simplifiy the rtw_resume function To: Greg KH References: From: Saurav Girepunje Message-ID: <30ae6751-3b44-7779-4eae-14d0ed7a75c6@gmail.com> Date: Sat, 4 Sep 2021 17:34:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/21 3:36 pm, Greg KH wrote: > 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 > Yes, rtw_resume_process function can be removed . Thanks for review greg. Regards, Saurav Girepunje