From patchwork Mon Jan 9 21:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 41161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2391933wrt; Mon, 9 Jan 2023 13:34:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXvujHZGdBb4oMYDeNjCbXQUV38u8aKZHWnU+9peSMn4CdCxgow1O0EYjsaKbmev6LrdWBtw X-Received: by 2002:aa7:d51a:0:b0:479:6c4f:40df with SMTP id y26-20020aa7d51a000000b004796c4f40dfmr59113536edq.18.1673300065168; Mon, 09 Jan 2023 13:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673300065; cv=none; d=google.com; s=arc-20160816; b=bHjDei517CqZpSL9bzupxyBbvTFjTBHi/N9ryl7mHGXvWOpDgW34DayaaSSMvw0hwp RGuiojwbUZDCfakx4NlV1h+g1ZX3RARCSryJnUzp3gNLFI1vg585iHO1CSVrPFgNaRFd wWThk2wd+NfTaD2HfNAO+0mqwhSfaX+MAitH4HGmdxsTQn5Ufx7qScjLGfM2MoPF3n3Z 22uE7Gp/rHMYb/yEgd3ImunaX2vNz0jm11EneGV7C8OAyNVSmMesKlwQ4m07GqxHQKqa KAYjWdWrsgktPu8xXXREiJyG6aV3NGEvyxV4rU6SzjXd79SCpHji0DNqNnmoadtVqMEk Wktg== 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=6oOP7ilBexgfwk3Jyb0OkYMvM8WjBu93eowsRHI+rxc=; b=zhpU79zQ5OcZLYUO63xe62f4EqSoUich48AjGyXlV4CuFmW7imv3jGSRoJSChr1pHl GLH/BrXbSF7W+7Qz6m/1scp5Y6/nvY2l0nK6WSMmyNfhcNyDKHa0c6w4jBootf1z2yAm Ux/tnwOBz3tnVSzsyZJi1fXyZ5OV0XR2NnMz9DNHzJVoWUTLuwCdpVVArwurdMaGvL5d f2FHlnH9YsxGQEZvo6DeOjUzdIkfKIyhdlj1Q6jzrUn7uwHfFGOqGZ1iCqHBNHq8Un3A v9BU8qVDbXi0Rksa4FTp+PCIw7mXFPKO+C4kuE0tMka7oOOlxj29y3eC6UahIZr3D4+a Lh+w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y90-20020a50bb63000000b00482b7282bdfsi8472666ede.89.2023.01.09.13.34.01; Mon, 09 Jan 2023 13:34:25 -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 S237726AbjAIVaN (ORCPT + 99 others); Mon, 9 Jan 2023 16:30:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237985AbjAIV3T (ORCPT ); Mon, 9 Jan 2023 16:29:19 -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 3D8ECDF3A for ; Mon, 9 Jan 2023 13:29:12 -0800 (PST) Received: from dslb-188-096-147-178.188.096.pools.vodafone-ip.de ([188.96.147.178] 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 1pEzhb-0007iD-SY; Mon, 09 Jan 2023 22:29:07 +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 v2 05/12] staging: r8188eu: replace switch with if Date: Mon, 9 Jan 2023 22:28:45 +0100 Message-Id: <20230109212852.75612-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230109212852.75612-1-martin@kaiser.cx> References: <20230108185738.597105-1-martin@kaiser.cx> <20230109212852.75612-1-martin@kaiser.cx> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754482248796762661?= X-GMAIL-MSGID: =?utf-8?q?1754582289243196667?= The switch statement in usb_write_port_complete has only one single case. Replace it with an if statement. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 6fe5a4230291..257bcf496012 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -41,13 +41,8 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) struct adapter *padapter = pxmitbuf->padapter; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - switch (pxmitbuf->flags) { - case HIGH_QUEUE_INX: + if (pxmitbuf->flags == HIGH_QUEUE_INX) rtw_chk_hi_queue_cmd(padapter); - break; - default: - break; - } if (padapter->bSurpriseRemoved || padapter->bDriverStopped || padapter->bWritePortCancel)