From patchwork Tue Jan 10 20:56:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 41653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2969359wrt; Tue, 10 Jan 2023 13:07:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXvfKcOi3L/C+ObrzRm0E/z80GIAX3B4U2AJ2L5nnE1m8hIdW7rGY6iUamj4rFeNnr0W3ZBS X-Received: by 2002:a05:6402:3786:b0:496:873:bb43 with SMTP id et6-20020a056402378600b004960873bb43mr15971408edb.16.1673384831140; Tue, 10 Jan 2023 13:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673384831; cv=none; d=google.com; s=arc-20160816; b=uU3Ukv5ifJIp6JBkVuEsHJrDSeIEBCfYX4kK0tHKWoEJG5bjhbfmDiuLNfOpapEhsa dlTPSUv0/rH7DEB9ZqzUZrJjcPsTQyQt6Cu6eLjmrFOHsJu8awvywicTKvTObo1rWFvv he8SoEQy0VUmje6mY1gSsYOUvAWL2cPYczWvnsi+wVALe92U2JSqV8EgpzSpvko5YUnr d3Dny9/yRWDO0fdJ7LHu7cddgRQ7KNljFvObQiIqjk4C1gibe0FMn58udIQ0jvI90wIW 0e1x8GTYkps0BOG0c2WG0ugynJ2RRPvwd8JaCfls7bIE/9cj988zNWoUyd0kFHqporL0 mHLg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a056402280a00b00443088b40b7si16773858ede.123.2023.01.10.13.06.47; Tue, 10 Jan 2023 13:07:11 -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 + 99 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 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?1754671172607436736?= X-GMAIL-MSGID: =?utf-8?q?1754671172607436736?= 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)