Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8429688rwl; Tue, 10 Jan 2023 13:30:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvCSbTUwreJg4zYNRK86RZwtc5uhpD1ww8ggMgDvzEU7T88KJOt1PJ5WjkIVHCIwRGvFfgO X-Received: by 2002:a17:907:a50f:b0:7c0:d609:6f9b with SMTP id vr15-20020a170907a50f00b007c0d6096f9bmr65659084ejc.27.1673386251082; Tue, 10 Jan 2023 13:30:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673386251; cv=none; d=google.com; s=arc-20160816; b=0JkXmI2n4pXImLQhvB1gbZ38tcLuXmDDvM1Gr4zRuR3rIuEuIkSb8cSqKV9/SPUL4s wbhyDTRSSzVNFCziWN6v8Zxp3lgvcNXHOE1f90MAiJ6Mxqae0Hpwaxx6LiGMcoa15Z0C JU0AZzZvdvqA0BB31dVALWCkoARjdoO4lE6Zfz8NpLlXzl2WO7wjF6CBw9l/BzvQBzZ3 9OmuBn8VeH6F23caCje4zOmk8zacJn5nShmoiawyfPCCHQdLCw6cXQQWQPX/jRp0gEkT Pa3XcVLX+5vMGll/qM0rqHIN80PkquABEi7qyiIcAzbQKKvPvN0Lwtq+iRy07E9+heuh C64w== 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=TjI0iW8DzHA9UMgnVzNVDWf38gxcsx5rroch6axpQNI=; b=gSm5t1nyaUxZJRoYrF5at2vPvunFSLc87i5Z40L0geKOmjMdrcET6jfs9iWymhammK oy0SSfW9zmQ17HVc+0Qcr5amWwcfS6ojNY73MjKtEdedy/IaVonjg/ezP92DzpWZyWo2 pe0pJFd3QO8cIIWF9Xrnnx3JtWjC29t/YfDdJc0XuSpWjubNnWVRcXZGc8v15Gse+JoT VVPFQK0wu2fE8uXqX9VQoUjjt+3t6ztkz2SRJheqtfBlD4rJyRUcVbwXLSjCq9dVtyNR oodaGdpsf5i1gFTPQQv/OC1s2jFlfqDOwaa/BGcL60JNTI0cCZLoF/Ow3HGAQmqUteEn sUVw== 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 sh42-20020a1709076eaa00b007820aa60dc3si11870753ejc.74.2023.01.10.13.30.38; Tue, 10 Jan 2023 13:30:51 -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 S234267AbjAJU5E (ORCPT + 53 others); Tue, 10 Jan 2023 15:57:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233426AbjAJU4r (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 B8B275950D for ; Tue, 10 Jan 2023 12:56:46 -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 1pFLfj-0001pw-H5; Tue, 10 Jan 2023 21:56:39 +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 2/4] staging: r8188eu: reformat usb_write_port_complete Date: Tue, 10 Jan 2023 21:56:24 +0100 Message-Id: <20230110205626.183516-3-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 This trivial patch reformats the usb_write_port_complete function. Hopefully, this makes the code a bit easier to read. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 8494b80a08e5..7da13b87d726 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -38,14 +38,13 @@ void rtw_read_port_cancel(struct adapter *padapter) static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) { struct xmit_buf *pxmitbuf = (struct xmit_buf *)purb->context; - struct adapter *padapter = pxmitbuf->padapter; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; + struct adapter *padapter = pxmitbuf->padapter; + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; if (pxmitbuf->flags == HIGH_QUEUE_INX) rtw_chk_hi_queue_cmd(padapter); - if (padapter->bSurpriseRemoved || padapter->bDriverStopped || - padapter->bWritePortCancel) + if (padapter->bSurpriseRemoved || padapter->bDriverStopped || padapter->bWritePortCancel) goto check_completion; switch (purb->status) { @@ -66,13 +65,9 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) check_completion: rtw_sctx_done_err(&pxmitbuf->sctx, - purb->status ? RTW_SCTX_DONE_WRITE_PORT_ERR : - RTW_SCTX_DONE_SUCCESS); - + purb->status ? RTW_SCTX_DONE_WRITE_PORT_ERR : RTW_SCTX_DONE_SUCCESS); rtw_free_xmitbuf(pxmitpriv, pxmitbuf); - tasklet_hi_schedule(&pxmitpriv->xmit_tasklet); - } u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) -- 2.30.2