Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8421098rwl; Tue, 10 Jan 2023 13:22:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXtA6Y0dRK0EJxMiBb4DhKaS+BiieYBU2GxAKoAFf3mnvP8fLfsVPunkt/OSPdRp2q8+ej4H X-Received: by 2002:a05:6402:528e:b0:481:420e:206d with SMTP id en14-20020a056402528e00b00481420e206dmr55803894edb.42.1673385741284; Tue, 10 Jan 2023 13:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673385741; cv=none; d=google.com; s=arc-20160816; b=LTRUvBeWdSfuGCYyqMg9SU8O4qVkrSPS7iE7rhh/p3KrsbV+EKILMGtxk3yfNLmSot BGlWuTFxhUmWDT7PoacleE+5X/ei6Q3BDSePqXCSOO/LLTL0VjGHz8WWTXitv6D4tTIJ HwbBDHYQBcrDfrY2NbE4MvaRzSrJwYIOwUBQmiOhGPZEs/l3Hq96mSR84xedDQJMHcD/ ExgWFO13hAVskQOdkwadLSCdcFyy4E3zNoZWJtM6iPNCQvHPFZ/zwXXCSQ/ktOUman6D H0kg/3MX58D3wZoinyjXzwNJjofJvlsl68/ZNfpiHxg2l35qH3lIxESXdbCDUTkQMgIl IiFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JwWJFYLSd2CQWw/zaAQ5yw40Gca1r5k8HEaEV9iwZO0=; b=CxEBzBwclN7RjS/QcSXoILW/U4zL+K4PhVX4KJ3BL22if6j9kUgeXLBxfRL+uEduG+ znUYo7wJhbCMbosTxjhht5LGyfFtlIuVTsVwEZJSegSStrh5/O8qPqC2i2qgKRZD7DOW +hHloUp8Wc5wv1MlFN1TAAkgDN/6vH2erJGZ81k20mpClXFx19wOn9dZabeLmGfO0zzL xzbB1n5IYKa/xZ4BtXPkTJN34G2+vMgYSNg9ogx/ny8ooWo6ULmE5SFhPTnC4ROB9FGk tCUNWBbflnWyWb63r4ZTAReTJwh+cDMLJlrJZYBpj4wn3i2ygqfwCxOjjVnbqh1gG8mn KVxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx19-20020a05640222b300b00494cb3beb5bsi11992900edb.180.2023.01.10.13.22.07; Tue, 10 Jan 2023 13:22:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbjAJU45 (ORCPT + 53 others); Tue, 10 Jan 2023 15:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232392AbjAJU4r (ORCPT ); Tue, 10 Jan 2023 15:56:47 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD8B5950E for ; Tue, 10 Jan 2023 12:56:47 -0800 (PST) Received: from dslb-178-004-206-224.178.004.pools.vodafone-ip.de ([178.4.206.224] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pFLfl-0001pw-3j; Tue, 10 Jan 2023 21:56:41 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 4/4] staging: r8188eu: always process urb status Date: Tue, 10 Jan 2023 21:56:26 +0100 Message-Id: <20230110205626.183516-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230110205626.183516-1-martin@kaiser.cx> References: <20230110205626.183516-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the if clause in usb_write_port_complete and process the urb status regardless of bSurpriseRemoved, bDriverStopped and bWritePortCancel. The only possible results of urb status processing are updates to bSurpriseRemoved and bDriverStopped. All of the three status variable are set to true only if the whole USB processing has to be stopped (when the driver is unloaded or when the system goes to sleep). It's no problem if one of the "stop everything" variables is already set and the urb status processing sets another one. This patch removes the last goto in usb_write_port_complete. It's also part of the ongoing effort to limit the use of the "stop everything" variables. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 3fd080091340..62106d2f82ad 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -44,9 +44,6 @@ static void usb_write_port_complete(struct urb *purb) if (pxmitbuf->flags == HIGH_QUEUE_INX) rtw_chk_hi_queue_cmd(padapter); - if (padapter->bSurpriseRemoved || padapter->bDriverStopped || padapter->bWritePortCancel) - goto check_completion; - switch (purb->status) { case 0: case -EINPROGRESS: @@ -63,7 +60,6 @@ static void usb_write_port_complete(struct urb *purb) break; } -check_completion: rtw_sctx_done_err(&pxmitbuf->sctx, purb->status ? RTW_SCTX_DONE_WRITE_PORT_ERR : RTW_SCTX_DONE_SUCCESS); rtw_free_xmitbuf(pxmitpriv, pxmitbuf); -- 2.30.2