From patchwork Sat Oct 22 07:06:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1086360wrr; Sat, 22 Oct 2022 00:33:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Q1UBbmFWJRUd0Zt9Y7Qv04Jr4VY/OenRudEWMjBgBb0QbD34cLD+98nOI4hFFkjrikCcG X-Received: by 2002:a17:90b:1e0a:b0:212:c44b:fffb with SMTP id pg10-20020a17090b1e0a00b00212c44bfffbmr11212708pjb.113.1666423999923; Sat, 22 Oct 2022 00:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666423999; cv=none; d=google.com; s=arc-20160816; b=guPIJNFx+W1QIOszrBuhlfM6I0MQAidvbRBIwE40k1hBzCwvqkenLKWsYaO6UPGTar c3OVSUorrqgk9Wi0+0NLsXVFeFH6sHTpN7VcpU5/FZFvM5bjf4GcppKu9joOVHe/lY58 dYJ0S5UtsAv4Z41SsboW8f4Vwgs8NCOkBNlgtpR6ZJgQQqC1wLWlwmxJSFHhcqtKfejK uN7kLRXBM6xSUgX2TGYfA1rtKUOs0FHq3HftMyq8DA+bpdSJjk628qU+IqxUQgW7J8mf c2DQXE6x99ssRCQZIlVMq1KfqOmAJgpo0QV6lkubOWv99NVGcRwOxfc2tt0mB+9y0gnd 2u4w== 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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=Mve9H2lClBC3804IuzOO+EWZarDJJo5eUVzSg17v0MqrZ31hQ8oGNbq/xIiki7KSbF CSLANFYLX17pggC2o58fS+SGjG1CXsgtQD9a9OhfDBlj8NjUdTGmtLvWsstvH+YQYV1M fP+U7ailgNcVuU1YHJ3+xhrir3iTQTuXlWbcWrcfhq1tXJqLurVAf6VmsydItnoTzfxa HAkUQyDvBLou7ybBbpKuhPK2odDsLTem4SWUhbYZFacDJYGz8Mdf6OopnOeFnv6zGjc9 2wD22pAKEMHNvWtp7DEGO+PW+HKQlWKfjA0CKTtFbyba6kPHkr0+/a6bd/LQU4aYRESw 6JWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jjxDV72H; 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 x1-20020a654541000000b0045d0fcdefb4si27649025pgr.273.2022.10.22.00.33.07; Sat, 22 Oct 2022 00:33:19 -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=jjxDV72H; 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 S230098AbiJVHGl (ORCPT + 99 others); Sat, 22 Oct 2022 03:06:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiJVHGh (ORCPT ); Sat, 22 Oct 2022 03:06:37 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C242A79E2 for ; Sat, 22 Oct 2022 00:06:35 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id j4so8854965lfk.0 for ; Sat, 22 Oct 2022 00:06:34 -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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=jjxDV72HaiWcEUJCW06k9mJBVN5H6X/Aths+c3EBdFIBlrt3Bf+FfS4Z1/12AfQUZy Ap30xeYUHVL8jHCGmoUNnEDePlLL+FojmVbXpCM3sFtA6pH6j5yIZ0sV9TXI5UkkvvEB 64eVqysV9GN9eTJUEN4HAxEXlga+5dAmITIV3XBbLUP9/QYpXMgvIin0MHjtCOaLoZ3z VUHPFt9MiEy4JufBg9JmqN04ao5/u0K1edtoE7mrBNpqOVPCG0Fdhb6Mbh3TXEAn1vMm +e9dEFlGoU/HYyFiLFQesma90kTI9qf8vOc0UArXfQcJnHWuXxcDYV2wyiCq4jJcyXqy TAGw== 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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=E0Mv+XMUmIm8arP0ZuAGhzHgC9rnUkAGYU5Wue09Jy3uUkYZmn7ifNPOaOjXYRVB1e ca6PlS+4yEqGr7vtPMeiDXYNt1cq0Frbp+Li8mbQsDTHfBsnFo8cBTVvvyseUI26uzKA MVWXV/kJCdJS3nPe+Pn/cW4sas4GNDZY3/u9yMT4WnAetgDYFy29KgrdaveMTQauVHVU mi3LtUJxsLwwOFwsjePUzMV0uxzgX2M0ukMg5h3pafs3A0ZbdGuT5MKkPUs1YU/Ds8Ub ntiSYZ2uPYWy5dPsK1fYJHYSqefoC9CHhVqVPzqiWU+xFvtjno9V2UA/5/TeKWiRgGwF Em2Q== X-Gm-Message-State: ACrzQf2bekUOkH4JrKY+rItSCWfRTfPFJk5/NG2jLOXZVmTZUDikggoM l0CQkUb1KuJPej8QiGsGjP0= X-Received: by 2002:ac2:47e1:0:b0:4a2:40e5:781a with SMTP id b1-20020ac247e1000000b004a240e5781amr7805580lfp.335.1666422393414; Sat, 22 Oct 2022 00:06:33 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:06:33 -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 v3 1/6] staging: vt6655: fix lines ending in a '(' Date: Sat, 22 Oct 2022 07:06:07 +0000 Message-Id: <20221022070612.13009-2-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372212102938490?= X-GMAIL-MSGID: =?utf-8?q?1747372212102938490?= fix serveral checkpatch errors related to lines ending with a '(' by refactoring the code lines Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 149 ++++++++++++++-------------------- 1 file changed, 63 insertions(+), 86 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e5036121665..f9d0b00d7cff 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -141,13 +141,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) */ static unsigned int -s_uGetTxRsvTime( - struct vnt_private *pDevice, - unsigned char byPktType, - unsigned int cbFrameLength, - unsigned short wRate, - bool bNeedAck -) +s_uGetTxRsvTime(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned int cbFrameLength, + unsigned short wRate, + bool bNeedAck) { unsigned int uDataTime, uAckTime; @@ -215,19 +213,16 @@ static __le16 get_rtscts_time(struct vnt_private *priv, /* byFreqType 0: 5GHz, 1:2.4Ghz */ static -unsigned int -s_uGetDataDuration( - struct vnt_private *pDevice, - unsigned char byDurType, - unsigned int cbFrameLength, - unsigned char byPktType, - unsigned short wRate, - bool bNeedAck, - unsigned int uFragIdx, - unsigned int cbLastFragmentSize, - unsigned int uMACfragNum, - unsigned char byFBOption -) +unsigned int s_uGetDataDuration(struct vnt_private *pDevice, + unsigned char byDurType, + unsigned int cbFrameLength, + unsigned char byPktType, + unsigned short wRate, + bool bNeedAck, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, + unsigned char byFBOption) { bool bLastFrag = false; unsigned int uAckTime = 0, uNextPktTime = 0, len; @@ -316,17 +311,13 @@ s_uGetDataDuration( } /* byFreqType: 0=>5GHZ 1=>2.4GHZ */ -static -__le16 -s_uGetRTSCTSDuration( - struct vnt_private *pDevice, - unsigned char byDurType, - unsigned int cbFrameLength, - unsigned char byPktType, - unsigned short wRate, - bool bNeedAck, - unsigned char byFBOption -) +static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, + unsigned char byDurType, + unsigned int cbFrameLength, + unsigned char byPktType, + unsigned short wRate, + bool bNeedAck, + unsigned char byFBOption) { unsigned int uCTSTime = 0, uDurTime = 0; @@ -409,22 +400,18 @@ s_uGetRTSCTSDuration( return cpu_to_le16((u16)uDurTime); } -static -__le16 -s_uFillDataHead( - struct vnt_private *pDevice, - unsigned char byPktType, - void *pTxDataHead, - unsigned int cbFrameLength, - unsigned int uDMAIdx, - bool bNeedAck, - unsigned int uFragIdx, - unsigned int cbLastFragmentSize, - unsigned int uMACfragNum, - unsigned char byFBOption, - unsigned short wCurrentRate, - bool is_pspoll -) +static __le16 s_uFillDataHead(struct vnt_private *pDevice, + unsigned char byPktType, + void *pTxDataHead, + unsigned int cbFrameLength, + unsigned int uDMAIdx, + bool bNeedAck, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, + unsigned char byFBOption, + unsigned short wCurrentRate, + bool is_pspoll) { struct vnt_tx_datahead_ab *buf = pTxDataHead; @@ -555,19 +542,15 @@ s_uFillDataHead( return buf->duration; } -static -void -s_vFillRTSHead( - struct vnt_private *pDevice, - unsigned char byPktType, - void *pvRTS, - unsigned int cbFrameLength, - bool bNeedAck, - bool bDisCRC, - struct ieee80211_hdr *hdr, - unsigned short wCurrentRate, - unsigned char byFBOption -) +static void s_vFillRTSHead(struct vnt_private *pDevice, + unsigned char byPktType, + void *pvRTS, + unsigned int cbFrameLength, + bool bNeedAck, + bool bDisCRC, + struct ieee80211_hdr *hdr, + unsigned short wCurrentRate, + unsigned char byFBOption) { unsigned int uRTSFrameLen = 20; @@ -752,17 +735,15 @@ s_vFillRTSHead( static void -s_vFillCTSHead( - struct vnt_private *pDevice, - unsigned int uDMAIdx, - unsigned char byPktType, - void *pvCTS, - unsigned int cbFrameLength, - bool bNeedAck, - bool bDisCRC, - unsigned short wCurrentRate, - unsigned char byFBOption -) +s_vFillCTSHead(struct vnt_private *pDevice, + unsigned int uDMAIdx, + unsigned char byPktType, + void *pvCTS, + unsigned int cbFrameLength, + bool bNeedAck, + bool bDisCRC, + unsigned short wCurrentRate, + unsigned char byFBOption) { unsigned int uCTSFrameLen = 14; @@ -868,21 +849,17 @@ s_vFillCTSHead( - * unsigned int cbFrameSize, Hdr+Payload+FCS */ -static -void -s_vGenerateTxParameter( - struct vnt_private *pDevice, - unsigned char byPktType, - struct vnt_tx_fifo_head *tx_buffer_head, - void *pvRrvTime, - void *pvRTS, - void *pvCTS, - unsigned int cbFrameSize, - bool bNeedACK, - unsigned int uDMAIdx, - void *psEthHeader, - unsigned short wCurrentRate -) +static void s_vGenerateTxParameter(struct vnt_private *pDevice, + unsigned char byPktType, + struct vnt_tx_fifo_head *tx_buffer_head, + void *pvRrvTime, + void *pvRTS, + void *pvCTS, + unsigned int cbFrameSize, + bool bNeedACK, + unsigned int uDMAIdx, + void *psEthHeader, + unsigned short wCurrentRate) { u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); bool bDisCRC = false; From patchwork Sat Oct 22 07:06:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1086735wrr; Sat, 22 Oct 2022 00:34:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6chXhQ0UVWLEAKjH72LPGT+obMYRCcqzVuhrNVYLWnMlMbc5B0bf+OCwuXbzMJyVYuFYN+ X-Received: by 2002:a17:902:820b:b0:185:b9a:8ac1 with SMTP id x11-20020a170902820b00b001850b9a8ac1mr23258354pln.111.1666424061358; Sat, 22 Oct 2022 00:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424061; cv=none; d=google.com; s=arc-20160816; b=jYG4MEcl2Tq4a2CaNvOvuzhqZe8iYxMQBBZHoiG41fH5L6wo94kE8alkcabhzajnPI jYlUMQbdCbw3DPD0MoJlCOPn5QGSlQItBwv9+/2JfgDoOxEa2Y2D41vaJ2M2rjtmPdJu ZNjRcuyhGEBDAHEJGovtMDxFP7oRORXZYNX8hcjvdCO3qh7sO1Wf+3j6jlB4NuXPd2O4 YJIjF+mmX5nelujA79FP7g0z5X+duzhFEEtGzUA/Rh1+mmWBcErW8YEk0lMejS4kyG7S 3Ib6e2G5++ZzOLVwYhin/itLOtMnMlEgEOezA5vzMmqh0csKSBzQQPQFVcL5sE9MSavF JTcA== 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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=ffgJG9naDs3LrVmLjVIkCSZuls6sPSlmUl/aPBm9vp9ZW69XSJbCs/kdXW2ToUeG+q md7TDZHkIiK4aJ7acAPdm1ebxWwZHDGQzsNvttnhBkOnTxqwErfA/3rchEgOXWd0/sa+ TXlC3sZsKKyYxHZrjucCWQN8i6ltLz5Pq5PC76YXRBSpTA7Ojie95raSzRVE7B5xG0Zs Ly+sYJsUQDRokfg30KPOm8/qiOXIuGioeB0gBmuA0HsvpmnDc/+UyPF0EpPupWWIjA2v +BbvnswdE8JaQwUTKgSVnHT92XzAEEUI+VKoP46NsOEdKRfc7Ewio3pWeF2rbvP6i6tR 7Lxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nAXkIAcv; 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 b24-20020a170902d89800b00176bfd3b6b9si26539209plz.416.2022.10.22.00.34.08; Sat, 22 Oct 2022 00:34:21 -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=nAXkIAcv; 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 S230117AbiJVHG7 (ORCPT + 99 others); Sat, 22 Oct 2022 03:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiJVHG5 (ORCPT ); Sat, 22 Oct 2022 03:06:57 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0B002AF66C for ; Sat, 22 Oct 2022 00:06:54 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id j4so8855718lfk.0 for ; Sat, 22 Oct 2022 00:06:54 -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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=nAXkIAcvVNXvjMlgJvvU9CkwESe1C3+PQedims4SaDrmTL/axqo6zev89iO0BAzWmk tZj+rm+jVU20+/Awgujekxgd8zDYefsPuQjmwiO0BJ/cNVzUF/t9vMgitlnVupCV311s t19Nh1GOElU2Cq3U1+lCPa8kYOQbj5/9ZSBep1vipSyL6pS4hq8e9mFcaoeaP6M6VsJx 8tmSkmDf7wge59gvIlw1vMjdwD/3ajpfTQiLkdYj4ni08FyvD1Ms2xm9a077LGAMwsCG 2414HaX1gltVAN0lLTRD6TK1evXOm1VEU/U0du62nt9xaw1x1wD7qRFaQTlvL9ZRiKnT 8+cA== 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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=URr5ViUif5UqnnFqUTLLPkKCWdRRwLyW0oELyMjH78ckV8vy5WwuyLEPhgbhZruqI8 M/PIqOPjIPm9d2K++wJSJbKnTuFcPVixsB9HCAqcFpLALeEmEuBDk0g9+MXD/RX9uElG 8HlskW0NKbWDP/Nxv2RT4rkl7+u1WIVqKyiKPJPTzaLKcfWPRMzXruc68JePiOynpsKl Juab5ipfYda5ieEzDPhTSIo6r7R9nGqGbEamv555ut22QIiFgiuSZZbkVGslrUnqPb4g xDi3xi+98tes++b6mHXlnSITdKrdqevulHv5UWmsstfPtiQTa4BoaIOcyHMU1W9lqHtf VnRQ== X-Gm-Message-State: ACrzQf1BfF1fPadcCZlwaq3iSc/PMju6v1qJwycU0GJOMKdq8HzZWMNg BRbACE9oPWKNo9JtMmUu5Eo= X-Received: by 2002:ac2:44d2:0:b0:4a2:c703:8b9f with SMTP id d18-20020ac244d2000000b004a2c7038b9fmr7905116lfm.97.1666422412901; Sat, 22 Oct 2022 00:06:52 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:06:52 -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 v3 2/6] staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration Date: Sat, 22 Oct 2022 07:06:08 +0000 Message-Id: <20221022070612.13009-3-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372276339027856?= X-GMAIL-MSGID: =?utf-8?q?1747372276339027856?= fix checkpatch errors by refactoring long lines of code in the function: s_uGetRTSCTSDuration Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 108 ++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 32 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index f9d0b00d7cff..01e72999831b 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -188,20 +188,29 @@ static __le16 get_rtscts_time(struct vnt_private *priv, data_time = bb_get_frame_time(priv->preamble_type, pkt_type, frame_length, current_rate); if (rts_rsvtype == 0) { /* RTSTxRrvTime_bb */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); cts_time = ack_time; } else if (rts_rsvtype == 1) { /* RTSTxRrvTime_ba, only in 2.4GHZ */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopCCKBasicRate); - cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); } else if (rts_rsvtype == 2) { /* RTSTxRrvTime_aa */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopOFDMBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopOFDMBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); cts_time = ack_time; } else if (rts_rsvtype == 3) { /* CTSTxRrvTime_ba, only in 2.4GHZ */ - cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); rrv_time = cts_time + ack_time + data_time + 2 * priv->uSIFS; return cpu_to_le16((u16)rrv_time); } @@ -323,73 +332,108 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, switch (byDurType) { case RTSDUR_BB: /* RTSDuration_bb */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case RTSDUR_BA: /* RTSDuration_ba */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case RTSDUR_AA: /* RTSDuration_aa */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case CTSDUR_BA: /* CTSDuration_ba */ - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, + cbFrameLength, wRate, bNeedAck); break; case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */ if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */ if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; From patchwork Sat Oct 22 07:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1087058wrr; Sat, 22 Oct 2022 00:35:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4B/Em1+XLXxupQcdmaK5SN2L5SUp2Ey3jmUBKSy9clByoAXsKghTmWd8dhnCpWJDzMd0u7 X-Received: by 2002:a17:907:980e:b0:78d:b6d5:661e with SMTP id ji14-20020a170907980e00b0078db6d5661emr19141476ejc.46.1666424111353; Sat, 22 Oct 2022 00:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424111; cv=none; d=google.com; s=arc-20160816; b=0iSf3BF/v5V7OO+0b/OEA8HE0ssU2P2LgHIp8dNks030jy+Ea0tVUyeR2+PN2PjhG8 mRt6feW1X/opSGPdkZcFcG7MfdlV1Fkils5Heu0ELZoivtTrY14b/81X4ERFBUVUqF+4 sgYNWsnJ2TxWanURGrXMGl4NfRegavG7RzzJTKKfuevLhXZG4FRmKduKsZxxRoxHrce1 /lLXu5nSEgFi3Kxc0nRR2ESzq6YVpi9ABENRQlL/QmH5536AgYF20CuKMFp0NCQ7h3bZ +Q/Z8rRhiGR79B7rdNqgcUoAXjrbp461GNEIMfDL2X5zvi8EDeXvy1aoKwZFnAUloPU3 tBvA== 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=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=lPhbKWBH9VTSmtxuOevs14Cg0fgDIATnD4lBPyjq7LNVqHvB8Q/BQGkympcDwOqjLu wnRwxuiXD4MtQIS1QGyfN2lw8MjazA+Sk2W33oDkR+v5jEPqRFfQmG2v64KFsQk3TWCZ LunwwyXpwYabiizr6vljyXHgIYVvn1dRkud2wmgrSIsEodbifdKhZeSdXcyxb+x2wRQC GDbiBDKGqcu7ZF9T3E4q0eCvJVW6srG+fYr1W1IsS7lGS+eSViCF/fd4xkCzwsfow8zv inZpG5kx2WIh4OCiinkNsARMVNBIgaKS26PbHF4fsy4KdZ6EajrDQQmif5WklEO8+cXS J9dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kFa016fe; 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 hc11-20020a170907168b00b007269ef1872esi25863586ejc.897.2022.10.22.00.34.47; Sat, 22 Oct 2022 00:35:11 -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=kFa016fe; 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 S229810AbiJVHHM (ORCPT + 99 others); Sat, 22 Oct 2022 03:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbiJVHHK (ORCPT ); Sat, 22 Oct 2022 03:07:10 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9686193EA for ; Sat, 22 Oct 2022 00:07:03 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id a25so6573769ljk.0 for ; Sat, 22 Oct 2022 00:07:03 -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=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=kFa016feSfxQ/pXKCHTLhFHzwa3i0Is7n1NUFuyHq43xYdEhm8BbN3uUIjK0xVh1D9 l4uYGFd0lXS2Mjrl6MJ7jtxuzS0qC3kgbK1CNWiZGq9zMw/sLQMAqt8+w8pvRkIgZkl6 2Z7jd1dLoGOS+JZsfZglvJiCmHXxYPTcQRApjWnugeEmFRyCEH9ChA7nPratv+gwtuEa Oom04WnQ9DWqrnNh70hC/XLKqZ8lu2CRIyc3P0PExqgCas2mmTIfQ2uFTX2yh6yS9kmp l3/FMuVUTSqkK7APUeRYh/Ds66WfDRwo3FKIbUCKcrBtmhkTEF2GzfYxB115gmQbcCIi YaXw== 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=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=z0N6eE9Vj1vkUYirjJb1DBRquhqYruE1L+OMWJTEdw0MXu1hmr82AnjKpwYEETEZNd PF+0W2XTM1yJ6IB8MiUTj8mfRcryEzb7C1XAtf/Kesae2l79w+kABi0eM8POSJ14NFa8 SOBrHMW/CuGOI+sH1u0jblN1eRxhBWM8nDe99dSLSWyZ5tIItFK5iH/e/5v2RT7m4eRN yFKqxB+faRk18djW6tdu7YCRjKQxB/6Rooba1sUrTKYGR0Bh6k9yXOYVaXouP5b5E1q3 9EKkKGOR0q/cxKDF4Ba24XV2mbK6RjeM/vnpjVxl1vCSMF2aAvMeRHcg//DrqEMwb1jA /+Sw== X-Gm-Message-State: ACrzQf0l6OHaZV93T/d62HIsnT5lmwwgKwqQ/okATqBJIcJfPzbmYgNk ppPBXmRG4Dt1JdKpyQxfY81TLnlgPyrgbwPz X-Received: by 2002:a2e:a591:0:b0:26f:c3c7:be64 with SMTP id m17-20020a2ea591000000b0026fc3c7be64mr7932444ljp.97.1666422421619; Sat, 22 Oct 2022 00:07:01 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:07:01 -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 v3 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Date: Sat, 22 Oct 2022 07:06:09 +0000 Message-Id: <20221022070612.13009-4-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372329103196933?= X-GMAIL-MSGID: =?utf-8?q?1747372329103196933?= fix checkpatch errors by refactoring long lines of code in the function: s_uFillDataHead Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 97 ++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 01e72999831b..dc853b83459b 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -484,19 +484,28 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, } else { /* Get Duration and TimeStamp */ buf->duration_a = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, - byPktType, wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, + byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->duration_b = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, - PK_TYPE_11B, pDevice->byTopCCKBasicRate, - bNeedAck, uFragIdx, cbLastFragmentSize, - uMACfragNum, byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, + cbFrameLength, + PK_TYPE_11B, + pDevice->byTopCCKBasicRate, + bNeedAck, uFragIdx, + cbLastFragmentSize, + uMACfragNum, + byFBOption)); } buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); - buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); + buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, + pDevice->byTopCCKBasicRate); return buf->duration_a; } @@ -509,14 +518,29 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, pDevice->byTopCCKBasicRate, PK_TYPE_11B, &buf->b); /* Get Duration and TimeStamp */ - buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, - pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, + cbFrameLength, PK_TYPE_11B, + pDevice->byTopCCKBasicRate, + bNeedAck, uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); @@ -534,12 +558,24 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, byPktType, &buf->a); /* Get Duration and TimeStampOff */ - buf->duration = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f0 = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f1 = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); return buf->duration; } @@ -555,10 +591,11 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, } else { /* Get Duration and TimeStampOff */ buf->duration = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); } buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); @@ -576,10 +613,10 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, } else { /* Get Duration and TimeStampOff */ buf->duration = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, + byPktType, wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); } buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); From patchwork Sat Oct 22 07:06:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1086714wrr; Sat, 22 Oct 2022 00:34:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45AFEvYQlwF8D5+a5+w4xjqfdX4pxnYfceIVGUftTXKvbzJv+1VfnJwjgIM92BJLuzoWOu X-Received: by 2002:a17:903:283:b0:186:8a20:c1b6 with SMTP id j3-20020a170903028300b001868a20c1b6mr1828764plr.119.1666424058743; Sat, 22 Oct 2022 00:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424058; cv=none; d=google.com; s=arc-20160816; b=weUCdsrLE+Votgv5EItW8gjJ4Ee9whPcgGuxfmfHYj35RmUO6qTWz1W8LkpbDjCGlH GnUqFP5YSHGN+v2hSfF0Kj3fb9iF/zy9E9sG9IlDPk1Kbq6DLEb2gFJAqzpB3ey+xT39 aIuF2BQp19OCEIe58ynpn2fJiY2IN6qK3pzO5RJnLJzGxq11XaN8+UEfQvkN7BkKjpQr BBLcnzpkEXgcqhDbiuTha+gLw0N3mF8IP0i/c3Is3lnADtkjgfgy76j1pICE+ZFV+Llp w8NYd/mv258r7YR7yNR893EBStCcYAJVIjufCNhY/yZVXOaxA/p1Zi07/hmejWy3dYQ3 nZGw== 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=HUcnHka9cEFND38RVcaT3dPsvb6aA2f6d8+vfWmfqXo=; b=nOhTceFUYIujA4wEMxHhSCa9NYKPDUQosvSRuRfzL85V1lPo1TrLnPvmynrHUQUu5i DkYj2MeGSNHZlgRi3V+UUOS0oK1yUpzzbNMFk4AVmrZMHyLmIpANwt/RnP+DEGok9qjg s5slA9U1Qm/RSXroEGIHd6u0QEMN+nDcDq24NwSbl3aVQZoCa/GFb3dSDdJOzQnexLgA 6ev4TSphrOmbHujFMIDFnt//FdHwrRQSSwY4XL5dwX3Ihwqe54xD2fmuyB8qNjbq7vNI q7Jitwt6y+6h6f9uOZjKiJVHCMUIt9wn5m290fdOkW8KUKHpFBs5/gmECP6qKvLa7HJk Dfiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ltQ4tV1c; 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 g15-20020a17090a708f00b002000867929fsi8319552pjk.183.2022.10.22.00.34.05; Sat, 22 Oct 2022 00:34:18 -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=ltQ4tV1c; 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 S230128AbiJVHHT (ORCPT + 99 others); Sat, 22 Oct 2022 03:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbiJVHHL (ORCPT ); Sat, 22 Oct 2022 03:07:11 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA6BF2B0924 for ; Sat, 22 Oct 2022 00:07:06 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id a25so6573838ljk.0 for ; Sat, 22 Oct 2022 00:07:06 -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=HUcnHka9cEFND38RVcaT3dPsvb6aA2f6d8+vfWmfqXo=; b=ltQ4tV1cKnxgxRDwEakd+9ToQ47KwJKvwUIvDyKglIEh5FMCyoQrtGhZu9pSOYFmn5 4mDiNJ898IM5qdonqBdZWoDqV5oZdqZ0z6aXo52rUPl3v4O7fKZuQZrv972Qqkm5Wr2L 6WVXvC631Paq330rDpSDL5JWUxtQ4MpiAbGq7i2VQXD/jtqgTgw/dhaYj2HKLnuhNrlC ClQnNePbquhT0jdIGKzZqUDf+UvIN0xYVlASno/q8ghcR7PVPVGBnnulecbkUAkbr+gu HFqWg0AvuOsbM/6afI5L4TFMZSIRzfAAWW3PUqhbRskpW8N8I0wFLXFiysNyfQQWX2G6 ORCg== 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=HUcnHka9cEFND38RVcaT3dPsvb6aA2f6d8+vfWmfqXo=; b=OkxYQxaWtKK+gTKIv8Gxn8mlT6qac0IPtcvSenbwsl7/CyMeqJ07BGYpcNNuiDoGaU O+oHW/fHEnYq6BJtub1XpX2JljxuPtKkORUydyP7LzzoH0AR4ckFNYDFwYqQVys24sU5 Gko7+yJLj3nvIlKiRWwal/p2kOWEjRaSRGMC/tQz3wx0qjL6NxIy3v8hCoUq0E1+mRg2 sd4m/D7V3VkNdF5N2s90+j53wyJbub27rCInhoNb6erQSydYvMNAyVHB6eHQzVN6WySY 6MCEJPXPP6uZpnCYT9jG67EuWlEXnuTa6w/NnSuJc6oF+REoDVUTZdKcJGCoCuiIM7BR QhZQ== X-Gm-Message-State: ACrzQf06O+GqzbNhjmBjvF7tcVXrRhlpG8KqVt2vpkUhx84I0Z5X5FOc EmIGZucxFVkj11KyMsmnYRo= X-Received: by 2002:a05:651c:54e:b0:26f:df91:ba27 with SMTP id q14-20020a05651c054e00b0026fdf91ba27mr7776490ljp.414.1666422424252; Sat, 22 Oct 2022 00:07:04 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.07.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:07:03 -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 v3 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter Date: Sat, 22 Oct 2022 07:06:10 +0000 Message-Id: <20221022070612.13009-5-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372273786661700?= X-GMAIL-MSGID: =?utf-8?q?1747372273786661700?= fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 67 ++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index dc853b83459b..951d4172e9f2 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice, } if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { + if (byFBOption != AUTO_FB_NONE && uDMAIdx != + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { /* Auto Fall back */ struct vnt_cts_fb *buf = pvCTS; /* Get SignalField, ServiceField & Length */ @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice, ether_addr_copy(buf->data.ra, pDevice->abyCurrentNetAddr); - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ + } else { + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && + * uDMAIdx != TYPE_BEACONDMA) + */ struct vnt_cts *buf = pvCTS; /* Get SignalField, ServiceField & Length */ vnt_get_phy_field(pDevice, uCTSFrameLen, @@ -964,50 +968,71 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, /* Fill RsvTime */ struct vnt_rrv_time_rts *buf = pvRrvTime; - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, bNeedACK); + + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else {/* RTS_needless, PCF mode */ struct vnt_rrv_time_cts *buf = pvRrvTime; - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, bNeedACK); + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, + wCurrentRate); /* Fill CTS */ - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, + bDisCRC, wCurrentRate, byFBOption); } } else if (byPktType == PK_TYPE_11A) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else if (!pvRTS) {/* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, + wCurrentRate, bNeedACK); } } else if (byPktType == PK_TYPE_11B) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else { /* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); } } } From patchwork Sat Oct 22 07:06:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7129 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1086787wrr; Sat, 22 Oct 2022 00:34:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ReuJmNfclJUB0gSxByQNcr4nszUBTD5LEJn1K+yoRiiDfNudkEPhwZTQJXbXpimN/TyyG X-Received: by 2002:a17:902:900a:b0:178:77c7:aa28 with SMTP id a10-20020a170902900a00b0017877c7aa28mr22795962plp.3.1666424059292; Sat, 22 Oct 2022 00:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424059; cv=none; d=google.com; s=arc-20160816; b=mSO9OoN1nhfVqFkWKyhOYkta2ZUQZ1VZ2VuIu7NmuYtpJDwmlwnX9cuhFBC+4dxzqH tWsEWmBf2fn9xV/+fhDNQRWgPrne5YyVP6ambXV7GFLPhFQsgvweV3yD8YlbsYqtUZfP CyzFBZZNuNu9dFkJTVD7x6NWtNUn7GkBYUAujzmRK45rX8XnEsEH+qoDK83yKAfsTtwg mMlLrmpP0u3nN2AWcnWTqGtVaeLNxtSiJ7Z8FFw/aNZ4osu6l6q++qEHSz1r0xD+V9VZ Y2geihJVCu833PcFcXSRcD9WLogXXt4OCi8HSVNSk8kld8WvAUiSQ+uCfkiEaK6Apmko vV1w== 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=NF2XVu1q9jU+DBiuqTBo6dmg55zjCxM1MoAMy78YdKg=; b=cqaug1DK6t9tWbmvTiMfFuXvoxG6Ve5fiIz5DJjVNtNb0ndGJvNxH77zkP15yUwqFL nz/eXJsja3IM6FvtWJj935RqZ2jdIwnij6Ypyc6hb+btKcvcoHqtufLnJ28Irx4/A8VG UkRRh1iD31Q27DFa7dutocECTtZZBeKAI8tUvEYy/WixWd4y+lz0bCuNZOw6OezDHa+e DkqqPvj9q+IjWjeS/wawI8rLP41GzgFPHblzHGIID3zQ9UuLhHyYO32L10lOwt51sFfd +CY2k6wNfnFfcL3PSrnnfcTQtYQOuAhnm3dYdYt856BSUAxX8EppxhhcZttNCerxbRU4 zS1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EF/ZK5Ep"; 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 nl7-20020a17090b384700b001f52b9da815si6876067pjb.167.2022.10.22.00.34.07; Sat, 22 Oct 2022 00:34:19 -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="EF/ZK5Ep"; 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 S230144AbiJVHHW (ORCPT + 99 others); Sat, 22 Oct 2022 03:07:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbiJVHHN (ORCPT ); Sat, 22 Oct 2022 03:07:13 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41834E610 for ; Sat, 22 Oct 2022 00:07:09 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id by36so6491905ljb.4 for ; Sat, 22 Oct 2022 00:07:09 -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=NF2XVu1q9jU+DBiuqTBo6dmg55zjCxM1MoAMy78YdKg=; b=EF/ZK5EpfIWMRHB2E1p+7kYWmD6Du2wObIfV2UWmLRg9808YB4krJGSmbqweUD75Qi 3YjJt8vF/T8/dN5p51Nu2anyPJPd612gcrt9NQokhDnzql0iilZtDi1VnMH1fe5JyRYP VpBx3S5h5/a0UmGLPifnpsAbJqh2NEYDcjKSiYq/5z+TRZ3LoxUwLnW0Hc42bujSNcGp bjNIUK7DmOfgQyfIUSWChi7svpRmA+Z3x3C5FnAqgftU/javstyYKebi1DYppAy4NvER 4QnphlgyntrJ0Fd4Ih3oFlachl83CKrCjZcLKEIuIKzJnn4ao6GJqwHgE8X5wWmHydQO 2zhw== 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=NF2XVu1q9jU+DBiuqTBo6dmg55zjCxM1MoAMy78YdKg=; b=wt321YPVvn9+AbVL5LbDyzTmjU/36o66nQpP8ALUFxW50DP7NMgKJxLaSjAinRv4CL lTqiYf7Nj5UWPYOd1ozu13TWamXEScTCaKlQopOPsxXPtEQfrDrmWpBxxsrw6rGoQErh OX+gLHH079qO5pfor/xnRlpOA47XscUiHbi1XBJ4rNHyOQFDMlPZnCmB8xWh5SfGMY0N AHEf+H+8HP384n+AwDZo6/Ozu77/HouVGnkkDJUbKfh52vRdZ4zlkZQpGrAtaajHIMjv ncxYnJ103Pn+t20eMuQF7l7FGS0/BVyHXttpopA23BZrgkXsbErrZe1zs3C2O79Urrzq 5Qyg== X-Gm-Message-State: ACrzQf3nAprhj6a/eZus45AUwwe1lTVrdP7PPUQo8pHMwfcgcRbfGEFc dmSGVx5r8ZuA3XCPcKs5zos= X-Received: by 2002:a05:651c:1547:b0:26e:9716:67ba with SMTP id y7-20020a05651c154700b0026e971667bamr8225237ljp.256.1666422427039; Sat, 22 Oct 2022 00:07:07 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:07:06 -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 v3 5/6] staging: vt6655: refactor long lines of code in the rest of the file Date: Sat, 22 Oct 2022 07:06:11 +0000 Message-Id: <20221022070612.13009-6-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372274193910294?= X-GMAIL-MSGID: =?utf-8?q?1747372274193910294?= 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 | 105 ++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 951d4172e9f2..572be45cdbeb 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1105,44 +1105,60 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, 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)); - cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g) + - sizeof(struct vnt_tx_datahead_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) + - cbMICHDR + sizeof(struct vnt_cts_fb)); + 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 */ @@ -1150,19 +1166,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, 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); } @@ -1170,19 +1192,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, /* 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); } @@ -1197,8 +1225,9 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, 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); + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, + uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption, + pDevice->wCurrentRate, is_pspoll); hdr->duration_id = uDuration; @@ -1446,8 +1475,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv, /* Get Duration and TimeStampOff */ short_head->duration = cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, - frame_size, PK_TYPE_11A, current_rate, - false, 0, 0, 1, AUTO_FB_NONE)); + frame_size, PK_TYPE_11A, current_rate, + false, 0, 0, 1, AUTO_FB_NONE)); short_head->time_stamp_off = vnt_time_stamp_off(priv, current_rate); @@ -1462,8 +1491,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv, /* Get Duration and TimeStampOff */ short_head->duration = cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, - frame_size, PK_TYPE_11B, current_rate, - false, 0, 0, 1, AUTO_FB_NONE)); + frame_size, PK_TYPE_11B, current_rate, + false, 0, 0, 1, AUTO_FB_NONE)); short_head->time_stamp_off = vnt_time_stamp_off(priv, current_rate); From patchwork Sat Oct 22 07:06:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1086809wrr; Sat, 22 Oct 2022 00:34:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6YFDSPecTHM34wtKi+daHA8obN33TnL6nKr4ncGq6exCRF6rhQ4dDO9bMQUSw87HFyWBiB X-Received: by 2002:a17:90a:7805:b0:20d:4fd9:9a0e with SMTP id w5-20020a17090a780500b0020d4fd99a0emr27085962pjk.169.1666424063302; Sat, 22 Oct 2022 00:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424063; cv=none; d=google.com; s=arc-20160816; b=EBIBDii38duik8BPlOamzAhfQ77BeiprrWl7dlDgIlFI0vGQ1/RMh9qk5cl/ED0/Il +UNUWUoXzLiyet0C5Y/LzPYEpcR3XJVyvh57GFXn8TntgoOsKwhqyp3P7wFCfyv6oU4q FolIqiSREyWhsesY2oU1iOmRLeWU1NkN5wEg1j2b17mjyQH3mglIVlBrbrPSXhRXNOcZ r9i/WC7rFtMO89VZvCjp6FvJrnfMZMpHs5X7tcgQYg5GL6eQEjCqJfaN0Fn9pnaD3/kz hlpl+y0i/35Rl68g3EPD4LskHp+RB/YF8QpYYrC0n5G9jwFfV144uqs4O/DtHMyXpgud MQYQ== 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=z/Jixh+fpGeoRUrSiUP31EewhYoOg//pK7EUFnRWzmw=; b=YR+1gEqfcwqwTNQv09T5Gnjp2BaevxiEUHaFj3GheyfWG3XVjoT8Zf/8IY1XJLcMhz Tzu5UFUZ2yiZIgZazOfqE0+GHXkHYdi7ybdBzlh+oJrxOzr0U69RwwzLQROh0CHim9qH 2NvOYrXPlRcvCL58r23BSDSYj8NSx1MaqODP8oMbMdTap7mbgRGC/J52H7BhExul1HPT isj1wxHfYEEXdWLmY7ytLOJ80KxoJB83Dg5iYgPYKAsSYZEzRAm32RTgXjP+CT2FOAtv 3sOzb+N9eaKHttEOqCXap/jkpZoI5nRPUzsXVsnp98W+Gfdg1aBBxSjnvH2V4Jti557H JJxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E6LyThuo; 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 oc9-20020a17090b1c0900b001fe2de6a2c9si10858622pjb.4.2022.10.22.00.34.10; Sat, 22 Oct 2022 00:34:23 -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=E6LyThuo; 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 S230160AbiJVHHe (ORCPT + 99 others); Sat, 22 Oct 2022 03:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbiJVHHZ (ORCPT ); Sat, 22 Oct 2022 03:07:25 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4756D2AF661 for ; Sat, 22 Oct 2022 00:07:14 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id by36so6492070ljb.4 for ; Sat, 22 Oct 2022 00:07:13 -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=z/Jixh+fpGeoRUrSiUP31EewhYoOg//pK7EUFnRWzmw=; b=E6LyThuoqqIGcCzOD9uvSNSj5QJPyHrtjO57xPt6jnTjmAgIq0ve1Q0XQfOPLmaYrJ +nS9WeAGgmx9KViD7Daa0/n0+Xt4CXYA/nA9X8r1L/R3buraKv3TQ9tLrc+TQTJ3Ojdb O4xJ++ENTE7vKhA01/OG0Fh8pEuarrMqQlu4HG1BUK8tSw2dMKwy5q8jqrjJBSWwfkNM TX47sf0KYRDqY9cR8BMjy6WKPS/z71nw2d1dx8OGwyboLQSMCKtyOStdCd/0i4kxjEtp 7eYQ6Ep6/IukjawdlW3L7Lj4FfarTrux4ln3oZudfQeowX+oO+kSNRpraQqAk/MDSbg/ 5pZQ== 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=z/Jixh+fpGeoRUrSiUP31EewhYoOg//pK7EUFnRWzmw=; b=iEhf7ehmdv1mbIIqdCXs5ubDnjUkDI8M8gcrKVfCglapuigd/zuQi7wniy2uyAr7Hc 1jBoZq4sU+NWPTW06b+wFnfjNLRzGIdeJ26oYLhQd9BY0o8v4RaFDSzNJNx7I5sUGFkc zZQjceiyLcl8WbH/DoaX9pHfuAs9ytvwupB/uq70HN1Je1N7uGbEP+dZ7t2d5mlWe0rA snzyNfoIv6EIfGeRq2Lu++YZ29YbevXdxfkbjTme0nPS0uFaGKvVktip1cOtk+2lxOMc YVsI7ZNKFAbFdezphDj6S6lz81Jq37mb1ZQmdyeeQqUpOdBw1Ww/4IQXTFF9tym+2RLs Ygyg== X-Gm-Message-State: ACrzQf1lGKdaLr0/rpUF5o2Rc52ouZH0ukaNEXIc0ch4NV9+DY/4/gw3 OJnF6fxp+zHc0CvTyUZ4XAE= X-Received: by 2002:a2e:8514:0:b0:274:7384:fc5 with SMTP id j20-20020a2e8514000000b0027473840fc5mr4402354lji.52.1666422432197; Sat, 22 Oct 2022 00:07:12 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:07:11 -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 v3 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Date: Sat, 22 Oct 2022 07:06:12 +0000 Message-Id: <20221022070612.13009-7-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> 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?1747372278427365693?= X-GMAIL-MSGID: =?utf-8?q?1747372278427365693?= join unnecessary split lines to avoid them ending in '(' Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 572be45cdbeb..c991619763da 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1300,10 +1300,8 @@ static void vnt_fill_txkey(struct ieee80211_hdr *hdr, u8 *key_buffer, ether_addr_copy(mic_hdr->addr2, hdr->addr2); ether_addr_copy(mic_hdr->addr3, hdr->addr3); - mic_hdr->frame_control = cpu_to_le16( - le16_to_cpu(hdr->frame_control) & 0xc78f); - mic_hdr->seq_ctrl = cpu_to_le16( - le16_to_cpu(hdr->seq_ctrl) & 0xf); + mic_hdr->frame_control = cpu_to_le16(le16_to_cpu(hdr->frame_control) & 0xc78f); + mic_hdr->seq_ctrl = cpu_to_le16(le16_to_cpu(hdr->seq_ctrl) & 0xf); if (ieee80211_has_a4(hdr->frame_control)) ether_addr_copy(mic_hdr->addr4, hdr->addr4);