From patchwork Mon Oct 24 10:01:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357054wru; Mon, 24 Oct 2022 03:05:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6graAu4zrdG1l105klLU6G/pc2X7syudVMcxDoACncPpucGehI2AN6skl8yG4Co/Ax7sBz X-Received: by 2002:a17:90a:8503:b0:213:2ae1:c559 with SMTP id l3-20020a17090a850300b002132ae1c559mr648091pjn.24.1666605920236; Mon, 24 Oct 2022 03:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666605920; cv=none; d=google.com; s=arc-20160816; b=OIjaYZNlaLTlqtJ9Eluw41O7NXR4zmha2RpXKu+7O/B6VUzm7WqbMrT04VwR6l0ray s6eYIewj7p4KKeHTPDLJ4rKTsSvRn6ASUHmLeHKnJ2fISJEyF+scrL4WpsJzwxD7q5s4 rZhwhc7y9XN0N2HunAhnugP1V8pzxrvnAE8cLsZRZlym31PobuAKFBTYcnclRqJMhhBp p+BFeJ7nIljBN1+V4jsbpyES+oQCjAW6rjPg8+fOarp9mrTz/DVKU1Vwx9TZPHcTFCJ2 emw9hHPh204SMTleaIhjSlqGXkkS7vZyyS/pnv1LyB0C0Co6ucS3vg23Rs/HYv8chHJV sCWQ== 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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=FkWePTBOGW/y5k6xnb6t6CigXEpTXwOhBclnmrviSnUF7zY6jEknyVQZ33MTOgvAV0 vAKS0K3BpveMSw4llKTJWsDagg44KzBulee/PeNzSKSEuDbsoY/fmOr6rXdRbaeLHIZA R+ZUpbtx7dGsQ0eN2GlBIEXstlchy+EGjNyG/SXxoeiCRcGaHIy4A6IeTvx6JVNhN2yY Jt7aBSsjSm+Z1J2JyYOs+rJYONRCIcI40fWT7zXSHg0SpnKYxKAAfecrqTN+UylpgIsM xl7uRStU6+UoxZbkNvTbMydmHRaIkR+ge/whc6nvgnYUxl9KI8jf4FUqCvA5GeOqEExE KO2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XDBNBbxd; 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 a13-20020a170902b58d00b00176d899ad4csi31012120pls.422.2022.10.24.03.05.07; Mon, 24 Oct 2022 03:05:20 -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=XDBNBbxd; 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 S229792AbiJXKCY (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230265AbiJXKCK (ORCPT ); Mon, 24 Oct 2022 06:02:10 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A43E158B7A for ; Mon, 24 Oct 2022 03:02:08 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id bn35so3362363ljb.5 for ; Mon, 24 Oct 2022 03:02:08 -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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=XDBNBbxdKWh0EVFDGI5K4frRn+oGJcAKRXe+TScQcSof4fGle1DMbjSpUYRu7LSGCZ 63rq4+i+m6rqoTJYliOCDdzZmevlvMHxImfH1AcMSONia1mY3VwYaYeB5lll1hhI1tT6 EbY4KTU7MORtTX/t1+Vt66nhDcuJivo7MfRsz2m6qKyty8wNhB0HuLAG+tgIQo6V6nvc KBS7gGHbhh3T71ByTmIDqnd0vbFBRY53RkdEnu53eqOj7nCkv2ad7aLbRjQKMeQB/qiz BNcPe3NMpwfA/OMx04+WWQAbAvLZx7fGwEHRGjz3UUUoJk5EPDu5HOv0Tg5JDorwb41k PG8A== 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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=Y6Iqi6hJbQcISFZR09g6w1dYc1tkx1l6BkT/N978YSCq6htfdYF/iQcsbgjuCzAsWQ GNaB9m8FjQL9sOa/BylXVUH0cdUakE/9tErvrZnJ+H2gEd4fV2i9YATia+WJ/dQVIc3r xZ1f/+7rDc0lHSYYP1ZSSm/hMGp38vBOGKt4Fvfc6kDkNdcu0Qn7hpYvRPblA2jWx3FV 52Q/2F7eKZcaHNqhAYYXBSz1XIR4HHtIk2nF2gV7YN6TiJ6VEiccglrh6nPrDvZ2ngo3 r6fVKk2VBPR5Krpqh7C73zcaBUb3gQvkktbP87MACNTlWTKlZiJBMgqzoXskdQz5FxDF AKjg== X-Gm-Message-State: ACrzQf32/qGUsxiwQ967wzlTaGCh40d+TbABulZoszbk27uNd8DEEH8D er/3jcEJ0Gqr4uI137PCfiM= X-Received: by 2002:a2e:924a:0:b0:26e:4cbf:544a with SMTP id v10-20020a2e924a000000b0026e4cbf544amr12468463ljg.471.1666605726954; Mon, 24 Oct 2022 03:02:06 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02: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 v4 1/6] staging: vt6655: fix lines ending in a '(' Date: Mon, 24 Oct 2022 10:01:47 +0000 Message-Id: <6742e42999e05ddf09318a0a3bda9ce23b6ae562.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?1747562969007655796?= X-GMAIL-MSGID: =?utf-8?q?1747562969007655796?= 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 | 165 ++++++++++++++-------------------- 1 file changed, 69 insertions(+), 96 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e5036121665..7eb7c6eb5cf0 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -139,15 +139,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) * PK_TYPE_11GB 2 * PK_TYPE_11GA 3 */ -static -unsigned int -s_uGetTxRsvTime( - struct vnt_private *pDevice, - unsigned char byPktType, - unsigned int cbFrameLength, - unsigned short wRate, - bool bNeedAck -) +static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned int cbFrameLength, + unsigned short wRate, + bool bNeedAck) { unsigned int uDataTime, uAckTime; @@ -214,20 +210,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 -) +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) { bool bLastFrag = false; unsigned int uAckTime = 0, uNextPktTime = 0, len; @@ -316,17 +308,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 +397,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 +539,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; @@ -750,19 +730,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 -) +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) { unsigned int uCTSFrameLen = 14; @@ -868,21 +844,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; @@ -954,11 +926,12 @@ s_vGenerateTxParameter( } } -static unsigned int -s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, - unsigned char *pbyTxBufferAddr, - unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD, - unsigned int is_pspoll) +static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned char *pbyTxBufferAddr, + unsigned int uDMAIdx, + struct vnt_tx_desc *pHeadTD, + unsigned int is_pspoll) { struct vnt_td_info *td_info = pHeadTD->td_info; struct sk_buff *skb = td_info->skb; From patchwork Mon Oct 24 10:01:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357399wru; Mon, 24 Oct 2022 03:06:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KPkZlh86x/Wh1X1dkkmiANWbD1DoMOnQPcvC+B+tbn5z3nnnGalRg7d36cLKTCp7ieoQ6 X-Received: by 2002:a17:902:a60d:b0:186:61f6:d7f4 with SMTP id u13-20020a170902a60d00b0018661f6d7f4mr22316520plq.75.1666605973142; Mon, 24 Oct 2022 03:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666605973; cv=none; d=google.com; s=arc-20160816; b=mTa5hd4h1Qwr8GL7vBkfs4gnqRJnb/wZSIgEDCstY2pe9xSRv77POYSLwEhZYQ3spY 7gMOrtjFGXZHv4oVHtrEPq/pKiM9TQouXTwOijbN9u9ReMPQDLfp/g0US+dZF/La0RtY kU9VE6A1j63pGNjzAtDv56BEDaG6kIhWuwFF3vVBdQxvTxHGZJpcAsVYkfgJA2vLTZgc 9rq4FJdaUQ+pFnXW8/tRjGMsfy3PZVejQpFg6dwHd28VYFv8fZ2UYHKiLzCAmRPkydgt nshtRntbYOsOzznlCSENjr+mzefFIIxNVyP8/xoFzm4+o0U0EnG2z70REUGas7y1yQJ1 a0Jg== 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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=qDvjV+dxIX5ZmiO+eeRtl7Cef+Z07U2jJ82ItTgj6RJmE24GqHkIb3SwJmhM5tu+T4 +esLIiDRm09XgZFJi0HGfAr/jk4Vgf6Ir4YEz/Fi9/MnSaRhXVKUCjCFqscDpWS/pInT I4YKE4FKIplYT3vvL0CmtOLcGjusjmkHTllNfmPXdxefjFC6aatVe2NL/oStXdUKwknv 6/2WRFtwbPz/jHH8oBridLWsVAf16srNxQz+xk8x4nI5J7ncz4NsNob/R3MLzwpvZPnS H2ysLL8/bzr2UR3FkGUOOIlh6SY8IcAIbJzecjUEl6mGQYkc7rwEeRkd7gYwgs3tWbDs d4kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mjai6n4k; 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 cx2-20020a17090afd8200b00212e2e1b626si7519644pjb.164.2022.10.24.03.05.59; Mon, 24 Oct 2022 03:06:13 -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=mjai6n4k; 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 S230288AbiJXKCe (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230287AbiJXKCQ (ORCPT ); Mon, 24 Oct 2022 06:02:16 -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 B53905A16F for ; Mon, 24 Oct 2022 03:02:11 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id bp15so15785469lfb.13 for ; Mon, 24 Oct 2022 03:02:11 -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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=mjai6n4kDY62qBhhamKh6a+Wa9fRoEMVdPXhkHh+FABVOM7L3WyJBPIvO55VpwhH2B U+pwdT20nPzYhNZi7mw4eGcFug1jIO1FeXBeOrtNpUQoF01oIDKtbfTYo7PafCo9XIuv SXjdIPay9qqPgy9vXe/By2a8xB20m+a22rzZ3O4w75CLQVYfTuXHntNOCK0ffnCk3O51 cQ2BO2mFKV4j9oUJychvnwKN/Bc4nYUG5CZ/gdQggFxf/8GW802UyeFoPxi8Z0THm3j3 /jmbT1RhWTE8JTQpTPC1VaYVWrlj7+KqmnQJRmym5B8h5lvV1wgbaZ/d6hINzAV0i7kl b5Tg== 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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=0/8X1qZtzLDKJCvIcgr/5Jyljih4YTwSKPRx+VtKaBeovMdqFOuDlwv+I7StqVS24Y 9ay2yHUyQOCeFWUGvtL93fg3FpbrbJ1JUUb3gzbRXHP4pv+Ie8RjBn38NEbWaYZlNXyj kPeUXiRxWy5BElS2ljKPKB1zlmT++f5iRhhI51lBkXS/tES4udf3+946srdUBEt+VFY8 MLCTHCvr1xfLvO9A8A0euU3HaTMfyEIv8oyLEBK7w+WSEC13cERPoo5+5M6oXFwvRxLA b7E9Te4+CVVdBkTUHrkzAjsQ0nKeZaXr8zP+O+c4CGRmV3nsaIRluaWlir2y24foXAft rvEg== X-Gm-Message-State: ACrzQf1GuL1oA1YwPiwZ9Ad/aBK8WhR0BuzXIPMor9WJnlI4kbAxUaso 8lBMx8S3LAr6zEOb1C95u1k= X-Received: by 2002:a05:6512:2616:b0:4a2:1723:cf40 with SMTP id bt22-20020a056512261600b004a21723cf40mr12150226lfb.354.1666605729930; Mon, 24 Oct 2022 03:02:09 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02:09 -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 2/6] staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration Date: Mon, 24 Oct 2022 10:01:48 +0000 Message-Id: <0e6a307052d3a354a850a502e509f46baccdbe1e.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?1747563024958706947?= X-GMAIL-MSGID: =?utf-8?q?1747563024958706947?= 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 7eb7c6eb5cf0..8e56a7ee8035 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -186,20 +186,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); } @@ -320,73 +329,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 Mon Oct 24 10:01:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8294 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357157wru; Mon, 24 Oct 2022 03:05:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4W407WWoR6MO4H0YkLr3V8snpKyO6x18rCn9zXzkntQPlxX/OGZ8jTFYEMZvoCXMMYtOo/ X-Received: by 2002:a63:2b48:0:b0:434:eb45:9c6a with SMTP id r69-20020a632b48000000b00434eb459c6amr26913298pgr.508.1666605936123; Mon, 24 Oct 2022 03:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666605936; cv=none; d=google.com; s=arc-20160816; b=dUufB44RuqyO/mUHdsd482AOkMM/oUbgkmACPGJVkA0ToYB9sMTNrUIrhetg4rYeyu Ub8ganFXZvv1dvo/ARI49OyojmhXwYUxV7ISJxsA688JMY1qDP8n/tWiinGKhBuRbMFW hNljQ2Fp9tZYsPz+BIbrizKJbcG/XGqsR5BYKHvN0glzn1YplKr5InpXmnUfLmdzry8m LZQEEgfaXGUVXSXw6iQITDsryKGT6cSSBkgM52mXdUUIr7tYJul2Cm7QzYXMDRIw6c9M Dz6WPOo/kMGcxt/8eOCCNRbw2JkmScccwoNFrLCBxcmryOSXUuTXS1IdgwwhgkwAw7o1 q3mg== 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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=qOaTaVNRUPNr+bGbJNnpMiPWymzqdgy+wzXutmdqwBaIRJ6jQTWykt73ZE5vlOCq8h dIk/NncnUze2o/cj7lrPLKHL9fDJSFaOVHcqqsjAHu1wkbEl/fVvMpylV14zvfrsl6/9 ULUoQC8ZTCxUs0pO7egX6s5SUkF6ni529fmJgjHE3bhztsA8zeb+ruDXeZItknhPNQex AItoqAAfxdrndqi9CqaIrGRrvW87eJUX2yO50E4zI7BYffGLiJkDqeIRZ6rCVzQHiFO1 7bfouQq4KgVrqjpIdq2nLXPEKgz54ebU7ypNbnT2PkCOhmqNbazH8D75biF/LhT87twY wjnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HsE0mA4Y; 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 a13-20020a170902b58d00b00176d899ad4csi31011130pls.422.2022.10.24.03.05.22; Mon, 24 Oct 2022 03:05:36 -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=HsE0mA4Y; 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 S230331AbiJXKCa (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbiJXKCU (ORCPT ); Mon, 24 Oct 2022 06:02:20 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E60E55A144 for ; Mon, 24 Oct 2022 03:02:12 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g12so5330390lfh.3 for ; Mon, 24 Oct 2022 03:02:12 -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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=HsE0mA4YRF+d60FHuzR+bNY90b/LW7majYVX+xOOROK3Z+MKgT7jmevYrqo2wYLoZy uf//LgVVDdHQcKYBWTwruvsD7xOrc/NsZA+xrb209tphyEmfhRTeSxYOpbU+dEsJ7w7g 2PXOGECSaVP98cQ7/VBM5C17duQLdBnbBBTs9B4QscvyNmul/c40bfSGVRd7Eg4NcV4P onUBqmmQBHk8mXuAZr7qbWEMY7/Q1E4laD45ClXJDe8ijDnavvSdXEaWg7gPldNyfq50 DWcDoAy5iAUn36BS/gQmJRe/HMV5jCq3+xgU5dAJg3lLLfmc+4LeWF+Em5eBUnSeLrGW BmpA== 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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=0jIKbiKGGhk3xQZ+WqZT7K0760y/0wP3E24V5LJPKuEP4ZOukuQ1oVi2mUk8FZs9YX z27QVRBZDM/VNESvh52FmalYhT2mltJ+YQbbc7M5WamUflHGac6n30/puwZuP5NTW275 Kg1y93IaneNc8piCIdficmvqm4Bko+9JW3aVRng4T7y1KOOWgi1tnxj/wBQOPbJAz7v3 FGYy/BS2R4caufR6Z8IzkEfpn/s57otU21kLqkbW/n72739OV67ewMFoDZG3m/tMKLr6 YO5B2aBM4uIqktavW4zndnE784wwcIfKQ/w0bwxA+ew4mXgVcxTrg1WIbmHzqfbhkciy 3v6A== X-Gm-Message-State: ACrzQf1v5QkspFwNEhAU66kIg0LYe9hEToltzBgooENTpaQolf17NCbP EgrD4up97hg5YT8bgZScxdI= X-Received: by 2002:ac2:5e70:0:b0:4a9:cd8b:980b with SMTP id a16-20020ac25e70000000b004a9cd8b980bmr3368274lfr.516.1666605732170; Mon, 24 Oct 2022 03:02:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02: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 v4 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Date: Mon, 24 Oct 2022 10:01:49 +0000 Message-Id: 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?1747562986038609545?= X-GMAIL-MSGID: =?utf-8?q?1747562986038609545?= 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 8e56a7ee8035..7b6571ba7c36 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -481,19 +481,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; } @@ -506,14 +515,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); @@ -531,12 +555,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; } @@ -552,10 +588,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); @@ -573,10 +610,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 Mon Oct 24 10:01:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357935wru; Mon, 24 Oct 2022 03:07:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67z8jMn3euWXNAl8MhzMdAVCSaBpSAFDrfX6VhbVlH9srrVLKG6QEO2wQ/OPfXBCoptTg6 X-Received: by 2002:a63:4307:0:b0:464:a24d:8201 with SMTP id q7-20020a634307000000b00464a24d8201mr27920355pga.116.1666606045370; 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=ElmQ1ZAJUp0tDFOpKu8GDqeFTjUsJ8E7IGR/msFaZ/wqNn0euLYFgOAEqgImI41dD3 mbifdwaWxVJjUC2PSvdQg1SVMslfs4a8wibtGnNUH+A0vQ4xX0vz707JtMbtAn41fVPr /pMeQFLg/vJLLjIYWfmziC7FRIFdJCIZR5lYYXw+FEdQyK9gCxzIL5gVjot4KCdc4EQE giV4PVKTpLdiEOztKgaSFKufXmbbm8Cb4mw55S67CPafKp+Rd+app5FLJBHDvJF1kevh NKmPGjRUUiGueXQHe4j5g+/MjRA1uKCdHi4tsKfl21s4gYX0QH7AiHqmY/wn3AsjN/l9 pyQg== 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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=nYa5lpyF0eN6lPlgZavkFI67eReBLdGg1Ga7j3wdhjYF16Q7kcZ+WJcmBxF0ts2EhL vmaYsqthY2YqiH9X//9jyYGxkkADiMiYCIG0zb13APQawzEnh/vkFxRkVwIVsdwTOIEe /YDTkj4DzbSRscQ9Ehr/+xPpxquyVQSFh2FHkU/d8MQHQT2cDqm0gk0SmeKy68NsQRSt W/Ke7xSk6oPwS98sWejuI8JZ594oYWbKinDn/eJTF9RlkN/1kPh5jGaNESuGayYFji0C F7pZ/MKvnn/KvGX166u+QaLWaAvjpk6QysbafWJFWug9h++NJb/5ay9g8MUWPvjlD9tf z8MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LyD7DulQ; 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 x7-20020a170902b40700b00186a2274394si3661335plr.476.2022.10.24.03.07.10; 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=LyD7DulQ; 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 S230398AbiJXKCl (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiJXKC0 (ORCPT ); Mon, 24 Oct 2022 06:02:26 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7658A5A144 for ; Mon, 24 Oct 2022 03:02:24 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g12so5331193lfh.3 for ; Mon, 24 Oct 2022 03:02:24 -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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=LyD7DulQtLdUdHohPQKOb++7jgZC7o1sGM7lrig+76akqITG0iDH7FAP3HkCdQlzT1 iTJMlw2vI61xH4z7Bc6fglS78X6RdvkVHvKmXDR6gkwaVuTkw7Ux3NrJb3T9f/ABOiLN e8PakEHHEJkZSw4tZo3TwsM4Ns/DMufyTMcsBAUGVG5MppUie9kUbuVgxJBYR13oYOk4 XsmpO7N07jxqeyNAAedz5MlmlYn1Ic6ELmri0ySxcnL2ZYEqSCKLpvZrS7vyYIMkNYoO nRi7i53jS4oxBPa6OcQHApRUno8R2HvAS3U1E4hWdptm4qjQl1yeyDj4i0TtyPEd6dck SuIg== 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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=I/OezysgSi/jxd6rZVH7txyJjJMsgO69QFgXAkSaWyp+Z7SvlawxJmaa+/rWyvzZzC 9gGdHElsIFfBz0u57Htv9jGurAE3iZ2shylrByRG1S+JO4FWMn/mPwwgLtfNFkVzb7Bf RetJesUSniCqmuenlBENxvifHinOD6L71jOFSSWV0HVFeR/3Et/2ZiFTxS6Snf5CmvBw JaO163e6u/jWfQQ9pT2a32CljPcaCQBZ24g9KoY5XuuCMvOWWcpyoi/SadZPe4a4MgC1 r5EB6o/M0CrFpoAEUCaqXfl5xLhkc28JQmMyUCc1lMftbZEVDc0jl1xLb+xvXe2mVLMq imgA== X-Gm-Message-State: ACrzQf1LhTMdooWj1SqCjknhySq8CIXvB2eFwQi/SncU54f8MKKKbNci SWcbPfK1+9I6YjkNNXGkq1Y= X-Received: by 2002:a05:6512:108b:b0:4a2:a253:5a90 with SMTP id j11-20020a056512108b00b004a2a2535a90mr11868424lfg.593.1666605743714; Mon, 24 Oct 2022 03:02:23 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02:23 -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 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParamete Date: Mon, 24 Oct 2022 10:01:50 +0000 Message-Id: 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?1747563100892594341?= X-GMAIL-MSGID: =?utf-8?q?1747563100892594341?= fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 68 ++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 7b6571ba7c36..475526b73e1a 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -834,7 +834,9 @@ static void 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 */ @@ -873,7 +875,11 @@ static void 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, @@ -959,50 +965,70 @@ 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 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; From patchwork Mon Oct 24 10:01:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 8298 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp357950wru; Mon, 24 Oct 2022 03:07:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Z3ORQh2TxHNHg3OVl0ZXjWXqEASnTTofvvmfqnSMQeaV6f1oC21ve89s/MTSW/6ZiV5gj X-Received: by 2002:a17:90a:354:b0:20a:6867:4a2b with SMTP id 20-20020a17090a035400b0020a68674a2bmr73323160pjf.157.1666606047128; Mon, 24 Oct 2022 03:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666606047; cv=none; d=google.com; s=arc-20160816; b=I5lossxm9M8xBIfA+/P4BSaDi86zF/tVHHVtgKgH2DfNQc+TQGmvK+RHhcI2nVu4b8 x9p/up7J5Nw9AWkZWkBnta+JwiFZEf1qRR1bdRW0KL8BfAZPhPXYHr8oXMd3Qrf06FRU e2/aW3K1c319zF5cRvhIzHURzMxWbYtm0Ac9lBKB8XMAm966pAZwxUEwVKps68BG9kFp 52d8SL9ksLrmaLra7i0lk95BKlE+edQpeEBpGovuVgqYs1TtZz4ut7BBcjNAeV2SCrnX ZR+Qyi07SKMf1qodnL32zW5B3cOXL9OUN/7S4aynqC6KhHSulIqqay46q50GGDRhTPZE cDmw== 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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=vQMvc4N+V4CfGL+hWo0zHSmlwyRSc+xu4EDvhkeLsooXJxJ1dRWwo16px6mZKyMULz HxxLKZgNYl5bjZLnTDibHPkLYKOaOFxSzCx+GWnkcZr2QSUfqYHMBDjISF1FMB9PTRti JmQSKZCSTY//Npk4GY2TEhtKs92RE/wEIvzj4oOOONBFWWdzY9itssc/W3IunU64DXAX yfSzlS10WtE9yTFQSoTM6TpT4rAg1+/5Y6H9zhb60xW+HaHVjROHTUfuPb7QENhCNYdR 23xNc/R8gJVm/eGi2CAhxL+HCbZbb6hoenEm4SeKoSXDrHY5bHqWFuSYDrteKPJMP2MV +rrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nq1Q11H5; 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 j65-20020a638b44000000b0046b2ebb0a4esi31453851pge.212.2022.10.24.03.07.13; Mon, 24 Oct 2022 03:07:27 -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=nq1Q11H5; 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 S230384AbiJXKC5 (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbiJXKCd (ORCPT ); Mon, 24 Oct 2022 06:02:33 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E15F75A8B8 for ; Mon, 24 Oct 2022 03:02:32 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g12so5331875lfh.3 for ; Mon, 24 Oct 2022 03:02:32 -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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=nq1Q11H5du7gVhunvJWLyKQeRvhmbS4Uz2eP0nz++8feNXQN2mIkyEwEYVGnee7+/6 3VpVwaBT2Cz4zam03P55KzT/dT1dH03pBYnxAxq/dNZdf4glEPr3uZdPR1Bo7iZjaznR Huag/Lr81tqDMleuaKqknAAe64Ieyv4AHKS8o9FR1Ozm/12+A3iLOWHuEPsbajyck4Jd LqotuWd1t4g3eW9E5Q22C/kzonAMXOLtWXze5oCw20ZqAcfukUnymG0dkRdIZWB+n7PV qCIHscHCngi/YTt+WIEFpC9frMTWgqjXSBcwPimf2rrP8IOhHyLhXriBBMZm5Kkf5RQD G4JQ== 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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=0kiCJ/QF5w269X4rEOMfsw7+Adu7nQcHJl8VSsnjvwwikG9rPVrxk1HcUxTbnI0XA0 Qj0XHeda3pDxokaA5UvX+ZVmUkc3MPPLzNK+mlYAa29e78ebzFoZ66Xa9XqhQKfSgg4w bkU6G1Gqq/QSJB29WJoR8eGK1fLmgr/OBe8syiMDro2F+py1IUf/6FwxZM83cF5xdeIX 5oUtgxI4gzV1OJ+2oWDGNbtH4fSZkTgKFGDUtub8G8cIAs1BzTblNvD9ePUmB6qT65OV j4s/VhQu1X8stbSf34MLrWpXWbjWFvTZZDxpwPFcPDdywSp+JJ5+kM+V7ISut2A3MDUH 7yGA== X-Gm-Message-State: ACrzQf1+OxW7YjE3KEJfOGI7XjbWX/ZzQggWfwumqXisYSVVhbQLHd/i 2Xi6qtjtiULVL1HDBQHqe5U= X-Received: by 2002:ac2:5dc5:0:b0:4a6:3193:582 with SMTP id x5-20020ac25dc5000000b004a631930582mr8585481lfq.236.1666605752278; Mon, 24 Oct 2022 03:02:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02:31 -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 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Date: Mon, 24 Oct 2022 10:01:52 +0000 Message-Id: <43693eef6afe24973ed28f8b26e2d5117f5d35f1.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?1747563102391398476?= X-GMAIL-MSGID: =?utf-8?q?1747563102391398476?= join unnecessary split lines to avoid them ending in '(' Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 6a4fcb16b674..d585435520b3 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1118,7 +1118,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + + pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + @@ -1296,10 +1296,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); @@ -1470,9 +1468,9 @@ 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)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, 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); @@ -1486,9 +1484,9 @@ 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)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, 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);