From patchwork Mon Oct 24 10:01:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357939wru; Mon, 24 Oct 2022 03:07:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fVZP3hvqtsLC5cisQrCJybVmjtHVEQM+4JAHSD4XHplqlbEfTTLADjnRhqSNrjzrPFHL3 X-Received: by 2002:a05:6a00:1389:b0:566:1549:c5bc with SMTP id t9-20020a056a00138900b005661549c5bcmr33058590pfg.8.1666606045562; Mon, 24 Oct 2022 03:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666606045; cv=none; d=google.com; s=arc-20160816; b=uP9Fo1Wx+sx2CYpAfmqZ/0/GTp8OyoyTprwqHDhR4jiIANSDRyrMyLxNa6nh4JLGZO nPya+jsfmhp8OUKpZ47JSSYTiXH9xRbgVd3qW4bWjF2VjsLUIfk+Smaau8TUjX9x1YZY NzCZeMSG5eKtQyYkdxNuj23mTm/qYAADkQHe3JaIMJEsD8IGkN/IcuKMzj7rk012bERv wP0rj2B1S2cCvhwyJ0GkMSz0bA3yHgr2r7IiBQuJQ0djTOPQhtAl7tve2Cf+zXWflHOx Db4hSJZvp/jmYzCpUrxkq3LU6cKGy9tCQ2Htku8+XzzdhxrYrA9tsts5Gm7EGnZcy5ty uzkQ== 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 :dkim-signature; bh=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=a0qS8qb/qOSgn8VenRI80VbiqtB41J+Upv81+3QoLhUn1Lugjb2DUqV2NuNVZnKOIg Imvq1gnph18pUjLiQAgX4+DlAIQX8GDmoo49j6mDoo+/5pe/itp63/G6e4G0DVPj8afD RUUrBQ3WpqCCAIDB5d4UnbZ751Z/Iadi8H1rMZ+x7ehAbp6nVkfLwhGnxLEKyisf8BUz Mem7IEvgQ5dG9Y1hW2V25KSBqzt/QuYfZE+AqmjpWXmGUEdFPimIXNRRryFQ+NAxHTt6 /avyKah9Xu1TRWskZ+p1AkIwhcJJXzMiT1MC6dzHao0cUvCIlEeDtqezoFGVo1eO2x+g RFUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lBZ3x9mM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a170902f0d400b00186a98b58d8si2509073pla.134.2022.10.24.03.07.13; Mon, 24 Oct 2022 03:07:25 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lBZ3x9mM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbiJXKCz (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbiJXKCd (ORCPT ); Mon, 24 Oct 2022 06:02:33 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB425A80F for ; Mon, 24 Oct 2022 03:02:31 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id u11so67361ljk.6 for ; Mon, 24 Oct 2022 03:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=lBZ3x9mMYxFamh03VdYBGEJO/v4ao06BqlUofFyF+4Wwg1gzMIjXh+YlUfGEkuZh4x qfkahbvj4xrAEe+KRMHgq7QsP/Sts9zPsKrWtYxC0ViAFasVrsURrP06VQ5UrVIJUGJ0 jf8KGKr3JhF/AeF5Yc3K2vFnSXM7glS41HjmHcSlcZyrsBStTRjgLDwzs42rXYYa4foT jcZaK8TX+hmpInd7JEq4YV0M/wZQ3DsE2yzr5J6SDQn98rhDjYFwk2gWfh3zrZTdZ8Ga bOzQVS03J6RlrniiFyUMAnFDK+9Crgx9sHhSx/khJhwY0ANeE2jKYsweJa9Q/Dwyf3YE gc2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=T8D1/LgHw/skab9pOYTzA43uFBQCrM7p3uWk8u21SBNEwCnkOSv0jMqPmyNqhpNbVm 4oja5nr6XQ4dRQA7zEjT/ARWpjT0jqFLEVlgIcfuGyq+DwztzR7g0J/N1VBFK8e1/x0l y5L7lBgqLuiQdAc6X8UVLwMurxfVFyk65bhWRsOg8+3vIMxv6qUJDmaHeT5pWQHwK6xk rUeSmzZ0LBI/ZM8gEatiH6R4qOobLYbrdPRcpdJSufDSEbJY9ISJ68bUw+liQ9XHhNNt tH1+/dQtvwqa0WpwoN960KvvZmSA22zFSclenMa03FF+MnEpmbHxTLgfZ/w5ujoDNpiD v0tg== X-Gm-Message-State: ACrzQf3TZteq5LiZfIeGw50MyRQkwN8iy78h058rZJ0AHjPyFIjwQhX4 cdJgBEGdj+vTFEZPyE/fW3Q= X-Received: by 2002:a2e:9648:0:b0:277:ae8:7512 with SMTP id z8-20020a2e9648000000b002770ae87512mr1606016ljh.244.1666605749957; Mon, 24 Oct 2022 03:02:29 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s9-20020a2eb629000000b0026dfbdfc1ddsm4896832ljn.11.2022.10.24.03.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02:29 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v4 5/6] staging: vt6655: refactor long lines of code in the rest of the file Date: Mon, 24 Oct 2022 10:01:51 +0000 Message-Id: <71c411a68c9c54b20e7fa687f736acac50b33b5e.1666605225.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1747563100791365099?= X-GMAIL-MSGID: =?utf-8?q?1747563100791365099?= fix checkpatch errors by refactoring long lines of code in the rest of the file Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 86 +++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 475526b73e1a..6a4fcb16b674 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1102,44 +1102,59 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, if (byFBOption == AUTO_FB_NONE) { if (bRTS) {/* RTS_need */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g)); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + + cbMICHDR + sizeof(struct vnt_rts_g)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g) + sizeof(struct vnt_tx_datahead_g); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); + pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts)); + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + + sizeof(struct vnt_cts)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - cbMICHDR + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g); + cbMICHDR + sizeof(struct vnt_cts) + + sizeof(struct vnt_tx_datahead_g); } } else { /* Auto Fall Back */ if (bRTS) {/* RTS_need */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts)); - pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g_fb)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g_fb) + sizeof(struct vnt_tx_datahead_g_fb); + cbMICHDR + sizeof(struct vnt_rts_g_fb) + + sizeof(struct vnt_tx_datahead_g_fb); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + + pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts_fb)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - cbMICHDR + sizeof(struct vnt_cts_fb) + sizeof(struct vnt_tx_datahead_g_fb); + cbMICHDR + sizeof(struct vnt_cts_fb) + + sizeof(struct vnt_tx_datahead_g_fb); } } /* Auto Fall Back */ } else {/* 802.11a/b packet */ @@ -1147,19 +1162,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, if (byFBOption == AUTO_FB_NONE) { if (bRTS) { pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS = NULL; pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_ab)); + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + + sizeof(struct vnt_rts_ab)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + - cbMICHDR + sizeof(struct vnt_rts_ab) + sizeof(struct vnt_tx_datahead_ab); + cbMICHDR + sizeof(struct vnt_rts_ab) + + sizeof(struct vnt_tx_datahead_ab); } else { /* RTS_needless, need MICHDR */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS = NULL; pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_tx_datahead_ab); } @@ -1167,19 +1188,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, /* Auto Fall Back */ if (bRTS) { /* RTS_need */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS = NULL; pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_a_fb)); + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + + sizeof(struct vnt_rts_a_fb)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + - cbMICHDR + sizeof(struct vnt_rts_a_fb) + sizeof(struct vnt_tx_datahead_a_fb); + cbMICHDR + sizeof(struct vnt_rts_a_fb) + + sizeof(struct vnt_tx_datahead_a_fb); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS = NULL; pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_tx_datahead_a_fb); } @@ -1195,7 +1222,8 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); /* Fill DataHead */ uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, - 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll); + 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, + is_pspoll); hdr->duration_id = uDuration;